-
-
Notifications
You must be signed in to change notification settings - Fork 354
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move files to generate windows installer under dist/windows (#1765)
- Loading branch information
Showing
8 changed files
with
135 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
$name=$args[0] | ||
$bits=$args[1] | ||
$end=$args.Length | ||
$meson_options=$args[2..$end] | ||
$scriptpath=$PSScriptRoot | ||
$builddir=$(Join-Path -Path $env:TEMP -ChildPath "build-win-installer") | ||
$installdir=$(Join-Path -Path $env:TEMP -ChildPath "rizin-win-installer") | ||
|
||
pushd $PSScriptRoot\..\.. | ||
|
||
$version=$(python sys\version.py) | ||
echo $version | ||
|
||
$env:Path += ";$env:ProgramFiles (x86)\Microsoft Visual Studio\Installer" | ||
$env:Path += ";$env:ProgramFiles\7-Zip" | ||
$env:Path += ";$env:ProgramFiles (x86)\Inno Setup 6" | ||
|
||
dist\windows\vsdevenv.ps1 $bits | ||
|
||
meson --buildtype=release --prefix=$installdir $builddir $meson_options | ||
ninja -C $builddir | ||
ninja -C $builddir install | ||
7z a dist\windows\Output\rizin-$name-$version.zip $installdir | ||
iscc dist\windows\rizin.iss /DRizinLocation=$installdir\* /DLicenseLocation=$PWD\COPYING.LESSER /DMyAppVersion=$version | ||
|
||
rm -r $builddir | ||
rm -r $installdir | ||
|
||
popd |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
; Script generated by the Inno Setup Script Wizard. | ||
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES! | ||
|
||
#define MyAppName "Rizin" | ||
#define MyAppPublisher "RizinOrg" | ||
#define MyAppURL "https://rizin.re/" | ||
#define MyAppExeName "bin\rizin.exe" | ||
#define IcoLocation "rizin.ico" | ||
|
||
[Setup] | ||
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications. | ||
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) | ||
AppId={{CB991F68-90D9-4DE5-92F4-0F9DC81E6C1F} | ||
AppName={#MyAppName} | ||
AppVersion={#MyAppVersion} | ||
;AppVerName={#MyAppName} {#MyAppVersion} | ||
AppPublisher={#MyAppPublisher} | ||
AppPublisherURL={#MyAppURL} | ||
AppSupportURL={#MyAppURL} | ||
AppUpdatesURL={#MyAppURL} | ||
ArchitecturesInstallIn64BitMode=x64 | ||
DefaultDirName={autopf}\{#MyAppName} | ||
DisableProgramGroupPage=yes | ||
; Remove the following line to run in administrative install mode (install for all users.) | ||
PrivilegesRequired=lowest | ||
PrivilegesRequiredOverridesAllowed=dialog | ||
OutputBaseFilename=rizin | ||
SetupIconFile={#IcoLocation} | ||
LicenseFile={#LicenseLocation} | ||
Compression=lzma | ||
SolidCompression=yes | ||
WizardStyle=modern | ||
|
||
[Languages] | ||
Name: "english"; MessagesFile: "compiler:Default.isl" | ||
Name: "brazilianportuguese"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl" | ||
Name: "catalan"; MessagesFile: "compiler:Languages\Catalan.isl" | ||
Name: "corsican"; MessagesFile: "compiler:Languages\Corsican.isl" | ||
Name: "czech"; MessagesFile: "compiler:Languages\Czech.isl" | ||
Name: "danish"; MessagesFile: "compiler:Languages\Danish.isl" | ||
Name: "dutch"; MessagesFile: "compiler:Languages\Dutch.isl" | ||
Name: "finnish"; MessagesFile: "compiler:Languages\Finnish.isl" | ||
Name: "french"; MessagesFile: "compiler:Languages\French.isl" | ||
Name: "german"; MessagesFile: "compiler:Languages\German.isl" | ||
Name: "hebrew"; MessagesFile: "compiler:Languages\Hebrew.isl" | ||
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl" | ||
Name: "japanese"; MessagesFile: "compiler:Languages\Japanese.isl" | ||
Name: "norwegian"; MessagesFile: "compiler:Languages\Norwegian.isl" | ||
Name: "polish"; MessagesFile: "compiler:Languages\Polish.isl" | ||
Name: "portuguese"; MessagesFile: "compiler:Languages\Portuguese.isl" | ||
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" | ||
Name: "slovenian"; MessagesFile: "compiler:Languages\Slovenian.isl" | ||
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl" | ||
Name: "turkish"; MessagesFile: "compiler:Languages\Turkish.isl" | ||
Name: "ukrainian"; MessagesFile: "compiler:Languages\Ukrainian.isl" | ||
|
||
[Tasks] | ||
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked | ||
|
||
[Files] | ||
Source: {#RizinLocation}; DestDir: "{app}"; Flags: recursesubdirs createallsubdirs | ||
Source: "rizin.ico"; DestDir: "{app}"; Flags: ignoreversion | ||
; NOTE: Don't use "Flags: ignoreversion" on any shared system files | ||
|
||
[Registry] | ||
Root: HKCU; Subkey: "Environment"; ValueType: string; ValueName: "Path"; ValueData: "{reg:HKCU\Environment,Path};{app}\bin"; Check: NeedsAddPath(ExpandConstant('{app}\bin')); | ||
Root: HKCU; SubKey: "SOFTWARE\Classes\*\shell\rizin"; ValueType: string; ValueData: "Open in Rizin"; Flags: uninsdeletekey; | ||
Root: HKCU; SubKey: "SOFTWARE\Classes\*\shell\rizin\command"; ValueType: string; ValueData: "{app}\bin\rizin.exe %1"; Flags: uninsdeletekey; | ||
Root: HKCU; SubKey: "SOFTWARE\Classes\*\shell\rizind"; ValueType: string; ValueData: "Open in Rizin debugger"; Flags: uninsdeletekey; | ||
Root: HKCU; SubKey: "SOFTWARE\Classes\*\shell\rizind\command"; ValueType: string; ValueData: "{app}\bin\rizin.exe -d %1"; Flags: uninsdeletekey; | ||
|
||
[Icons] | ||
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Parameters: "--"; IconFilename: "{autopf}\{#MyAppName}\rizin.ico" | ||
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Parameters: "--"; IconFilename: "{autopf}\{#MyAppName}\rizin.ico"; Tasks: desktopicon | ||
|
||
[Run] | ||
Filename: "{app}\{#MyAppExeName}"; Parameters: "--"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent | ||
|
||
[Code] | ||
function NeedsAddPath(Param: string): boolean; | ||
var | ||
OrigPath: string; | ||
begin | ||
if not RegQueryStringValue( | ||
HKEY_CURRENT_USER, | ||
'Environment', | ||
'Path', OrigPath) | ||
then begin | ||
Result := True; | ||
exit; | ||
end; | ||
{ look for the path with leading and trailing semicolon } | ||
{ Pos() returns 0 if not found } | ||
Result := | ||
(Pos(';' + UpperCase(Param) + ';', ';' + UpperCase(OrigPath) + ';') = 0) and | ||
(Pos(';' + UpperCase(Param) + '\;', ';' + UpperCase(OrigPath) + ';') = 0); | ||
end; |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters