forked from sreiter/ProMesh
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* master: ARTE features for ProMesh (#2)
- Loading branch information
Showing
11 changed files
with
292 additions
and
13 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Build installer | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
tags: | ||
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
jobs: | ||
|
||
installer-build: | ||
name: Build on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. | ||
fail-fast: false | ||
|
||
# Set up a matrix to run the following 3 configurations: | ||
# 1. <Windows, Release, latest MSVC compiler toolchain on the default runner image, default generator> | ||
# 2. <Linux, Release, latest GCC compiler toolchain on the default runner image, default generator> | ||
# 3. <Linux, Release, latest Clang compiler toolchain on the default runner image, default generator> | ||
# | ||
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list. | ||
matrix: | ||
# os: [ubuntu-latest, windows-latest] | ||
os: [windows-latest] | ||
build_type: [Release] | ||
|
||
steps: | ||
- name: (0) Checkout self. | ||
uses: actions/checkout@v4 | ||
|
||
- name: (1) Artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: artifacts-${{matrix.os}} | ||
path: artifacts | ||
github-token: ${{ github.token }} | ||
repository: ${{ github.repository }} | ||
run-id: 12359566993 | ||
|
||
- name: (2) Move dir. | ||
if: startsWith( ${{ matrix.os }}, "windows-latest") | ||
run: Move-Item -Path artifacts/Release -Destination deployment/win64/artifacts | ||
|
||
- name: (3) Create installer | ||
if: startsWith( ${{ matrix.os }}, "windows-latest") | ||
uses: joncloud/[email protected] | ||
with: | ||
script-file: "deployment/win64/promesh4-installer.nsi" | ||
arguments: "/V3" | ||
|
||
- name: (4) Artifacts | ||
if: startsWith( ${{ matrix.os }}, "windows-latest") | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ProMesh4-Installer-${{ matrix.os }} | ||
path: ${{ github.workspace }}/deployment/win64/ProMesh4-Installer.exe # or path/to/artifact | ||
|
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,83 @@ | ||
on: | ||
workflow_dispatch: | ||
push: | ||
# Sequence of patterns matched against refs/tags | ||
#tags: | ||
# - 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | ||
|
||
name: Upload Release Asset | ||
jobs: | ||
build: | ||
name: Upload Release Asset for ${{ matrix.os }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
|
||
strategy: | ||
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable. | ||
fail-fast: false | ||
matrix: | ||
os: [windows-latest] | ||
build_type: [Release] | ||
|
||
steps: | ||
- name: Checkout self | ||
uses: actions/checkout@v4 | ||
|
||
- name: Download pre-packed asset | ||
uses: actions/download-artifact@v4 | ||
with: | ||
# name: ProMesh4-Installer-${{matrix.os}} | ||
name: ProMesh4-Installer-windows-latest | ||
# path: $GITHUB_WORKSPACE | ||
github-token: ${{ github.token }} | ||
repository: ${{ github.repository }} | ||
run-id: 12355131211 | ||
|
||
- name: Download pre-packed artifact | ||
run: ls . | ||
|
||
#- name: Download pre-packed artifact | ||
# run: ls ./assets | ||
|
||
# Fetch the latest release from GitHub API | ||
- name: Get latest release | ||
id: get_release | ||
run: | | ||
latest_release=$(curl -s \ | ||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | ||
https://api.github.com/repos/${{ github.repository }}/releases/latest) | ||
echo "::set-output name=upload_url::$(echo $latest_release | jq -r .upload_url | sed -e "s/{?name,label}//")" | ||
# - name: Create Release | ||
# id: create_release | ||
# uses: actions/create-release@v1 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# tag_name: ${{ github.ref }} | ||
# release_name: Release ${{ github.ref }} | ||
# draft: false | ||
# prerelease: false | ||
|
||
- name: Test | ||
run: echo "URL=${{ steps.get_release.outputs.upload_url }}" | ||
|
||
#- name: Upload Release Binary | ||
# id: upload-release-asset | ||
# uses: actions/upload-release-asset@v1 | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# with: | ||
# upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
# #upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
# asset_path: ./ProMesh4-Installer.exe | ||
# asset_name: promesh_setup_win64.exe | ||
# asset_content_type: application/octet-stream | ||
|
||
- name: Upload Release Binary | ||
uses: AButler/[email protected] | ||
with: | ||
files: "./ProMesh4-Installer.exe" | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
release-tag: v0.0.2 |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
;-------------------------------- | ||
|
||
; The name of the installer | ||
Name ProMesh4 | ||
|
||
; The file to write | ||
OutFile "ProMesh4-Installer.exe" | ||
|
||
; The default installation directory | ||
InstallDir $PROGRAMFILES64\ProMesh4 | ||
|
||
; Registry key to check for directory (so if you install again, it will | ||
; overwrite the old one automatically) | ||
InstallDirRegKey HKLM "SOFTWARE\G-CSC\ProMesh4" "Install_Dir" | ||
|
||
; Request application privileges for Windows Vista | ||
RequestExecutionLevel admin | ||
|
||
Icon "..\data\ProMeshIcon.ico" | ||
|
||
LicenseBkColor /windows | ||
LicenseData "..\..\LICENSE" | ||
|
||
XPStyle on | ||
ManifestSupportedOS all | ||
|
||
;-------------------------------- | ||
|
||
; Pages | ||
|
||
Page license | ||
Page directory | ||
Page components | ||
Page instfiles | ||
|
||
UninstPage uninstConfirm | ||
UninstPage instfiles | ||
|
||
;-------------------------------- | ||
|
||
; The stuff to install | ||
Section ProMesh4 (required)" | ||
SectionIn RO | ||
; Set output path to the installation directory. | ||
SetOutPath $INSTDIR | ||
; Put file there | ||
File "artifacts\ProMesh4.exe" | ||
File "artifacts\\*.dll" | ||
SetOutPath $INSTDIR\platforms | ||
File "artifacts\platforms\*.dll" | ||
SetOutPath $INSTDIR\tools | ||
File "artifacts\tools\*.exe" | ||
; File "artifacts\tools\*LICENSE" | ||
SetOutPath $INSTDIR\translations | ||
File "artifacts\translations\*" | ||
SetOutPath $INSTDIR\imageformats | ||
File "artifacts\imageformats\*" | ||
SetOutPath $INSTDIR\iconengines | ||
File "artifacts\iconengines\*" | ||
SetOutPath $INSTDIR | ||
; Write the installation path into the registry | ||
WriteRegStr HKLM SOFTWARE\G-CSC\ProMesh4 "Install_Dir" "$INSTDIR" | ||
; Write the uninstall keys for Windows | ||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\G-CSC\ProMesh4" "DisplayName" "ProMesh4" | ||
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\G-CSC\ProMesh4" "UninstallString" '"$INSTDIR\uninstall.exe"' | ||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\G-CSC\ProMesh4" "NoModify" 1 | ||
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\G-CSC\ProMesh4" "NoRepair" 1 | ||
WriteUninstaller "uninstall.exe" | ||
SectionEnd | ||
; Optional section (can be disabled by the user) | ||
Section "Programs Shortcut" | ||
CreateDirectory "$SMPROGRAMS\ProMesh4" | ||
CreateShortcut "$SMPROGRAMS\ProMesh4\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 | ||
CreateShortcut "$SMPROGRAMS\ProMesh4\ProMesh4.lnk" "$INSTDIR\ProMesh4.exe" "" "$INSTDIR\ProMesh4.exe" 0 | ||
SectionEnd | ||
Section "Start Menu Shortcut" | ||
CreateShortcut "$STARTMENU\ProMesh4.lnk" "$INSTDIR\ProMesh4.exe" "" "$INSTDIR\ProMesh4.exe" 0 | ||
SectionEnd | ||
Section "Desktop Shortcut" | ||
CreateShortcut "$DESKTOP\ProMesh4.lnk" "$INSTDIR\ProMesh4.exe" "" "$INSTDIR\ProMesh4.exe" 0 | ||
SectionEnd | ||
;-------------------------------- | ||
; Uninstaller | ||
Section "Uninstall" | ||
; Remove registry keys | ||
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\G-CSC\ProMesh4" | ||
DeleteRegKey HKLM SOFTWARE\G-CSC\ProMesh4 | ||
; Remove files and uninstaller | ||
Delete $INSTDIR\ProMesh4.exe | ||
Delete $INSTDIR\*.dll | ||
RMDir /r /REBOOTOK $INSTDIR\platforms | ||
Delete $INSTDIR\uninstall.exe | ||
; Remove shortcuts, if any | ||
Delete "$SMPROGRAMS\ProMesh4\*.*" | ||
Delete "$STARTMENU\ProMesh4.lnk" | ||
Delete "$DESKTOP\ProMesh4.lnk" | ||
; Remove directories used | ||
RMDir "$SMPROGRAMS\ProMesh4" | ||
RMDir "$INSTDIR" | ||
SectionEnd |