1
0
Fork 0
mirror of https://github.com/Orama-Interactive/Pixelorama.git synced 2025-01-18 09:09:47 +00:00

[CI] Change names of artifacts, file paths and generate Linux ARM64 & ARM32 builds in release.yml

This commit is contained in:
Emmanouil Papadeas 2024-05-01 19:54:44 +03:00
parent 74abc30f30
commit 3278e5c4b2
3 changed files with 117 additions and 109 deletions

View file

@ -41,19 +41,19 @@ jobs:
submodules: true submodules: true
- name: Setup 💻 - name: Setup 💻
run: | run: |
mkdir -v -p build/windows-64bit ~/.local/share/godot/export_templates mkdir -v -p build/${EXPORT_NAME}-Windows-64bit ~/.local/share/godot/export_templates
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
- name: Windows Build 🔧 - name: Windows Build 🔧
run: godot --headless -v --export-release "Windows Desktop 64-bit" ./build/windows-64bit/$EXPORT_NAME.exe run: godot --headless -v --export-release "Windows Desktop 64-bit" ./build/${EXPORT_NAME}-Windows-64bit/$EXPORT_NAME.exe
- name: Copy pixelorama_data folder 📁 - name: Copy pixelorama_data folder 📁
run: | run: |
cp -R ./pixelorama_data ./build/windows-64bit cp -R ./pixelorama_data ./build/${EXPORT_NAME}-Windows-64bit
rm ./build/windows-64bit/pixelorama_data/.gdignore rm ./build/${EXPORT_NAME}-Windows-64bit/pixelorama_data/.gdignore
- name: Upload Artifact 🚀 - name: Upload Artifact 🚀
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: Windows-64bit name: ${EXPORT_NAME}-Windows-64bit
path: ./build/windows-64bit/ path: ./build/${EXPORT_NAME}-Windows-64bit/
retention-days: 14 retention-days: 14
export-linux: export-linux:
@ -68,27 +68,27 @@ jobs:
submodules: true submodules: true
- name: Setup 💻 - name: Setup 💻
run: | run: |
mkdir -v -p build/linux-64bit ~/.local/share/godot/export_templates mkdir -v -p build/${EXPORT_NAME}-Linux-64bit ~/.local/share/godot/export_templates
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
- name: Linux Build 🔧 - name: Linux Build 🔧
run: | run: |
godot --headless -v --export-release "Linux/X11 64-bit" ./build/linux-64bit/$EXPORT_NAME.x86_64 godot --headless -v --export-release "Linux/X11 64-bit" ./build/${EXPORT_NAME}-Linux-64bit/$EXPORT_NAME.x86_64
- name: Give execute permission ☑️ - name: Give execute permission ☑️
run: | run: |
chmod +x ./build/linux-64bit/$EXPORT_NAME.x86_64 chmod +x ./build/${EXPORT_NAME}-Linux-64bit/$EXPORT_NAME.x86_64
- name: Copy pixelorama_data folder 📁 - name: Copy pixelorama_data folder 📁
run: | run: |
rm ./pixelorama_data/.gdignore rm ./pixelorama_data/.gdignore
cp -R ./pixelorama_data ./build/linux-64bit cp -R ./pixelorama_data ./build/${EXPORT_NAME}-Linux-64bit
- name: Create tar.gz archive 🗜️ - name: Create tar.gz archive 🗜️
run: | run: |
cd build cd build
tar zcvf linux-64bit.tar.gz linux-64bit tar zcvf ${EXPORT_NAME}-Linux-64bit.tar.gz ${EXPORT_NAME}-Linux-64bit
- name: Upload Artifact 🚀 - name: Upload Artifact 🚀
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: Linux-64bit name: ${EXPORT_NAME}-Linux-64bit
path: ./build/linux-64bit.tar.gz path: ./build/${EXPORT_NAME}-Linux-64bit.tar.gz
retention-days: 14 retention-days: 14
export-mac: export-mac:
@ -102,7 +102,7 @@ jobs:
- name: Setup environment 🔧 - name: Setup environment 🔧
run: | run: |
export GODOT_VERSION=${GODOT_VERSION} export GODOT_VERSION=${GODOT_VERSION}
export EXPORT_NAME=Pixelorama export EXPORT_NAME=${EXPORT_NAME}
- name: Download and extract export templates 💾 - name: Download and extract export templates 💾
run: | run: |
mkdir -v -p "/Users/runner/Library/Application Support/Godot/export_templates/${GODOT_VERSION}.stable" mkdir -v -p "/Users/runner/Library/Application Support/Godot/export_templates/${GODOT_VERSION}.stable"
@ -119,25 +119,25 @@ jobs:
run: | run: |
chown runner ./Godot.app/Contents/MacOS/Godot chown runner ./Godot.app/Contents/MacOS/Godot
chmod +x ./Godot.app/Contents/MacOS/Godot chmod +x ./Godot.app/Contents/MacOS/Godot
./Godot.app/Contents/MacOS/Godot --headless -v --export-release "macOS" ./build/mac/Pixelorama.zip ./Godot.app/Contents/MacOS/Godot --headless -v --export-release "macOS" ./build/mac/${EXPORT_NAME}.zip
- name: Make application executable 🔧 - name: Make application executable 🔧
run: | run: |
unzip -a ./build/mac/Pixelorama.zip -d ./build/mac unzip -a ./build/mac/${EXPORT_NAME}.zip -d ./build/mac
chmod +x ./build/mac/Pixelorama.app/Contents/MacOS/Pixelorama chmod +x ./build/mac/${EXPORT_NAME}.app/Contents/MacOS/${EXPORT_NAME}
rm ./build/mac/Pixelorama.zip rm ./build/mac/${EXPORT_NAME}.zip
- name: Fix application icon 🖼 - name: Fix application icon 🖼
run: sips -s format icns ./build/mac/Pixelorama.app/Contents/Resources/icon.icns --out ./build/mac/Pixelorama.app/Contents/Resources/icon.icns run: sips -s format icns ./build/mac/${EXPORT_NAME}.app/Contents/Resources/icon.icns --out ./build/mac/${EXPORT_NAME}.app/Contents/Resources/icon.icns
- name: Copy pixelorama_data folder 📁 - name: Copy pixelorama_data folder 📁
run: | run: |
cp -R ./pixelorama_data ./build/mac/Pixelorama.app/Contents/Resources cp -R ./pixelorama_data ./build/mac/${EXPORT_NAME}.app/Contents/Resources
rm ./build/mac/Pixelorama.app/Contents/Resources/pixelorama_data/.gdignore rm ./build/mac/${EXPORT_NAME}.app/Contents/Resources/pixelorama_data/.gdignore
- name: Ad-hoc signing ✍️ - name: Ad-hoc signing ✍️
run: codesign -s - --force --deep ./build/mac/Pixelorama.app run: codesign -s - --force --deep ./build/mac/${EXPORT_NAME}.app
- name: Create DMG archive 🔧 - name: Create DMG archive 🔧
run: hdiutil create -srcfolder ./build/mac -fs HFS+ -volname Pixelorama ./build/mac/Pixelorama.dmg run: hdiutil create -srcfolder ./build/mac -fs HFS+ -volname ${EXPORT_NAME} ./build/mac/${EXPORT_NAME}.dmg
- name: Upload Artifact 🚀 - name: Upload Artifact 🚀
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4
with: with:
name: Mac name: ${EXPORT_NAME}-Mac
path: ./build/mac/Pixelorama.dmg path: ./build/mac/${EXPORT_NAME}.dmg
retention-days: 14 retention-days: 14

