[feat] add github actions scripts

This commit is contained in:
dijunkun
2025-08-10 00:03:13 +08:00
parent 1a1bbe3e4d
commit f2664daaec
14 changed files with 1134 additions and 22 deletions

View File

@@ -0,0 +1,99 @@
; <20>ýű<C3BD>ʹ<EFBFBD><CAB9> HM VNISEdit <20>ű<EFBFBD><C5B1><EFBFBD><E0BCAD><EFBFBD>򵼲<EFBFBD><F2B5BCB2><EFBFBD>
; <20><>װ<EFBFBD><D7B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ʼ<EFBFBD><CABC><EFBFBD><EFBFBD><E5B3A3>
!define PRODUCT_NAME "CrossDesk"
!define PRODUCT_VERSION "0.0.1"
!define PRODUCT_PUBLISHER "CrossDesk"
!define PRODUCT_WEB_SITE "https://www.crossdesk.cn/"
!define APP_NAME "CrossDesk"
!define UNINSTALL_REG_KEY "CrossDesk"
;<3B>ﰲװ<EFB0B2><D7B0>ͼ<EFBFBD><CDBC>
Icon "icons\crossdesk.ico"
!define MUI_ICON "icons\crossdesk.ico"
;<3B><>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
SetCompressor /FINAL lzma
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ԱȨ<D4B1>ޣ<EFBFBD>д<EFBFBD><D0B4>HKLM<4C><4D>Ҫ<EFBFBD><D2AA>
RequestExecutionLevel admin
; ------ MUI <20>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD><EFBFBD><E6B6A8> ------
!include "MUI.nsh"
!define MUI_ABORTWARNING
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_LANGUAGE "SimpChinese"
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
; ------ MUI <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ------
Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "CrossDesk-${PRODUCT_VERSION}.exe"
InstallDir "$PROGRAMFILES\CrossDesk"
ShowInstDetails show
Section "MainSection"
SetOutPath "$INSTDIR"
SetOverwrite ifnewer
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ļ<EFBFBD>
File /oname=crossdesk.exe "build\windows\x64\release\crossdesk\crossdesk.exe"
; ? <20><><EFBFBD><EFBFBD>ͼ<EFBFBD><CDBC><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD><EFBFBD>װĿ¼
File "icons\crossdesk.ico"
;<3B><>д<EFBFBD><D0B4>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>Ϣ
WriteUninstaller "$INSTDIR\uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL_REG_KEY}" "DisplayName" "${PRODUCT_NAME}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL_REG_KEY}" "UninstallString" "$INSTDIR\uninstall.exe"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL_REG_KEY}" "DisplayVersion" "${PRODUCT_VERSION}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL_REG_KEY}" "Publisher" "${PRODUCT_PUBLISHER}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL_REG_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL_REG_KEY}" "DisplayIcon" "$INSTDIR\crossdesk.ico"
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL_REG_KEY}" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL_REG_KEY}" "NoRepair" 1
SectionEnd
Section "Cert"
SetOutPath "$APPDATA\CrossDesk\certs"
File /r "certs\crossdesk.cn_root.crt"
SectionEnd
Section -AdditionalIcons
;<3B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ݷ<EFBFBD>ʽ
CreateShortCut "$DESKTOP\${PRODUCT_NAME}.lnk" "$INSTDIR\crossdesk.exe" "" "$INSTDIR\crossdesk.ico"
;<3B>ʼ<EFBFAA>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>ݷ<EFBFBD>ʽ
CreateShortCut "$SMPROGRAMS\${PRODUCT_NAME}.lnk" "$INSTDIR\crossdesk.exe" "" "$INSTDIR\crossdesk.ico"
;<3B><><EFBFBD><EFBFBD>ҳ<EFBFBD><D2B3><EFBFBD>ݷ<EFBFBD>ʽ<EFBFBD><CABD><EFBFBD><EFBFBD><EFBFBD>
WriteIniStr "$DESKTOP\${PRODUCT_NAME}.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
SectionEnd
Section "Uninstall"
; ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ж<EFBFBD>س<EFBFBD><D8B3><EFBFBD>
Delete "$INSTDIR\crossdesk.exe"
Delete "$INSTDIR\uninstall.exe"
; <20>ݹ<EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD><EFBFBD>װĿ¼
RMDir /r "$INSTDIR"
; ɾ<><C9BE><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ϳ<EFBFBD>ʼ<EFBFBD>˵<EFBFBD><CBB5><EFBFBD><EFBFBD>ݷ<EFBFBD>ʽ
Delete "$DESKTOP\${PRODUCT_NAME}.lnk"
Delete "$DESKTOP\${PRODUCT_NAME}.url"
Delete "$SMPROGRAMS\${PRODUCT_NAME}.lnk"
; ɾ<><C9BE>ע<EFBFBD><D7A2><EFBFBD><EFBFBD>ж<EFBFBD><D0B6><EFBFBD><EFBFBD>
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${UNINSTALL_REG_KEY}"
; <20>ݹ<EFBFBD>ɾ<EFBFBD><C9BE><EFBFBD>û<EFBFBD> AppData <20>е<EFBFBD> CrossDesk <20>ļ<EFBFBD><C4BC><EFBFBD>
RMDir /r "$APPDATA\CrossDesk"
RMDir /r "$LOCALAPPDATA\CrossDesk"
SectionEnd
Section -Post
SectionEnd