Skip to content

Commit 0d59caf

Browse files
committed
[[ Win x86_64 ]] Enable building Windows x86_64 installer
This patch adds support to the build tools for building the x86_64 installer for Windows.
1 parent 772991e commit 0d59caf

File tree

4 files changed

+43
-24
lines changed

4 files changed

+43
-24
lines changed

builder/builder_tool.livecodescript

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,10 @@ on startup
4444
if it is "linux" then
4545
put true into tPlatforms["linux-x86"]
4646
put true into tPlatforms["linux-x86_64"]
47+
else if it is "win" then
48+
put true into tPlatforms["win-x86"]
49+
put true into tPlatforms["win-x86_64"]
4750
else
48-
if it begins with "win" then get "windows"
4951
if it is "mac" then get "macosx"
5052
put true into tPlatforms[it]
5153
end if

builder/builder_utilities.livecodescript

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,13 @@ function builderPlatform
133133
end if
134134
throw "Unknown Linux architecture:" && the processor
135135
case "win32"
136-
return "windows"
136+
if the processor is "x86" then
137+
return "win-x86"
138+
end if
139+
if the processor is "x86_64" then
140+
return "win-x86_64"
141+
end if
142+
throw "Unknown Windows architecture:" && the processor
137143
case "macos"
138144
return "macosx"
139145
case "iphone"
@@ -153,8 +159,10 @@ command builderFetchEngine pVersion, pPlatform
153159
end if
154160
if sEngineDir is not empty then
155161
switch pPlatform
156-
case "windows"
162+
case "win-x86"
157163
return sEngineDir & slash & "win-x86-bin"
164+
case "win-x86_64"
165+
return sEngineDir & slash & "win-x86_64-bin"
158166
case "linux-x86"
159167
return sEngineDir & slash & "linux-x86-bin"
160168
case "linux-x86_64"
@@ -183,7 +191,8 @@ command builderFetchEngine pVersion, pPlatform
183191
end if
184192
local tPlatform
185193
switch pPlatform
186-
case "windows"
194+
case "win-x86"
195+
case "win-x86_64"
187196
get "windows/release"
188197
break
189198
case "linux-x86"
@@ -453,7 +462,8 @@ function builderInstallerEngine pPlatform
453462
put the result into tEngineFolder
454463

455464
switch pPlatform
456-
case "windows"
465+
case "win-x86"
466+
case "win-x86_64"
457467
return tEngineFolder & slash & "installer.exe"
458468
case "linux-x86"
459469
return tEngineFolder & slash & "installer"

builder/server_builder.livecodescript

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ command serverBuilderRun pPlatform, pEdition
3636
-- Clean up any existing output file
3737
delete file tOutputFile
3838

39-
if pPlatform is "windows" then
39+
if pPlatform begins with "win-" then
4040
repeat for each word tExternal in "revdb revzip revxml dbsqlite dbmysql dbpostgresql dbodbc"
4141
get "server-" & tExternal & ".dll"
4242
if there is not a file (tEngineFolder & slash & it) then
@@ -61,7 +61,7 @@ command serverBuilderRun pPlatform, pEdition
6161
end if
6262

6363
local tExeExtension, tOutExeExtension
64-
if pPlatform is "windows" then
64+
if pPlatform begins with "win-" then
6565
put ".exe" into tExeExtension
6666
put ".exe" into tOutExeExtension
6767
--else if pPlatform is "linux" then
@@ -73,7 +73,7 @@ command serverBuilderRun pPlatform, pEdition
7373
end if
7474

7575
local tLibExtension
76-
if pPlatform is "windows" then
76+
if pPlatform begins with "win-" then
7777
put ".dll" into tLibExtension
7878
else if pPlatform is "macosx" then
7979
put ".dylib" into tLibExtension
@@ -173,8 +173,10 @@ function getZipFilenameStub pVersion, pPlatform, pEdition
173173
replace "." with "_" in pVersion
174174
if pPlatform is "macosx" then
175175
put "Mac" into pPlatform
176-
else if pPlatform is "windows" then
177-
put "Windows" into pPlatform
176+
else if pPlatform is "win-x86" then
177+
put "Windows-x86" into pPlatform
178+
else if pPlatform is "win-x86_64" then
179+
put "Windows-x86_64" into pPlatform
178180
else if pPlatform is "linux-x86" then
179181
put "Linux" into pPlatform
180182
else if pPlatform is "linux-x86_64" then

builder/tools_builder.livecodescript

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ command toolsBuilderRun pPlatform, pEdition, pVersion
1515
-- If on windows or linux, we can't do anything macosxy due to lack of lipo/strip :o(
1616
local tEngineFolders
1717

18-
get "windows linux-x86 linux-x86_64 linux-armv6hf macosx ios android-armeabi-v7a android-arm64-v8a android-x86 android-x86_64 emscripten"
18+
get "win-x86 win-x86_64 linux-x86 linux-x86_64 linux-armv6hf macosx ios android-armeabi-v7a android-arm64-v8a android-x86 android-x86_64 emscripten"
1919

2020
repeat for each word tPlatform in it
2121
builderFetchEngine pVersion, tPlatform
@@ -112,9 +112,6 @@ private command toolsBuilderFilterExternals pFolder, pPlatform
112112
end repeat
113113
end if
114114

