Troy, I looked over the NSIS documentation more closely ... there is a LOT of new functionality since the last time I really dug into it. I think there are some standard ways of doing things that will accomplish the kind of issues you are interested in for BibleCS. (an aside: I consider nsis a wonderful piece of software ... too bad some documentation and some examples are so 'rude and crude')
Also, my impression is that BibleCS would want the following kind of actions: * If a re-install, the default installation directory for BibleCS would be its previous directory. There are standard registry entries to accomplish this. * Otherwise, if SWORD_PATH environment variable defined, use that as the default installation directory (can be over-ridden while leaving SWORD_PATH environment variable the same) * If SWORD_PATH environment variable not defined, use the following as the default installation directory $PROGRAMFILES\CrossWire\The SWORD Project and set SWORD_PATH to this value. If the end-user changed the default installation directory, set SWORD_PATH to correspond (or do you want to use "The SWORD Project for Windows" as now used in setup.ini?) * Typically, the SWORD_PATH would be the same of the "home directory" for BibleCS, but they can be separate. In that case, BibleCS would resolve the location of the resources using SwMgr to check local subdirectories and SWORD_PATH. If SWORD_PATH wasn't defined, then BibleCS would expect to find resources in mods.d and modules in standard relative positions in subdirectories "beneath" the installation directory of BibleCS. * Do you want to have the InstallManager.exe installed? That makes the download larger ... should it be separate? The uninstaller portion can check if it is available so as to do a thorough uninstall of the modules. Otherwise, the default uninstaller generated by nsis can be set-up to "blow-away" the subdirectories (with confirmation as appropriate) * Do you prefer to use "old-style 1.x" scripting, eclipse-style, or scripting compatible with the 2.0 gui-generated wizard. The setup.nsi looks a LOT different from what I am used to, especially the macros. * Is there a relatively new file InstallManager.exe, or should the reference in setup.ini be InstallMgr.exe? ----- Original Message ----- From: "Lynn Allan" <[EMAIL PROTECTED]> To: "SWORD Developers' Collaboration Forum" <[email protected]> Sent: Thursday, September 22, 2005 4:07 PM Subject: Re: [sword-devel] BibleCS Installer > Troy, > > I tweaked an existing nsis 1.x script for a prototype > LcdBibleStarterKit to accomplish the kinds of things I think you are > asking about. It may serve as an example of nsis techniques to > accomplish certain things. When the end-user finishes the > installation, the .onInstSuccess standard nsis function is used to > invoke InstallManager.exe When the end-user uninstalls the > application, there are stubs to show how to query for deleting files > (not really how this would be done ... just to illustrate), and then > the un.onUninstSuccess nsis standard function is invoked to once again > run InstallManager.exe > http:\\lcdbible.sf.net\misc\LcdBibleStarterKitSetup.nsi > > An setup from the above file that loads LcdBible and optionally WEB > and KJV is at: > http:\\lcdbible.sf.net\download\LcdBibleStarterKitSetup_beta_130k.exe > > This is only to serve as an example of things you can do ... it should > deal better with SWORD_PATH for $INSTDIR, and doesn't yet use the > InstallManager.exe appropriately. It does seem to do what you asked > about. (Use the above StarterKit with caution ... it should be 'well > behaved', but is only a prototype and could potentially clobber an > existing BibleCS installation) > > By the way, it is easier/quicker to get nsis scripts working with > small "stub" programs for sword.exe, icu*.dll, and InstallManager.exe > > ----- Original Message ----- > From: "Troy A. Griffitts" <[EMAIL PROTECTED]> > To: "SWORD Developers' Collaboration Forum" > <[email protected]> > Sent: Thursday, September 22, 2005 1:28 PM > Subject: Re: [sword-devel] BibleCS Installer > > > > Lynn, > > I've not looked at the installer since I sent the email. I would > LOVE > > for your help on this. I only used the eclipse wizard to get me > > started. They also supply a highlighting code editor and popup hint > > help for NSIS functions. > > > > Thanks for your input! > > > > -Troy. > > > > > > > > Lynn Allan wrote: > > > Troy, > > > > > > I've used the NSIS installer a fair amount, although with "native > 1.x" > > > scripting rather than with Eclipse. I was able to get setup.nsi to > > > compile and run, and wanted to check if you have resolved your > > > questions before looking closer. > > > > > > > > >>There are a few things missing: > > >> Launch Readme.txt and wait for close BEFORE launching > > > > > > InstallManager.exe > > > > > > NSIS has the .onInstSuccess standard routine that may help. You > may > > > want to invoke InstallManager.exe with this (below code also > > > illustrates dealing with SWORD_PATH environment variable): > > > > > > Function .onInstSuccess > > > ClearErrors > > > ReadEnvStr $R0 SWORD_PATH > > > MessageBox MB_OK "LcdBible ver ${VERSION_DISPLAY} > (${DATE_DISPLAY}) > > > \ > > > $\r$\nMini Tutorial for new users: \ > > > $\r$\n1. *********** LcdBible info goes here > *******************. \ > > > $\r$\nFeedback appreciated: LcdBible_at_yahoogroups.com \ > > > $\r$\nSWORD_PATH should be set. Currently = $R0 \ > > > $\r$\n \ > > > $\r$\nLcdBible will start as soon as you click on the 'OK' > button.\ > > > $\r$\nEnjoy! LcdBible is 'freeware' (no charge)" > > > Exec $INSTDIR\LcdBible.exe > > > FunctionEnd > > > > > > > > >> Registry keys correct so Windows Module self-installers > > > > > > (website, > > > > > >>module download, windows) know where to unzip themselves. > > >> Uninstaller successfully launching > "$INSTDIR/InstallManager.exe > > >>-uninstall" to uninstall all modules > > > > > > > > > Are these still unresolved? I can perhaps help ... also, there is > an > > > extraordinarily active and helpful NSIS installer forum that I've > > > found incredibly valuable. > > > http://forums.winamp.com/forumdisplay.php?s=&forumid=65 > > > > > > > > > _______________________________________________ > > > sword-devel mailing list: [email protected] > > > http://www.crosswire.org/mailman/listinfo/sword-devel > > > Instructions to unsubscribe/change your settings at above page > > > > _______________________________________________ > > sword-devel mailing list: [email protected] > > http://www.crosswire.org/mailman/listinfo/sword-devel > > Instructions to unsubscribe/change your settings at above page > > > > > _______________________________________________ > sword-devel mailing list: [email protected] > http://www.crosswire.org/mailman/listinfo/sword-devel > Instructions to unsubscribe/change your settings at above page > _______________________________________________ sword-devel mailing list: [email protected] http://www.crosswire.org/mailman/listinfo/sword-devel Instructions to unsubscribe/change your settings at above page
