Skip to content

Commit

Permalink
Rename artifacts
Browse files Browse the repository at this point in the history
(References: #42)
  • Loading branch information
Aszusz committed Mar 18, 2024
1 parent fdc72d7 commit bd1148b
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 30 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,6 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: msdki-macos
path: MoonshineSDKInstaller/build/bin/msdki.pkg
name: msdki-macos-setup
path: MoonshineSDKInstaller/build/bin/${{ env.app_name }}-${{ inputs.version }}.pkg
if-no-files-found: error
7 changes: 5 additions & 2 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ on:
required: true
type: string

env:
app_name: ${{ inputs.env == 'production' && 'MoonshineSDKInstaller' || 'MoonshineSDKInstallerDevelopment' }}

jobs:
build:
runs-on: "windows-latest"
Expand Down Expand Up @@ -112,6 +115,6 @@ jobs:
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: msdki-windows
path: MoonshineSDKInstaller/build/bin/msdki.exe
name: msdki-windows-setup
path: MoonshineSDKInstaller/build/bin/${{ env.app_name }}-${{ inputs.version }}.exe
if-no-files-found: error
9 changes: 5 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ on:
type: string

env:
app_name: ${{ inputs.env == 'production' && 'MoonshineSDKInstaller' || 'MoonshineSDKInstallerDevelopment' }}
tag: v${{ inputs.version }}${{ inputs.env == 'production' && ' ' || '-Dev' }}

jobs:
Expand Down Expand Up @@ -55,12 +56,12 @@ jobs:
- name: Download windows installer
uses: actions/download-artifact@v4
with:
name: msdki-windows
name: msdki-windows-setup

- name: Download macos installer
uses: actions/download-artifact@v4
with:
name: msdki-macos
name: msdki-macos-setup

- name: Debug artifacts
run: ls .
Expand All @@ -76,6 +77,6 @@ jobs:
draft: true
prerelease: ${{ inputs.env == 'development' }}
files: |
msdki.exe
msdki.pkg
${{ env.app_name }}-${{ inputs.version }}.exe
${{ env.app_name }}-${{ inputs.version }}.pkg
fail_on_unmatched_files: true
11 changes: 6 additions & 5 deletions MoonshineSDKInstaller/build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -340,8 +340,9 @@
<target name="create-windows-installer">
<exec executable="${nsis.cmd}" failonerror="true">
<arg value="/DVERSION=${app.version}"/>
<arg value="/DINSTALLERNAME=${app.name}"/>
<arg value="/DEXECUTABLENAME=${app.name}"/>
<arg value="/DAPP_NAME=${app.name}"/>
<arg value="/DAPP_TITLE=${app.name}"/>
<arg value="/DINSTALLER_NAME=${app.name}-${app.version}"/>
<arg value="/DAPPID=${app.id}"/>
<arg value="/DTIMESTAMP=${timestamp.time}"/>
<arg value="./nsis-build.nsi"/>
Expand All @@ -361,7 +362,7 @@
<arg value="SHA256"/>
<arg value="/fd"/>
<arg value="SHA256"/>
<arg value="./bin/msdki.exe"/>
<arg value="./bin/${app.name}-${app.version}.exe"/>
</exec>
<echo message="Signed Windows Installer"/>
</target>
Expand Down Expand Up @@ -439,7 +440,7 @@
<arg value="--sign"/>
<arg value="Developer ID Installer"/>
<arg value="./bin/msdki-unsigned.pkg"/>
<arg value="./bin/msdki.pkg"/>
<arg value="./bin/${app.name}-${app.version}.pkg"/>
</exec>
<echo message="Signed macOS pkg"/>
</target>
Expand All @@ -449,7 +450,7 @@
<exec executable="xcrun" failonerror="true">
<arg value="notarytool"/>
<arg value="submit"/>
<arg value="./bin/msdki.pkg"/>
<arg value="./bin/${app.name}-${app.version}.pkg"/>
<arg value="--keychain-profile"/>
<arg value="${notarytool.profile}"/>
<arg value="--wait"/>
Expand Down
34 changes: 17 additions & 17 deletions MoonshineSDKInstaller/build/nsis-build.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,22 @@
;General

;Name and file
Name "${INSTALLERNAME}"
OutFile "bin\msdki.exe"
Name "${APP_NAME}"
OutFile "bin\${INSTALLER_NAME}.exe"

;Default installation folder
InstallDir "$PROGRAMFILES64\${INSTALLERNAME}"
InstallDir "$PROGRAMFILES64\${APP_NAME}"

;Get installation folder from registry if available
InstallDirRegKey HKCU "Software\${INSTALLERNAME}" ""
InstallDirRegKey HKCU "Software\${APP_NAME}" ""

;Request application privileges for Windows Vista and higher
RequestExecutionLevel admin

;--------------------------------
;Start of running process check

!define APP_NAME find_close_terminate
#!define APP_NAME find_close_terminate
!define WND_PROCESS_TITLE "MoonshineSDKInstaller"
!define TO_MS 2000
!define SYNC_TERM 0x00100001
Expand Down Expand Up @@ -72,22 +72,22 @@ LangString stopMsg 0 "Stopping ${WND_PROCESS_TITLE} Application"
;End of running process check

Function .onInit
!insertmacro TerminateApp "${EXECUTABLENAME}.exe"
!insertmacro TerminateApp "${APP_TITLE}.exe"

ReadRegStr $R0 HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPID}" \
"TimeStamp"
StrCmp $R0 "" done
StrCmp $R0 "${TIMESTAMP}" 0 done
MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION \
"This version of ${EXECUTABLENAME} is already installed. Do you want to run the current installation?$\n$\n \
Yes - Start ${EXECUTABLENAME} now$\n \
"This version of ${APP_TITLE} is already installed. Do you want to run the current installation?$\n$\n \
Yes - Start ${APP_TITLE} now$\n \
No - Do a fresh install$\n \
Cancel - Cancel this installation" \
IDYES run_application IDNO run_uninstaller
Abort
run_application:
ClearErrors
Exec "$INSTDIR\${EXECUTABLENAME}.exe"
Exec "$INSTDIR\${APP_TITLE}.exe"
Abort
run_uninstaller:
ClearErrors
Expand All @@ -114,8 +114,8 @@ FunctionEnd
!define MUI_HEADERIMAGE
;!define MUI_HEADERIMAGE_BITMAP "header.bmp"
;!define MUI_WELCOMEFINISHPAGE_BITMAP "wizard.bmp"
!define MUI_FINISHPAGE_RUN "$INSTDIR\${EXECUTABLENAME}.exe"
!define MUI_FINISHPAGE_RUN_TEXT "Run ${EXECUTABLENAME}"
!define MUI_FINISHPAGE_RUN "$INSTDIR\${APP_TITLE}.exe"
!define MUI_FINISHPAGE_RUN_TEXT "Run ${APP_TITLE}"
!define MUI_FINISHPAGE_NOAUTOCLOSE
;!define MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\orange-install.ico"
;!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\orange-uninstall.ico"
Expand Down Expand Up @@ -147,13 +147,13 @@ Section "Moonshine-SDK-Installer" SecMoonshineSDKInstaller
File /r "bin\app\*"