View file

@ -5,7 +5,7 @@ on:
branches: [ release ] branches: [ release ]
env: env:
GODOT_VERSION: 4.1.1 GODOT_VERSION: 4.2.2
EXPORT_NAME: Pixelorama EXPORT_NAME: Pixelorama
TAG: v1.0 TAG: v1.0
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }} BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
@ -15,7 +15,7 @@ jobs:
name: Windows Export 🗔 name: Windows Export 🗔
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: docker://barichello/godot-ci:4.1.1 image: docker://barichello/godot-ci:4.2.2
steps: steps:
- name: Setup WINE, rcedit and NSIS 🍷 - name: Setup WINE, rcedit and NSIS 🍷
run: | run: |
@ -33,34 +33,34 @@ jobs:
submodules: true submodules: true
- name: Setup 💻 - name: Setup 💻
run: | run: |
mkdir -v -p build/windows-64bit build/windows-32bit ~/.local/share/godot/export_templates mkdir -v -p build/${EXPORT_NAME}-Windows-64bit build/${EXPORT_NAME}-Windows-32bit ~/.local/share/godot/export_templates
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
- name: Windows Build 🔧 - name: Windows Build 🔧
run: | run: |
godot --headless -v --export-release "Windows Desktop 64-bit" ./build/windows-64bit/$EXPORT_NAME.exe godot --headless -v --export-release "Windows Desktop 64-bit" ./build/${EXPORT_NAME}-Windows-64bit/${EXPORT_NAME}.exe
godot --headless -v --export-release "Windows Desktop 32-bit" ./build/windows-32bit/$EXPORT_NAME.exe godot --headless -v --export-release "Windows Desktop 32-bit" ./build/${EXPORT_NAME}-Windows-32bit/${EXPORT_NAME}.exe
- name: Copy pixelorama_data folder 📁 - name: Copy pixelorama_data folder 📁
run: | run: |
rm ./pixelorama_data/.gdignore rm ./pixelorama_data/.gdignore
cp -R ./pixelorama_data ./build/windows-64bit cp -R ./pixelorama_data ./build/${EXPORT_NAME}-Windows-64bit
cp -R ./pixelorama_data ./build/windows-32bit cp -R ./pixelorama_data ./build/${EXPORT_NAME}-Windows-32bit
cp -R ./pixelorama_data ./build cp -R ./pixelorama_data ./build
- name: Zip 🗜️ - name: Zip 🗜️
working-directory: ./build working-directory: ./build
run: | run: |
zip -r Pixelorama.Windows-64bit.zip windows-64bit zip -r ${EXPORT_NAME}-Windows-64bit.zip ${EXPORT_NAME}-Windows-64bit
zip -r Pixelorama.Windows-32bit.zip windows-32bit zip -r ${EXPORT_NAME}-Windows-32bit.zip ${EXPORT_NAME}-Windows-32bit
- name: Build installer 🔧 - name: Build installer 🔧
run: | run: |
python3 ./installer/utils/po2nsi.py -i ./installer/pixelorama.nsi -o ./installer/pixelorama_loc.nsi -p ./installer/po -l "English" -v python3 ./installer/utils/po2nsi.py -i ./installer/pixelorama.nsi -o ./installer/pixelorama_loc.nsi -p ./installer/po -l "English" -v
makensis ./installer/pixelorama_loc.nsi makensis ./installer/pixelorama_loc.nsi
mkdir ./build/installer mkdir ./build/installer
mv ./installer/${EXPORT_NAME}_${TAG}_setup.exe ./build/installer mv ./installer/${EXPORT_NAME}_${TAG}_setup.exe ./build
- name: Upload Release Assets to itch.io 🎮 - name: Upload Release Assets to itch.io 🎮
run: | run: |
butler push ./build/windows-64bit ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:windows-64 --userversion ${{env.TAG}} butler push ./build/${EXPORT_NAME}-Windows-64bit ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:windows-64 --userversion ${TAG}
butler push ./build/windows-32bit ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:windows-32 --userversion ${{env.TAG}} butler push ./build/${EXPORT_NAME}-Windows-32bit ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:windows-32 --userversion ${TAG}
butler push ./build/installer ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:windows-installer --userversion ${{env.TAG}} butler push ./build/${EXPORT_NAME}_${TAG}_setup.exe ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:windows-installer --userversion ${TAG}
- name: Upload Release Asset 🚀 - name: Upload Release Asset 🚀
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
with: with:
@ -74,7 +74,7 @@ jobs:
name: Linux Export 🐧 name: Linux Export 🐧
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: docker://barichello/godot-ci:4.1.1 image: docker://barichello/godot-ci:4.2.2
steps: steps:
- name: Checkout 🛎️ - name: Checkout 🛎️
uses: actions/checkout@v4 uses: actions/checkout@v4
@ -82,35 +82,45 @@ jobs:
submodules: true submodules: true
- name: Setup 💻 - name: Setup 💻
run: | run: |
mkdir -v -p build/linux-64bit build/linux-32bit ~/.local/share/godot/export_templates mkdir -v -p build/${EXPORT_NAME}-Linux-64bit build/${EXPORT_NAME}-Linux-32bit build/${EXPORT_NAME}-Linux-ARM64 build/${EXPORT_NAME}-Linux-ARM32 ~/.local/share/godot/export_templates
mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable mv /root/.local/share/godot/export_templates/${GODOT_VERSION}.stable ~/.local/share/godot/export_templates/${GODOT_VERSION}.stable
- name: Linux Build 🔧 - name: Linux Build 🔧
run: | run: |
godot --headless -v --export-release "Linux/X11 64-bit" ./build/linux-64bit/$EXPORT_NAME.x86_64 godot --headless -v --export-release "Linux/X11 64-bit" ./build/${EXPORT_NAME}-Linux-64bit/${EXPORT_NAME}.x86_64
godot --headless -v --export-release "Linux/X11 32-bit" ./build/linux-32bit/$EXPORT_NAME.x86 godot --headless -v --export-release "Linux/X11 32-bit" ./build/${EXPORT_NAME}-Linux-32bit/${EXPORT_NAME}.x86
godot --headless -v --export-release "Linux/X11 ARM64" ./build/${EXPORT_NAME}-Linux-ARM64/${EXPORT_NAME}.arm64
godot --headless -v --export-release "Linux/X11 ARM32" ./build/${EXPORT_NAME}-Linux-ARM32/${EXPORT_NAME}.arm32
- name: Give execute permission ☑️ - name: Give execute permission ☑️
run: | run: |
chmod +x ./build/linux-64bit/$EXPORT_NAME.x86_64 chmod +x ./build/${EXPORT_NAME}-Linux-64bit/${EXPORT_NAME}.x86_64
chmod +x ./build/linux-32bit/$EXPORT_NAME.x86 chmod +x ./build/${EXPORT_NAME}-Linux-32bit/${EXPORT_NAME}.x86
chmod +x ./build/${EXPORT_NAME}-Linux-ARM64/${EXPORT_NAME}.arm64
chmod +x ./build/${EXPORT_NAME}-Linux-ARM32/${EXPORT_NAME}.arm32
- name: Copy pixelorama_data folder 📁 - name: Copy pixelorama_data folder 📁
run: | run: |
rm ./pixelorama_data/.gdignore rm ./pixelorama_data/.gdignore
cp -R ./pixelorama_data ./build/linux-64bit cp -R ./pixelorama_data ./build/${EXPORT_NAME}-Linux-64bit
cp -R ./pixelorama_data ./build/linux-32bit cp -R ./pixelorama_data ./build/${EXPORT_NAME}-Linux-32bit
cp -R ./pixelorama_data ./build/${EXPORT_NAME}-Linux-ARM64
cp -R ./pixelorama_data ./build/${EXPORT_NAME}-Linux-ARM32
- name: Create tar.gz archive 🗜️ - name: Create tar.gz archive 🗜️
run: | run: |
cd build cd build
tar zcvf Pixelorama.Linux-64bit.tar.gz linux-64bit tar zcvf ${EXPORT_NAME}-Linux-64bit.tar.gz ${EXPORT_NAME}-Linux-64bit
tar zcvf Pixelorama.Linux-32bit.tar.gz linux-32bit tar zcvf ${EXPORT_NAME}-Linux-32bit.tar.gz ${EXPORT_NAME}-Linux-32bit
tar zcvf ${EXPORT_NAME}-Linux-ARM64.tar.gz ${EXPORT_NAME}-Linux-ARM64
tar zcvf ${EXPORT_NAME}-Linux-ARM32.tar.gz ${EXPORT_NAME}-Linux-ARM32
- name: Upload Release Assets to itch.io 🎮 - name: Upload Release Assets to itch.io 🎮
run: | run: |
butler push ./build/Pixelorama.Linux-64bit.tar.gz ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:linux-64 --userversion ${{env.TAG}} butler push ./build/${{env.EXPORT_NAME}}-Linux-64bit.tar.gz ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:linux-x86_64 --userversion ${{env.TAG}}
butler push ./build/Pixelorama.Linux-32bit.tar.gz ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:linux-32 --userversion ${{env.TAG}} butler push ./build/${{env.EXPORT_NAME}}-Linux-32bit.tar.gz ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:linux-x86 --userversion ${{env.TAG}}
butler push ./build/${{env.EXPORT_NAME}}-Linux-ARM64.tar.gz ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:linux-arm64 --userversion ${{env.TAG}}
butler push ./build/${{env.EXPORT_NAME}}-Linux-ARM32.tar.gz ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:linux-arm32 --userversion ${{env.TAG}}
- name: Upload Release Asset 🚀 - name: Upload Release Asset 🚀
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./build/Pixelorama.Linux-*.tar.gz file: ./build/${{env.EXPORT_NAME}}-Linux-*.tar.gz
tag: ${{env.TAG}} tag: ${{env.TAG}}
overwrite: true overwrite: true
file_glob: true file_glob: true
@ -143,34 +153,33 @@ jobs:
run: | run: |
chown runner ./Godot.app/Contents/MacOS/Godot chown runner ./Godot.app/Contents/MacOS/Godot
chmod +x ./Godot.app/Contents/MacOS/Godot chmod +x ./Godot.app/Contents/MacOS/Godot
./Godot.app/Contents/MacOS/Godot --headless -v --export-release "macOS" ./build/mac/Pixelorama.zip ./Godot.app/Contents/MacOS/Godot --headless -v --export-release "macOS" ./build/mac/${EXPORT_NAME}.zip
- name: Make application executable 🔧 - name: Make application executable 🔧
run: | run: |
unzip -a ./build/mac/Pixelorama.zip -d ./build/mac unzip -a ./build/mac/${EXPORT_NAME}.zip -d ./build/mac
chmod +x ./build/mac/Pixelorama.app/Contents/MacOS/Pixelorama chmod +x ./build/mac/${EXPORT_NAME}.app/Contents/MacOS/${EXPORT_NAME}
rm ./build/mac/Pixelorama.zip rm ./build/mac/${EXPORT_NAME}.zip
- name: Fix application icon 🖼 - name: Fix application icon 🖼
run: sips -s format icns ./build/mac/Pixelorama.app/Contents/Resources/icon.icns --out ./build/mac/Pixelorama.app/Contents/Resources/icon.icns run: sips -s format icns ./build/mac/${EXPORT_NAME}.app/Contents/Resources/icon.icns --out ./build/mac/${EXPORT_NAME}.app/Contents/Resources/icon.icns
- name: Copy pixelorama_data folder 📁 - name: Copy pixelorama_data folder 📁
run: | run: |
cp -R ./pixelorama_data ./build/mac/Pixelorama.app/Contents/Resources cp -R ./pixelorama_data ./build/mac/${EXPORT_NAME}.app/Contents/Resources
rm ./build/mac/Pixelorama.app/Contents/Resources/pixelorama_data/.gdignore rm ./build/mac/${EXPORT_NAME}.app/Contents/Resources/pixelorama_data/.gdignore
- name: Ad-hoc signing ✍️ - name: Ad-hoc signing ✍️
run: codesign -s - --force --deep ./build/mac/Pixelorama.app run: codesign -s - --force --deep ./build/mac/${EXPORT_NAME}.app
- name: Create DMG archive 🔧 - name: Create DMG archive 🔧
run: hdiutil create -srcfolder ./build/mac -fs HFS+ -volname Pixelorama ./build/mac/Pixelorama.dmg run: hdiutil create -srcfolder ./build/mac -fs HFS+ -volname ${EXPORT_NAME} ./build/mac/${EXPORT_NAME}-Mac.dmg
- name: Upload Release Assets to itch.io 🎮 - name: Upload Release Assets to itch.io 🎮
run: | run: |
curl -L -o butler.zip https://broth.itch.ovh/butler/darwin-amd64/LATEST/archive/default curl -L -o butler.zip https://broth.itch.ovh/butler/darwin-amd64/LATEST/archive/default
unzip butler.zip unzip butler.zip
chmod +x butler chmod +x butler
./butler push ./build/mac/Pixelorama.dmg ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:mac --userversion ${{env.TAG}} ./butler push ./build/mac/${{env.EXPORT_NAME}}-Mac.dmg ${{ secrets.ITCHIO_USERNAME }}/${{ secrets.ITCHIO_GAME }}:mac --userversion ${{env.TAG}}
- name: Upload Release Asset 🚀 - name: Upload Release Asset 🚀
uses: svenstaro/upload-release-action@v2 uses: svenstaro/upload-release-action@v2
with: with:
repo_token: ${{ secrets.GITHUB_TOKEN }} repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./build/mac/Pixelorama.dmg file: ./build/mac/${{env.EXPORT_NAME}}-Mac.dmg
asset_name: ${{env.EXPORT_NAME}}[Mac].dmg
tag: ${{env.TAG}} tag: ${{env.TAG}}
overwrite: true overwrite: true
@ -178,7 +187,7 @@ jobs:
name: Web Export 🌐 name: Web Export 🌐
runs-on: ubuntu-latest runs-on: ubuntu-latest
container: container:
image: docker://barichello/godot-ci:4.1.1 image: docker://barichello/godot-ci:4.2.2
steps: steps:
- name: Checkout 🛎️ - name: Checkout 🛎️
uses: actions/checkout@v4 uses: actions/checkout@v4

