Windows: Remove installer

This commit is contained in:
kichikuou
2024-01-20 11:04:43 +09:00
parent 370100a6f2
commit 894b0592f4
5 changed files with 4 additions and 119 deletions
+4 -10
View File
@@ -9,11 +9,11 @@ jobs:
matrix:
include:
- sys: MINGW32
installer: "xsystem35-32bit"
package: "xsystem35-32bit"
cmake_args: "-DENABLE_DEBUGGER=no"
deps: ""
- sys: UCRT64
installer: "xsystem35-64bit"
package: "xsystem35-64bit"
cmake_args: ""
deps: "cjson:p"
defaults:
@@ -34,8 +34,6 @@ jobs:
SDL2_ttf:p
SDL2_mixer:p
libwebp:p
nsis:p
ntldd:p
${{ matrix.deps }}
- name: Checkout
@@ -52,12 +50,8 @@ jobs:
run: ctest --output-on-failure
working-directory: out/release
- name: Package
working-directory: tools/installer
run: ./make-installer.sh ../../out/release ${{ matrix.installer }}.nsi
- name: Upload
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.installer }}
path: tools/installer/${{ matrix.installer }}.exe
name: ${{ matrix.package }}
path: out/release/src/xsystem35.exe
-21
View File
@@ -1,21 +0,0 @@
#!/bin/sh
# To use this script in MSYS2 shell, install mingw-w64-ucrt-x86_64-nsis and
# mingw-w64-ucrt-x86_64-ntldd packages.
if [ $# -ne 2 ]; then
echo 'Usage: make-installer.sh <build-dir> <nsi>'
exit 1
fi
builddir=$1
nsi=$2
echo 'dlls.nsi:'
ntldd -R $builddir/src/xsystem35.exe |perl -ne 'print "File \"$1\"\n" if /=> (.*) \(/' |grep 'mingw32\|ucrt64' |tee $builddir/dlls.nsi
echo
echo 'dlls-uninstall.nsi:'
sed 's/^File ".*\\/Delete "$INSTDIR\\/' $builddir/dlls.nsi |tee $builddir/dlls-uninstall.nsi
echo
makensis -INPUTCHARSET UTF8 -DBUILDDIR="$builddir" "$nsi"
-5
View File
@@ -1,5 +0,0 @@
Unicode true
Name xsystem35
OutFile xsystem35-32bit.exe
InstallDir $PROGRAMFILES32\xsystem35
!include xsystem35.nsi
-5
View File
@@ -1,5 +0,0 @@
Unicode true
Name xsystem35
OutFile xsystem35-64bit.exe
InstallDir $PROGRAMFILES64\xsystem35
!include xsystem35.nsi
-78
View File
@@ -1,78 +0,0 @@
ManifestDPIAware true
SetCompressor /SOLID lzma
LoadLanguageFile "${NSISDIR}\Contrib\Language files\English.nlf"
LoadLanguageFile "${NSISDIR}\Contrib\Language files\Japanese.nlf"
Page license
Page directory
Page components
Page instfiles
UninstPage uninstConfirm
UninstPage instfiles
LicenseData ..\..\COPYING
!define SHCNE_ASSOCCHANGED 0x08000000
!define SHCNF_IDLIST 0
Function RefreshShellIcons
System::Call 'shell32.dll::SHChangeNotify(i, i, i, i) v \
(${SHCNE_ASSOCCHANGED}, ${SHCNF_IDLIST}, 0, 0)'
FunctionEnd
Section
SetOutPath $INSTDIR
FILE ${BUILDDIR}\src\xsystem35.exe
!include ${BUILDDIR}\dlls.nsi
SetOutPath $INSTDIR\fonts
FILE /x CMakeLists.txt ..\..\fonts\*.*
WriteUninstaller $INSTDIR\uninstall.exe
WriteRegStr HKLM "Software\Kichikuou\xsystem35" "InstallDir" "$INSTDIR"
WriteRegStr HKLM "Software\Kichikuou\xsystem35\profile" "ttfont_gothic" "$INSTDIR\fonts\MTLc3m.ttf"
WriteRegStr HKLM "Software\Kichikuou\xsystem35\profile" "ttfont_mincho" "$INSTDIR\fonts\mincho.otf"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\xsystem35" "DisplayName" "xsystem35 (remove only)"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\xsystem35" "UninstallString" '"$INSTDIR\uninstall.exe"'
SectionEnd
LangString FileAssociation ${LANG_ENGLISH} "Associate with .ALD file type"
LangString FileAssociation ${LANG_JAPANESE} ".ALD ファイルに関連付け"
Section "$(FileAssociation)"
WriteRegStr HKCR ".ald" "" "System35Archive"
WriteRegStr HKCR "System35Archive" "" "AliceSoft System 3.x archive"
WriteRegStr HKCR "System35Archive\DefaultIcon" "" "$INSTDIR\xsystem35.exe,0"
WriteRegStr HKCR "System35Archive\shell\open\command" "" '"$INSTDIR\xsystem35.exe" "%1"'
Call RefreshShellIcons
SectionEnd
LangString DesktopIcon ${LANG_ENGLISH} "Create Desktop icon"
LangString DesktopIcon ${LANG_JAPANESE} "デスクトップショートカットを作成"
Section "$(DesktopIcon)"
CreateShortcut $DESKTOP\xsystem35.lnk $INSTDIR\xsystem35.exe
SectionEnd
LangString StartMenu ${LANG_ENGLISH} "Create Start menu entry"
LangString StartMenu ${LANG_JAPANESE} "スタートメニューに登録"
Section "$(StartMenu)"
CreateDirectory $SMPROGRAMS\xsystem35
CreateShortcut $SMPROGRAMS\xsystem35\xsystem35.lnk $INSTDIR\xsystem35.exe
CreateShortcut $SMPROGRAMS\xsystem35\uninstall.lnk $INSTDIR\uninstall.exe
SectionEnd
Section "Uninstall"
Delete $DESKTOP\xsystem35.lnk
RMDir /r $SMPROGRAMS\xsystem35
DeleteRegKey HKCR ".ald"
DeleteRegKey HKCR "System35Archive"
DeleteRegKey HKLM "Software\Kichikuou\xsystem35"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\xsystem35"
RMDir /r $INSTDIR\fonts
Delete $INSTDIR\uninstall.exe
Delete $INSTDIR\xsystem35.exe
!include ${BUILDDIR}\dlls-uninstall.nsi
RMDir $INSTDIR
SectionEnd