mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 23:18:17 +01:00
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.
171 lines
5 KiB
Text
171 lines
5 KiB
Text
;This file will be executed next to the application bundle image
|
|
;I.e. current directory will contain folder Bisq with application files
|
|
#define AppVersion GetEnv('version')
|
|
#define FileVersion GetEnv('file_version')
|
|
#define AppCopyrightYear GetDateTimeString('yyyy', '-', ':')
|
|
|
|
[Setup]
|
|
AppId={{bisq}}
|
|
AppName=Bisq
|
|
AppVersion={#AppVersion}
|
|
AppVerName=Bisq v{#AppVersion}
|
|
AppPublisher=Bisq
|
|
AppComments=Bisq
|
|
AppCopyright=Copyright (C) {#AppCopyrightYear}
|
|
AppPublisherURL=https://bisq.network
|
|
AppSupportURL=https://bisq.community
|
|
;AppUpdatesURL=https://github.com/bisq-network/bisq/releases
|
|
VersionInfoVersion={#FileVersion}
|
|
VersionInfoDescription=Bisq Setup
|
|
VersionInfoCopyright=Copyright (C) {#AppCopyrightYear}
|
|
DefaultDirName={localappdata}\Bisq
|
|
DisableStartupPrompt=Yes
|
|
DisableDirPage=Yes
|
|
DisableProgramGroupPage=Yes
|
|
DisableReadyPage=Yes
|
|
DisableFinishedPage=Yes
|
|
DisableWelcomePage=Yes
|
|
DefaultGroupName=Bisq
|
|
;Optional License
|
|
LicenseFile=
|
|
;WinXP or above
|
|
MinVersion=0,5.1
|
|
OutputBaseFilename=Bisq-{#AppVersion}
|
|
Compression=lzma
|
|
SolidCompression=yes
|
|
PrivilegesRequired=lowest
|
|
SetupIconFile=Bisq\Bisq.ico
|
|
UninstallDisplayIcon={app}\Bisq.ico
|
|
UninstallDisplayName=Bisq
|
|
WizardImageStretch=No
|
|
WizardSmallImageFile=Bisq-setup-icon.bmp
|
|
ArchitecturesInstallIn64BitMode=x64
|
|
ChangesAssociations=Yes
|
|
|
|
[Languages]
|
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
|
|
|
[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"; Check: returnTrue()
|
|
Name: "{commondesktop}\Bisq"; Filename: "{app}\Bisq.exe"; IconFilename: "{app}\Bisq.ico"; Check: returnFalse()
|
|
|
|
[Run]
|
|
Filename: "{app}\Bisq.exe"; Description: "{cm:LaunchProgram,Bisq}"; Flags: nowait postinstall skipifsilent; Check: returnTrue()
|
|
Filename: "{app}\Bisq.exe"; Parameters: "-install -svcName ""Bisq"" -svcDesc ""Bisq"" -mainExe ""Bisq.exe"" "; Check: returnFalse()
|
|
|
|
[UninstallRun]
|
|
Filename: "{app}\Bisq.exe "; Parameters: "-uninstall -svcName Bisq -stopOnUninstall"; Check: returnFalse()
|
|
|
|
[Code]
|
|
function returnTrue(): Boolean;
|
|
begin
|
|
Result := True;
|
|
end;
|
|
|
|
function returnFalse(): Boolean;
|
|
begin
|
|
Result := False;
|
|
end;
|
|
|
|
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 InitializeSetup(): Boolean;
|
|
begin
|
|
// Possible future improvements:
|
|
// if version less or same => just launch app
|
|
// if upgrade => check if same app is running and wait for it to exit
|
|
// Add pack200/unpack200 support?
|
|
Result := True;
|
|
end;
|