You are here

Launchers & Installers

8 posts / 0 new
Last post
LOGAN-Portable
LOGAN-Portable's picture
Offline
Last seen: 11 years 5 months ago
Developer
Joined: 2007-09-11 12:24
Launchers & Installers

Anyone who uses the Launcher and Installer to create their own versions or adaptions finds himself besides the usual adaption, entering similar information several times.

For example, both Launcher and Installer need AppName, PortableName, ExecutableName etc.

Suggestion:

Having an AppInfo.nsh that is included in both the Launcher and Setup that contains the AppName, AppVersion and AppShortName etc. Then this is being included into the launcher and setup, using one file. Less work to update or change and less chance of typos Smile

For example when the application "My Application" uses the AppInfo.nsh where the very basics are defined. ("My Application" "1.0.0.0", "MyApplication", etc.) it can derive the portablename from that ( "${AppShortName}Portable" ) or the launcher exe name ( "${AppShortName}Portable.exe" ) or the Portable app name ( "${AppName} Portable" ) etc. So instead of updating 2 NSI files and entering variations of the name several times, I suggest using the few defines in one shared file to have all variations derived from that. Example:

Original:

!define NAME "Notepad++ExamplePortable"
!define PORTABLEAPPNAME "Notepad++ Example Portable"
!define APPNAME "Notepad++ Example"
!define VER "1.5.7.0"

Suggestion:

!define MYNAME "Notepad++Example"
!define MYLONGNAME "Notepad++ Example"

!define NAME "${MYNAME}Portable"
!define PORTABLEAPPNAME "${MYLONGNAME} Portable"
!define APPNAME "${MYLONGNAME}"
!define VER "1.5.7.0"

And having the unique defined variables in a separate file so both the installer and launcher can and will be using the same info.

Of course one may argue "its only a few lines" and "need to change the rest anyway" I think it might be a useful tip to make the entering of the info easier so people can concentrate on the important stuff right away.

Cheers.

digitxp
digitxp's picture
Offline
Last seen: 12 years 9 months ago
Joined: 2007-11-03 18:33
Looks good and easy.

I was thinking about making a command line switch to uninstall the app (A lot of people don't know what the delete key does :P)

Insert original signature here with Greasemonkey Script.

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 6 months ago
Developer
Joined: 2006-12-06 18:07
Looks like a good idea, it

Looks like a good idea, it would cut back on typos and on forgetting to change some information. Let's hope John adopts this, or at least considers it.

The developer formerly known as ZGitRDun8705

John T. Haller
John T. Haller's picture
Online
Last seen: 15 min 28 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
No Version

We couldn't include the version as many times, the app is updated... and the installer to update its version... but the launcher is not because nothing in it changed. So, we'd be left with just APPNAME, NAME and PORTABLENAME... which never really change at all.

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

LOGAN-Portable
LOGAN-Portable's picture
Offline
Last seen: 11 years 5 months ago
Developer
Joined: 2007-09-11 12:24
Of cource

Doesn't the launcher as well as the installer include the appversion? Hmm maybe I looked at an old version of the launcher. (I really thought that version was referring to the app version, not the install or launcher script version.)

I understand from an upgrade view the name doesn't change either but having made some launchers and installers myself, I had to change the name of the app 3 times in the launcher and another 3 times in the setup before even starting with the technical bits. I think having it centralized would be a good idea, even if you dont have to change it again.

The described way is only meant to make it easier to start a new app from the supplied scripts, which on its own can become tedious when you need to change basically the same info for the launcher as well as the setup. I agree if the scripts are done it doesn't change for the app if you release a new version, but seeing as you use the defines anyway for the rest of the information it's only logical to further optimize it Smile

It's not so much for your convenience rather for us average users who take an existing setup and launcher to make an application. If it saves us a few minutes of work entering very similar information over and over again (which we have to do anyway: launcher, setup, help.html and AppInfo.ini) every minute saved is a minute gained Smile If it only saves 2 minutes, it saved 20 minutes for 10 new apps Blum

But I understand your position, you only have to enter the same word (Copy/Paste) about six times for a new app. By comparison of the rest of the time spend on it it might be less than 1% of saving. But at bigger volumes it's worth a thought. Imagine the time you spend on entering the generic information of all those apps in the suite.

But the biggest gain is using !include "AppInfo.nsh" to be used by the Launcher as well as the Installer to get at least a bit of tedious work out of our hands Smile

rab040ma
Offline
Last seen: 1 week 3 days ago
Joined: 2007-08-27 13:35
The launcher includes the

The launcher includes the launcher version not the program version. Evidently only the PAF has the program version (as well as the installer vertsion) and then mainly in the filename.

MC

LOGAN-Portable
LOGAN-Portable's picture
Offline
Last seen: 11 years 5 months ago
Developer
Joined: 2007-09-11 12:24
Hmm, I just looked. I guess

Hmm, I just looked. I guess you're right.

ZachHudock
ZachHudock's picture
Offline
Last seen: 1 year 6 months ago
Developer
Joined: 2006-12-06 18:07
I understand your position,

I understand your position, but I think that even for this small amount of data, splitting it off into an appinfo.nsh is a great idea, it will keep all the changes in one central location so the launchers and installers would need less editing and in turn would eliminate or cut down on possible issues. Also, if the appinfo.nsh structure was adopted, it would be much easier to write a portable app creator that uses NSIS and keeps everything in the standard PAF format, because then the appinfo.nsh file could be created for each specific app, where doing things the in the current form would require parsing the text of an existing template and editing blocks of it at a time.

The developer formerly known as ZGitRDun8705

Log in or register to post comments