2020#define ERLANG_CSV_URL ' http://elixir-lang.org/erlang.csv'
2121
2222#include <idp.iss>
23- #include " src\ispp_inspect.iss"
2423
2524[Setup]
2625AppName = Elixir
2726AppVersion = 2.0
2827OutputBaseFilename = elixir-websetup
2928SolidCompression = yes
30- DisableWelcomePage = no
3129
3230; This installer doesn't install anything itself, it just runs other installers
3331CreateAppDir = no
3432Uninstallable = no
33+ PrivilegesRequired = lowest
3534
3635; The user will see the offline installer's finished page instead
3736DisableFinishedPage = yes
@@ -40,6 +39,7 @@ DisableFinishedPage=yes
4039SetupIconFile = assets\drop.ico
4140WizardImageFile = assets\drop_banner.bmp
4241WizardSmallImageFile = assets\null.bmp
42+ DisableWelcomePage = no
4343
4444[CustomMessages]
4545; The version string shouldn't show the version of this installer (AppVersion)
@@ -68,20 +68,20 @@ Source: "compiler:SetupLdr.e32"; DestDir: "{tmp}"; Flags: deleteafterinstall
6868
6969[Run]
7070; Run the Erlang installer if task is selected
71- Filename : " {tmp} \{#StrInspectScriptConst('GlobalErlangData.Exe32') }" ; Flags : hidewizard ; StatusMsg : " Installing {#StrInspectScriptConst('GlobalErlangData.Name32') }..." ; Tasks: erlang\32
72- Filename : " {tmp} \{#StrInspectScriptConst('GlobalErlangData.Exe64') }" ; Flags : hidewizard ; StatusMsg : " Installing {#StrInspectScriptConst('GlobalErlangData.Name64') }..." ; Tasks: erlang\64
71+ Filename : " {tmp} \{code:GetScriptString|ErlangExe32 }" ; Flags : hidewizard ; StatusMsg : " Installing {code:GetScriptString|ErlangName32 }..." ; Tasks: erlang\32
72+ Filename : " {tmp} \{code:GetScriptString|ErlangExe64 }" ; Flags : hidewizard ; StatusMsg : " Installing {code:GetScriptString|ErlangName64 }..." ; Tasks: erlang\64
7373; Extract the downloaded Precompiled.zip archive
7474Filename : " {tmp} \7za.exe" ; Parameters : " x -oelixir Precompiled.zip" ; WorkingDir : " {tmp} " ; StatusMsg : " Extracting Precompiled.zip archive..."
7575; Compile the offline installer
7676Filename : " {tmp} \ISCC.exe" ; Parameters : " /dSkipWelcome /dNoCompression Elixir.iss" ; WorkingDir : " {tmp} " ; StatusMsg : " Compiling Elixir installer..."
7777; Run the offline installer
78- Filename : " {tmp} \Output\elixir-v{#StrInspectScriptConst('CacheSelectedRelease.Version') }-setup.exe" ; Flags : nowait postinstall ; StatusMsg : " Starting Elixir installer..."
78+ Filename : " {tmp} \Output\elixir-v{code:GetScriptString|ElixirVersion }-setup.exe" ; Flags : nowait postinstall ; StatusMsg : " Starting Elixir installer..."
7979
8080[Tasks]
81- Name : " unins_previous" ; Description : " Uninstall previous version at {#StrInspectScriptConst('GetPreviousAppPath') } (Recommended)" ; Check : CheckPreviousVersionExists
81+ Name : " unins_previous" ; Description : " Uninstall previous version at {code:GetScriptString|ElixirPreviousPath } (Recommended)" ; Check : CheckPreviousVersionExists
8282Name : " erlang" ; Description : " Install Erlang" ; Check : CheckToInstallErlang
83- Name : " erlang\32" ; Description : " {#StrInspectScriptConst('GlobalErlangData.Name32') }" ; Flags : exclusive
84- Name : " erlang\64" ; Description : " {#StrInspectScriptConst('GlobalErlangData.Name64') }" ; Flags : exclusive ; Check : IsWin64
83+ Name : " erlang\32" ; Description : " {code:GetScriptString|ErlangName32 }" ; Flags : exclusive
84+ Name : " erlang\64" ; Description : " {code:GetScriptString|ErlangName64 }" ; Flags : exclusive ; Check : IsWin64
8585
8686[Code]
8787#include " src\U til.iss"
102102 GlobalErlangCSVFilePath: String;
103103
104104 CacheSelectedRelease: TElixirRelease;
105+
106+ function GetScriptString (Param: String): String;
107+ begin
108+ Result := ' ' ;
109+
110+ case (Param) of
111+ ' ErlangExe32' : Result := GlobalErlangData.Exe32;
112+ ' ErlangExe64' : Result := GlobalErlangData.Exe64;
113+ ' ErlangName32' : Result := GlobalErlangData.Name32;
114+ ' ErlangName64' : Result := GlobalErlangData.Name64;
115+ ' ElixirVersion' : Result := CacheSelectedRelease.Version;
116+ ' ElixirPreviousPath' : Result := GetPreviousAppPath();
117+ end ;
118+ end ;
105119
106120procedure CurPageChanged (CurPageID: Integer);
107121var
232246function CheckToInstallErlang : Boolean; begin
233247 // Erlang should be installed if there's no Erlang path in the registry
234248 Result := (GetLatestErlangPath = ' ' ); end ;
235-
236- // Scripted constants expand here
237- { #StrInspectAllFuncs}
0 commit comments