A script to create a setup for each plugin
Moderators: Hacker, petermad, Stefan2, white
- fabiochelly
- Power Member
- Posts: 603
- Joined: 2003-02-05, 12:03 UTC
- Location: Rambouillet, France
A script to create a setup for each plugin
I just finished a script for NSIS (Nullsoft Install System) which can create an automatic setup for your plugins (WFX or WLX).
The script creates self exe setup which will automatically install your plugin and register it in the Total Commander ini file.
The exe header is only 35 KB.
And as this script use the incredible LZMA compression, you'll get almost everytime a smaller setup.exe than a standard zip archive containing all your files.
You can download it here (4 KB):
http://www.chelly.net/tcplugin.zip
or here:
http://totalcommander.free.fr/fabio/tcplugin.zip
Here is a screenshot of the result setup.exe:
Image: http://www.chelly.net/disk/tcplugin.png
The script creates self exe setup which will automatically install your plugin and register it in the Total Commander ini file.
The exe header is only 35 KB.
And as this script use the incredible LZMA compression, you'll get almost everytime a smaller setup.exe than a standard zip archive containing all your files.
You can download it here (4 KB):
http://www.chelly.net/tcplugin.zip
or here:
http://totalcommander.free.fr/fabio/tcplugin.zip
Here is a screenshot of the result setup.exe:
Image: http://www.chelly.net/disk/tcplugin.png
Last edited by fabiochelly on 2004-03-16, 16:34 UTC, edited 2 times in total.
Fabio Chelly.
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
Great idea, of course if as said icfu plugins authors will use it, I hope wthe will.
I haven't tried it yet but I'd like to see in it (of course if it's possible) such things:
- it could read from for example tcplugin.ini file last used folder for plugins - separately for each type of plugins. Of course I know that people use different folders for plugin installation - some of them put them all to one common folder, other (like me) create separate folders for different types of plugins and create separate folder for each plugin inside (eg. D:\totalcmd\FileSystem Plugins\Versions\), etc.
- It should use optionally %Commander_path% variable,
- It should be multilingual,
I haven't tried it yet but I'd like to see in it (of course if it's possible) such things:
- it could read from for example tcplugin.ini file last used folder for plugins - separately for each type of plugins. Of course I know that people use different folders for plugin installation - some of them put them all to one common folder, other (like me) create separate folders for different types of plugins and create separate folder for each plugin inside (eg. D:\totalcmd\FileSystem Plugins\Versions\), etc.
- It should use optionally %Commander_path% variable,
- It should be multilingual,
2djk
Now pages for NSIS scripts are
English: http://www.totalcmd.net/plugring/nsis_scripts.html
Russian: http://www.wincmd.ru/plugring/nsis_scripts.html
2Fabio
Thanks for great idea. One more step to make Total Commander even more popular!
I think they will. I already posted this news to Russian Total Commander Plugring Group.Great idea, of course if as said icfu plugins authors will use it, I hope wthe will.
Now pages for NSIS scripts are
English: http://www.totalcmd.net/plugring/nsis_scripts.html
Russian: http://www.wincmd.ru/plugring/nsis_scripts.html
2Fabio
Thanks for great idea. One more step to make Total Commander even more popular!
I've seenErgo wrote:I think they will. I already posted this news to Russian Total Commander Plugring Group.

2fabiochelly
It really works

I suppose it will be possible (is it now?) to add not only main plugin file but also other files (.ini, .lng, readme).
What about displaying readme after installation - you know some plugins need some additional libraries etc.
What about wcx plugins - will user be able to decide to which extension associate this plugin?
Anyway, good job, thanks.
- fabiochelly
- Power Member
- Posts: 603
- Joined: 2003-02-05, 12:03 UTC
- Location: Rambouillet, France
You just have to specify each file to install in the same way as the main file.I suppose it will be possible (is it now?) to add not only main plugin file but also other files (.ini, .lng, readme).
Everything is possible and easy to add with NSIS.What about displaying readme after installation - you know some plugins need some additional libraries etc
They seem to be complicated to install.What about wcx plugins
There are other parameters than the plugin path or name and I don't know how to find them.
Yes, it works fine even if the extension is .dll or any other extensionwill user be able to decide to which extension associate this plugin?
Fabio Chelly.
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
- ghisler(Author)
- Site Admin
- Posts: 50843
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
Some questions:
A) Where does it look for wincmd.ini? The location isn't so easy to determine:
1. From Registry unter HKEY_CURRENT_USER
2. From Registry unter HKEY_LOCAL_MACHINE
3. If the path in them shows .\wincmd.ini, in the TC program directory (determine also from registry)
4. If the two keys are missing, in the Windows dir (or ask user because he may be using the /i= parameter...
B) Where does it place the plugins? The TC dir? It may be read only.
So all in all it's far too complex. Maybe a better solution would be to have a special extension, e.g. .tcplugin, which when double clicked in TC would auto-install the plugin. What do you think?
A) Where does it look for wincmd.ini? The location isn't so easy to determine:
1. From Registry unter HKEY_CURRENT_USER
2. From Registry unter HKEY_LOCAL_MACHINE
3. If the path in them shows .\wincmd.ini, in the TC program directory (determine also from registry)
4. If the two keys are missing, in the Windows dir (or ask user because he may be using the /i= parameter...
B) Where does it place the plugins? The TC dir? It may be read only.
So all in all it's far too complex. Maybe a better solution would be to have a special extension, e.g. .tcplugin, which when double clicked in TC would auto-install the plugin. What do you think?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
IIRC that was proposed some time ago by the users themselves. My opinion - yes, that would be nice, but with some predefined settings, like install into "%COMMANDER_PATH%\Lister Plugins\%Plugin_Name%\" for instance.So all in all it's far too complex. Maybe a better solution would be to have a special extension, e.g. .tcplugin, which when double clicked in TC would auto-install the plugin. What do you think?
Thanks
Roman
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
- fabiochelly
- Power Member
- Posts: 603
- Joined: 2003-02-05, 12:03 UTC
- Location: Rambouillet, France
I think, I considered all possibilities:A) Where does it look for wincmd.ini?
Code: Select all
1. I search for the default TC install folder
- I check for the HKCU > Total Commander
- if not found, I check for the HKLM > Total Commander
- if not found, I check for the HKCU > Windows Commander
- if not found, I check for the HKLM > Windows Commander
- if not found, I go to step 5.
2. If the key has been found, I check the ini path value
- if it begins by '.\', I recreate the path by concatenating the TC path
- if it begins by %, I replace '%USERPROFILES%' by the real 'USER PROFILES' path
- otherwise, if the path contains the char '\', I use it as it is (custom folder) and if it doesn't contain any '\' in it, I concatenate the Windows folder path
3. if the keys have been found, I search in the TC ini file if the plugin has been installed
4. If the plugin has already been installed (I found it in the ini the same name -for a WFX- ot the same file -for a WLX-), I propose to install the plugin in the same folder
- otherwise I propose TCPATH\addons\PLUGIN_TYPE\PLUGIN_NAME (where PLUGIN_TYPE can be 'WLX' or 'WFX')
5. if the keys have not been found, I will propose a default path to install in the 'program files'\plugin_name\' folder
In any case, I only 'propose' the path, so if this path is readonly, the user can change it anyway.
It would be a good solution. Winamp for instance, use the same solution (a .zip file renamed to another extension associated to winamp) for their skins or any extension that has to be always in a specific folder. But they created their SuperPimp installer for the plugins because an installer is less limited as it let the user choose the path and the options for the install.So all in all it's far too complex. Maybe a better solution would be to have a special extension, e.g. .tcplugin
But I think that both solutions could be used.
Fabio Chelly.
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
Hmm... This thread started me thinking, which isn't always a good, thing 
We'll try to do a script for the InnoSetup installer, which is free and also has the ability to call external DLL's (which makes it possible to query plugins for their settings, just like TC does)..
Shouldn't be too difficult.. But this will add more to the exe than 35k, that's for sure..

