diff --git a/installer/xsystem35.nsi b/installer/xsystem35.nsi index c3234ac..27a3fcb 100644 --- a/installer/xsystem35.nsi +++ b/installer/xsystem35.nsi @@ -13,6 +13,13 @@ 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 @@ -33,8 +40,9 @@ 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,1" + 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" diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a3bb804..dd62bcc 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -65,7 +65,7 @@ target_sources(xsystem35 PRIVATE network.c) if (WIN32) - target_sources(xsystem35 PRIVATE win/dialog.c) + target_sources(xsystem35 PRIVATE win/dialog.c win/resources.rc) endif() if (EMSCRIPTEN) diff --git a/src/win/resources.rc b/src/win/resources.rc new file mode 100644 index 0000000..2b0fcd5 --- /dev/null +++ b/src/win/resources.rc @@ -0,0 +1 @@ +100 ICON DISCARDABLE "xsystem35.ico" diff --git a/src/win/xsystem35.ico b/src/win/xsystem35.ico new file mode 100644 index 0000000..b7beb2d Binary files /dev/null and b/src/win/xsystem35.ico differ