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

Commit e564645

Browse files
committed
Isolate signing functionality and 7zip path declaration
1 parent 7115125 commit e564645

File tree

5 files changed

+15
-16
lines changed

5 files changed

+15
-16
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
/elixir
22
/Output
3-
signtool_args.txt

7za_path.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
C:\Users\chris\Documents\bin\7za.exe

ElixirWeb.iss

+7-12
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; ElixirWeb.iss - Elixir Web Installer
1+
; ElixirWeb.iss - Elixir Web Installer
22
; Copyright 2014 Chris Hyndman
33
;
44
; Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,7 +16,10 @@
1616
; "Elixir" and the Elixir logo are copyright (c) 2012 Plataformatec.
1717

1818
#define COMPAT_MASK 1
19-
#define PATH_TO_7ZA GetEnv('USERPROFILE') + '\Documents\7za920'
19+
20+
#define FILE_7ZA_PATH = FileOpen('7za_path.txt')
21+
#define PATH_TO_7ZA FileRead(FILE_7ZA_PATH)
22+
#expr FileClose(FILE_7ZA_PATH)
2023

2124
#define ELIXIR_CSV_URL 'http://elixir-lang.org/elixir.csv'
2225
#define ERLANG_CSV_URL 'http://elixir-lang.org/erlang.csv'
@@ -26,17 +29,10 @@
2629

2730
[Setup]
2831
AppName=Elixir
29-
AppVersion=1.01
32+
AppVersion=1.02
3033
OutputBaseFilename=elixir-websetup
3134
SolidCompression=yes
3235

33-
; Sign the installer using signtool.exe from VS and arguments from signtool_args.txt
34-
#ifexist 'signtool_args.txt'
35-
#define FileHandle = FileOpen('signtool_args.txt')
36-
#emit 'SignTool=signtool ' + FileRead(FileHandle)
37-
#expr FileClose(FileHandle)
38-
#endif
39-
4036
; This installer doesn't install anything itself, it just runs other installers
4137
CreateAppDir=no
4238
Uninstallable=no
@@ -53,7 +49,6 @@ WizardImageBackColor=clWhite
5349
WizardImageFile=assets\drop_banner.bmp
5450
WizardSmallImageFile=assets\null.bmp
5551

56-
5752
[CustomMessages]
5853
; The version string shouldn't show the version of this installer (AppVersion)
5954
NameAndVersion=%1
@@ -67,7 +62,7 @@ Source: "assets\drop_banner.bmp"; DestDir: "{tmp}\assets"; Flags: deleteafterins
6762
Source: "assets\null.bmp"; DestDir: "{tmp}\assets"; Flags: deleteafterinstall
6863
Source: "src\legroom\modpath.iss"; DestDir: "{tmp}\src\legroom"; Flags: deleteafterinstall
6964
; 7-Zip portable extractor
70-
Source: "{#PATH_TO_7ZA}\7za.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall
65+
Source: "{#PATH_TO_7ZA}"; DestDir: "{tmp}"; Flags: deleteafterinstall
7166
; Compiler files
7267
Source: "compiler:Default.isl"; DestDir: "{tmp}"; Flags: deleteafterinstall
7368
Source: "compiler:ISCC.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall

README.md

+4-3
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ First, download the Unicode version of Inno Setup (`isetup-X.Y.Z-unicode.exe` fr
2222
To build the **web installer**, follow these steps:
2323

2424
1. Download and install the [Inno Download Plugin](https://code.google.com/p/inno-download-plugin/).
25-
2. Download the [7-Zip Command Line Version](http://www.7-zip.org/download.html) and extract it to `7za920` in your Documents folder (i.e. `C:\Users\YourUserName\Documents\7za920`). You can redefine the `PATH_TO_7ZA` macro if you have this extracted elsewhere.
26-
3. Open `elixir-windows-setup\ElixirWeb.iss` in the Inno Setup Compiler.
27-
4. Click "Compile" to build an installer in `elixir-windows-setup/Output`.
25+
2. Download the [7-Zip Command Line Version](http://www.7-zip.org/download.html) and extract it somewhere.
26+
3. Edit the path in `elixir-windows-setup\7za_path.txt` to point to where you extracted 7za.exe.
27+
4. Open `elixir-windows-setup\ElixirWeb.iss` in the Inno Setup Compiler.
28+
5. Click "Compile" to build an installer in `elixir-windows-setup/Output`.
2829

2930
To build the **offline installer** follow these steps:
3031

sign.bat

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@echo off
2+
"C:\Program Files (x86)\Windows Kits\10\bin\x64\signtool.exe" sign /debug /sha1 5D61459775F965DA92630DEEAD3946EF5F9EA02C Output\elixir-websetup.exe
3+
pause

0 commit comments

Comments
 (0)