Skip to content

Commit 4b321d3

Browse files
committed
Cleanup of readme.md and installation script
1 parent 8684927 commit 4b321d3

File tree

3 files changed

+51
-71
lines changed

3 files changed

+51
-71
lines changed

README.md

Lines changed: 20 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@
22

33
A Windows installer for the [Hack](https://github.com/chrissimpkins/Hack) typeface.
44

5+
While it might seem like overkill to use a Windows installer for fonts, there is good reason for this on the Windows platform. A number of things can go wrong when one tries to install or update frequently updated fonts manually (see [issue #152](https://github.com/chrissimpkins/Hack/issues/152) and [issue #129](https://github.com/chrissimpkins/Hack/issues/129) in the [Hack repository](https://github.com/chrissimpkins/Hack/)).
56

6-
## Why is a Windows Font Installer Necessary?
7-
8-
While it might seem like overkill to use a Windows installer for fonts, there is good reason for this on the Windows platform. A number of things can go wrong when one tries to install or update frequently updated fonts manually (see [issue #152](https://github.com/chrissimpkins/Hack/issues/152) in the Hack repository).
9-
10-
This installer addresses most of these issues. A (not complete) list of things that can go wrong can be found in [FontInstallationIssues.md](https://github.com/source-foundry/Hack-windows-installer/blob/master/FontInstallationIssues.md).
7+
This installer addresses most of the [commonly obeserved issues](https://github.com/source-foundry/Hack-windows-installer/blob/master/FontInstallationIssues.md).
118

129

1310
## Usage
@@ -17,6 +14,15 @@ This installer addresses most of these issues. A (not complete) list of things t
1714
- Follow the installation instructions
1815

1916

17+
## Installer Source
18+
19+
You may review the comment annotated installer source in [HackWindowsInstaller.iss](https://github.com/source-foundry/Hack-windows-installer/blob/master/src/HackWindowsInstaller.iss).
20+
21+
To build this setup yourself, download the most recent ANSI (not Unicode) version of [Inno Setup](http://www.jrsoftware.org/isdl.php). Install it and activate the option to install the [Inno Setup Preprocessor](http://www.jrsoftware.org/ispphelp/). Double-click `HackWindowsInstall.iss` (folder `src`), which will load it in Inno Setup and select *Build* - *Compile*.
22+
23+
We release the compiled installer with its SHA256 hash digest and [VirusTotal](https://virustotal.com/en/) malware scan report link in [Releases](https://github.com/source-foundry/Hack-windows-installer/releases/latest).
24+
25+
2026
## Silent Installation
2127

2228
To install silently, use the following command:
@@ -28,30 +34,25 @@ To remove it silently:
2834
``C:\Program Files\Hack Windows Installer\unins000.exe /VERYSILENT /SUPPRESSMSGBOXES /NORESTART``
2935

3036

31-
## Installer Source
32-
33-
You may review the comment annotated installer source in [HackWindowsInstaller.iss](https://github.com/source-foundry/Hack-windows-installer/blob/master/src/HackWindowsInstaller.iss).
34-
35-
We release the compiled installer with its SHA256 hash digest and [VirusTotal](https://virustotal.com/en/) malware scan report link in [Releases](https://github.com/source-foundry/Hack-windows-installer/releases).
36-
37-
3837
## Troubleshooting
3938

40-
The installer creates a log file on the path C:\Users\ (Username) \AppData\Local\Temp\Setup Log (Year-Month-Day) #<XXX>.txt.
39+
The installer creates a log file on the path `C:\Users\(Username)\AppData\Local\Temp\Setup Log (Year-Month-Day) #XXX.txt`.
4140

4241
If you are using EMET: If the "Only trusted fonts" option is activated, you need to declare Hack as trusted or it will not be usable.
4342

4443

4544
## Contributions
4645

47-
Any constructive contribution is very welcome! If you have any question or encounter a bug, please create a new [issue](https://github.com/source-foundry/Hack-windows-installer/issues/new).
48-
49-
50-
## Build from Source
46+
Any constructive contribution is very welcome!
5147

52-
To build this setup yourself, download the most recent ANSI (not Unicode) version of [Inno Setup](http://www.jrsoftware.org/isdl.php). Install it and activate the option to install the [Inno Setup Preprocessor](http://www.jrsoftware.org/ispphelp/).
48+
In order to fix a bug you have encountered, we require the log file from the installer. To view this log file, do the following:
5349

54-
Double-click `HackWindowsInstall.iss` (from folder `src`), which will load it in Inno Setup and then select *Build* - *Compile*.
50+
- Click Start -> Click Run -> Enter *%temp%* to open your TEMP folder
51+
- Locate the file called Setup Log 2016-04-26 #xxx.txt where XXX should be 001
52+
- Double-click it and look into it to make sure it's the setup log from our installer. In the third line it should say *HackWindowsInstaller.exe*
53+
- Check the file for any information that you do not want others to see. For example, line 3,4 and 10 contain the paths where the setup is started from and how your TEMP folder is called. Just delete these lines. The other lines should be safe and only contain common information.
54+
- Open a new [issue](https://github.com/source-foundry/Hack-windows-installer/issues/new) in the Hack-Windows-Installer repository
55+
- Paste the entire text (minus the lines noted above) there
5556

5657

5758
## License

src/HackWindowsInstaller.iss

Lines changed: 20 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@
1414

1515

1616

17-
//Disable the following line when releasing the setup
18-
//#define DEBUG
19-
2017
//Update this when releasing a new version
2118
#define public Version '1.1.0'
2219

@@ -28,7 +25,6 @@
2825

2926

3027

31-
3228
//--------------------------------------------------------------------
3329
//Get the base path of this setup. It is assumed that is located in a folder named "src" and the base path is the folder above it
3430
#define base_path StringChange(SourcePath,'src\','')
@@ -37,8 +33,8 @@
3733
//Name of this setup
3834
#define public AppName 'Hack Windows Installer'
3935

40-
//URL of the project homepage of the FONT
41-
#define public HackMonospaced_Homepage 'http://sourcefoundry.org/hack/' /*'https://github.com/chrissimpkins/Hack'*/
36+
//URL of the project homepage for the FONT
37+
#define public HackMonospaced_Homepage 'http://sourcefoundry.org/hack/' /*'https://github.com/chrissimpkins/Hack'*/
4238

4339
//URL of the installer homepage
4440
#define public Installer_Homepage 'https://github.com/source-foundry/Hack-windows-installer'
@@ -52,21 +48,18 @@
5248
#define public FontCache30Service 'FontCache3.0.0.0'
5349

5450

55-
56-
5751
//Total number of font entries we have
5852
#define total_fonts 4
59-
//--------------------------
60-
6153

54+
//Define font array
6255
#dim public font_source[total_fonts]
6356
#dim public font_file[total_fonts]
6457
#dim public font_name[total_fonts]
6558

6659
//Counter for array
6760
#define cntr 0
6861

69-
62+
//---------------------------------------------------------
7063

7164
#define font_source[cntr] HackMonospaced_Sourcefolder
7265
#define font_file[cntr] 'Hack-Bold.ttf'
@@ -88,8 +81,6 @@
8881
#define font_name[cntr] 'Hack Italic'
8982
#define cntr cntr+1
9083

91-
92-
9384
//---------------------------------------------------------
9485

9586
//Helper macro to generate a SHA1 hash for a font file
@@ -147,6 +138,10 @@ SetupIconFile=img\Hack-installer-icon.ico
147138
;This icon will be displayed in Add/Remove programs and needs to be installed locally
148139
UninstallDisplayIcon={app}\Hack-installer-icon.ico
149140

141+
;Folder configuration
142+
SourceDir={#base_path}
143+
OutputDir=out\
144+
OutputBaseFilename=HackWindowsInstaller
150145

151146
;Target folder settings
152147
DefaultDirName={pf}\Hack Windows Installer\
@@ -162,12 +157,7 @@ ArchitecturesInstallIn64BitMode=x64
162157
;Only allow the installer to run on Windows 7 and upwards
163158
MinVersion=6.1
164159

165-
;Folder configuration
166-
SourceDir={#base_path}
167-
OutputDir=out\
168-
OutputBaseFilename=HackWindowsInstaller
169-
170-
;the file should be uninstallable
160+
;It should be uninstallable
171161
Uninstallable=Yes
172162

173163
Compression=lzma2/ultra
@@ -192,9 +182,9 @@ SetupWindowTitle={#AppName} {#Version}
192182
;Message for the "Read to install" wizard page
193183
;NOT USED - "Ready To Install" - below title bar
194184
;WizardReady=
195-
;"Setup is now ready to begin installing ...."
185+
;ReadLabel1: "Setup is now ready to begin installing ...."
196186
ReadyLabel1=
197-
;"Click Install to continue with the installation"
187+
;ReadyLabel2b: "Click Install to continue with the installation"
198188
ReadyLabel2b=Setup is now ready to install the Hack fonts v{#HackMonospaced_Version} on your system.
199189

200190

@@ -203,7 +193,7 @@ ReadyLabel2b=Setup is now ready to install the Hack fonts v{#HackMonospaced_Vers
203193
[Icons]
204194
Name: "{app}\Fonts Applet"; Filename: "control.exe"; Parameters: "/name Microsoft.Fonts"; WorkingDir: "{win}";
205195

206-
;The links to the homepage are only created if the user has selected the matching component
196+
;Link to the Hack homepage
207197
Name: "{app}\Hack Homepage"; Filename: "{#HackMonospaced_Homepage}";
208198

209199

@@ -227,7 +217,7 @@ Source: "img\Hack-installer-icon.ico"; DestDir: "{app}"; Flags: ignoreversion;
227217
;If a user copies *.TTF files to the "Fonts" applet and a font file with the same name already exists, Windows will simply append "_0" (or _1) to the font file and copy it.
228218
;These "ghost" files need to be exterminated!
229219

230-
;Helper macro to add something to a filename before the extension
220+
;Helper macro to add a string at the end oof filename, but before the extension
231221
#define public AddStringToEndOfFilename(str fileName, str whatToAdd) \
232222
StringChange(fileName, '.'+ExtractFileExt(filename), whatToAdd + '.' + ExtractFileExt(fileName))
233223

@@ -243,7 +233,6 @@ Type: files; Name: "{fonts}\Hack-BoldOblique.ttf";
243233
Type: files; Name: "{fonts}\Hack-RegularOblique.ttf";
244234

245235

246-
247236

248237
[INI]
249238
;Create an ini to make detection for enterprise deployment tools easy
@@ -456,13 +445,13 @@ begin
456445
end;
457446
458447
459-
//Prepare FontFiles and FontFilesHashes arrays
448+
//Prepare FontFiles* arrays
460449
procedure FillFontDataArray();
461450
begin
462451
463-
//Helper macro to generate a pascal script function call with the font filename and the SHA1 hash
464-
#define public AddFontDataMacro(str fileName, strFontName, str SHA1Hash) \
465-
' AddFontData(''' + fileName + ''', ''' + strFontName + ''', ''' + SHA1Hash + ''');'
452+
//Helper macro to generate a pascal script function call with the font filename, name and SHA1 hash
453+
#define public AddFontDataMacro(str fileName, str FontName, str SHA1Hash) \
454+
' AddFontData(''' + fileName + ''', ''' + FontName + ''', ''' + SHA1Hash + ''');'
466455
467456
//Generate AddFontData(....) calls
468457
#define public i 0
@@ -488,7 +477,7 @@ begin
488477
//Fill font data arrays
489478
FillFontDataArray;
490479
491-
//Prepare the custom PrepareToInstall wizard page
480+
//Prepare the custom PrepareToInstall wizard page where we show the progress of the service start/stop
492481
title:=SetupMessage(msgWizardPreparing);
493482
subTitle:=SetupMessage(msgPreparingDesc);
494483
@@ -646,7 +635,7 @@ var
646635
currentFontFileNameWindows:string;
647636
648637
begin
649-
log('---BeforeInstallAction---');
638+
log('---BeforeInstallAction START---');
650639
651640
customPrepareToInstall.SetProgress(0, 0);
652641
customPrepareToInstall.Show;
@@ -720,7 +709,7 @@ end;
720709
//Show a custom prepare to install page in order to give the user output what we are doing
721710
procedure AfterInstallAction();
722711
begin
723-
log('---AfterInstallAction---');
712+
log('---AfterInstallAction START---');
724713
725714
customPrepareToInstall.SetProgress(0, 0);
726715
customPrepareToInstall.Show;

src/HackWindowsInstaller_TEMP_Preprocessed.iss

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,6 @@
1818

1919

2020

21-
22-
2321
; ISPP: Base Path C:\dev\git\Hack-windows-installer\
2422

2523

@@ -35,12 +33,6 @@
3533

3634

3735

38-
39-
40-
41-
42-
43-
4436

4537

4638

@@ -92,6 +84,10 @@ SetupIconFile=img\Hack-installer-icon.ico
9284
;This icon will be displayed in Add/Remove programs and needs to be installed locally
9385
UninstallDisplayIcon={app}\Hack-installer-icon.ico
9486

87+
;Folder configuration
88+
SourceDir=C:\dev\git\Hack-windows-installer\
89+
OutputDir=out\
90+
OutputBaseFilename=HackWindowsInstaller
9591

9692
;Target folder settings
9793
DefaultDirName={pf}\Hack Windows Installer\
@@ -107,12 +103,7 @@ ArchitecturesInstallIn64BitMode=x64
107103
;Only allow the installer to run on Windows 7 and upwards
108104
MinVersion=6.1
109105

110-
;Folder configuration
111-
SourceDir=C:\dev\git\Hack-windows-installer\
112-
OutputDir=out\
113-
OutputBaseFilename=HackWindowsInstaller
114-
115-
;the file should be uninstallable
106+
;It should be uninstallable
116107
Uninstallable=Yes
117108

118109
Compression=lzma2/ultra
@@ -137,9 +128,9 @@ SetupWindowTitle=Hack Windows Installer 1.1.0
137128
;Message for the "Read to install" wizard page
138129
;NOT USED - "Ready To Install" - below title bar
139130
;WizardReady=
140-
;"Setup is now ready to begin installing ...."
131+
;ReadLabel1: "Setup is now ready to begin installing ...."
141132
ReadyLabel1=
142-
;"Click Install to continue with the installation"
133+
;ReadyLabel2b: "Click Install to continue with the installation"
143134
ReadyLabel2b=Setup is now ready to install the Hack fonts v2.020 on your system.
144135

145136

@@ -148,7 +139,7 @@ ReadyLabel2b=Setup is now ready to install the Hack fonts v2.020 on your system.
148139
[Icons]
149140
Name: "{app}\Fonts Applet"; Filename: "control.exe"; Parameters: "/name Microsoft.Fonts"; WorkingDir: "{win}";
150141

151-
;The links to the homepage are only created if the user has selected the matching component
142+
;Link to the Hack homepage
152143
Name: "{app}\Hack Homepage"; Filename: "http://sourcefoundry.org/hack/";
153144

154145

@@ -170,7 +161,7 @@ Source: "img\Hack-installer-icon.ico"; DestDir: "{app}"; Flags: ignoreversion;
170161
;If a user copies *.TTF files to the "Fonts" applet and a font file with the same name already exists, Windows will simply append "_0" (or _1) to the font file and copy it.
171162
;These "ghost" files need to be exterminated!
172163

173-
;Helper macro to add something to a filename before the extension
164+
;Helper macro to add a string at the end oof filename, but before the extension
174165

175166
Type: files; Name: "{fonts}\Hack-Bold_*.ttf";
176167
Type: files; Name: "{fonts}\Hack-BoldItalic_*.ttf";
@@ -182,7 +173,6 @@ Type: files; Name: "{fonts}\Hack-BoldOblique.ttf";
182173
Type: files; Name: "{fonts}\Hack-RegularOblique.ttf";
183174

184175

185-
186176

187177
[INI]
188178
;Create an ini to make detection for enterprise deployment tools easy
@@ -546,7 +536,7 @@ var
546536
currentFontFileNameWindows:string;
547537
548538
begin
549-
log('---BeforeInstallAction---');
539+
log('---BeforeInstallAction START---');
550540
551541
customPrepareToInstall.SetProgress(0, 0);
552542
customPrepareToInstall.Show;
@@ -612,7 +602,7 @@ end;
612602
613603
procedure AfterInstallAction();
614604
begin
615-
log('---AfterInstallAction---');
605+
log('---AfterInstallAction START---');
616606
617607
customPrepareToInstall.SetProgress(0, 0);
618608
customPrepareToInstall.Show;

0 commit comments

Comments
 (0)