We'll try to do a script for the InnoSetup installer, which is free and also has the ability to call external DLL's (which makes it possible to query plugins for their settings, just like TC does)..
Shouldn't be too difficult.. But this will add more to the exe than 35k, that's for sure..
Best regards,
Christian Tiberg
Christian Tiberg
- fabiochelly
- Power Member
- Posts: 603
- Joined: 2003-02-05, 12:03 UTC
- Location: Rambouillet, France
Before creating my setups with NSIS, I was using Innosetup.
It's a good installer but it's almost impossible to do with IS what I have done with NSIS.
Innosetup header is 200 KB, and it's not a real programming language as in NSIS.
It's a good installer but it's almost impossible to do with IS what I have done with NSIS.
Innosetup header is 200 KB, and it's not a real programming language as in NSIS.
Fabio Chelly.
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
- AlleyKat
- Senior Member
- Posts: 203
- Joined: 2003-06-15, 10:51 UTC
- Location: for personal info, see wiki
- Contact:


I like keeping things a little separate and have some order on my harddrive - I wouldn't be using TC otherwise, now would I - so I always put TC in my Program files folder. In there, I copy my (dear-as-life) toolbar, and make a subfolder for plugins (intelligently named plugins) and another folder containing my collection of single icons for the toolbar. Hmm gotta collect'em in one file, sometime.
I usually remember the ini files in the Win folder, too, but occasion I forgot - if I have to be completely straight about this, I'd prefer it to default to the TC folder instead. I usually don't give it much thought installing TC itself, even thou it asks - I guess it's a leftover, me assuming I have my usual 'total' control of the Windows folder as I used to in the 'good old days'; I hardly ever look in that folder anymore, and any program installing files into Windows itself, I always assume having to be installed from the bottom up when reinstalling a Windows (like Office, Nero, Spywareblaster etc etc). TC isn't quite like that - if I have to make a single program suggestion to mr. Ghisler, it'll be 'put that to the chosen TC folder instead by default'.
But it'd honestly be darn nice to have an installer for all the plugins, too. I'm seeing forward to all plugin authors using this method for the ease of the 'broad' public - hmm my own preference for do-it-yourself zipped files irks me to say I'd like that method, too, but - you can't stop the future. Go for it.

Translate your favorite Mozilla Extension ~ Your Language Is Important Too.
#tcmd on irc.freenode.net - the place to idle
#tcmd on irc.freenode.net - the place to idle
- fabiochelly
- Power Member
- Posts: 603
- Joined: 2003-02-05, 12:03 UTC
- Location: Rambouillet, France
You're talking about the standard UI.
Since the version 2 of NSIS, there is also the modern UI whick look like exactly other installer (a nicer I think).
I didn't use it because the header is 50 KB instead of 35 KB.
But I just need to change 2 lines of code in my script to have a modern UI installer.
Here is a screenshot:
http://www.chelly.net/disk/ebordereau.png
Since the version 2 of NSIS, there is also the modern UI whick look like exactly other installer (a nicer I think).
I didn't use it because the header is 50 KB instead of 35 KB.
But I just need to change 2 lines of code in my script to have a modern UI installer.
Here is a screenshot:
http://www.chelly.net/disk/ebordereau.png
Fabio Chelly.
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous
#60241
Lorsqu'on s'occupe d'informatique il faut faire comme les canards...
Paraître calme en surface et pédaler comme un forcené par en dessous