Skip to content

Commit

Permalink
chore: add NSIS installer
Browse files Browse the repository at this point in the history
  • Loading branch information
dzpao committed Dec 2, 2023
1 parent 18d400b commit ed2a200
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/windows-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,12 @@ jobs:
rm -rf tintin
rm -rf pcre-8.45
- name: Create installer
uses: joncloud/makensis-action@v4
with:
script-file: windows/install.nsi
arguments: "/V3"

- name: Create artifact -- WinTin++
uses: actions/upload-artifact@v3
with:
Expand Down
30 changes: 30 additions & 0 deletions windows/install.nsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
Name "PaoTin++ for Windows"
OutFile PaoTin++.exe
ShowInstDetails show
AllowRootDirInstall true

!include "FileFunc.nsh"

Page custom selectDriver
Page instfiles

Var Dialog
Var Drive

Function selectDriver
nsDialogs::Create 1018
Pop $Dialog

${NSD_CreateDropList} 0 0 100% 20u "选择你要安装到哪个盘"
${GetDrives} "HDD" "Example1"

nsDialogs::Show

CreateDirectory "%LOCALAPPDATA%\Microsoft\Windows Terminal\Fragments\PaoTin++"
CreateDirectory "%LOCALAPPDATA%\Microsoft\Windows Terminal Preview\Fragments\PaoTin++"
FunctionEnd

Function Example1
MessageBox MB_OK "$9 ($8 Drive)"
Push $0
FunctionEnd

0 comments on commit ed2a200

Please sign in to comment.