Skip to content
This repository was archived by the owner on May 1, 2024. It is now read-only.

Commit 883592b

Browse files
committed
Several bugfixes to make ISCC happy...
1 parent 20ece54 commit 883592b

File tree

1 file changed

+14
-22
lines changed

1 file changed

+14
-22
lines changed

scripts/make-installer.ps1

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@ function ExitMsg ()
2121
#### Initializations
2222
$cd = (Get-Item -Path ".\" -Verbose).FullName
2323
$isccDefine = ""
24-
$isccDir = (Get-Item -Path ".\" -Verbose).FullName
24+
$isccDir = $cd
2525
$elixirVersion = ""
26-
$startInstaller = false
26+
$startInstaller = 0
2727

2828
#### Script
2929
Info("Current directory:")
@@ -36,7 +36,7 @@ foreach ($arg in $args)
3636
if ($arg = "--innoelixirweb")
3737
{
3838
$isccDefine = "/dSkipPages /dNoCompression"
39-
$startInstaller = true
39+
$startInstaller = 1
4040
}
4141
}
4242
Info("Finished reading arguments")
@@ -63,19 +63,8 @@ else
6363
if (Test-Path .\Precompiled.zip)
6464
{
6565
Info("Precompiled.zip found")
66-
$zipPath = .\Precompiled.zip
67-
$zipDest = .\elixir
68-
69-
Info("Creating $zipDest...")
70-
New-Item $zipDest -type directory -force
71-
72-
Info("Extracting files into $zipDest...")
73-
$shell = New-Object -com Shell.Application
74-
$zipFile = $shell.NameSpace($zipPath)
75-
foreach ($item in $zipFile.items())
76-
{
77-
$shell.Namespace($zipDest).copyhere($item)
78-
}
66+
Info("Extracting Precompiled.zip to .\elixir...")
67+
scripts\extract-zip.ps1 $cd\Precompiled.zip $cd\elixir
7968
}
8069
else
8170
{
@@ -87,15 +76,18 @@ else
8776
if ($elixirVersion -eq "")
8877
{
8978
Info("Reading Elixir version from elixir\VERSION...")
90-
$versionFile = Get-Content .\elixir\VERSION
91-
$elixirVersion = $versionFile[0]
79+
foreach ($line in (Get-Content $cd\elixir\VERSION))
80+
{
81+
$elixirVersion = $line
82+
break
83+
}
9284
Info("Elixir version: $elixirVersion")
9385
}
9486

95-
$isccDefine += " /dElixirVersion=" + $elixirVersion
87+
$isccDefine = "`"/dElixirVersion=" + $elixirVersion + "`" " + $isccDefine
9688

97-
Info("Running $iscc $isccDefine Elixir.iss")
98-
& $iscc $isccDefine Elixir.iss
89+
Info("Running $isccDir\ISCC.exe $isccDefine /Q Elixir.iss")
90+
& $isccDir\ISCC.exe $isccDefine /Q Elixir.iss
9991
if ($LastExitCode -eq 0)
10092
{
10193
Info("Installer compiled successfully to .\Output\elixir-v$elixirVersion-setup.exe")
@@ -106,7 +98,7 @@ else
10698
ExitMsg
10799
}
108100

109-
if ($startInstaller)
101+
if ($startInstaller -eq 1)
110102
{
111103
Info("Starting installer...")
112104
start ".\Output\elixir-v$elixirVersion-setup.exe"

0 commit comments

Comments
 (0)