Skip to content

Commit 204773b

Browse files
Adds Windows installer. Closes #637 (#642)
* Adds Windows installer * Fixes working directory for Build Installer step in create-release.yml * Fixes working directory for Build Installer step in create-release.yml * Fixes working directory for Build Installer step in create-release.yml * Adds Windows installer and updates create-release.yml * Updates upload-artifact action to v4 in create-release.yml * Updates installer file name and version in install.iss * Updates OutputDir in install.iss * Updates path for dev-proxy-installer in create-release.yml * Adds installer icon to Windows build * Updates installer file name and version in install.iss * Updates installer file name and version in install.iss --------- Co-authored-by: Waldek Mastykarz <waldek@mastykarz.nl>
1 parent e90e2ef commit 204773b

File tree

4 files changed

+106
-17
lines changed

4 files changed

+106
-17
lines changed

.github/workflows/create-release.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,22 @@ jobs:
6666
with:
6767
name: binaries-dev-proxy-abstractions-${{ github.ref_name }}
6868
path: ./dev-proxy-abstractions-${{ github.ref_name }}.zip
69+
- name: Add install file
70+
if: matrix.architecture == 'win-x64' || matrix.architecture == 'win-x86'
71+
run: cp ./install.iss ./${{ env.release }}
72+
- name: Add installer icon
73+
if: matrix.architecture == 'win-x64' || matrix.architecture == 'win-x86'
74+
run: cp ./media/icon.ico ./${{ env.release }}
75+
- name: Build Installer
76+
if: matrix.architecture == 'win-x64' || matrix.architecture == 'win-x86'
77+
run: ISCC.exe install.iss /F"dev-proxy-installer-${{ matrix.architecture }}-${{ github.ref_name }}"
78+
working-directory: ./${{ env.release }}
79+
- name: Upload Installer
80+
if: matrix.architecture == 'win-x64' || matrix.architecture == 'win-x86'
81+
uses: actions/upload-artifact@v4
82+
with:
83+
name: installer-dev-proxy-${{ github.ref_name }}-${{ matrix.architecture }}
84+
path: ./${{ env.release }}/dev-proxy-installer-${{ matrix.architecture }}-${{ github.ref_name }}.exe
6985
create_release:
7086
name: Create Release
7187
needs: [publish_binaries]
@@ -90,3 +106,4 @@ jobs:
90106
with:
91107
args: |
92108
output/binaries-*/*.zip
109+
output/installer-*/*.exe

LICENSE

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
MIT License
1+
MIT License
22

3-
Copyright (c) 2022 Microsoft Graph
3+
Copyright (c) Microsoft Corporation.
44

5-
Permission is hereby granted, free of charge, to any person obtaining a copy
6-
of this software and associated documentation files (the "Software"), to deal
7-
in the Software without restriction, including without limitation the rights
8-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9-
copies of the Software, and to permit persons to whom the Software is
10-
furnished to do so, subject to the following conditions:
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
1111

12-
The above copyright notice and this permission notice shall be included in all
13-
copies or substantial portions of the Software.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
1414

15-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21-
SOFTWARE.
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE

install.iss

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
; Script generated by the Inno Setup Script Wizard.
2+
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
3+
4+
#define MyAppName "Dev Proxy"
5+
#define MyAppSetupExeName "dev-proxy-installer-win-x64-0.17.0"
6+
#define MyAppVersion "0.17.0"
7+
#define MyAppPublisher "Microsoft"
8+
#define MyAppURL "https://aka.ms/devproxy"
9+
10+
[Setup]
11+
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
12+
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
13+
AppId={{4448FDE7-D519-4009-AFE2-0C5D0AA9C3D2}
14+
AppName={#MyAppName}
15+
AppVersion={#MyAppVersion}
16+
AppPublisher={#MyAppPublisher}
17+
AppPublisherURL={#MyAppURL}
18+
AppSupportURL={#MyAppURL}
19+
AppUpdatesURL={#MyAppURL}
20+
AppVerName={#MyAppName} v{#MyAppVersion}
21+
UninstallDisplayIcon={app}\icon.ico
22+
DefaultDirName={autopf}\{#MyAppName}
23+
DefaultGroupName={#MyAppName}
24+
DisableProgramGroupPage=yes
25+
LicenseFile=..\LICENSE
26+
; Remove the following line to run in administrative install mode (install for all users.)
27+
PrivilegesRequired=lowest
28+
OutputBaseFilename={#MyAppSetupExeName}
29+
Compression=lzma
30+
SolidCompression=yes
31+
WizardStyle=modern
32+
OutputDir=.
33+
34+
[Registry]
35+
Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; Flags: preservestringtype
36+
37+
[Languages]
38+
Name: "english"; MessagesFile: "compiler:Default.isl"
39+
40+
[Files]
41+
Source: ".\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Excludes: "*.iss"
42+
43+
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
44+
45+
[UninstallDelete]
46+
Type:files;Name:"{app}\rootCert.pfx"
47+
48+
[Code]
49+
function UpdatePath(Param: string): string;
50+
var
51+
OrigPath: string;
52+
begin
53+
// Get original PATH value
54+
if not RegQueryStringValue(HKEY_CURRENT_USER, 'Environment', 'Path', OrigPath) then
55+
OrigPath := '';
56+
57+
// If the path is already there, do nothing
58+
if Pos(';' + ExpandConstant('{app}') + ';', ';' + OrigPath + ';') > 0 then
59+
Result := OrigPath
60+
else
61+
// Otherwise, add it
62+
Result := OrigPath + ';' + ExpandConstant('{app}');
63+
end;
64+
65+
procedure DeinitializeSetup();
66+
var
67+
OrigPath: string;
68+
begin
69+
OrigPath := UpdatePath('');
70+
// Set the updated path during installation
71+
RegWriteStringValue(HKEY_CURRENT_USER, 'Environment', 'Path', OrigPath);
72+
end;

media/icon.ico

162 KB
Binary file not shown.

0 commit comments

Comments
 (0)