115-
-- remove windows 64 bit builds only required for filemaker
116-
get shell("rm -fv *x86_64.dll")
117-
118115
-- If the directory contains no code any more, remove it
119116
put the files & return & the folders into tFiles
120117
filter lines of tFiles with regex pattern "^.*\.(so|dylib|bundle|dll|lcext)$"
@@ -195,7 +192,8 @@ private command toolsBuilderMakePackage pVersion, pEdition, pPlatform, pEngineFo
195192
packageCompilerConfigureSource tPackager, "linux-x86", pEngineFolders["linux-x86"]
196193
packageCompilerConfigureSource tPackager, "linux-x86_64", pEngineFolders["linux-x86_64"]
197194
packageCompilerConfigureSource tPackager, "linux-armv6-hf", pEngineFolders["linux-armv6hf"]
198-
packageCompilerConfigureSource tPackager, "windows", pEngineFolders["windows"]
195+
packageCompilerConfigureSource tPackager, "win-x86", pEngineFolders["win-x86"]
196+
packageCompilerConfigureSource tPackager, "win-x86_64", pEngineFolders["win-x86_64"]
199197
packageCompilerConfigureSource tPackager, "ios", pEngineFolders["ios"]
200198
packageCompilerConfigureSource tPackager, "android-armeabi-v7a", pEngineFolders["android-armeabi-v7a"]
201199
packageCompilerConfigureSource tPackager, "android-arm64-v8a", pEngineFolders["android-arm64-v8a"]
@@ -223,6 +221,8 @@ private command toolsBuilderMakePackage pVersion, pEdition, pPlatform, pEngineFo
223221
end if
224222
if pPlatform begins with "linux" then
225223
packageCompilerConfigureVariable tPackager, "TargetPlatform", "linux"
224+
else if pPlatform begins with "win" then
225+
packageCompilerConfigureVariable tPackager, "TargetPlatform", "windows"
226226
else
227227
packageCompilerConfigureVariable tPackager, "TargetPlatform", pPlatform
228228
end if
@@ -231,11 +231,11 @@ private command toolsBuilderMakePackage pVersion, pEdition, pPlatform, pEngineFo
231231
packageCompilerConfigureVariable tPackager, "EscapedVersionTag", tVersionEscaped
232232
packageCompilerConfigureVariable tPackager, "ProductBranch", char 1 to 3 of pVersion
233233
packageCompilerConfigureVariable tPackager, "TargetArchitectures", "i386"
234-
if pPlatform is "linux-x86" then
234+
if pPlatform ends with "-x86" then
235235
packageCompilerConfigureVariable tPackager, "TargetArchitecture", "x86"
236-
else if pPlatform is "linux-x86_64" then
236+
else if pPlatform ends with "-x86_64" then
237237
packageCompilerConfigureVariable tPackager, "TargetArchitecture", "x86_64"
238-
else if pPlatform is "linux-armv6hf" then
238+
else if pPlatform ends with "-armv6hf" then
239239
packageCompilerConfigureVariable tPackager, "TargetArchitecture", "armv6-hf"
240240
end if
241241

@@ -423,7 +423,8 @@ private command toolsBuilderMakeInstaller pVersion, pEdition, pPlatform, pIdeFol
423423
put return & "insert script of stack" && quote & "InstallerUtilities" & quote && "into back" after tParams["startup_script"]
424424

425425
switch pPlatform
426-
case "windows"
426+
case "win-x86"
427+
case "win-x86_64"
427428
-- Process the manifest appropriately
428429
local tManifestFile
429430
get windowsManifest()
@@ -434,7 +435,7 @@ private command toolsBuilderMakeInstaller pVersion, pEdition, pPlatform, pIdeFol
434435
put tManifestFile into tParams["manifest"]
435436

436437
-- First we deploy the installer unsigned
437-
put abstractPinFile(builderInstallerEngine("windows")) into tParams["engine"]
438+
put abstractPinFile(builderInstallerEngine(pPlatform)) into tParams["engine"]
438439
put tInstallerStackfile into tParams["stackfile"]
439440
put pPackageFile into tParams["payload"]
440441
put tOutputFileStub & ".unsigned.exe" into tParams["output"]
@@ -938,8 +939,10 @@ function getInstallerFilenameStub pVersion, pPlatform, pEdition
938939
replace "." with "_" in pVersion
939940
if pPlatform is "macosx" then
940941
put "Mac" into pPlatform
941-
else if pPlatform is "windows" then
942-
put "Windows" into pPlatform
942+
else if pPlatform is "win-x86" then
943+
put "Windows-x86" into pPlatform
944+
else if pPlatform is "win-x86_64" then
945+
put "Windows-x86_64" into pPlatform
943946
else if pPlatform begins with "linux" then
944947
put "Linux" into pPlatform
945948
end if
@@ -956,8 +959,10 @@ function getDmgFilenameStub pVersion, pPlatform, pEdition
956959
replace "." with "_" in pVersion
957960
if pPlatform is "macosx" then
958961
put "Mac" into pPlatform
959-
else if pPlatform is "windows" then
960-
put "Windows" into pPlatform
962+
else if pPlatform is "win-x86" then
963+
put "Windows-x86" into pPlatform
964+
else if pPlatform is "win-x86_64" then
965+
put "Windows-x86_64" into pPlatform
961966
else if pPlatform is "linux" or pPlatform is "linux-x64" or pPlatform is "linux-armv6hf" then
962967
put "Linux" into pPlatform
963968
end if

0 commit comments

Comments
 (0)