Skip to content
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

Add CI-automated Windows installer based on Inno Setup #3601

Merged
merged 1 commit into from
Nov 11, 2020

Conversation

kinke
Copy link
Member

@kinke kinke commented Oct 27, 2020

With the option to add the bin dir to the current user's PATH, choosing x64 and/or x86 libraries, and optionally opening README.txt after installation.

An uninstaller is generated and accessible from 'add/remove programs'.

The major.minor version part (or first 8 commit hash chars for CI builds) constitute the 'app ID' - v1.24.1 upgrades v1.24.0, but
v1.25.0-beta1 is a separate 1.25 family installed side-by-side.

Also reflect installed LDC versions in (the 32-bit view of) the registry - e.g., key HKLM\SOFTWARE\LDC\1.24 with values InstallationFolder and Version (1.24.0).

image
image
image
image

@kinke kinke force-pushed the installer branch 4 times, most recently from 88f4e16 to 70b46e3 Compare October 27, 2020 18:39
With the option to add the bin dir to the current user's PATH, choosing
x64 and/or x86 libraries, and optionally opening README.txt after
installation.

An uninstaller is generated and accessible from 'add/remove programs'.

The major.minor version part (or first 8 commit hash chars for CI
builds) constitute the 'app ID' - v1.24.1 upgrades v1.24.0, but
v1.25.0-beta1 is a separate 1.25 family installed side-by-side.

Also reflect installed LDC versions in (the 32-bit view of) the
registry - e.g., key HKLM\SOFTWARE\LDC\1.24 with values
`InstallationFolder` and `Version` ("1.24.0").
@kinke
Copy link
Member Author

kinke commented Oct 29, 2020

Should also be nice to integrate in other projects via /VERYSILENT [/CURRENTUSER] [/DIR="C:\bla"] - no need for a 7z unpacker.

@rainers: What do you think?

@rainers
Copy link
Contributor

rainers commented Oct 31, 2020

Should also be nice to integrate in other projects via /VERYSILENT [/CURRENTUSER] [/DIR="C:\bla"] - no need for a 7z unpacker.

@rainers: What do you think?

Does this automatically work with Inno-Setup? Sounds nice, but I'd probably stay with the 7z files for Visual D for now. A 7za.dll is also used to unpack dmd.

BTW: Your install script looks a lot cleaner than the mess that NSIS needs, but maybe the current task is also simpler.

The major.minor version part (or first 8 commit hash chars for CI builds) constitute the 'app ID' - v1.24.1 upgrades v1.24.0, but
v1.25.0-beta1 is a separate 1.25 family installed side-by-side.

It might get confusing when setting the PATH variable multiple times.

Maybe it would be worth avoiding to have LDC installed both by the installer and Visual D. If you want to be compatible with how Visual D updates the compilers: it unpacks the multilib 7z-files into a user specified root folder, which results in "c:\D\ldc2-1.24.0-windows-multilib", for example. That doesn't look as clean as "LDC 1.24", though.

@kinke
Copy link
Member Author

kinke commented Oct 31, 2020

Does this automatically work with Inno-Setup? Sounds nice, but I'd probably stay with the 7z files for Visual D for now. A 7za.dll is also used to unpack dmd.

Sure, if you need a 7za.dll anyway, then keep on using the .7z, it's something like 15% (~8 MB) smaller.

BTW: Your install script looks a lot cleaner than the mess that NSIS needs, but maybe the current task is also simpler.

Years ago, I went with Inno for another project, and remembered it as way simpler than NSIS and WiX at the time, at least for simple setups like this. With the DelphiScript support it's also quite powerful for more complex tasks.

It might get confusing when setting the PATH variable multiple times.

Each new install prepends it and thus takes precedence (unless it's already in user PATH). And removes it when uninstalling. So you can give v1.25.0-beta1 a try and use it as default compiler; if the code needs 2.095 adaptations you don't want to get into, you can uninstall it and use the previous version as default compiler again.

Maybe it would be worth avoiding to have LDC installed both by the installer and Visual D.

Yes, that's why I've added the registry stuff here, so that you can auto-detect installed versions.

@kinke kinke merged commit 4b3a640 into ldc-developers:master Nov 11, 2020
@kinke kinke deleted the installer branch November 11, 2020 23:49
@kinke kinke mentioned this pull request Jun 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants