Skip to content

Commit 3689633

Browse files
committed
Clarify the portable-upgrade procedure
1 parent 5619ff2 commit 3689633

File tree

1 file changed

+35
-11
lines changed

1 file changed

+35
-11
lines changed

content/docs/upgrading.md

Lines changed: 35 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ If there is a new version, the Updater dialog will allow you to choose:
3232
Going to the main website and downloading the latest installer and running it yourself. You can watch the [Announcements](https://community.notepad-plus-plus.org/category/1/announcements) category in the [Notepad++ Community Forum](https://community.notepad-plus-plus.org/) to see when new release-candidates or final versions are released.
3333

3434
<a name="new-version-available-but-auto-updater-find-nothing" reasonLink="https://github.com/notepad-plus-plus/wingup/blob/21e375caf17360fb86f757612052d5a785261d96/src/winmain.cpp#L780" reasonDesc="wingup links to this anchor, so it needs to always exist, even though the safety-delay header has been rephrased"></a>
35+
3536
## No New Version Found: Safety Delay
3637

3738
There are two reasons that would cause there to be no new version found during an auto-triggered upgrade check or an on-demand upgrade check:
@@ -54,31 +55,54 @@ If you have a portable edition of Notepad++, unzipping the contents from the new
5455

5556
1. Starting condition:
5657
- Your original installation is in `c:\PortableNpp\`
58+
- For these instructions, this is assumed to be where you want the upgraded copy of Notepad++ to end up.
59+
- These instructions will refer to this as "the Destination".
5760
- You have the ComparePlus plugin, or otherwise understand how to compare contents of similar files
5861
- You have read and understood the [Online UserManual section on Editing Configuration Files](https://npp-user-manual.org/docs/config-files/#editing-configuration-files)
5962
- Make sure you have recently exited Notepad++ and restarted it, without having made any configuration changes in the GUI since restarting it, as per "Editing Configuration Files".
60-
2. Unzip the new portable zipfile into `c:\PortableNpp.new\`
61-
3. Compare each of the following configuration files. Look for any settings that are in the New but not in the Old, and copy them over.
62-
- **Optional**: For some, the updates in the configuration files usually just give access to new features which you might not care about (like a new right-click menu action); in that case, it is up to you to decide whether you want to bring over the new features or not.
63-
- **Overwrite**: For these configuration files, users rarely customize them. Unless you know that you have, it's generally safe to just overwrite it with the new copy.
64-
- **Model**: For these configuration files, you will be comparing your raw file with the new `.model.` version. These are files that are often customized, so when you are comparing, you will want to be careful to bring over the new features (things that are in the new `.model.`) without getting rid of your customizations.
65-
66-
| Old (`c:\PortableNpp\...`) | New (`c:\PortableNpp.new\...`) | Notes |
63+
2. Unzip the new portable zipfile into `c:\PortableNpp.temp\`
64+
- This is just being used to temporarily store the new version of Notepad++.
65+
- These instructions will refer to this as the "Temporary" version.
66+
3. Compare each of the following configuration files. Look for any settings that are in the "Temporary" but not in the "Destination", and copy those settings over inside each file.
67+
- If you find a config file that exists in the "Temporary" but not in the "Destination", and it's not listed below, it could be a new configuration file that these instructions haven't been updated to include that, so you should copy that file over.
68+
- **Key**:
69+
- **Compare**: `config.xml` should always be compared, to make sure old choices are kept and new options are included.
70+
- **Keep**: The `session.xml` file and `backup\` folder's files should always be kept in your "Destination" directory. Do not overwrite them or delete them. (The "Temporary" directory from the Portable unzip will not include that file or directory, but they are included in this list so you don't accidentally delete or overwrite them.)
71+
- **Optional**: For some config files, the updates usually just give access to new features which you might not care about (like a new right-click menu action); in that case, it is up to you to decide whether you want to bring over the new features or not.
72+
- **Overwrite**: For these configuration files, users rarely customize them. Unless you know that you have, it's generally safe to just overwrite it with the new copy. If you know you have customized them (for example, if you've customized your chosen Theme in the Style Configurator¹), you will need to compare them and merge.
73+
- **Model**: For these configuration files, you will be comparing your raw "Destination" file with the new `.model.` version in the "Temporary" location. These are files that are often customized, so when you are comparing, you will want to be careful to bring over the new features (things that are in the new `.model.`) without getting rid of your customizations. The `.model.` files should also be copied over into the "Destination" directory.
74+
- **Zero-byte file**: These configuration files are 0 bytes. If your "Destination" does not have the file, it can be copied from the "Temporary" to the "Destination".
75+
76+
| Destination (`c:\PortableNpp\...`) | Temporary (`c:\PortableNpp.temp\...`) | Notes |
6777
|-----|-----|-------|
68-
| `...\config.xml` | `...\config.xml` | |
78+
| `...\config.xml` | `...\config.xml` | Compare |
79+
| `...\session.xml` | _(does not exist)_ | Keep |
80+
| `...\backup\*.*` | _(does not exist)_ | Keep |
6981
| `...\contextMenu.xml` | `...\contextMenu.xml` | Optional |
7082
| `...\shortcuts.xml` | `...\shortcuts.xml` | Optional |
7183
| `...\toolbarIcons.xml` | `...\toolbarIcons.xml` | Optional |
7284
| `...\langs.xml` | `...\langs.model.xml` | Model |
7385
| `...\stylers.xml` | `...\stylers.model.xml` | Model |
86+
| `...\*_example.xml` | `...\*_example.xml` | Overwrite |
7487
| `...\themes\___.xml` | `...\themes\____.xml` | Overwrite ¹ |
7588
| `...\autoCompletion\___.xml` | `...\autoCompletion\____.xml` | Overwrite |
7689
| `...\localization\___.xml` | `...\localization\____.xml` | Overwrite |
7790
| `...\functionList\___.xml` | `...\functionList\____.xml` | Overwrite |
7891
| `...\userDefineLangs\___.xml` | `...\userDefineLangs\____.xml` | Overwrite |
92+
| `...\updater\*.*` | `...\updater\*.*` | Overwrite |
93+
| `...\change.log` | `...\change.log` | Overwrite |
94+
| `...\license.txt` | `...\license.txt` | Overwrite |
95+
| `...\doLocalConf.xml` | `...\doLocalConf.xml` | Zero-byte file |
96+
| `...\nppLog*Issue.xml` | `...\nppLog*Issue.xml` | Zero-byte file |
97+
98+
- ¹: If you are using a specific theme, it's more likely that you will have customized that theme's file. Please do a full comparison on that theme file, but you can probably get away with just overwriting the other "Destination" theme files using the copies in the "Temporary" directory.
99+
100+
4. After updating the config files, then you can exit Notepad++, copy the `notepad++.exe` and `plugins\config\nppPluginList.dll` from the "Temporary" to the "Destination", and restart Notepad++ to start using your upgraded portable edition which resides in the "Destination" directory.
101+
102+
The "portable" versions of Notepad++ assume you are willing to do some things manually in order to get your true portability. If this procedure seems to complicated for you, and you would rather use something more automatic like the installer: You _can_ use the installer to put Notepad++ in any directory you want, not just in the Program Files hierarchy; and you can tell the installer that you don't want to use AppData, which will put the configuration files in the same directory that the executable goes in, which makes it _nearly_ portable (though the installer might have added hooks to make it easy for you to open files using the installed copy of Notepad++, which goes against the spirit of truly-portable software).
79103

80-
- ¹: If you are using a specific theme, it's more likely that you will have customized that theme's file. Please do a full comparison on that theme file, but you can probably get away with just overwriting the old theme files.
104+
_Note: a similar procedure can be used when you think your installed copy of Notepad++ has themes or syntax highlighting configuration that is missing compared to a fresh install or portable: in that case, you would use `%AppData%\Notepad++\____.xml` and/or `C:\Program Files\Notepad++\____.xml` as the "Destination" location, instead of using a portable directory. See [Configuration Files during Upgrades](../config-files/#configuration-files-during-upgrades)._
81105

82-
4. After updating the config files, then you can exit Notepad++, copy the `notepad++.exe` and `plugins\config\nppPluginList.dll` from the old to the new, and restart Notepad++ to start using your upgraded portable edition.
106+
## Upgrading Plugins
83107

84-
_Note: a similar procedure can be used when you think your installed copy of Notepad++ has themes or syntax highlighting configuration that is missing compared to a fresh install or portable, except you would use `%AppData%\Notepad++\____.xml` and/or `C:\Program Files\Notepad++\____.xml` as the **Old** location, instead of a portable location._
108+
Neither the installer/updater nor manually upgrading your portable edition will affect your plugins, though upgrading either should update the `nppPluginList.dll` used to determine what plugins the **Plugins Admin**. After upgrading Notepad++, you should go to [**Plugins > Plugins Admin > Updates**](../plugins/#install-using-plugins-admin) to check to see if any of your plugins should be updated. (To clarify: The installer may also update any of the default plugins, including NppExport, NppConverter, and MIME Tools; however, if you don't use the installer, those can be upgraded using **Plugins Admin**'s **Updates** tab, as well.)

0 commit comments

Comments
 (0)