Merge branch 'master' into MrD_Move-AHI-on-OSD-screen
@ -0,0 +1,23 @@
|
||||
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
|
||||
Upstream-Name: INAV Configurator
|
||||
Source: https://github.com/iNavFlight/inav-configurator
|
||||
|
||||
Files: *
|
||||
Copyright: Copyright 2022 The INAV open source project
|
||||
License: GPL-3
|
||||
|
||||
License: GPL-3
|
||||
This program is free software: you can redistribute it and/or modify it under
|
||||
the terms of the GNU General Public License as published by the Free Software
|
||||
Foundation, either version 3 of the License, or (at your option) any later
|
||||
version.
|
||||
.
|
||||
This program is distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
||||
.
|
||||
You should have received a copy of the GNU General Public License along with
|
||||
this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
.
|
||||
On Debian systems, the complete text of the GNU General Public License
|
||||
can be found in `/usr/share/common-licenses/GPL-3'.
|
After Width: | Height: | Size: 9.5 KiB |
After Width: | Height: | Size: 9.5 KiB |
@ -0,0 +1,8 @@
|
||||
[Desktop Entry]
|
||||
Name=INAV Configurator
|
||||
Comment=Crossplatform configuration tool for the INAV flight control system
|
||||
Exec=/opt/inav/inav-configurator/inav-configurator
|
||||
Icon=/opt/inav/inav-configurator/icon/inav_icon_128.png
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Utility
|
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 108 KiB |
After Width: | Height: | Size: 151 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 32 KiB |
@ -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;
|