bisq/desktop/package/windows/Bisq.iss

208 lines
6.4 KiB
Text
Raw Normal View History

;This file will be executed next to the application bundle image
2017-06-28 00:42:26 +02:00
;I.e. current directory will contain folder Bisq with application files
;Note: This file must use UTF-8 encoding with BOM for the unicode custom messages to be displayed properly
#define SourceDir GetEnv('package_dir') + '\windows'
Update windows packaging process The 64bitBuild.bat script has been renamed to package.bat and has been updated so that it is capable of performing the complete packaging process without having to rely on the jar first being built and prepped from the MacOS scripts. However, it does support having the jar previously built and prepped and will look for a prepped jar in the desktop/package folder. If not found, it will build and prep it prior to packaging the executable. Additionally, some unnecessary options that were being passed to javapackager.exe have been eliminated such as BappVersion and Bruntime. AppVersion is now being passed via environment variables and the Bruntime option is valid only when the -native option is set to jnlp. The Bisq.iss file was changed so it no longer needs to be updated with AppVersion every time as it is being passed from package.bat via environment variables. Also, AppCopyrightYear does not need to be updated as it is determined automatically. A few other options were added or tweaked as well. Finally, a release.bat script has been added that will perform the release process of copying necessary files to a versioned release folder and generating/verifying signatures. Linux and MacOS packaged installers should be copied to their appropriate package folders prior to executing this script if they are to be included in this release process, otherwise only the Windows files will be included. The MacOS and Linux packaging scripts should be reviewed and updated accordingly.
2018-12-22 01:14:54 -08:00
#define AppVersion GetEnv('version')
#define FileVersion GetEnv('file_version')
#define AppCopyrightYear GetDateTimeString('yyyy', '-', ':')
Update windows packaging process The 64bitBuild.bat script has been renamed to package.bat and has been updated so that it is capable of performing the complete packaging process without having to rely on the jar first being built and prepped from the MacOS scripts. However, it does support having the jar previously built and prepped and will look for a prepped jar in the desktop/package folder. If not found, it will build and prep it prior to packaging the executable. Additionally, some unnecessary options that were being passed to javapackager.exe have been eliminated such as BappVersion and Bruntime. AppVersion is now being passed via environment variables and the Bruntime option is valid only when the -native option is set to jnlp. The Bisq.iss file was changed so it no longer needs to be updated with AppVersion every time as it is being passed from package.bat via environment variables. Also, AppCopyrightYear does not need to be updated as it is determined automatically. A few other options were added or tweaked as well. Finally, a release.bat script has been added that will perform the release process of copying necessary files to a versioned release folder and generating/verifying signatures. Linux and MacOS packaged installers should be copied to their appropriate package folders prior to executing this script if they are to be included in this release process, otherwise only the Windows files will be included. The MacOS and Linux packaging scripts should be reviewed and updated accordingly.
2018-12-22 01:14:54 -08:00
[Setup]
2017-06-28 00:42:26 +02:00
AppId={{bisq}}
AppName=Bisq
Update windows packaging process The 64bitBuild.bat script has been renamed to package.bat and has been updated so that it is capable of performing the complete packaging process without having to rely on the jar first being built and prepped from the MacOS scripts. However, it does support having the jar previously built and prepped and will look for a prepped jar in the desktop/package folder. If not found, it will build and prep it prior to packaging the executable. Additionally, some unnecessary options that were being passed to javapackager.exe have been eliminated such as BappVersion and Bruntime. AppVersion is now being passed via environment variables and the Bruntime option is valid only when the -native option is set to jnlp. The Bisq.iss file was changed so it no longer needs to be updated with AppVersion every time as it is being passed from package.bat via environment variables. Also, AppCopyrightYear does not need to be updated as it is determined automatically. A few other options were added or tweaked as well. Finally, a release.bat script has been added that will perform the release process of copying necessary files to a versioned release folder and generating/verifying signatures. Linux and MacOS packaged installers should be copied to their appropriate package folders prior to executing this script if they are to be included in this release process, otherwise only the Windows files will be included. The MacOS and Linux packaging scripts should be reviewed and updated accordingly.
2018-12-22 01:14:54 -08:00
AppVersion={#AppVersion}
AppVerName=Bisq v{#AppVersion}
2017-06-28 00:42:26 +02:00
AppPublisher=Bisq
AppComments={cm:AppComments}
Update windows packaging process The 64bitBuild.bat script has been renamed to package.bat and has been updated so that it is capable of performing the complete packaging process without having to rely on the jar first being built and prepped from the MacOS scripts. However, it does support having the jar previously built and prepped and will look for a prepped jar in the desktop/package folder. If not found, it will build and prep it prior to packaging the executable. Additionally, some unnecessary options that were being passed to javapackager.exe have been eliminated such as BappVersion and Bruntime. AppVersion is now being passed via environment variables and the Bruntime option is valid only when the -native option is set to jnlp. The Bisq.iss file was changed so it no longer needs to be updated with AppVersion every time as it is being passed from package.bat via environment variables. Also, AppCopyrightYear does not need to be updated as it is determined automatically. A few other options were added or tweaked as well. Finally, a release.bat script has been added that will perform the release process of copying necessary files to a versioned release folder and generating/verifying signatures. Linux and MacOS packaged installers should be copied to their appropriate package folders prior to executing this script if they are to be included in this release process, otherwise only the Windows files will be included. The MacOS and Linux packaging scripts should be reviewed and updated accordingly.
2018-12-22 01:14:54 -08:00
AppCopyright=Copyright (C) {#AppCopyrightYear}
2017-10-11 07:21:50 -05:00
AppPublisherURL=https://bisq.network
Update windows packaging process The 64bitBuild.bat script has been renamed to package.bat and has been updated so that it is capable of performing the complete packaging process without having to rely on the jar first being built and prepped from the MacOS scripts. However, it does support having the jar previously built and prepped and will look for a prepped jar in the desktop/package folder. If not found, it will build and prep it prior to packaging the executable. Additionally, some unnecessary options that were being passed to javapackager.exe have been eliminated such as BappVersion and Bruntime. AppVersion is now being passed via environment variables and the Bruntime option is valid only when the -native option is set to jnlp. The Bisq.iss file was changed so it no longer needs to be updated with AppVersion every time as it is being passed from package.bat via environment variables. Also, AppCopyrightYear does not need to be updated as it is determined automatically. A few other options were added or tweaked as well. Finally, a release.bat script has been added that will perform the release process of copying necessary files to a versioned release folder and generating/verifying signatures. Linux and MacOS packaged installers should be copied to their appropriate package folders prior to executing this script if they are to be included in this release process, otherwise only the Windows files will be included. The MacOS and Linux packaging scripts should be reviewed and updated accordingly.
2018-12-22 01:14:54 -08:00
AppSupportURL=https://bisq.community
2019-02-20 22:57:16 -08:00
;AppUpdatesURL=https://bisq.network/downloads
Update windows packaging process The 64bitBuild.bat script has been renamed to package.bat and has been updated so that it is capable of performing the complete packaging process without having to rely on the jar first being built and prepped from the MacOS scripts. However, it does support having the jar previously built and prepped and will look for a prepped jar in the desktop/package folder. If not found, it will build and prep it prior to packaging the executable. Additionally, some unnecessary options that were being passed to javapackager.exe have been eliminated such as BappVersion and Bruntime. AppVersion is now being passed via environment variables and the Bruntime option is valid only when the -native option is set to jnlp. The Bisq.iss file was changed so it no longer needs to be updated with AppVersion every time as it is being passed from package.bat via environment variables. Also, AppCopyrightYear does not need to be updated as it is determined automatically. A few other options were added or tweaked as well. Finally, a release.bat script has been added that will perform the release process of copying necessary files to a versioned release folder and generating/verifying signatures. Linux and MacOS packaged installers should be copied to their appropriate package folders prior to executing this script if they are to be included in this release process, otherwise only the Windows files will be included. The MacOS and Linux packaging scripts should be reviewed and updated accordingly.
2018-12-22 01:14:54 -08:00
VersionInfoVersion={#FileVersion}
VersionInfoDescription=Bisq Setup
VersionInfoCopyright=Copyright (C) {#AppCopyrightYear}
2017-06-28 00:42:26 +02:00
DefaultDirName={localappdata}\Bisq
DisableStartupPrompt=Yes
DisableDirPage=Yes
DisableProgramGroupPage=Yes
DisableReadyPage=No
DisableFinishedPage=No
2017-06-28 00:42:26 +02:00
DisableWelcomePage=Yes
DefaultGroupName=Bisq
;Optional License
LicenseFile=
;Windows 7 with Service Pack 1 or above
MinVersion=0,6.1.7601
Update windows packaging process The 64bitBuild.bat script has been renamed to package.bat and has been updated so that it is capable of performing the complete packaging process without having to rely on the jar first being built and prepped from the MacOS scripts. However, it does support having the jar previously built and prepped and will look for a prepped jar in the desktop/package folder. If not found, it will build and prep it prior to packaging the executable. Additionally, some unnecessary options that were being passed to javapackager.exe have been eliminated such as BappVersion and Bruntime. AppVersion is now being passed via environment variables and the Bruntime option is valid only when the -native option is set to jnlp. The Bisq.iss file was changed so it no longer needs to be updated with AppVersion every time as it is being passed from package.bat via environment variables. Also, AppCopyrightYear does not need to be updated as it is determined automatically. A few other options were added or tweaked as well. Finally, a release.bat script has been added that will perform the release process of copying necessary files to a versioned release folder and generating/verifying signatures. Linux and MacOS packaged installers should be copied to their appropriate package folders prior to executing this script if they are to be included in this release process, otherwise only the Windows files will be included. The MacOS and Linux packaging scripts should be reviewed and updated accordingly.
2018-12-22 01:14:54 -08:00
OutputBaseFilename=Bisq-{#AppVersion}
2017-06-28 00:42:26 +02:00
Compression=lzma
SolidCompression=yes
PrivilegesRequired=lowest
2017-12-20 20:57:50 +01:00
SetupIconFile=Bisq\Bisq.ico
UninstallDisplayIcon={app}\Bisq.ico
UninstallDisplayName=Bisq
WizardImageFile={#SourceDir}\Bisq-setup-image.bmp
2017-06-28 00:42:26 +02:00
WizardImageStretch=No
WizardSmallImageFile=Bisq-setup-icon.bmp
2017-06-28 00:42:26 +02:00
ArchitecturesInstallIn64BitMode=x64
ShowLanguageDialog=No
2017-06-28 00:42:26 +02:00
[Languages]
Name: en; MessagesFile: "compiler:Default.isl"
Name: de; MessagesFile: "compiler:Languages\German.isl"
Name: fr; MessagesFile: "compiler:Languages\French.isl"
Name: sp; MessagesFile: "compiler:Languages\Spanish.isl"
[CustomMessages]
en.AppComments=The decentralized exchange network
en.AppIsRunning=Bisq is running, please close it and run setup again.
de.AppComments=Das dezentrale Austauschnetzwerk
de.AppIsRunning=Bisq läuft, bitte schließen Sie es und führen Sie das Setup erneut aus.
fr.AppComments=Le réseau d'échange décentralisé
fr.AppIsRunning=Bisq est en cours d'exécution, fermez-le et exécutez à nouveau le programme d'installation.
sp.AppComments=La red de intercambio descentralizado
sp.AppIsRunning=Bisq se está ejecutando, ciérrelo y vuelva a ejecutar la configuración.
2017-06-28 00:42:26 +02:00
[Files]
Source: "Bisq\Bisq.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "Bisq\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
[Icons]
Name: "{group}\Bisq"; Filename: "{app}\Bisq.exe"; IconFilename: "{app}\Bisq.ico"
Name: "{userdesktop}\Bisq"; Filename: "{app}\Bisq.exe"; IconFilename: "{app}\Bisq.ico"
2017-06-28 00:42:26 +02:00
[Run]
Filename: "{app}\Bisq.exe"; Description: "{cm:LaunchProgram,Bisq}"; Flags: nowait postinstall skipifsilent
2017-06-28 00:42:26 +02:00
[Code]
procedure DirectoryCopy(SourcePath, DestPath: string);
var
FindRec: TFindRec;
SourceFilePath: string;
DestFilePath: string;
begin
if FindFirst(SourcePath + '\*', FindRec) then
begin
try
repeat
if (FindRec.Name <> '.') and (FindRec.Name <> '..') then
begin
SourceFilePath := SourcePath + '\' + FindRec.Name;
DestFilePath := DestPath + '\' + FindRec.Name;
if FindRec.Attributes and FILE_ATTRIBUTE_DIRECTORY = 0 then
begin
if FileCopy(SourceFilePath, DestFilePath, False) then
begin
Log(Format('Copied %s to %s', [SourceFilePath, DestFilePath]));
end
else
begin
Log(Format('Failed to copy %s to %s', [SourceFilePath, DestFilePath]));
end;
end
else
begin
if DirExists(DestFilePath) or CreateDir(DestFilePath) then
begin
Log(Format('Created %s', [DestFilePath]));
DirectoryCopy(SourceFilePath, DestFilePath);
end
else
begin
Log(Format('Failed to create %s', [DestFilePath]));
end;
end;
end;
until not FindNext(FindRec);
finally
FindClose(FindRec);
end;
end
else
begin
Log(Format('Failed to list %s', [SourcePath]));
end;
end;
//Delete old app directory to prevent issues during update
procedure DeleteOldAppDataDirectory;
var
entry: String;
begin
entry := ExpandConstant('{localappdata}') + '\Bisq\';
if DirExists(entry) then begin
DelTree(entry, true, true, true);
end;
end;
procedure DeleteTorFiles;
var
mainnetDir: String;
torDir: String;
hiddenServiceDir: String;
hiddenServiceBackupDir : String;
begin
mainnetDir := ExpandConstant('{userappdata}') + '\Bisq\btc_mainnet';
torDir := mainnetDir + '\tor\*';
hiddenServiceDir := mainnetDir + '\tor\hiddenservice';
hiddenServiceBackupDir := mainnetDir + '\hiddenservice_backup';
if DirExists(hiddenServiceDir) then begin
if DirExists(hiddenServiceBackupDir) then begin
DelTree(hiddenServiceBackupDir, true, true, true);
end;
CreateDir(hiddenServiceBackupDir);
DirectoryCopy(hiddenServiceDir, hiddenServiceBackupDir);
DelTree(torDir, false, true, true);
CreateDir(hiddenServiceDir);
DirectoryCopy(hiddenServiceBackupDir, hiddenServiceDir);
end;
end;
function PrepareToInstall(var NeedsRestart: Boolean): String;
begin
DeleteOldAppDataDirectory;
DeleteTorFiles;
Result := '';
end;
function IsAppRunning(): Boolean;
var
FSWbemLocator : Variant;
FWMIService : Variant;
FWbemObjectSet : Variant;
ExecutablePath : String;
begin
Result := False;
ExecutablePath := Format('%s\Bisq\Bisq.exe', [ExpandConstant('{localappdata}')])
StringChangeEx(ExecutablePath, '\', '\\', True);
try
FSWbemLocator := CreateOleObject('WBEMScripting.SWBEMLocator');
FWMIService := FSWbemLocator.ConnectServer('localhost', 'root\CIMV2', '', '');
FWbemObjectSet := FWMIService.ExecQuery(Format('SELECT Name FROM Win32_Process Where ExecutablePath="%s"', [ExecutablePath]));
Result := (FWbemObjectSet.Count > 0);
FWbemObjectSet := Unassigned;
FWMIService := Unassigned;
FSWbemLocator := Unassigned;
except
end;
end;
2017-06-28 00:42:26 +02:00
function InitializeSetup(): Boolean;
begin
Result := True;
if IsAppRunning() then
begin
MsgBox(ExpandConstant('{cm:AppIsRunning}'), mbCriticalError, MB_OK);
Result := False;
end;
end;
function InitializeUninstall(): Boolean;
begin
Result := True;
if IsAppRunning() then
begin
MsgBox(ExpandConstant('{cm:AppIsRunning}'), mbCriticalError, MB_OK);
Result := False;
end;
2017-06-28 00:42:26 +02:00
end;