Skip to content

Commit

Permalink
Merge pull request #177 from chewing/msi-improvement
Browse files Browse the repository at this point in the history
feat(msi)!: remove nsis installer
  • Loading branch information
kanru authored Jul 5, 2024
2 parents 6cbf814 + ce46581 commit e547419
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 234 deletions.
1 change: 0 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,4 @@ jobs:
with:
name: Unsigned Installer
path: |
dist\windows-chewing-tsf-unsigned.exe
dist\windows-chewing-tsf-unsigned.msi
4 changes: 0 additions & 4 deletions .github/workflows/code-signing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,12 @@ jobs:
output-artifact-directory: dist
- name: Rename Artifact and Calculate Checksum
run: |
mv dist/windows-chewing-tsf-unsigned.exe dist/windows-chewing-tsf.exe
sha256sum dist/windows-chewing-tsf.exe > dist/windows-chewing-tsf.exe.sha256
mv dist/windows-chewing-tsf-unsigned.msi dist/windows-chewing-tsf.msi
sha256sum dist/windows-chewing-tsf.msi > dist/windows-chewing-tsf.msi.sha256
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: Signed Installer
path: |
dist/windows-chewing-tsf.exe
dist/windows-chewing-tsf.exe.sha256
dist/windows-chewing-tsf.msi
dist/windows-chewing-tsf.msi.sha256
2 changes: 0 additions & 2 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,5 @@ jobs:
**Full Changelog**: https://github.com/chewing/windows-chewing-tsf/compare/1ba881c...nightly
files: |
dist/windows-chewing-tsf.exe
dist/windows-chewing-tsf.exe.sha256
dist/windows-chewing-tsf.msi
dist/windows-chewing-tsf.msi.sha256
Binary file modified ChewingTextService/ChewingTextService.rc
Binary file not shown.
3 changes: 2 additions & 1 deletion installer/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ To build an installer:

5. Put `32-bit` chewing-cli.exe in this dir.

6. Compile installer.nsi with NSIS.
6. Compile windows-chewing-tsf.wixproj with msbuild.

All steps can be automated by scripts\build_installer.bat
3 changes: 0 additions & 3 deletions installer/SetupChewing.bat

This file was deleted.

199 changes: 0 additions & 199 deletions installer/installer.nsi

This file was deleted.

45 changes: 21 additions & 24 deletions scripts/build_installer.bat
Original file line number Diff line number Diff line change
@@ -1,30 +1,27 @@
cmake -B x86 -A Win32 -DBUILD_TESTING=OFF
cmake --build x86 --config Release
cmake -B x64 -A x64 -DBUILD_TESTING=OFF
cmake --build x64 --config Release
cmake -B build\x86 -A Win32 -DBUILD_TESTING=OFF
cmake --build build\x86 --config Release
cmake -B build\x64 -A x64 -DBUILD_TESTING=OFF
cmake --build build\x64 --config Release
pushd tsfreg
cargo build --release
popd
mkdir dist
mkdir nsis
copy installer\* nsis\
copy COPYING.txt nsis\
copy ChewingTextService\mainicon2.ico nsis\chewing.ico
mkdir nsis\Dictionary
copy libchewing\data\*.dat nsis\Dictionary\
copy x64\libchewing\data\*.dat nsis\Dictionary\
mkdir nsis\x86
copy x86\ChewingTextService\Release\*.dll nsis\x86\
copy x86\libchewing\Release\*.dll nsis\x86\
copy x86\ChewingPreferences\Release\*.exe nsis\
copy x86\libchewing\chewing-cli.exe nsis\
mkdir nsis\x64
copy x64\ChewingTextService\Release\*.dll nsis\x64\
copy x64\libchewing\Release\*.dll nsis\x64\
copy tsfreg\target\release\tsfreg.exe nsis\
pushd nsis
makensis installer.nsi
mkdir build\installer
copy installer\* build\installer\
copy ChewingTextService\mainicon2.ico build\installer\chewing.ico
mkdir build\installer\Dictionary
copy libchewing\data\*.dat build\installer\Dictionary\
copy build\x64\libchewing\data\*.dat build\installer\Dictionary\
mkdir build\installer\x86
copy build\x86\ChewingTextService\Release\*.dll build\installer\x86\
copy build\x86\libchewing\Release\*.dll build\installer\x86\
copy build\x86\ChewingPreferences\Release\*.exe build\installer\
copy build\x86\libchewing\chewing-cli.exe build\installer\
mkdir build\installer\x64
copy build\x64\ChewingTextService\Release\*.dll build\installer\x64\
copy build\x64\libchewing\Release\*.dll build\installer\x64\
copy tsfreg\target\release\tsfreg.exe build\installer\
pushd build\installer
msbuild -p:Configuration=Release -restore windows-chewing-tsf.wixproj
popd
copy nsis\windows-chewing-tsf.exe dist\windows-chewing-tsf-unsigned.exe
copy nsis\bin\Release\zh-TW\windows-chewing-tsf.msi dist\windows-chewing-tsf-unsigned.msi
copy build\installer\bin\Release\zh-TW\windows-chewing-tsf.msi dist\windows-chewing-tsf-unsigned.msi

0 comments on commit e547419

Please sign in to comment.