;Store installation folder
WriteRegStr HKCU "Software\${INSTALLERNAME}" "" $INSTDIR
WriteRegStr HKCU "Software\${APP_NAME}" "" $INSTDIR

;Create uninstaller
WriteUninstaller "$INSTDIR\uninstall.exe"

WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPID}" \
"DisplayName" "${INSTALLERNAME}"
"DisplayName" "${APP_NAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPID}" \
"Publisher" "Prominic.NET, Inc."
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPID}" \
Expand All @@ -165,7 +165,7 @@ Section "Moonshine-SDK-Installer" SecMoonshineSDKInstaller
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPID}" \
"HelpLink" "https://moonshine-ide.com/faq/"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPID}" \
"DisplayIcon" "$\"$INSTDIR\${EXECUTABLENAME}.exe$\""
"DisplayIcon" "$\"$INSTDIR\${APP_TITLE}.exe$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPID}" \
"UninstallString" "$\"$INSTDIR\uninstall.exe$\""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPID}" \
Expand All @@ -183,7 +183,7 @@ Section "Moonshine-SDK-Installer" SecMoonshineSDKInstaller
"EstimatedSize" "$0"

;Create Start Menu entry
CreateShortCut "$SMPROGRAMS\${INSTALLERNAME} (64-bit).lnk" "$INSTDIR\${EXECUTABLENAME}.exe"
CreateShortCut "$SMPROGRAMS\${APP_NAME} (64-bit).lnk" "$INSTDIR\${APP_TITLE}.exe"

SectionEnd

Expand All @@ -195,9 +195,9 @@ Section "Uninstall"
RMDir /r "$INSTDIR\*"
RMDir "$INSTDIR"

Delete "$SMPROGRAMS\${INSTALLERNAME}.lnk"
Delete "$SMPROGRAMS\${APP_NAME}.lnk"

DeleteRegKey /ifempty HKCU "Software\${INSTALLERNAME}"
DeleteRegKey /ifempty HKCU "Software\${APP_NAME}"

DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPID}"
SectionEnd

0 comments on commit bd1148b

Please sign in to comment.