You are here

[Notepad++Portable] How to install other plugins ?

12 posts / 0 new
Last post
bgillis
bgillis's picture
Offline
Last seen: 4 years 5 months ago
Joined: 2007-05-11 04:25
[Notepad++Portable] How to install other plugins ?

If anybody need to install a notepad++ plugin (available here) in the non-portable version of notepad++, he usually has to unzip the plugin dlls in "plugins" folder of notepad++ root folder. If the plugin has specific settings, these settings will be saved in an ".ini" file in notepad++ root folder or in "plugins\config\" folder.

Now I'd like to follow the same procedure with the portable version of notepad++. I've unzipped all the dlls in folder "App\Notepad++\plugins". But then, the settings are saved in "App\Notepad++" or in "App\Notepad++\plugins\config" instead of "Data\settings" or "Data\settings\plugins\config".

So... is there any way to force the saving of plugin settings in the correct folder ? Or does .nsi script of notepad++portable.exe need to be updated to add support for extra plugins ?

Thanks for your help,

Bertrand

Simeon
Simeon's picture
Offline
Last seen: 10 years 2 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
My Notepad

has a plugins folder within /Notepad++Portable/Data/settings.
In that folder there is a ini file and another folder called config.

If you dont have these folders, try creating them, moving your plugins over and see whether it works.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

bgillis
bgillis's picture
Offline
Last seen: 4 years 5 months ago
Joined: 2007-05-11 04:25
Well...

I do have the following folders and files in my Notepad++Portable folder:

- /Data/settings
   - Notepad++PortableSettings.ini
   - config.xml
   - contextMenu.xml
   - session.xml
   - shortcuts.xml
   - stylers.xml
- /Data/settings/plugins
   - NPPTextFX.ini
- /Data/settings/plugins/config
   - compare.ini
   - explorer.ini
   - favorites.dat
   - ftp_synchronizera.ini
   - hexeditor.ini
   - nppexec.ini
   - nppexport.ini
   - spellchecker.ini
   - wndmgr.ini

All that is normal because these files are preconfigured in the .nsi script of notepad++portable.exe for the following plugins located by default in

- /App/notepad++/plugins
  - compareplugin.dll
  - explorer.dll
  - ftp_synchronizera.dll
  - hexeditor.dll
  - nppexec.dll
  - nppexport.dll
  - npptextfx.dll
  - npptools.dll
  - spellchecker.dll

Unfortunately, if I add new plugin dlls in folder /Data/settings/plugins these plugins are not loaded by notepad++. If I add new plugin dlls in folder /App/notepad++/plugins these plugins are loaded by notepad++ but corresponding .ini files are saved in folder /App/notepad++/plugins or /App/notepad++/plugins/config instead of folder /Data/settings/plugins or /Data/settings/plugins/config.

Simeon
Simeon's picture
Offline
Last seen: 10 years 2 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
Youre right

After taking a look at the launcher source I saw that Johns Launcher moves the plugins and handles the changing drive letter in the plugins inifile.
Guess you have to recompile the launcher.
But maybe John comes up with a better way.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 42 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Config

Plugins are installed, as usual, to Notepad++\plugins. In Notepad++ Portable, this folder is at Notepad++Portable\App\Notepad++\plugins.

Newer Notepad++ plugins save their settings within Notepad++\plugins\config. This folder is moved to Notepad++\Data\settings on exit, so it will be backed up by the PortableApps.com Backup program. Some older plugins still drop INIs in the root Notepad++ folder. These will still work, but their settings won't be backed up by the backup routine unless you select complete backup.

At the moment, there's no easy workaround, though I'm working on one for the next release of Notepad++ Portable.

Sometimes, the impossible can become possible, if you're awesome!

bgillis
bgillis's picture
Offline
Last seen: 4 years 5 months ago
Joined: 2007-05-11 04:25
Thanks John

for the explanation... So I will wait the next release of notepad++portable before installing other plugins.

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 42 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
You Can Use Them Now

You can use them now without issue. It's just that their config files for the old ones won't be backed up unless you do a full backup. Shouldn't be a big deal for many of the older plugins as in the off chance you do lose a drive or have a crash and haven't done a full backup, they're pretty easy to reconfigure.

Sometimes, the impossible can become possible, if you're awesome!

haustin
Offline
Last seen: 13 years 3 months ago
Joined: 2007-09-19 17:59
anomaly after upgrade to 4.8 then 4.8.1

I somehow ended up with an uppercase App\Notepad++\plugins\Config and a lowercase Data\settings\plugins\config.

Because of the existing (empty) target directory, Notepad++Portable.nsi:298 silently fails:

Rename "$PROGRAMDIRECTORY\plugins\config" "$SETTINGSDIRECTORY\plugins\config"

...leaving the source directory intact. After manually deleting Data\settings\plugins\config, the launcher works as expected.

Unfortunately, I no longer have the previous 2 launchers, so I can't try to reproduce the problem.

If it were to happen in the wild, it seems a logical way to handle it would be to replace Lines 193-195:

    Rename "$SETTINGSDIRECTORY\plugins\config" "$PROGRAMDIRECTORY\plugins\config"
    Rename "$SETTINGSDIRECTORY\plugins\NPPTextFX.ini" "$PROGRAMDIRECTORY\plugins\NPPTextFX.ini"
    Rename "$SETTINGSDIRECTORY\plugins\NPPTextFX\TIDYCFG.INI" "$PROGRAMDIRECTORY\plugins\NPPTextFX\TIDYCFG.INI"

with something like:

    Rename "$SETTINGSDIRECTORY\plugins\NPPTextFX.ini" "$PROGRAMDIRECTORY\plugins\NPPTextFX.ini"
    Rename "$SETTINGSDIRECTORY\plugins\NPPTextFX\TIDYCFG.INI" 
;Lines 194-195 moved up
    IfFileExists "$PROGRAMDIRECTORY\plugins\config" "" MoveConfigDir
        CopyFiles /SILENT "$SETTINGSDIRECTORY\plugins\config\*.*" "$PROGRAMDIRECTORY\plugins\config"
        RMDir /r "$SETTINGSDIRECTORY\plugins\config"
        Goto Line196
MoveConfigDir:
    Rename "$SETTINGSDIRECTORY\plugins\config" "$PROGRAMDIRECTORY\plugins\config"
Line196:
    ;Other INIs from older plugins

Of course, since I've never seen NSIS code before and I've not read the docs, I imagine I've made gross syntactical and tactical errors. Smile

The idea was to give precedence to settings saved under Data, remove the failure triggering condition, and impact "normal" launches as little as possible.

Hope this helps. -hea

P.S. I think I'll go donate again.

Simeon
Simeon's picture
Offline
Last seen: 10 years 2 months ago
DeveloperTranslator
Joined: 2006-09-25 15:15
If

you want to get deeper into this you can download the older packeger here. But if you install an older copy it is wise to make a copy of the existing Notepad++Portable folder as backup.

"What about Love?" - "Overrated. Biochemically no different than eating large quantities of chocolate." - Al Pacino in The Devils Advocate

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 42 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Revision 2

Thanks for catching that, it got through my testing. I've posted revision 2 which will combine these directories.

Sometimes, the impossible can become possible, if you're awesome!

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 42 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Support Added in 4.8.1

I added support for the older-style Notepad++ config files into the new 4.8.1 release.

Sometimes, the impossible can become possible, if you're awesome!

bgillis
bgillis's picture
Offline
Last seen: 4 years 5 months ago
Joined: 2007-05-11 04:25
Perfect!

Thanks John... everything is working perfectly now Wink

Log in or register to post comments