View file

@ -6,40 +6,40 @@
; Helper variables so that we don't change 20 instances of the version for every update ; Helper variables so that we don't change 20 instances of the version for every update
!define APPNAME "Pixelorama" !define APPNAME "Pixelorama"
!define APPVERSION "v0.11.2" !define APPVERSION "v1.0"
!define COMPANYNAME "Orama Interactive" !define COMPANYNAME "Orama Interactive"
; Include the Modern UI library ; Include the Modern UI library
!include "MUI2.nsh" !include "MUI2.nsh"
!include "x64.nsh" !include "x64.nsh"
; Basic Installer Info ; Basic Installer Info
Name "${APPNAME} ${APPVERSION}" Name "${APPNAME} ${APPVERSION}"
OutFile "${APPNAME}_${APPVERSION}_setup.exe" OutFile "${APPNAME}_${APPVERSION}_setup.exe"
Unicode True Unicode True
; Default installation folder ; Default installation folder
InstallDir "$APPDATA\${COMPANYNAME}\${APPNAME}" InstallDir "$APPDATA\${COMPANYNAME}\${APPNAME}"
; Get installation folder from registry if available ; Get installation folder from registry if available
InstallDirRegKey HKCU "Software\${COMPANYNAME}\${APPNAME}" "InstallDir" InstallDirRegKey HKCU "Software\${COMPANYNAME}\${APPNAME}" "InstallDir"
; Request application privileges for Vista and later ; Request application privileges for Vista and later
RequestExecutionLevel admin RequestExecutionLevel admin
; Interface Settings ; Interface Settings
!define MUI_ICON "assets\pixel-install.ico" !define MUI_ICON "assets\pixel-install.ico"
!define MUI_UNICON "assets\pixel-uninstall.ico" !define MUI_UNICON "assets\pixel-uninstall.ico"
!define MUI_WELCOMEFINISHPAGE_BITMAP "assets\wizard.bmp" !define MUI_WELCOMEFINISHPAGE_BITMAP "assets\wizard.bmp"
@ -55,7 +55,7 @@
!define MUI_FINISHPAGE_RUN "$INSTDIR\pixelorama.exe" !define MUI_FINISHPAGE_RUN "$INSTDIR\pixelorama.exe"
; Language selection settings ; Language selection settings
!define MUI_LANGDLL_ALLLANGUAGES !define MUI_LANGDLL_ALLLANGUAGES
## Remember the installer language ## Remember the installer language
!define MUI_LANGDLL_REGISTRY_ROOT HKCU !define MUI_LANGDLL_REGISTRY_ROOT HKCU
@ -64,7 +64,7 @@
; Installer pages ; Installer pages
!insertmacro MUI_PAGE_WELCOME !insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "LICENSE" !insertmacro MUI_PAGE_LICENSE "LICENSE"
!insertmacro MUI_PAGE_COMPONENTS !insertmacro MUI_PAGE_COMPONENTS
@ -83,10 +83,10 @@
!insertmacro MUI_LANGUAGE "English" !insertmacro MUI_LANGUAGE "English"
;@INSERT_TRANSLATIONS@ ;@INSERT_TRANSLATIONS@
; Assign language strings to installer/uninstaller section names ; Assign language strings to installer/uninstaller section names
LangString SecInstall ${LANG_ENGLISH} "Install ${APPNAME}" LangString SecInstall ${LANG_ENGLISH} "Install ${APPNAME}"
LangString SecStartmenu ${LANG_ENGLISH} "Create Start Menu shortcuts (optional)" LangString SecStartmenu ${LANG_ENGLISH} "Create Start Menu shortcuts (optional)"
LangString SecDesktop ${LANG_ENGLISH} "Create shortcut on Desktop (optional)" LangString SecDesktop ${LANG_ENGLISH} "Create shortcut on Desktop (optional)"
@ -97,25 +97,25 @@
; Installer sections ; Installer sections
Section "$(SecInstall)" SecInstall ; Main install section Section "$(SecInstall)" SecInstall ; Main install section
SectionIn RO ; Non optional section SectionIn RO ; Non optional section
; Set the installation folder as the output directory ; Set the installation folder as the output directory
SetOutPath "$INSTDIR" SetOutPath "$INSTDIR"
; Copy all files to install directory ; Copy all files to install directory
${If} ${RunningX64} ${If} ${RunningX64}
File "..\build\windows-64bit\pixelorama.exe" File "..\build\${APPNAME}-Windows-64bit\${APPNAME}.exe"
File "..\build\windows-64bit\pixelorama.pck" File "..\build\${APPNAME}-Windows-64bit\${APPNAME}.pck"
${Else} ${Else}
File "..\build\windows-32bit\pixelorama.exe" File "..\build\${APPNAME}-Windows-32bit\${APPNAME}.exe"
File "..\build\windows-32bit\pixelorama.pck" File "..\build\${APPNAME}-Windows-32bit\${APPNAME}.pck"
${EndIf} ${EndIf}
File "..\assets\graphics\icons\pxo.ico" File "..\assets\graphics\icons\pxo.ico"
SetOutPath "$INSTDIR\pixelorama_data" SetOutPath "$INSTDIR\pixelorama_data"
File /nonfatal /r "..\build\pixelorama_data\*" File /nonfatal /r "..\build\pixelorama_data\*"
; Store installation folder in the registry ; Store installation folder in the registry
WriteRegStr HKCU "Software\${COMPANYNAME}\${APPNAME}" "InstallDir" $INSTDIR WriteRegStr HKCU "Software\${COMPANYNAME}\${APPNAME}" "InstallDir" $INSTDIR
@ -124,7 +124,7 @@
; Create Add/Remove Programs entry ; Create Add/Remove Programs entry
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" \ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" \
"DisplayName" "${APPNAME}" "DisplayName" "${APPNAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" \ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" \
"UninstallString" "$INSTDIR\uninstall.exe" "UninstallString" "$INSTDIR\uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" \ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" \
@ -138,10 +138,10 @@
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" \ WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" \
"DisplayVersion" "${APPVERSION}" "DisplayVersion" "${APPVERSION}"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" \ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" \
"NoModify" 1 "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" \ WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" \
"NoRepair" 1 "NoRepair" 1
; Associate .pxo files with Pixelorama ; Associate .pxo files with Pixelorama
WriteRegStr HKCR ".pxo" "" "Pixelorama project" WriteRegStr HKCR ".pxo" "" "Pixelorama project"
WriteRegStr HKCR ".pxo" "ContentType" "image/pixelorama" WriteRegStr HKCR ".pxo" "ContentType" "image/pixelorama"
@ -161,7 +161,7 @@
; Create folder in Start Menu\Programs and create shortcuts for app and uninstaller ; Create folder in Start Menu\Programs and create shortcuts for app and uninstaller
CreateDirectory "$SMPROGRAMS\${COMPANYNAME}" CreateDirectory "$SMPROGRAMS\${COMPANYNAME}"
CreateShortCut "$SMPROGRAMS\${COMPANYNAME}\${APPNAME} ${APPVERSION}.lnk" "$INSTDIR\Pixelorama.exe" CreateShortCut "$SMPROGRAMS\${COMPANYNAME}\${APPNAME} ${APPVERSION}.lnk" "$INSTDIR\Pixelorama.exe"
CreateShortCut "$SMPROGRAMS\${COMPANYNAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe" CreateShortCut "$SMPROGRAMS\${COMPANYNAME}\Uninstall.lnk" "$INSTDIR\uninstall.exe"
@ -169,9 +169,9 @@
Section /o "$(SecDesktop)" SecDesktop ; Create Desktop shortcut Section /o "$(SecDesktop)" SecDesktop ; Create Desktop shortcut
; Create shortcut for app on desktop ; Create shortcut for app on desktop
CreateShortCut "$DESKTOP\${APPNAME} ${APPVERSION}.lnk" "$INSTDIR\Pixelorama.exe" CreateShortCut "$DESKTOP\${APPNAME} ${APPVERSION}.lnk" "$INSTDIR\${APPNAME}.exe"
SectionEnd SectionEnd
@ -180,7 +180,7 @@
Function .onInit Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY !insertmacro MUI_LANGDLL_DISPLAY
FunctionEnd FunctionEnd
@ -192,8 +192,8 @@
; Delete all files and folders created by the installer ; Delete all files and folders created by the installer
Delete "$INSTDIR\uninstall.exe" Delete "$INSTDIR\uninstall.exe"
Delete "$INSTDIR\Pixelorama.exe" Delete "$INSTDIR\${APPNAME}.exe"
Delete "$INSTDIR\Pixelorama.pck" Delete "$INSTDIR\${APPNAME}.pck"
Delete "$INSTDIR\pxo.ico" Delete "$INSTDIR\pxo.ico"
RMDir /r "$INSTDIR\pixelorama_data" RMDir /r "$INSTDIR\pixelorama_data"
RMDir "$INSTDIR" RMDir "$INSTDIR"
@ -221,44 +221,43 @@
Section "un.$(un.SecConfig)" un.SecConfig ; Configuration removal section Section "un.$(un.SecConfig)" un.SecConfig ; Configuration removal section
; Delete the application's settings file ; Delete the application's settings file
Delete "$APPDATA\Godot\app_userdata\${APPNAME}\cache.ini" Delete "$APPDATA\Godot\app_userdata\${APPNAME}\cache.ini"
SectionEnd SectionEnd
; Uninstaller functions ; Uninstaller functions
Function un.onInit Function un.onInit
!insertmacro MUI_UNGETLANGUAGE !insertmacro MUI_UNGETLANGUAGE
FunctionEnd FunctionEnd
; Section description language strings for multilingual support ; Section description language strings for multilingual support
LangString DESC_SecInstall ${LANG_ENGLISH} "Installs ${APPNAME} ${APPVERSION}." LangString DESC_SecInstall ${LANG_ENGLISH} "Installs ${APPNAME} ${APPVERSION}."
LangString DESC_SecStartmenu ${LANG_ENGLISH} "Creates Start Menu shortcuts for ${APPNAME}." LangString DESC_SecStartmenu ${LANG_ENGLISH} "Creates Start Menu shortcuts for ${APPNAME}."
LangString DESC_SecDesktop ${LANG_ENGLISH} "Creates a Desktop shortcut for ${APPNAME}." LangString DESC_SecDesktop ${LANG_ENGLISH} "Creates a Desktop shortcut for ${APPNAME}."
LangString DESC_un.SecUninstall ${LANG_ENGLISH} "Uninstalls ${APPNAME} ${APPVERSION} and removes all shortcuts." LangString DESC_un.SecUninstall ${LANG_ENGLISH} "Uninstalls ${APPNAME} ${APPVERSION} and removes all shortcuts."
LangString DESC_un.SecConfig ${LANG_ENGLISH} "Removes configuration files for ${APPNAME}." LangString DESC_un.SecConfig ${LANG_ENGLISH} "Removes configuration files for ${APPNAME}."
; Assign language strings to installer/uninstaller descriptions ; Assign language strings to installer/uninstaller descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecInstall} $(DESC_SecInstall) !insertmacro MUI_DESCRIPTION_TEXT ${SecInstall} $(DESC_SecInstall)
!insertmacro MUI_DESCRIPTION_TEXT ${SecStartmenu} $(DESC_SecStartmenu) !insertmacro MUI_DESCRIPTION_TEXT ${SecStartmenu} $(DESC_SecStartmenu)
!insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} $(DESC_SecDesktop) !insertmacro MUI_DESCRIPTION_TEXT ${SecDesktop} $(DESC_SecDesktop)
!insertmacro MUI_FUNCTION_DESCRIPTION_END !insertmacro MUI_FUNCTION_DESCRIPTION_END
!insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${un.SecUninstall} $(DESC_un.SecUninstall) !insertmacro MUI_DESCRIPTION_TEXT ${un.SecUninstall} $(DESC_un.SecUninstall)
!insertmacro MUI_DESCRIPTION_TEXT ${un.SecConfig} $(DESC_un.SecConfig) !insertmacro MUI_DESCRIPTION_TEXT ${un.SecConfig} $(DESC_un.SecConfig)
!insertmacro MUI_UNFUNCTION_DESCRIPTION_END !insertmacro MUI_UNFUNCTION_DESCRIPTION_END