-
Notifications
You must be signed in to change notification settings - Fork 144
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NSIS installer for Windows #474
Conversation
Having MSYS2 packages is nice, but there are those weird Windows devs who insist on building their software using native Windows tools like Microsoft Visual Studio instead of building everything in MSYS. There are also other environments like Node.js which insist on using Visual Studio toolchain on Windows. Let's provide them with a way to install Themis into system so that they can build their software the way they want to. NullSoft Scriptable Install System is a venerable and straightforward installation toolkit. Moreover, it's available in MSYS so it's very easy to integrate into our build system. Provide an initial script for building an installer and a makefile target "nsis_installer" which produce "InstallThemis.exe" in the build directory. Piggyback on the "make install" target to figure out what files need to be distributed. Include our licensing information as well. Alsso include MSYS2 runtime libraries which are necessary to use Themis outside of MSYS2.
VIAddVersionKey "CompanyName" "Cossack Labs Limited" | ||
VIAddVersionKey "LegalCopyright" "(c) Cossack Labs Limited" | ||
VIAddVersionKey "FileDescription" "Themis library installer" | ||
VIAddVersionKey "FileVersion" "0.11.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need add to our checklist for releases where we will need to update version. maybe place here some placeholder and set correct version before using this file?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks very good.
But I'd suggest to test this PR on our CI with all other supported OS.
@makensis Themis.nsi | ||
@rm -r "$(BIN_PATH)/install" | ||
|
||
FORCE: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what means FORCE
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This empty target forces the installer to be rebuilt when make nsis_installer
is run. Otherwise make sees that InstallThemis.exe
already exists in the build directory and does not need to be updated.
Ideally, we should not be calling make install
recursively. The nsi script could copy the binaries from the build directory and header files from the repo. This will allow us to accurately track the dependencies for make so that repeated make nsis_installer
runs will rebuild the binaries and the installer only when necessary.
However, that would mean that we'd have to maintain two separate lists of installed files. Recently we have unified RPM and DEB packaging to use make install
instead of their own lists. I think that we'd be better off just using make install
everywhere.
Since NSIS scripts are Windows- and MSYS-specific, produce a nice error message if the users try running "make nsis_installer" in non-MSYS environment (e.g., on their macBook, or in a regular terminal on Windows without proper environment configuration).
Having MSYS2 packages is nice, but there are those weird Windows devs who insist on building their software using native Windows tools like Microsoft Visual Studio instead of building everything in MSYS. There are also other environments like Node.js which insist on using Visual Studio toolchain on Windows. Let's provide them with a way to install Themis into system so that they can build their software the way they want to.
NullSoft Scriptable Install System is a venerable and straightforward installation toolkit. Moreover, it's available in MSYS so it's very easy to integrate into our build system. Provide an initial script for building an installer and a makefile target
nsis_installer
which produces InstallThemis.exe in the build directory. Piggyback on themake install
target to figure out what files need to be distributed. Include our licensing information as well. Also include MSYS2 runtime libraries which are necessary to use Themis outside of MSYS2.We get these cool Win95-style installers as a reward: