mirror of
https://github.com/chylex/TweetDuck.git
synced 2025-04-13 09:15:47 +02:00
Update installers to Inno Setup 6 & remove references to .NET Framework
This commit is contained in:
parent
35c2ee3673
commit
1cf7d13873
10
README.md
10
README.md
@ -66,15 +66,15 @@ Icons and logos were designed in [Affinity Designer](https://affinity.serif.com/
|
|||||||
> If you don't want to build installers using the existing foundations, you can skip this section.
|
> If you don't want to build installers using the existing foundations, you can skip this section.
|
||||||
|
|
||||||
Official Windows installers are built using [InnoSetup](https://jrsoftware.org/isinfo.php) and [Inno Download Plugin](https://mitrichsoftware.wordpress.com/inno-setup-tools/inno-download-plugin/), specifically:
|
Official Windows installers are built using [InnoSetup](https://jrsoftware.org/isinfo.php) and [Inno Download Plugin](https://mitrichsoftware.wordpress.com/inno-setup-tools/inno-download-plugin/), specifically:
|
||||||
* [InnoSetup 5.6.1](https://files.jrsoftware.org/is/5/innosetup-5.6.1.exe) with Preprocessor support
|
* [InnoSetup 6.2.1](https://files.jrsoftware.org/is/6/innosetup-6.2.1.exe)
|
||||||
* [Inno Download Plugin 1.5.0](https://drive.google.com/folderview?id=0Bzw1xBVt0mokSXZrUEFIanV4azA&usp=sharing#list)
|
* [Inno Download Plugin 1.5.1](https://drive.google.com/folderview?id=0Bzw1xBVt0mokSXZrUEFIanV4azA&usp=sharing#list)
|
||||||
|
|
||||||
When installing InnoSetup, you can choose to include Inno Script Studio which I recommend for editing and testing installer configuration files in the `bld` folder (`.iss` extension).
|
During installation, the download plugin will ask whether to add its include path to `ISPPBuiltins.iss`. Note that this option does not work with InnoSetup 6, so TweetDuck installers don't need it.
|
||||||
|
|
||||||
Scripts for building installers require the `PATH` environment variable to include the InnoSetup installation folder. You can either edit `PATH` manually, or use a program like [Rapid Environment Editor](https://www.rapidee.com/en/about) to simplify the process. For example, this is the installation folder I added to `PATH` under **User variables**:
|
Scripts for building installers require the `PATH` environment variable to include the InnoSetup installation folder. You can either edit `PATH` manually, or use a program like [Rapid Environment Editor](https://www.rapidee.com/en/about) to simplify the process. For example, this is the installation folder I added to `PATH` under **User variables**:
|
||||||
* `C:\Program Files (x86)\Inno Setup 5`
|
* `C:\Program Files (x86)\Inno Setup 6`
|
||||||
|
|
||||||
You may need to restart Visual Studio after changing `PATH` for the change to take place.
|
You may need to restart Visual Studio or Rider after changing `PATH` for the change to take place.
|
||||||
|
|
||||||
## Solution Overview
|
## Solution Overview
|
||||||
|
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
|
|
||||||
#define MyAppVersion GetFileVersion("..\windows\TweetDuck\bin\x86\Release\TweetDuck.exe")
|
#define MyAppVersion GetFileVersion("..\windows\TweetDuck\bin\x86\Release\TweetDuck.exe")
|
||||||
|
|
||||||
|
#include ReadReg(HKLM, "Software\Mitrich Software\Inno Download Plugin", "InstallDir") + "\idp.iss"
|
||||||
|
|
||||||
[Setup]
|
[Setup]
|
||||||
AppId={{8C25A716-7E11-4AAD-9992-8B5D0C78AE06}
|
AppId={{8C25A716-7E11-4AAD-9992-8B5D0C78AE06}
|
||||||
AppName={#MyAppName}
|
AppName={#MyAppName}
|
||||||
@ -29,13 +31,11 @@ Uninstallable=TDIsUninstallable
|
|||||||
UninstallDisplayName={#MyAppName}
|
UninstallDisplayName={#MyAppName}
|
||||||
UninstallDisplayIcon={app}\{#MyAppExeName}
|
UninstallDisplayIcon={app}\{#MyAppExeName}
|
||||||
Compression=lzma2/ultra
|
Compression=lzma2/ultra
|
||||||
LZMADictionarySize=15360
|
LZMADictionarySize=32768
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
InternalCompressLevel=normal
|
InternalCompressLevel=normal
|
||||||
MinVersion=0,6.1
|
MinVersion=0,6.1
|
||||||
|
|
||||||
#include <idp.iss>
|
|
||||||
|
|
||||||
[Languages]
|
[Languages]
|
||||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
||||||
@ -68,20 +68,11 @@ AdditionalTasks=Additional shortcuts and components:
|
|||||||
var UpdatePath: String;
|
var UpdatePath: String;
|
||||||
var VisitedTasksPage: Boolean;
|
var VisitedTasksPage: Boolean;
|
||||||
|
|
||||||
function TDGetNetFrameworkVersion: Cardinal; forward;
|
{ Prepare installation variables. }
|
||||||
|
|
||||||
{ Check .NET Framework version on startup, ask user if they want to proceed if older than 4.7.2. }
|
|
||||||
function InitializeSetup: Boolean;
|
function InitializeSetup: Boolean;
|
||||||
begin
|
begin
|
||||||
UpdatePath := ExpandConstant('{param:UPDATEPATH}')
|
UpdatePath := ExpandConstant('{param:UPDATEPATH}')
|
||||||
VisitedTasksPage := False
|
VisitedTasksPage := False
|
||||||
|
|
||||||
if (TDGetNetFrameworkVersion() < 461808) and (MsgBox('{#MyAppName} requires .NET Framework 4.7.2 or newer,'+#13+#10+'please visit {#MyAppShortURL} for a download link.'+#13+#10+#13+#10'Do you want to proceed with the setup anyway?', mbCriticalError, MB_YESNO or MB_DEFBUTTON2) = IDNO) then
|
|
||||||
begin
|
|
||||||
Result := False
|
|
||||||
Exit
|
|
||||||
end;
|
|
||||||
|
|
||||||
Result := True
|
Result := True
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -140,17 +131,3 @@ function TDIsUninstallable: Boolean;
|
|||||||
begin
|
begin
|
||||||
Result := (UpdatePath = '')
|
Result := (UpdatePath = '')
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Return DWORD value containing the build version of .NET Framework. }
|
|
||||||
function TDGetNetFrameworkVersion: Cardinal;
|
|
||||||
var FrameworkVersion: Cardinal;
|
|
||||||
|
|
||||||
begin
|
|
||||||
if RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', FrameworkVersion) then
|
|
||||||
begin
|
|
||||||
Result := FrameworkVersion
|
|
||||||
Exit
|
|
||||||
end;
|
|
||||||
|
|
||||||
Result := 0
|
|
||||||
end;
|
|
||||||
|
@ -9,6 +9,8 @@
|
|||||||
|
|
||||||
#define MyAppVersion GetFileVersion("..\windows\TweetDuck\bin\x86\Release\TweetDuck.exe")
|
#define MyAppVersion GetFileVersion("..\windows\TweetDuck\bin\x86\Release\TweetDuck.exe")
|
||||||
|
|
||||||
|
#include ReadReg(HKLM, "Software\Mitrich Software\Inno Download Plugin", "InstallDir") + "\idp.iss"
|
||||||
|
|
||||||
[Setup]
|
[Setup]
|
||||||
AppId={{8C25A716-7E11-4AAD-9992-8B5D0C78AE06}
|
AppId={{8C25A716-7E11-4AAD-9992-8B5D0C78AE06}
|
||||||
AppName={#MyAppName} Portable
|
AppName={#MyAppName} Portable
|
||||||
@ -29,13 +31,11 @@ Uninstallable=no
|
|||||||
UsePreviousAppDir=no
|
UsePreviousAppDir=no
|
||||||
PrivilegesRequired=lowest
|
PrivilegesRequired=lowest
|
||||||
Compression=lzma2/ultra
|
Compression=lzma2/ultra
|
||||||
LZMADictionarySize=15360
|
LZMADictionarySize=32768
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
InternalCompressLevel=normal
|
InternalCompressLevel=normal
|
||||||
MinVersion=0,6.1
|
MinVersion=0,6.1
|
||||||
|
|
||||||
#include <idp.iss>
|
|
||||||
|
|
||||||
[Languages]
|
[Languages]
|
||||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
||||||
@ -52,19 +52,10 @@ AdditionalTasks=Additional components:
|
|||||||
[Code]
|
[Code]
|
||||||
var UpdatePath: String;
|
var UpdatePath: String;
|
||||||
|
|
||||||
function TDGetNetFrameworkVersion: Cardinal; forward;
|
{ Prepare installation variables. }
|
||||||
|
|
||||||
{ Check .NET Framework version on startup, ask user if they want to proceed if older than 4.7.2. }
|
|
||||||
function InitializeSetup: Boolean;
|
function InitializeSetup: Boolean;
|
||||||
begin
|
begin
|
||||||
UpdatePath := ExpandConstant('{param:UPDATEPATH}')
|
UpdatePath := ExpandConstant('{param:UPDATEPATH}')
|
||||||
|
|
||||||
if (TDGetNetFrameworkVersion() < 461808) and (MsgBox('{#MyAppName} requires .NET Framework 4.7.2 or newer,'+#13+#10+'please visit {#MyAppShortURL} for a download link.'+#13+#10+#13+#10'Do you want to proceed with the setup anyway?', mbCriticalError, MB_YESNO or MB_DEFBUTTON2) = IDNO) then
|
|
||||||
begin
|
|
||||||
Result := False
|
|
||||||
Exit
|
|
||||||
end;
|
|
||||||
|
|
||||||
Result := True
|
Result := True
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -102,17 +93,3 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Return DWORD value containing the build version of .NET Framework. }
|
|
||||||
function TDGetNetFrameworkVersion: Cardinal;
|
|
||||||
var FrameworkVersion: Cardinal;
|
|
||||||
|
|
||||||
begin
|
|
||||||
if RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', FrameworkVersion) then
|
|
||||||
begin
|
|
||||||
Result := FrameworkVersion
|
|
||||||
Exit
|
|
||||||
end;
|
|
||||||
|
|
||||||
Result := 0
|
|
||||||
end;
|
|
||||||
|
@ -11,6 +11,8 @@
|
|||||||
#define MyAppVersion GetFileVersion("..\windows\TweetDuck\bin\x86\Release\TweetDuck.exe")
|
#define MyAppVersion GetFileVersion("..\windows\TweetDuck\bin\x86\Release\TweetDuck.exe")
|
||||||
#define CefVersion GetFileVersion("..\windows\TweetDuck\bin\x86\Release\libcef.dll")
|
#define CefVersion GetFileVersion("..\windows\TweetDuck\bin\x86\Release\libcef.dll")
|
||||||
|
|
||||||
|
#include ReadReg(HKLM, "Software\Mitrich Software\Inno Download Plugin", "InstallDir") + "\idp.iss"
|
||||||
|
|
||||||
[Setup]
|
[Setup]
|
||||||
AppId={{{#MyAppID}}
|
AppId={{{#MyAppID}}
|
||||||
AppName={#MyAppName}
|
AppName={#MyAppName}
|
||||||
@ -37,8 +39,6 @@ SolidCompression=True
|
|||||||
InternalCompressLevel=normal
|
InternalCompressLevel=normal
|
||||||
MinVersion=0,6.1
|
MinVersion=0,6.1
|
||||||
|
|
||||||
#include <idp.iss>
|
|
||||||
|
|
||||||
[Languages]
|
[Languages]
|
||||||
Name: "english"; MessagesFile: "compiler:Default.isl"
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
||||||
@ -84,7 +84,6 @@ Type: filesandordirs; Name: "{app}\scripts"
|
|||||||
function TDIsUninstallable: Boolean; forward;
|
function TDIsUninstallable: Boolean; forward;
|
||||||
function TDGetRunArgs(Param: String): String; forward;
|
function TDGetRunArgs(Param: String): String; forward;
|
||||||
function TDFindUpdatePath: String; forward;
|
function TDFindUpdatePath: String; forward;
|
||||||
function TDGetNetFrameworkVersion: Cardinal; forward;
|
|
||||||
function TDGetAppVersionClean: String; forward;
|
function TDGetAppVersionClean: String; forward;
|
||||||
function TDGetFullDownloadFileName: String; forward;
|
function TDGetFullDownloadFileName: String; forward;
|
||||||
function TDIsMatchingCEFVersion: Boolean; forward;
|
function TDIsMatchingCEFVersion: Boolean; forward;
|
||||||
@ -93,7 +92,7 @@ procedure TDExecuteFullDownload; forward;
|
|||||||
var IsPortable: Boolean;
|
var IsPortable: Boolean;
|
||||||
var UpdatePath: String;
|
var UpdatePath: String;
|
||||||
|
|
||||||
{ Check .NET Framework version on startup, ask user if they want to proceed if older than 4.7.2. Prepare full download package if required. }
|
{ Prepare update installation, and the full download package if required. }
|
||||||
function InitializeSetup: Boolean;
|
function InitializeSetup: Boolean;
|
||||||
begin
|
begin
|
||||||
IsPortable := ExpandConstant('{param:PORTABLE}') = '1'
|
IsPortable := ExpandConstant('{param:PORTABLE}') = '1'
|
||||||
@ -111,12 +110,6 @@ begin
|
|||||||
idpAddFile('https://github.com/{#MyAppPublisher}/{#MyAppName}/releases/download/'+TDGetAppVersionClean()+'/'+TDGetFullDownloadFileName(), ExpandConstant('{tmp}\{#MyAppName}.Full.exe'))
|
idpAddFile('https://github.com/{#MyAppPublisher}/{#MyAppName}/releases/download/'+TDGetAppVersionClean()+'/'+TDGetFullDownloadFileName(), ExpandConstant('{tmp}\{#MyAppName}.Full.exe'))
|
||||||
end;
|
end;
|
||||||
|
|
||||||
if (TDGetNetFrameworkVersion() < 461808) and (MsgBox('{#MyAppName} requires .NET Framework 4.7.2 or newer,'+#13+#10+'please visit {#MyAppShortURL} for a download link.'+#13+#10+#13+#10'Do you want to proceed with the setup anyway?', mbCriticalError, MB_YESNO or MB_DEFBUTTON2) = IDNO) then
|
|
||||||
begin
|
|
||||||
Result := False
|
|
||||||
Exit
|
|
||||||
end;
|
|
||||||
|
|
||||||
Result := True
|
Result := True
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -211,20 +204,6 @@ begin
|
|||||||
Result := Path
|
Result := Path
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{ Return DWORD value containing the build version of .NET Framework. }
|
|
||||||
function TDGetNetFrameworkVersion: Cardinal;
|
|
||||||
var FrameworkVersion: Cardinal;
|
|
||||||
|
|
||||||
begin
|
|
||||||
if RegQueryDWordValue(HKEY_LOCAL_MACHINE, 'Software\Microsoft\NET Framework Setup\NDP\v4\Full', 'Release', FrameworkVersion) then
|
|
||||||
begin
|
|
||||||
Result := FrameworkVersion
|
|
||||||
Exit
|
|
||||||
end;
|
|
||||||
|
|
||||||
Result := 0
|
|
||||||
end;
|
|
||||||
|
|
||||||
{ Return the name of the full installer file to download from GitHub. }
|
{ Return the name of the full installer file to download from GitHub. }
|
||||||
function TDGetFullDownloadFileName: String;
|
function TDGetFullDownloadFileName: String;
|
||||||
begin
|
begin
|
||||||
|
Loading…
Reference in New Issue
Block a user