A script to create a setup for each plugin

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: Hacker, petermad, Stefan2, white

User avatar
fabiochelly
Power Member
Power Member
Posts: 603
Joined: 2003-02-05, 12:03 UTC
Location: Rambouillet, France

A script to create a setup for each plugin

Post by *fabiochelly »

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
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
icfu
Power Member
Power Member
Posts: 6052
Joined: 2003-09-10, 18:33 UTC

Post by *icfu »

Excellent work! Now let's hope that all plugin authors will use it. :)

Icfu
This account is for sale
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

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,
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
Ergo
Senior Member
Senior Member
Posts: 204
Joined: 2003-02-05, 12:20 UTC
Location: Belarus
Contact:

Post by *Ergo »

2djk
Great idea, of course if as said icfu plugins authors will use it, I hope wthe will.
I think they will. I already posted this news to Russian Total Commander Plugring Group.

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!
Wincmd.ru WWW.TOTALCMD.NET
I see that future is near...
User avatar
djk
Power Member
Power Member
Posts: 1651
Joined: 2003-03-17, 11:33 UTC
Location: Poland
Contact:

Post by *djk »

Ergo wrote:I think they will. I already posted this news to Russian Total Commander Plugring Group.
I've seen :-)

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.
DJK
Totally addicted to Total Commander
totalcmd.pl
en.totalcmd.pl
User avatar
fabiochelly
Power Member
Power Member
Posts: 603
Joined: 2003-02-05, 12:03 UTC
Location: Rambouillet, France

Post by *fabiochelly »

I suppose it will be possible (is it now?) to add not only main plugin file but also other files (.ini, .lng, readme).
You just have to specify each file to install in the same way as the main file.
What about displaying readme after installation - you know some plugins need some additional libraries etc
Everything is possible and easy to add with NSIS.
What about wcx plugins
They seem to be complicated to install.
There are other parameters than the plugin path or name and I don't know how to find them.
will user be able to decide to which extension associate this plugin?
Yes, it works fine even if the extension is .dll or any other extension
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
User avatar
JohnFredC
Power Member
Power Member
Posts: 886
Joined: 2003-03-14, 13:37 UTC
Location: Sarasota Florida

Post by *JohnFredC »

2fabiochelly

This is another great contribution to the TC Community. Thanks!
Licensed, Mouse-Centric, moving (slowly) toward Touch-centric
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50843
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

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?
Author of Total Commander
https://www.ghisler.com
User avatar
Hacker
Moderator
Moderator
Posts: 13144
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Post by *Hacker »

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?
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.

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.
User avatar
fabiochelly
Power Member
Power Member
Posts: 603
Joined: 2003-02-05, 12:03 UTC
Location: Rambouillet, France

Post by *fabiochelly »

A) Where does it look for wincmd.ini?
I think, I considered all possibilities:

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.
So all in all it's far too complex. Maybe a better solution would be to have a special extension, e.g. .tcplugin
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.
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
User avatar
ctiberg
Member
Member
Posts: 194
Joined: 2003-10-24, 14:10 UTC
Location: Kristianstad, Sweden

Post by *ctiberg »

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..
Best regards,
Christian Tiberg
User avatar
fabiochelly
Power Member
Power Member
Posts: 603
Joined: 2003-02-05, 12:03 UTC
Location: Rambouillet, France

Post by *fabiochelly »

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.
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
User avatar
AlleyKat
Senior Member
Senior Member
Posts: 203
Joined: 2003-06-15, 10:51 UTC
Location: for personal info, see wiki
Contact:

Post by *AlleyKat »

:shock: I'm SO looking forward to this! I do a reinstall of my TC every once a year or so, absolutely from scratch, generally in connection with reinstalling my windows - then it's time for a serious update of the plugins, too. ;)

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. :D
Translate your favorite Mozilla Extension ~ Your Language Is Important Too.
#tcmd on irc.freenode.net - the place to idle
User avatar
ctiberg
Member
Member
Posts: 194
Joined: 2003-10-24, 14:10 UTC
Location: Kristianstad, Sweden

Post by *ctiberg »

The trouble with NSIS, at least last time I looked, is - IMHO of course - that it doesn't follow the 'standard' look&feel for installers set by WISE, InstallShield etc. InnoSetup does more or less, so it's my choice for freeware stuff until I find something else :)
Best regards,
Christian Tiberg
User avatar
fabiochelly
Power Member
Power Member
Posts: 603
Joined: 2003-02-05, 12:03 UTC
Location: Rambouillet, France

Post by *fabiochelly »

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
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
Post Reply