some time ago we had short mail conversation about the NSIS installer, because I ran into trouble getting the packing routine to work, because of problems with unlist.exe. You told me, that you have an older Windows installation in a virtual machine and in the end I proposed to create a new, more flexible installer script based on Inno Setup 5, but I never had time to do so... but now! If you'd like to try it, here is how it goes...
First, you need to install the current Inno Setup 5 Unicode installer (http://www.jrsoftware.org/isdl.php#stable) to its standard location ("C:\Program Files" or "C:\Program Files (x86)") for this to work. Current version is 5.5.9.
The main features are:
- Installer compiles under Windows 7/10 (both tested) without problems, regardles of 32 or 64 bit
- Version number extraction from valentina.exe working again (didn't work for me under Win7/10 with NSIS)
- Standard installation path is now C:/Program Files (C:/Program Files (x86) respectively on 64 bit systems) changeable by the user
- User can choose to deactivate file associations (val/vit/vst), if problems with other programs might occur
- Install task checks, if same version is currently installed and offers uninstall, if an older version was found
- Uninstall task checks, if tape.exe or valentina.exe are running, it then stops and asks user to close corresponding program if necessary
- Install script easily extendable to include additional configuration during and after install (i. e. user chosen location for patterns and measurements, etc.)
- Uninstall script also extendable, i.e. user can choose, if he'd like to remove everything or only the program itself and leave the data as is, etc.
- even downloadable extra content during install phase is possible
Regarding my change to the installation destination path:
The NSIS installer used to install the program under User %AppData%\local. I think, there are some problems with this location:
- by convention, under Windows program files are installed into c:\Program Files folder, the user shouldn't end up with program files in data folder
- under normal circumstances, %AppData%\local is hidden from the normal explorer view, so the user might have problems finding his files
- during uninstall every folder was deleted -> if you put your own measurement files or patterns inside, they got lost (happened to me more than twice!)
The attached files:
- LICENSE_VALENTINA It's the license information extracted off the end of the README.txt file. It is presented to the user before the actual install takes place. I thought it might be a good idea to especially take this license part, because there you refer to the different licenses (BSD, GPL,etc.) of some if the components Valentina depends on (QMuParser,VPropertyExplorer) inside. Further license variations can be added very easily.
- valentina.iss The actual installer file. Take a look inside, it's pretty straight forward and there are only a few parameters you actually might have to modify in future.
- valentina.pro I modified the current valentina.pro file to include the new Inno Setup packaging and removed NSIS completely as an example for you to make testing this more comfortable. You'll clearly find out what I changed if you create a diff to the current one.
Where to put the files:
- create a new dir inside "dist\win" named "inno" (besides the "nsis" directory)
- put LICENSE_VALENTINA and valentina.iss in this directory
- replace valentina.pro under "src\app\valentina" with the modified one
Fingers crossed, compile the whole thing, the installer should end up in build/package as usual.