Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/iNavFlight/inav-configurator.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/assets
diff options
context:
space:
mode:
authorErNis <ernis@fpvdev.com>2022-06-03 14:45:26 +0300
committerErNis <ernis@fpvdev.com>2022-06-03 15:18:02 +0300
commitc4f4bb0f677ac370ce0ef146807a53fec3884cb8 (patch)
treefb7b28286f08f65c977ba1f8e20cd2a794d0aaf5 /assets
parentf53d2b166b132043bfe46011d4be53d59343b7a1 (diff)
'win32' and 'win64' release targets now build 'old' zip alongside with 'new' installer .exe
Diffstat (limited to 'assets')
-rw-r--r--assets/windows/inav_installer.bmpbin0 -> 154544 bytes
-rw-r--r--assets/windows/inav_installer_icon.icobin0 -> 45997 bytes
-rw-r--r--assets/windows/inav_installer_small.bmpbin0 -> 32824 bytes
-rw-r--r--assets/windows/installer.iss169
4 files changed, 169 insertions, 0 deletions
diff --git a/assets/windows/inav_installer.bmp b/assets/windows/inav_installer.bmp
new file mode 100644
index 00000000..d65f3940
--- /dev/null
+++ b/assets/windows/inav_installer.bmp
Binary files differ
diff --git a/assets/windows/inav_installer_icon.ico b/assets/windows/inav_installer_icon.ico
new file mode 100644
index 00000000..e180941b
--- /dev/null
+++ b/assets/windows/inav_installer_icon.ico
Binary files differ
diff --git a/assets/windows/inav_installer_small.bmp b/assets/windows/inav_installer_small.bmp
new file mode 100644
index 00000000..535303fb
--- /dev/null
+++ b/assets/windows/inav_installer_small.bmp
Binary files differ
diff --git a/assets/windows/installer.iss b/assets/windows/installer.iss
new file mode 100644
index 00000000..f82c30bf
--- /dev/null
+++ b/assets/windows/installer.iss
@@ -0,0 +1,169 @@
+; ------------------------------------------
+; Installer for INAV
+; ------------------------------------------
+; It receives from the command line with /D the parameters:
+; version
+; archName
+; archAllowed
+; archInstallIn64bit
+; sourceFolder
+; targetFolder
+
+#define ApplicationName "INAV Configurator"
+#define CompanyName "The INAV open source project"
+#define CompanyUrl "https://github.com/iNavFlight/inav"
+#define ExecutableFileName "inav-configurator.exe"
+#define GroupName "INAV"
+#define InstallerFileName "INAV-Configurator_" + archName + "-installer" + "_" + version
+#define SourcePath "..\..\" + sourceFolder + "\inav-configurator\" + archName
+#define TargetFolderName "INAV-Configurator"
+#define UpdatesUrl "https://github.com/iNavFlight/inav-configurator/releases"
+
+[CustomMessages]
+AppName=inav-configurator
+LaunchProgram=Start {#ApplicationName}
+
+[Files]
+Source: "{#SourcePath}\*"; DestDir: "{app}"; Flags: recursesubdirs
+
+[Icons]
+; Programs group
+Name: "{group}\{#ApplicationName}"; Filename: "{app}\{#ExecutableFileName}";
+; Desktop icon
+Name: "{autodesktop}\{#ApplicationName}"; Filename: "{app}\{#ExecutableFileName}";
+; Non admin users, uninstall icon
+Name: "{group}\Uninstall {#ApplicationName}"; Filename: "{uninstallexe}"; Check: not IsAdminInstallMode
+
+[Languages]
+; English default, it must be first
+Name: "en"; MessagesFile: "compiler:Default.isl"
+; Official languages
+;Name: "ca"; MessagesFile: "compiler:Languages\Catalan.isl"
+;Name: "da"; MessagesFile: "compiler:Languages\Danish.isl"
+;Name: "de"; MessagesFile: "compiler:Languages\German.isl"
+;Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl"
+;Name: "fr"; MessagesFile: "compiler:Languages\French.isl"
+;Name: "it"; MessagesFile: "compiler:Languages\Italian.isl"
+;Name: "ja"; MessagesFile: "compiler:Languages\Japanese.isl"
+;Name: "nl"; MessagesFile: "compiler:Languages\Dutch.isl"
+;Name: "pt"; MessagesFile: "compiler:Languages\Portuguese.isl"
+;Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl"
+;Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl"
+; Not official. Sometimes not updated to latest version (strings missing)
+;Name: "ga"; MessagesFile: "unofficial_inno_languages\Galician.isl"
+;Name: "eu"; MessagesFile: "unofficial_inno_languages\Basque.isl"
+;Name: "hr"; MessagesFile: "unofficial_inno_languages\Croatian.isl"
+;Name: "hu"; MessagesFile: "unofficial_inno_languages\Hungarian.isl"
+;Name: "id"; MessagesFile: "unofficial_inno_languages\Indonesian.isl"
+;Name: "ko"; MessagesFile: "unofficial_inno_languages\Korean.isl"
+;Name: "lv"; MessagesFile: "unofficial_inno_languages\Latvian.isl"
+;Name: "sv"; MessagesFile: "unofficial_inno_languages\Swedish.isl"
+;Name: "zh_CN"; MessagesFile: "unofficial_inno_languages\ChineseSimplified.isl"
+;Name: "zh_TW"; MessagesFile: "unofficial_inno_languages\ChineseTraditional.isl"
+; Not available
+; pt_BR (Portuguese Brasileiro)
+
+[Run]
+; Add a checkbox to start the app after installed
+Filename: {app}\{cm:AppName}.exe; Description: {cm:LaunchProgram,{cm:AppName}}; Flags: nowait postinstall skipifsilent
+
+[Setup]
+AppId=2e5662ca-1fb3-8f1e-a7e1-e390add7a19d
+AppName={#ApplicationName}
+AppPublisher={#CompanyName}
+AppPublisherURL={#CompanyUrl}
+AppUpdatesURL={#UpdatesUrl}
+AppVersion={#version}
+ArchitecturesAllowed={#archAllowed}
+ArchitecturesInstallIn64BitMode={#archInstallIn64bit}
+Compression=lzma2
+DefaultDirName={autopf}\{#GroupName}\{#TargetFolderName}
+DefaultGroupName={#GroupName}\{#ApplicationName}
+LicenseFile=..\..\LICENSE
+MinVersion=6.2
+OutputBaseFilename={#InstallerFileName}
+OutputDir=..\..\{#targetFolder}\
+PrivilegesRequiredOverridesAllowed=commandline dialog
+SetupIconFile=inav_installer_icon.ico
+ShowLanguageDialog=yes
+SolidCompression=yes
+UninstallDisplayIcon={app}\{#ExecutableFileName}
+UninstallDisplayName={#ApplicationName}
+WizardImageFile=inav_installer.bmp
+WizardSmallImageFile=inav_installer_small.bmp
+WizardStyle=modern
+
+[Code]
+function GetOldNsisUninstallerPath(): String;
+var
+ RegKey: String;
+begin
+ Result := '';
+ // Look into the different registry entries: win32, win64 and without user rights
+ if not RegQueryStringValue(HKLM, 'SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\INAV Configurator', 'UninstallString', Result) then
+ begin
+ if not RegQueryStringValue(HKLM, 'SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\INAV Configurator', 'UninstallString', Result) then
+ begin
+ RegQueryStringValue(HKCU, 'SOFTWARE\INAV\INAV Configurator', 'UninstallString', Result)
+ end;
+ end;
+end;
+
+function GetQuietUninstallerPath(): String;
+var
+ RegKey: String;
+begin
+ Result := '';
+ RegKey := Format('%s\%s_is1', ['Software\Microsoft\Windows\CurrentVersion\Uninstall', '{#emit SetupSetting("AppId")}']);
+ if not RegQueryStringValue(HKEY_LOCAL_MACHINE, RegKey, 'QuietUninstallString', Result) then
+ begin
+ RegQueryStringValue(HKEY_CURRENT_USER, RegKey, 'QuietUninstallString', Result);
+ end;
+end;
+
+function InitializeSetup(): Boolean;
+var
+ ResultCode: Integer;
+ ParameterStr : String;
+ UninstPath : String;
+begin
+
+ Result := True;
+
+ // Check if the application is already installed by the old NSIS installer, and uninstall it
+ UninstPath := GetOldNsisUninstallerPath();
+
+ // Found, start uninstall
+ if UninstPath <> '' then
+ begin
+
+ UninstPath := RemoveQuotes(UninstPath);
+
+ // Add this parameter to not return until uninstall finished. The drawback is that the uninstaller file is not deleted
+ ParameterStr := '_?=' + ExtractFilePath(UninstPath);
+
+ if Exec(UninstPath, ParameterStr, '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
+ begin
+ // Delete the unistaller file and empty folders. Not deleting the files.
+ DeleteFile(UninstPath);
+ DelTree(ExtractFilePath(UninstPath), True, False, True);
+ end
+ else begin
+ Result := False;
+ MsgBox('Error uninstalling old Configurator ' + SysErrorMessage(ResultCode) + '.', mbError, MB_OK);
+ end;
+ end
+ else begin
+
+ // Search for new Inno Setup installations
+ UninstPath := GetQuietUninstallerPath();
+ if UninstPath <> '' then
+ begin
+ if not Exec('>', UninstPath, '', SW_SHOW, ewWaitUntilTerminated, ResultCode) then
+ begin
+ Result := False;
+ MsgBox('Error uninstalling Configurator ' + SysErrorMessage(ResultCode) + '.', mbError, MB_OK);
+ end;
+ end;
+ end;
+end; \ No newline at end of file