Spaces:
Sleeping
Sleeping
Commit ·
c6655ee
1
Parent(s): 2f6a264
feat(release): add Inno Setup installer script and EverBrainSetup.exe generation to release workflow
Browse files- .github/workflows/release.yml +16 -0
- scripts/installer.iss +48 -0
.github/workflows/release.yml
CHANGED
|
@@ -70,6 +70,20 @@ jobs:
|
|
| 70 |
cp ./bin/ever-brain.exe ./ever-brain.exe
|
| 71 |
fi
|
| 72 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 73 |
- name: Upload Binary Artifact
|
| 74 |
uses: actions/upload-artifact@v4
|
| 75 |
with:
|
|
@@ -77,6 +91,7 @@ jobs:
|
|
| 77 |
path: |
|
| 78 |
./${{ matrix.target.artifact_name }}
|
| 79 |
./ever-brain.exe
|
|
|
|
| 80 |
if-no-files-found: ignore
|
| 81 |
|
| 82 |
create-github-release:
|
|
@@ -102,6 +117,7 @@ jobs:
|
|
| 102 |
files: |
|
| 103 |
./release-assets/ever-brain-windows-x64.exe
|
| 104 |
./release-assets/ever-brain.exe
|
|
|
|
| 105 |
./release-assets/ever-brain-darwin-arm64
|
| 106 |
./release-assets/ever-brain-linux-x64
|
| 107 |
env:
|
|
|
|
| 70 |
cp ./bin/ever-brain.exe ./ever-brain.exe
|
| 71 |
fi
|
| 72 |
|
| 73 |
+
- name: Compile Windows Setup Installer (EverBrainSetup.exe)
|
| 74 |
+
if: matrix.target.os == 'windows-latest'
|
| 75 |
+
shell: pwsh
|
| 76 |
+
run: |
|
| 77 |
+
if (Get-Command iscc -ErrorAction SilentlyContinue) {
|
| 78 |
+
iscc scripts/installer.iss /O.
|
| 79 |
+
} else {
|
| 80 |
+
Write-Host "Inno Setup iscc not in path, checking default Program Files..."
|
| 81 |
+
$innoPath = "C:\Program Files (x86)\Inno Setup 6\iscc.exe"
|
| 82 |
+
if (Test-Path $innoPath) {
|
| 83 |
+
& $innoPath scripts/installer.iss /O.
|
| 84 |
+
}
|
| 85 |
+
}
|
| 86 |
+
|
| 87 |
- name: Upload Binary Artifact
|
| 88 |
uses: actions/upload-artifact@v4
|
| 89 |
with:
|
|
|
|
| 91 |
path: |
|
| 92 |
./${{ matrix.target.artifact_name }}
|
| 93 |
./ever-brain.exe
|
| 94 |
+
./EverBrainSetup.exe
|
| 95 |
if-no-files-found: ignore
|
| 96 |
|
| 97 |
create-github-release:
|
|
|
|
| 117 |
files: |
|
| 118 |
./release-assets/ever-brain-windows-x64.exe
|
| 119 |
./release-assets/ever-brain.exe
|
| 120 |
+
./release-assets/EverBrainSetup.exe
|
| 121 |
./release-assets/ever-brain-darwin-arm64
|
| 122 |
./release-assets/ever-brain-linux-x64
|
| 123 |
env:
|
scripts/installer.iss
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
; Inno Setup Script for Ever-Brain CLI
|
| 2 |
+
#define MyAppName "EverBrain"
|
| 3 |
+
#define MyAppVersion "1.0.0"
|
| 4 |
+
#define MyAppPublisher "Ever-Brain"
|
| 5 |
+
#define MyAppURL "https://github.com/abrez-rizvi/ever-brain"
|
| 6 |
+
#define MyAppExeName "ever-brain.exe"
|
| 7 |
+
|
| 8 |
+
[Setup]
|
| 9 |
+
AppId={{D37D6E2C-9F62-4C9D-9F36-F173516E49E0}
|
| 10 |
+
AppName={#MyAppName}
|
| 11 |
+
AppVersion={#MyAppVersion}
|
| 12 |
+
AppPublisher={#MyAppPublisher}
|
| 13 |
+
AppPublisherURL={#MyAppURL}
|
| 14 |
+
AppSupportURL={#MyAppURL}
|
| 15 |
+
AppUpdatesURL={#MyAppURL}
|
| 16 |
+
DefaultDirName={autopf}\{#MyAppName}
|
| 17 |
+
DefaultGroupName={#MyAppName}
|
| 18 |
+
DisableProgramGroupPage=yes
|
| 19 |
+
PrivilegesRequired=lowest
|
| 20 |
+
OutputBaseFilename=EverBrainSetup
|
| 21 |
+
Compression=lzma
|
| 22 |
+
SolidCompression=yes
|
| 23 |
+
WizardStyle=modern
|
| 24 |
+
ChangesEnvironment=yes
|
| 25 |
+
|
| 26 |
+
[Languages]
|
| 27 |
+
Name: "english"; MessagesFile: "compiler:Default.isl"
|
| 28 |
+
|
| 29 |
+
[Files]
|
| 30 |
+
Source: "..\bin\ever-brain.exe"; DestDir: "{app}"; Flags: ignoreversion
|
| 31 |
+
Source: "..\bin\ever-brain.exe"; DestName: "evb.exe"; DestDir: "{app}"; Flags: ignoreversion
|
| 32 |
+
|
| 33 |
+
[Registry]
|
| 34 |
+
; Add application directory to user PATH
|
| 35 |
+
Root: HKCU; Subkey: "Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; Check: NeedsAddPath(ExpandConstant('{app}'))
|
| 36 |
+
|
| 37 |
+
[Code]
|
| 38 |
+
function NeedsAddPath(Param: string): boolean;
|
| 39 |
+
var
|
| 40 |
+
OrigPath: string;
|
| 41 |
+
begin
|
| 42 |
+
if not RegQueryStringValue(HKEY_CURRENT_USER, 'Environment', 'Path', OrigPath)
|
| 43 |
+
then begin
|
| 44 |
+
Result := True;
|
| 45 |
+
exit;
|
| 46 |
+
end;
|
| 47 |
+
Result := Pos(';' + Param + ';', ';' + OrigPath + ';') = 0;
|
| 48 |
+
end;
|