-
Notifications
You must be signed in to change notification settings - Fork 1
172 lines (154 loc) · 7.29 KB
/
build-windows.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
name: Build windows (Win-latest)
on:
workflow_dispatch:
inputs:
refToBuild:
description: 'Branch, tag or commit SHA1 to build'
default: ''
required: false
type: string
refToHelpAsset:
description: 'Run-ID of build with help-ehf asset'
default: ''
required: false
type: string
jobs:
build:
runs-on: windows-latest
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
steps:
- name: Find VS
shell: pwsh
run: |
$installationPath = Get-VSSetupInstance `
| Select-VSSetupInstance -Require Microsoft.VisualStudio.Workload.NativeDesktop -Latest `
| Select-Object -ExpandProperty InstallationPath
Write-Output "VSDEVCMD=${installationPath}\Common7\Tools\VsDevCmd.bat" `
| Out-File -FilePath "${Env:GITHUB_ENV}" -Append
cat "${Env:GITHUB_ENV}"
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ inputs.refToBuild }}
- name: Download pre-built OpenSSL
shell: pwsh
run: |
cd .\microemacs\3rdparty
Invoke-WebRequest https://download.firedaemon.com/FireDaemon-OpenSSL/openssl-3.0.15.zip -OutFile openssl.zip
Expand-Archive -Path .\openssl.zip -DestinationPath .
dir .
- name: Compile windows100 mec
shell: pwsh
run: |
& "${Env:COMSPEC}" /s /c "`"${Env:VSDEVCMD}`" -arch=x86 -host_arch=x64 -no_logo && set" `
| % { , ($_ -Split '=', 2) } `
| % { [System.Environment]::SetEnvironmentVariable($_[0], $_[1]) }
nmake -f winmsvc.mak BTYP=c
working-directory: ./microemacs/src
- name: Compile windows100 mew
shell: pwsh
run: |
& "${Env:COMSPEC}" /s /c "`"${Env:VSDEVCMD}`" -arch=x86 -host_arch=x64 -no_logo && set" `
| % { , ($_ -Split '=', 2) } `
| % { [System.Environment]::SetEnvironmentVariable($_[0], $_[1]) }
nmake -f winmsvc.mak BTYP=w
working-directory: ./microemacs/src
- name: Create windows100 bin download
shell: pwsh
run: |
mkdir -Path downloads
mkdir -Path packages
cd .\microemacs\bin
Remove-Item .gitignore
Rename-Item -Path windows100-intel32-msvc17 -NewName windows100-intel32
cd ..
Rename-Item -Path release_readme.txt -NewName readme.txt
$env:MEVER=$(.\bin\windows100-intel32\mec -p @contribs/ver.emf)
Compress-Archive -Path bin,COPYING.txt,readme.txt -DestinationPath ..\downloads\Jasspa_MicroEmacs_${env:MEVER}_bin_windows_binaries
- name: Create windows100 openssl download
shell: pwsh
run: |
cd .\microemacs
$env:MEVER=$(.\bin\windows100-intel32\mec -p @contribs/ver.emf)
cd .\3rdparty\openssl-3.0\x86\bin
mkdir -Path tfs\bin\windows100-intel32
Copy-Item -Path libssl-3.dll -Destination tfs\bin\windows100-intel32
Copy-Item -Path libcrypto-3.dll -Destination tfs\bin\windows100-intel32
Copy-Item -Path ..\..\version.txt -Destination tfs\bin\windows100-intel32
Copy-Item -Path ..\..\LICENSE.txt -Destination tfs\bin\windows100-intel32
cd tfs
Compress-Archive -Path bin -DestinationPath ..\..\..\..\..\..\downloads\Jasspa_MicroEmacs_${env:MEVER}_bin_windows_openssl.zip
cd ..
..\..\..\..\bin\windows100-intel32\tfs -o ../../../../../packages/Jasspa_MicroEmacs_${env:MEVER}_openssl_windows100_intel32.tfs -a ../../../../mesingle/tfs_hd tfs
- name: Get ehf help file
uses: dawidd6/action-download-artifact@v6
with:
run_id: ${{ inputs.refToHelpAsset }}
workflow: build-linux.yml
name: help-ehf
path: ./microemacs
search_artifacts: true
- name: Create windows MSI installer
shell: pwsh
run: |
$env:Path = $env:WIX + 'bin;' + $env:Path
cd .\microemacs
$env:MEVER=$(.\bin\windows100-intel32\mec -p @contribs/ver.emf)
$env:MEVERDT=$(.\bin\windows100-intel32\mec -p @contribs/ver.emf -f MEVERDT)
$env:MEVERYR=$(.\bin\windows100-intel32\mec -p @contribs/ver.emf -f MEVERYR)
cd .\wix
Copy-Item -Path ..\bin\windows100-intel32\mew.exe -Destination .
Copy-Item -Path ..\bin\windows100-intel32\mec.exe -Destination .
Copy-Item -Path ..\COPYING.txt -Destination .
..\bin\windows100-intel32\mec.exe -p "@meigen"
Copy-Item -Path ..\me.ehf -Destination macros
heat dir macros -o jmeMacros.wxs -scom -frag -srd -sreg -gg -cg MacrosGroupId -dr jmeMacrosDirRef
candle -ext WixUIExtension -ext WixUtilExtension jme.wxs jmeMacros.wxs
light -ext WixUIExtension -ext WixUtilExtension -o Jasspa_MicroEmacs_${env:MEVER}_installer_windows.msi -loc jme.wxl jme.wixobj jmeMacros.wixobj -b macros
Copy-Item -Path Jasspa_MicroEmacs_${env:MEVER}_installer_windows.msi -Destination ..\..\downloads
- name: Compile windows100 static mec
shell: pwsh
run: |
& "${Env:COMSPEC}" /s /c "`"${Env:VSDEVCMD}`" -arch=x86 -host_arch=x64 -no_logo && set" `
| % { , ($_ -Split '=', 2) } `
| % { [System.Environment]::SetEnvironmentVariable($_[0], $_[1]) }
nmake -f winmsvc.mak BTYP=c LSTT=1
working-directory: ./microemacs/src
- name: Create windows100 mesc
shell: pwsh
run: |
cd .\microemacs
$env:MEVER=$(.\bin\windows100-intel32\mec -p @contribs/ver.emf)
cd .\mesingle
mkdir -Path bin\windows100-intel32
..\bin\windows100-intel32\mec.exe -p "@mesgen" -f -p ..\bin\windows100-intel32-msvc17s\mec.exe -t ..\bin\windows100-intel32\tfs.exe -o bin\windows100-intel32\mesc.exe
Copy-Item -Path ..\COPYING.txt -Destination .
Copy-Item -Path ..\readme.txt -Destination .
Compress-Archive -Path bin,COPYING.txt,readme.txt -DestinationPath ..\..\downloads\Jasspa_MicroEmacs_${env:MEVER}_abin_windows_mesc
- name: Compile windows100 static mew
shell: pwsh
run: |
& "${Env:COMSPEC}" /s /c "`"${Env:VSDEVCMD}`" -arch=x86 -host_arch=x64 -no_logo && set" `
| % { , ($_ -Split '=', 2) } `
| % { [System.Environment]::SetEnvironmentVariable($_[0], $_[1]) }
nmake -f winmsvc.mak BTYP=w LSTT=1
working-directory: ./microemacs/src
- name: Create windows100 mesw
shell: pwsh
run: |
cd .\microemacs
$env:MEVER=$(.\bin\windows100-intel32\mec -p @contribs/ver.emf)
cd .\mesingle
Remove-Item bin\windows100-intel32\mesc.exe
..\bin\windows100-intel32\mec.exe -p "@mesgen" -f -p ..\bin\windows100-intel32-msvc17s\mew.exe -t ..\bin\windows100-intel32\tfs.exe -o bin\windows100-intel32\mesw.exe
Compress-Archive -Path bin,COPYING.txt,readme.txt -DestinationPath ..\..\downloads\Jasspa_MicroEmacs_${env:MEVER}_abin_windows_mesw
- name: Upload Packages
uses: actions/upload-artifact@v4
with:
name: windows100-downloads
path: downloads
- name: Upload windows100 packages
uses: actions/upload-artifact@v4
with:
name: windows100-packages
path: packages