Unified windows installer, added functionality
This commit is contained in:
parent
d7ce70cabb
commit
cfe9ce2bc9
|
@ -88,7 +88,7 @@ jobs:
|
||||||
- name: Running installer build
|
- name: Running installer build
|
||||||
uses: Minionguyjpro/Inno-Setup-Action@v1.2.2
|
uses: Minionguyjpro/Inno-Setup-Action@v1.2.2
|
||||||
with:
|
with:
|
||||||
path: .\windows_installer\x64.iss
|
path: .\windows_installer\ollama.iss
|
||||||
options: /O+ /dAppVersion=${{ steps.get_flutter_version.outputs.version_number }}
|
options: /O+ /dAppVersion=${{ steps.get_flutter_version.outputs.version_number }}
|
||||||
- name: Uploading installer
|
- name: Uploading installer
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
|
|
|
@ -42,7 +42,7 @@ void main() async {
|
||||||
// await execute(
|
// await execute(
|
||||||
// 'Windows x64 installer',
|
// 'Windows x64 installer',
|
||||||
// 'iscc.exe',
|
// 'iscc.exe',
|
||||||
// ['windows_installer/x64.iss', '/qp', '/dAppVersion=$version'],
|
// ['windows_installer/ollama.iss', '/qp', '/dAppVersion=$version'],
|
||||||
// " > Inno Setup is not installed. Please install it from https://www.jrsoftware.org/isdl.php#stable\n Then add the Inno Setup directory to your PATH environment variable.");
|
// " > Inno Setup is not installed. Please install it from https://www.jrsoftware.org/isdl.php#stable\n Then add the Inno Setup directory to your PATH environment variable.");
|
||||||
|
|
||||||
// ----------
|
// ----------
|
||||||
|
@ -59,7 +59,12 @@ void main() async {
|
||||||
// await execute(
|
// await execute(
|
||||||
// 'Windows arm64 installer',
|
// 'Windows arm64 installer',
|
||||||
// 'iscc.exe',
|
// 'iscc.exe',
|
||||||
// ['windows_installer/arm64.iss', '/qp', '/dAppVersion=$version'],
|
// [
|
||||||
|
// 'windows_installer/ollama.iss',
|
||||||
|
// '/qp',
|
||||||
|
// '/dAppVersion=$version',
|
||||||
|
// '/dAppArchitectures=arm64'
|
||||||
|
// ],
|
||||||
// " > Inno Setup is not installed. Please install it from https://www.jrsoftware.org/isdl.php#stable\n Then add the Inno Setup directory to your PATH environment variable.");
|
// " > Inno Setup is not installed. Please install it from https://www.jrsoftware.org/isdl.php#stable\n Then add the Inno Setup directory to your PATH environment variable.");
|
||||||
|
|
||||||
print('----------');
|
print('----------');
|
||||||
|
@ -73,11 +78,10 @@ void main() async {
|
||||||
await outputDir.create();
|
await outputDir.create();
|
||||||
|
|
||||||
await copyFile('build\\app\\outputs\\flutter-apk\\app-release.apk',
|
await copyFile('build\\app\\outputs\\flutter-apk\\app-release.apk',
|
||||||
'build\\.output\\ollama.apk');
|
'build\\.output\\ollama-android-v$version.apk');
|
||||||
await copyFile('build\\app\\outputs\\flutter-apk\\app-release.apk.sha1',
|
await copyFile(
|
||||||
'build\\.output\\ollama.apk.sha1');
|
'build\\windows\\x64\\runner\\ollama-windows-x64-v$version.exe',
|
||||||
await copyFile('build\\windows\\x64\\runner\\ollama-v$version-x64.exe',
|
'build\\.output\\ollama-windows-x64-v$version.exe');
|
||||||
'build\\.output\\ollama-v$version-x64.exe');
|
|
||||||
print('- done');
|
print('- done');
|
||||||
} catch (_) {
|
} catch (_) {
|
||||||
print('- failed');
|
print('- failed');
|
||||||
|
|
|
@ -1,17 +1,28 @@
|
||||||
; Script generated by the Inno Setup Script Wizard.
|
; Inno Setup script for Ollama App, created by JHubi1
|
||||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
|
||||||
|
|
||||||
;#define AppVersion "1.0.1"
|
|
||||||
|
|
||||||
#define AppName "Ollama App"
|
#define AppName "Ollama App"
|
||||||
#define AppPublisher "JHubi1"
|
#define AppPublisher "JHubi1"
|
||||||
#define AppURL "https://jhubi1.com"
|
#define AppURL "https://jhubi1.com"
|
||||||
#define AppExeName "ollama.exe"
|
#define AppExeName "ollama.exe"
|
||||||
#define AppArchitectures "arm64"
|
|
||||||
|
; #define AppVersion "1.0.1"
|
||||||
|
; #define AppArchitectures "x64"
|
||||||
|
|
||||||
|
#ifndef AppVersion
|
||||||
|
#error AppVersion is required
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef AppArchitectures
|
||||||
|
#define AppArchitectures "x64"
|
||||||
|
#endif
|
||||||
|
|
||||||
[Setup]
|
[Setup]
|
||||||
SourceDir=..
|
SourceDir=..
|
||||||
ArchitecturesAllowed={#AppArchitectures}
|
#if AppArchitectures == 'x64'
|
||||||
|
ArchitecturesAllowed=x64compatible
|
||||||
|
#else
|
||||||
|
ArchitecturesAllowed={#AppArchitectures}
|
||||||
|
#endif
|
||||||
|
|
||||||
AppId={{4ACF8C84-5D9B-455C-9FED-93D29E2F71DC}
|
AppId={{4ACF8C84-5D9B-455C-9FED-93D29E2F71DC}
|
||||||
AppName={#AppName}
|
AppName={#AppName}
|
||||||
|
@ -20,7 +31,7 @@ AppVerName={#AppName} v{#AppVersion}
|
||||||
AppPublisher={#AppPublisher}
|
AppPublisher={#AppPublisher}
|
||||||
AppPublisherURL={#AppURL}
|
AppPublisherURL={#AppURL}
|
||||||
SetupIconFile=windows\runner\resources\app_icon.ico
|
SetupIconFile=windows\runner\resources\app_icon.ico
|
||||||
AppCopyright=© 2024 {#AppPublisher}
|
AppCopyright=Copyright 2024 {#AppPublisher}
|
||||||
|
|
||||||
UninstallDisplayIcon={app}\{#AppExeName}
|
UninstallDisplayIcon={app}\{#AppExeName}
|
||||||
UninstallDisplayName={#AppName}
|
UninstallDisplayName={#AppName}
|
||||||
|
@ -67,3 +78,30 @@ Name: "{autodesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Tasks: deskto
|
||||||
[Run]
|
[Run]
|
||||||
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||||
|
|
||||||
|
[Code]
|
||||||
|
function InitializeSetup(): Boolean;
|
||||||
|
begin
|
||||||
|
Result := true;
|
||||||
|
{ TODO: Uncoment when arm64 is ready! }
|
||||||
|
{if (ProcessorArchitecture = paArm64) and (ExpandConstant('{#AppArchitectures}') = 'x64') then
|
||||||
|
begin
|
||||||
|
if SuppressibleTaskDialogMsgBox('Architecture Compatibility', 'You are running the x64 version of the installer on an arm64 device. There is an arm64 version avaliable for download. It is recommended to be used. Do you wish to continue?', mbError, MB_YESNO, [SetupMessage(msgButtonYes), SetupMessage(msgButtonNo)], 0, IDNO) = IDNO then
|
||||||
|
begin
|
||||||
|
Result := false;
|
||||||
|
end;
|
||||||
|
end;}
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure CurUninstallStepChanged (CurUninstallStep: TUninstallStep);
|
||||||
|
var
|
||||||
|
mres : integer;
|
||||||
|
begin
|
||||||
|
case CurUninstallStep of
|
||||||
|
usPostUninstall:
|
||||||
|
begin
|
||||||
|
mres := MsgBox('Do you want to Remove settings?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2)
|
||||||
|
if mres = IDYES then
|
||||||
|
DelTree(ExpandConstant('{userappdata}\JHubi1\Ollama App'), True, True, True);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
end;
|
|
@ -1,70 +0,0 @@
|
||||||
; Script generated by the Inno Setup Script Wizard.
|
|
||||||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
|
||||||
|
|
||||||
;#define AppVersion "1.0.1"
|
|
||||||
|
|
||||||
#define AppName "Ollama App"
|
|
||||||
#define AppPublisher "JHubi1"
|
|
||||||
#define AppURL "https://jhubi1.com"
|
|
||||||
#define AppExeName "ollama.exe"
|
|
||||||
#define AppArchitectures "x64"
|
|
||||||
|
|
||||||
[Setup]
|
|
||||||
SourceDir=..
|
|
||||||
; disabled because arm64 is not yet supported by flutter
|
|
||||||
;ArchitecturesAllowed={#AppArchitectures}
|
|
||||||
|
|
||||||
AppId={{4ACF8C84-5D9B-455C-9FED-93D29E2F71DC}
|
|
||||||
AppName={#AppName}
|
|
||||||
AppVersion={#AppVersion}
|
|
||||||
AppVerName={#AppName} v{#AppVersion}
|
|
||||||
AppPublisher={#AppPublisher}
|
|
||||||
AppPublisherURL={#AppURL}
|
|
||||||
SetupIconFile=windows\runner\resources\app_icon.ico
|
|
||||||
AppCopyright=© 2024 {#AppPublisher}
|
|
||||||
|
|
||||||
UninstallDisplayIcon={app}\{#AppExeName}
|
|
||||||
UninstallDisplayName={#AppName}
|
|
||||||
|
|
||||||
DefaultDirName={autopf}\OllamaApp
|
|
||||||
OutputDir=build\windows\{#AppArchitectures}\runner
|
|
||||||
OutputBaseFilename=ollama-windows-{#AppArchitectures}-v{#AppVersion}
|
|
||||||
|
|
||||||
AppSupportURL=https://github.com/JHubi1/ollama-app/issues
|
|
||||||
AppUpdatesURL=https://github.com/JHubi1/ollama-app/releases
|
|
||||||
|
|
||||||
LicenseFile=windows_installer\docs\license.txt
|
|
||||||
InfoBeforeFile=windows_installer\docs\before.txt
|
|
||||||
InfoAfterFile=windows_installer\docs\after.txt
|
|
||||||
|
|
||||||
WizardImageFile=assets\OllamaAppBanner.bmp
|
|
||||||
|
|
||||||
PrivilegesRequiredOverridesAllowed=dialog
|
|
||||||
;Password=enterPasswordInCaseOfSecretBuild
|
|
||||||
;Encryption=yes
|
|
||||||
|
|
||||||
DisableWelcomePage=no
|
|
||||||
DisableProgramGroupPage=yes
|
|
||||||
|
|
||||||
Compression=lzma
|
|
||||||
SolidCompression=yes
|
|
||||||
WizardStyle=modern
|
|
||||||
|
|
||||||
[Languages]
|
|
||||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
|
||||||
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
|
|
||||||
|
|
||||||
[Tasks]
|
|
||||||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
|
||||||
|
|
||||||
[Files]
|
|
||||||
Source: "build\windows\{#AppArchitectures}\runner\Release\{#AppExeName}"; DestDir: "{app}"; Flags: ignoreversion
|
|
||||||
Source: "build\windows\{#AppArchitectures}\runner\Release\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
|
|
||||||
|
|
||||||
[Icons]
|
|
||||||
Name: "{autoprograms}\{#AppName}"; Filename: "{app}\{#AppExeName}"
|
|
||||||
Name: "{autodesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; Tasks: desktopicon
|
|
||||||
|
|
||||||
[Run]
|
|
||||||
Filename: "{app}\{#AppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(AppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
|
||||||
|
|
Loading…
Reference in New Issue