mirror of
https://github.com/azure-rtos/guix.git
synced 2025-02-04 07:13:17 +08:00
Add workflow action to generate GUIX Studio installer. (#87)
This commit is contained in:
parent
0928ac82b3
commit
7561c15add
2
.github/workflows/studio_demo_test.yml
vendored
2
.github/workflows/studio_demo_test.yml
vendored
@ -32,7 +32,7 @@ jobs:
|
|||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: scripts\build_studio_demo.cmd
|
run: scripts\build_guix_studio.cmd
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: scripts\test_studio_demo.cmd
|
run: scripts\test_studio_demo.cmd
|
||||||
|
@ -32,7 +32,7 @@ jobs:
|
|||||||
submodules: true
|
submodules: true
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: scripts\build_studio_demo_compile.cmd
|
run: scripts\build_guix.cmd
|
||||||
|
|
||||||
- name: Test
|
- name: Test
|
||||||
run: scripts\test_studio_demo_compile.cmd
|
run: scripts\test_studio_demo_compile.cmd
|
||||||
|
45
.github/workflows/studio_installer.yml
vendored
Normal file
45
.github/workflows/studio_installer.yml
vendored
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
# This is a basic workflow that is manually triggered
|
||||||
|
|
||||||
|
name: GUIX Studio Installer
|
||||||
|
|
||||||
|
# Controls when the action will run.
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||||
|
jobs:
|
||||||
|
# This workflow contains a single job called "linux_job"
|
||||||
|
generate_studio_installer:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
issues: read
|
||||||
|
checks: write
|
||||||
|
pull-requests: write
|
||||||
|
|
||||||
|
# The type of runner that the job will run on
|
||||||
|
runs-on: windows-2019
|
||||||
|
|
||||||
|
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||||
|
steps:
|
||||||
|
- name: Check out the repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
submodules: true
|
||||||
|
|
||||||
|
- name: Install Inno Setup
|
||||||
|
run: scripts\run-pwsh.cmd scripts\install_inno_setup.ps1
|
||||||
|
|
||||||
|
- name: Build GUIX Studio
|
||||||
|
run: scripts\build_guix_studio.cmd
|
||||||
|
|
||||||
|
- name: Download VC++ Redistributable
|
||||||
|
run: scripts\download_vc_redist.cmd
|
||||||
|
|
||||||
|
- name: Generate installer
|
||||||
|
run: scripts\generate_studio_installer.cmd
|
||||||
|
|
||||||
|
- name: Upload installer
|
||||||
|
uses: actions/upload-artifact@v3.1.3
|
||||||
|
with:
|
||||||
|
name: guix_studio_installer
|
||||||
|
path: guix_studio\installer\output\*.exe
|
17
guix_studio/installer/Readme.txt
Normal file
17
guix_studio/installer/Readme.txt
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
|
||||||
|
To generate GUIX Studio installer, follow these steps:
|
||||||
|
|
||||||
|
1) Install Inno Setup from the following link:
|
||||||
|
|
||||||
|
http://www.jrsoftware.org/isinfo.php
|
||||||
|
|
||||||
|
2) Build GUIX Studio executable:
|
||||||
|
Execute script "build_guix_studio.cmd" from scripts folder.
|
||||||
|
|
||||||
|
3) Download Microsoft Visual C++ Redistributable:
|
||||||
|
Execute script "download_vc_redist.cmd" from scripts folder to download the Microsoft Visual C++ Redistributable package.
|
||||||
|
This package is essential for installing Microsoft C and C++(MSVC) runtime libraries.
|
||||||
|
|
||||||
|
4)Run the Inno Setup compiler:
|
||||||
|
Launch the Inno Setup compiler and open /GUIX/installer/guix_installer.iss.
|
||||||
|
Click the compiler button. When the compiler runs cleanly, the installer is generated in output folder.
|
65
guix_studio/installer/guix_installer_release.iss
Normal file
65
guix_studio/installer/guix_installer_release.iss
Normal file
@ -0,0 +1,65 @@
|
|||||||
|
; Script generated by the Inno Setup Script Wizard.
|
||||||
|
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
|
||||||
|
|
||||||
|
[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={{1D4932BC-ACD4-4292-9530-92C8BE2E58CF}
|
||||||
|
AppName= GUIX Studio
|
||||||
|
AppVersion=6.3.0.1
|
||||||
|
;AppPublisher=
|
||||||
|
AppPublisherURL=https://azure.com/rtos
|
||||||
|
AppSupportURL=https://azure.com/rtos
|
||||||
|
AppUpdatesURL=https://azure.com/rtos
|
||||||
|
DefaultDirName={sd}\Azure_RTOS\GUIX_Studio_6.3
|
||||||
|
DefaultGroupName=Azure RTOS
|
||||||
|
CloseApplications=no
|
||||||
|
;LicenseFile=
|
||||||
|
OutputBaseFilename=guix_studio_setup_version_6.3.0.1
|
||||||
|
SetupIconFile=graphics\guix_1616icon.ico
|
||||||
|
Compression=lzma
|
||||||
|
SolidCompression=yes
|
||||||
|
ChangesAssociations=yes
|
||||||
|
UsePreviousAppDir=no
|
||||||
|
UsePreviousGroup=no
|
||||||
|
;SignedUninstaller=yes
|
||||||
|
;SignTool=
|
||||||
|
|
||||||
|
SourceDir=..\
|
||||||
|
OutputDir=installer\output
|
||||||
|
|
||||||
|
[Languages]
|
||||||
|
Name: "english"; MessagesFile: "compiler:Default.isl"
|
||||||
|
|
||||||
|
[CustomMessages]
|
||||||
|
AskAssociate=Associate the GUIX Studio application with the .gxp file extension
|
||||||
|
|
||||||
|
[Tasks]
|
||||||
|
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: checkedonce
|
||||||
|
Name: "associate"; Description: "{cm:AskAssociate}"; GroupDescription: "Other tasks"; Flags: checkedonce
|
||||||
|
|
||||||
|
[Files]
|
||||||
|
Source: "installer\vc_redist.x86.exe"; DestDir: "{tmp}"; Flags: nocompression createallsubdirs recursesubdirs deleteafterinstall
|
||||||
|
Source: "build\vs_2019\Release\guix_studio.exe"; DestDir: "{app}\studio"; DestName: "GUIX_Studio.exe"; Flags: ignoreversion
|
||||||
|
|
||||||
|
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
|
||||||
|
|
||||||
|
[Icons]
|
||||||
|
Name: "{group}\GUIX Studio 6.3\GUIX Studio"; Filename: "{app}\studio\GUIX_Studio.exe"
|
||||||
|
Name: "{group}\GUIX Studio 6.3\GUIX Studio User's Guide"; Filename: "https://aka.ms/azrtos-guix-studio-user-guide"
|
||||||
|
Name: "{group}\GUIX Studio 6.3\GUIX User's Guide"; Filename: "https://aka.ms/azrtos-guix-user-guide"
|
||||||
|
Name: "{group}\GUIX Studio 6.3\{cm:UninstallProgram,GUIX Studio}"; Filename: "{uninstallexe}"
|
||||||
|
Name: "{commondesktop}\GUIX Studio 6.3.0.1"; Filename: "{app}\studio\GUIX_Studio.exe"; Tasks: desktopicon
|
||||||
|
|
||||||
|
[Registry]
|
||||||
|
Root: HKCR; Subkey: ".gxp"; ValueType: string; ValueName: ""; ValueData: "GUIX_Studio_Project"; Flags: uninsdeletevalue; Tasks: associate
|
||||||
|
Root: HKCR; Subkey: "GUIX_Studio_Project"; ValueType: string; ValueName: ""; ValueData: "GUIX Studio Project"; Flags: uninsdeletekey; Tasks: associate
|
||||||
|
Root: HKCR; Subkey: "GUIX_Studio_Project\DefaultIcon"; ValueType: string; ValueName: ""; ValueData: "{app}\studio\GUIX_Studio.exe,0"; Tasks: associate
|
||||||
|
Root: HKCR; Subkey: "GUIX_Studio_Project\shell\open\command"; ValueType: string; ValueName: ""; ValueData: """{app}\studio\GUIX_Studio.exe"" ""%1"""; Tasks: associate
|
||||||
|
|
||||||
|
Root: HKLM; Subkey: "Software\Microsoft\Azure_RTOS\GUIX\InstallDir"; ValueType: string; ValueName: ""; ValueData: "{app}";
|
||||||
|
|
||||||
|
[Run]
|
||||||
|
Filename: "{tmp}\vc_redist.x86.exe"; StatusMsg: "Installing Visual C++ 2015-2019 Redistributable(x86)"; Parameters:"/passive"
|
||||||
|
|
7
scripts/download_vc_redist.cmd
Normal file
7
scripts/download_vc_redist.cmd
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
rem Save working directory so that we can restore it back after building everything. This will make developers happy and then
|
||||||
|
rem switch to the folder this script resides in. Don't assume absolute paths because on the build host and on the dev host the locations may be different.
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File download_vc_redist.ps1
|
||||||
|
|
||||||
|
exit /B %ERRORLEVEL%
|
3
scripts/download_vc_redist.ps1
Normal file
3
scripts/download_vc_redist.ps1
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
cd ../guix_studio/installer
|
||||||
|
Invoke-WebRequest https://aka.ms/vs/16/release/vc_redist.x86.exe -O vc_redist.x86.exe
|
||||||
|
dir
|
10
scripts/generate_studio_installer.cmd
Normal file
10
scripts/generate_studio_installer.cmd
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
rem Save working directory so that we can restore it back after building everything. This will make developers happy and then
|
||||||
|
rem switch to the folder this script resides in. Don't assume absolute paths because on the build host and on the dev host the locations may be different.
|
||||||
|
pushd "%~dp0"
|
||||||
|
|
||||||
|
cd ..\guix_studio\installer
|
||||||
|
|
||||||
|
rem generate studio installer
|
||||||
|
"C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /Q "guix_installer_release.iss"
|
||||||
|
|
||||||
|
exit /B %ERRORLEVEL%
|
30
scripts/install_inno_setup.ps1
Normal file
30
scripts/install_inno_setup.ps1
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
|
||||||
|
if (Test-Path "$PSScriptRoot\win-installer-helper.psm1")
|
||||||
|
{
|
||||||
|
Import-Module "$PSScriptRoot\win-installer-helper.psm1"
|
||||||
|
}
|
||||||
|
elseif (Test-Path "C:\win-installer-helper.psm1")
|
||||||
|
{
|
||||||
|
Import-Module "C:\win-installer-helper.psm1"
|
||||||
|
}
|
||||||
|
|
||||||
|
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
|
||||||
|
|
||||||
|
Start-Setup
|
||||||
|
|
||||||
|
try {
|
||||||
|
|
||||||
|
|
||||||
|
Get-File -Url "http://www.jrsoftware.org/download.php/is.exe" -fileName "innosetup-6.0.3.exe"
|
||||||
|
Install-FromExe -Path "C:\Downloads\innosetup-6.0.3.exe" -Arguments "/VERYSILENT /SUPPRESSMSGBOXES"
|
||||||
|
}
|
||||||
|
catch
|
||||||
|
{
|
||||||
|
$_.Exception | Format-List
|
||||||
|
exit -1
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
Stop-Setup
|
||||||
|
}
|
5
scripts/run-pwsh.cmd
Normal file
5
scripts/run-pwsh.cmd
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
@echo off
|
||||||
|
setlocal EnableDelayedExpansion
|
||||||
|
setlocal EnableExtensions
|
||||||
|
"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -ExecutionPolicy Bypass -NoLogo -NonInteractive -NoProfile -WindowStyle Hidden -File "%1"
|
||||||
|
exit /B %ERRORLEVEL%
|
1828
scripts/win-installer-helper.psm1
Normal file
1828
scripts/win-installer-helper.psm1
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user