Fixes, Readme, Makers
parent
6fe68a6b73
commit
0d1502e03d
Binary file not shown.
After Width: | Height: | Size: 14 KiB |
Binary file not shown.
After Width: | Height: | Size: 4.5 KiB |
Binary file not shown.
Before Width: | Height: | Size: 151 KiB |
Binary file not shown.
Before Width: | Height: | Size: 32 KiB |
@ -1,169 +0,0 @@
|
||||
; ------------------------------------------
|
||||
; 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 + "_" + 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;
|
@ -0,0 +1,162 @@
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"
|
||||
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension">
|
||||
<!-- http://wixtoolset.org/documentation/manual/v3/xsd/wix/product.html -->
|
||||
<Product Id="{{ProductCode}}"
|
||||
UpgradeCode="{{UpgradeCode}}"
|
||||
Name = "{{ApplicationName}}"
|
||||
Version="{{Version}}"
|
||||
Manufacturer="{{Manufacturer}}"
|
||||
Language="{{Language}}">
|
||||
<!-- Only run this installer on Windows 7 or up (or if it"s already installed, I guess) -->
|
||||
<!-- <Condition Message="This application is only supported on Windows 7 or higher.">
|
||||
<![CDATA[Installed OR (VersionNT >= 601)]]>
|
||||
</Condition> -->
|
||||
<!-- http://wixtoolset.org/documentation/manual/v3/xsd/wix/package.html -->
|
||||
<Package InstallerVersion="405"
|
||||
Compressed="yes"
|
||||
Comments="Windows Installer Package"
|
||||
Platform="{{Platform}}"
|
||||
InstallScope="{{PackageScope}}"/>
|
||||
<!-- Don't allow downgrades -->
|
||||
<MajorUpgrade AllowSameVersionUpgrades="yes" DowngradeErrorMessage="A later version of this product is already installed. Setup will now exit."/>
|
||||
<!-- This will hide our Uninstall entry in Apps & Features. We doing this so
|
||||
we can write our own which we can better control. -->
|
||||
<Property Id="ARPSYSTEMCOMPONENT" Value="1" />
|
||||
<!-- While the MSI package is hidden in Apps & Features, it can still be queried
|
||||
via PowerShell and other means. To differentiate we give the public entry a slightly
|
||||
different name to make admins life easier. -->
|
||||
<Property Id="VisibleProductName" Value="{{ApplicationName}}" />
|
||||
<!-- Tells the package to install perUser or perMachine. In case of perUser, all
|
||||
files will be redirected to the user profile and all registry entries to HKCU. -->
|
||||
<Property Id="MSIINSTALLPERUSER" Secure="yes" Value="{{InstallPerUser}}" />
|
||||
<!-- Overides the default install mode. It solves a problem where
|
||||
individual packaged files that have the same version as in previous
|
||||
installed App version will be deleted if the files are in use during
|
||||
this upgrade. Unfortunately this causes an ICE 40 warning during linking. -->
|
||||
<Property Id="REINSTALLMODE" Value="emus" />
|
||||
<!-- Overrides the default reboot behavior if files are in use during the upgrade.
|
||||
By default, this will be set to "ReallySuppress" to make sure no unexpected reboot will happpen.-->
|
||||
<Property Id="REBOOT" Value="{{RebootMode}}" />
|
||||
<!-- Installlation level to use that determines which features are installed.
|
||||
see guides/enduser.md to check which Install Level maps to which feature that will
|
||||
correspondingly get installed.
|
||||
If not set, this will default to "2" (Main Feature, Launch On Login) -->
|
||||
<Property Id="INSTALLLEVEL" Value="{{InstallLevel}}" />
|
||||
<!-- Allows to customize the Windows user group that gets access rights on
|
||||
the install folder in cas the auto-updater is installed. User that run the App
|
||||
must be part of that user group to be able to auto-update. -->
|
||||
<Property Id="UPDATERUSERGROUP" Value="Users" />
|
||||
<!-- A property to define whether the auto-updater is enabled when the
|
||||
feature gets installed. This way the update can be installed but also be disabled
|
||||
by overwriting the default value. -->
|
||||
<Property Id="AUTOUPDATEENABLED" Value="1" />
|
||||
<!-- Necessary registry search to find the install path which is used by the
|
||||
PurgeOnUninstall action. Since this package can be installed perUser or perMachine,
|
||||
we have to look in both places. First successful search wins. -->
|
||||
<Property Id="INSTALLPATH">
|
||||
<RegistrySearch Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{{ProductCode}}}.msq"
|
||||
Root="HKCU"
|
||||
Type="raw"
|
||||
Id="INSTALLPATH_REGSEARCH_HKCU"
|
||||
Name="InstallPath"
|
||||
Win64="{{Win64YesNo}}"/>
|
||||
<RegistrySearch Key="SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{{{ProductCode}}}.msq"
|
||||
Root="HKLM"
|
||||
Type="raw"
|
||||
Id="INSTALLPATH_REGSEARCH_HKLM"
|
||||
Name="InstallPath"
|
||||
Win64="{{Win64YesNo}}"/>
|
||||
</Property>
|
||||
<!-- Lets change the product name depending on the perUser installMode.
|
||||
This way the user and admins can see in which scope the MSI was installed. -->
|
||||
<SetProperty Action="SetVisibleProductName" Id="VisibleProductName" Sequence="both" Before="AppSearch" Value="{{ApplicationName}} (User)">
|
||||
<![CDATA[MSIINSTALLPERUSER = "1"]]>
|
||||
</SetProperty>
|
||||
<!-- Again we give thee MSI generaten entry a slightly different name to help
|
||||
differentiate between the public one and the invisible one. -->
|
||||
<SetProperty Action="SetProductName" Id="ProductName" Sequence="both" Before="AppSearch" Value="{{ApplicationName}} (User - MSI)">
|
||||
<![CDATA[MSIINSTALLPERUSER = "1"]]>
|
||||
</SetProperty>
|
||||
|
||||
<Media Id="1" Cabinet="product.cab" EmbedCab="yes"/>
|
||||
<!-- {{Icon}}-->
|
||||
<!-- {{UI}} -->
|
||||
|
||||
<!-- Step 2: Add files and directories -->
|
||||
<Directory Id="TARGETDIR" Name="SourceDir">
|
||||
<!-- Installation files to %PROGRAMFILES% -->
|
||||
<Directory Id="{{ProgramFilesFolder}}">
|
||||
<!-- {{Directories}} -->
|
||||
</Directory>
|
||||
|
||||
<!-- Desktop -->
|
||||
<Directory Id="DesktopFolder" Name="Desktop" />
|
||||
|
||||
<!-- Start Menu -->
|
||||
<Directory Id="ProgramMenuFolder">
|
||||
<Directory Id="ApplicationProgramsFolder" Name="{{ShortcutFolderName}}"/>
|
||||
</Directory>
|
||||
</Directory>
|
||||
|
||||
<!-- Step 3: Add app to Start Menu -->
|
||||
<DirectoryRef Id="ApplicationProgramsFolder">
|
||||
<Component Id="ApplicationShortcut" Guid="{{ApplicationShortcutGuid}}" Win64="{{Win64YesNo}}">
|
||||
<Shortcut Id="ApplicationStartMenuShortcut"
|
||||
Name="{{ShortcutName}}"
|
||||
Description="{{ApplicationDescription}}"
|
||||
Target="[APPLICATIONROOTDIRECTORY]{{ApplicationBinary}}.exe"
|
||||
WorkingDirectory="APPLICATIONROOTDIRECTORY">
|
||||
<!-- {{ShortcutProperties}} -->
|
||||
</Shortcut>
|
||||
<RemoveFolder Id="ApplicationProgramsFolder" On="uninstall"/>
|
||||
<RegistryValue Root="HKCU"
|
||||
Key="Software\Microsoft\{{ApplicationShortName}}"
|
||||
Name="installed"
|
||||
Type="integer"
|
||||
Value="1"
|
||||
KeyPath="yes"/>
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<!-- Step 4: Add app desktop shortcut -->
|
||||
<DirectoryRef Id="DesktopFolder">
|
||||
<Component Id="DesktopShortcut" Guid="{{DesktopShortcutGuid}}" >
|
||||
<Shortcut Id="MyDesktopShortcut"
|
||||
Name="{{ShortcutName}}"
|
||||
Description="{{ApplicationDescription}}"
|
||||
Target="[APPLICATIONROOTDIRECTORY]{{ApplicationBinary}}.exe"
|
||||
WorkingDirectory="APPLICATIONROOTDIRECTORY"/>
|
||||
<RegistryValue Root="HKCU"
|
||||
Key="Software\Microsoft\{{ApplicationShortName}}"
|
||||
Name="installed"
|
||||
Type="integer"
|
||||
Value="1"
|
||||
KeyPath="yes" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<!-- {{AutoUpdatePermissions}} -->
|
||||
|
||||
<!-- Lets cleanup any files that are were not part of the initial install
|
||||
via this MSI. Such as newer versions installed by the auto-updater. -->
|
||||
<DirectoryRef Id="APPLICATIONROOTDIRECTORY">
|
||||
<Component Id="PurgeOnUninstall" Guid="{{RandomGuid}}" Win64="{{Win64YesNo}}">
|
||||
<CreateFolder/>
|
||||
<util:RemoveFolderEx On="uninstall" Property="INSTALLPATH" />
|
||||
</Component>
|
||||
</DirectoryRef>
|
||||
|
||||
<Feature Id="Complete" Title="{{ApplicationName}} ({{SemanticVersion}})" Description="The complete package." Display="expand" Level="1" {{ConfigurableDirectory}}>
|
||||
<!-- Step 5: Tell WiX to install the files -->
|
||||
<Feature Id="MainApplication" Title="Main Application" Level="1" Description="The main components to run the applications." >
|
||||
<!-- {{ComponentRefs}} -->
|
||||
<ComponentRef Id="ApplicationShortcut" />
|
||||
<ComponentRef Id="DesktopShortcut" />
|
||||
<ComponentRef Id="PurgeOnUninstall" />
|
||||
</Feature>
|
||||
<!-- {{AutoLaunchFeature}} -->
|
||||
<!-- {{AutoUpdateFeature}} -->
|
||||
</Feature>
|
||||
<!-- {{AutoRun}} -->
|
||||
</Product>
|
||||
</Wix>
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue