Skip to content

Commit 9571be6

Browse files
committed
feat(windows): create Keyman for Windows installer without buildpkg
1 parent e1087ed commit 9571be6

File tree

3 files changed

+27
-5
lines changed

3 files changed

+27
-5
lines changed

docs/build/windows.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ Building:
101101
* Ant
102102
* Gradle
103103
* Maven
104-
* OpenJDK 11
104+
* Optional: OpenJDK 11 (https://learn.microsoft.com/en-us/java/openjdk/download)
105105

106106
```ps1
107107
# Elevated PowerShell
@@ -254,8 +254,8 @@ choco install openjdk
254254
choco install visualstudio2019community visualstudio2019-workload-nativedesktop visualstudio2019buildtools
255255
```
256256
* Verify required build tools are installed
257-
* Run `Visual Studio Installer`
258-
* Check the `Individual components` tab
257+
* Run `Visual Studio Installer`
258+
* Check the `Individual components` tab
259259
* Verify `MSVC v142 - VS 2019 c++ x64/x86 build tools (Latest)` is installed. If not, install it.
260260

261261
Recommended: configure Visual Studio to use two-space tab stops:

windows/src/desktop/inst/Makefile

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,19 @@ prereq-resources:
2828
$(SIGNCODE) /d "Keyman Resources" desktop_resources.dll
2929

3030
desktop: prereq
31+
rem compile .msi
3132
$(MAKE) -fdownload.mak candle
3233
$(WIXLIGHT) -dWixUILicenseRtf=License.rtf -out keymandesktop.msi -ext WixUIExtension $(DESKTOP_FILES)
3334
$(SIGNCODE) /d "Keyman" keymandesktop.msi
34-
# TODO: replace buildpkg with kmc? Or promote it to developer?
35-
$(ROOT)\bin\buildtools\buildpkg -m keymandesktop.msi -s $(ROOT)\bin\desktop -l license.html
35+
36+
rem build self-extracting archive
37+
$(MAKE) -fdownload.mak setup-inf
38+
$(WZZIP) keymandesktop.zip keymandesktop.msi license.html setup.inf
39+
-del setup.inf
40+
$(COPY) /b $(ROOT)\bin\desktop\setup-redist.exe + keymandesktop.zip keymandesktop.exe
41+
-del keymandesktop.zip
42+
43+
rem sign and copy files
3644
$(SIGNCODE) /d "Keyman" keymandesktop.exe
3745
$(MAKE) -fdownload.mak copyredist-desktop
3846

@@ -51,6 +59,8 @@ clean:
5159
-del /Q desktopui.wxs
5260
-del /Q cef.wxs
5361
-del /Q locale.wxs
62+
-del keymandesktop.zip
63+
-del setup.inf
5464

5565
check:
5666
if not exist $(ROOT)\src\engine\inst\keymanengine.msm $(MAKE) check-engine

windows/src/desktop/inst/download.in

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,15 @@ candle-locale:
6363
# locale files are in desktop/locale/*
6464
$(WIXHEAT) dir ..\kmshell\locale -o locale.wxs -ag -cg Locale -dr INSTALLDIR -var var.LOCALESOURCE -wx -nologo
6565
$(WIXCANDLE) -dVERSION=$VersionWin -dRELEASE=$VersionRelease -dPRODUCTID=$GUID1 -dLOCALESOURCE=..\kmshell\locale locale.wxs
66+
67+
#
68+
# Build setup.inf
69+
#
70+
71+
setup-inf:
72+
echo [Setup] > setup.inf
73+
echo Version=$VersionWin >> setup.inf
74+
echo MSIFileName=keymandesktop.msi >> setup.inf
75+
echo MSIOptions= >> setup.inf
76+
echo License=license.html >> setup.inf
77+
echo [Packages] >> setup.inf

0 commit comments

Comments
 (0)