Skip to content
This repository has been archived by the owner on Aug 31, 2021. It is now read-only.

Commit

Permalink
Merge pull request #6821 from livecode/feature-deploy64
Browse files Browse the repository at this point in the history
[[ Win 64 ]] Add support for 64 bit standalones on Windows
  • Loading branch information
montegoulding committed May 8, 2019
2 parents ad4d699 + 78bd957 commit a32c635
Show file tree
Hide file tree
Showing 15 changed files with 520 additions and 200 deletions.
94 changes: 51 additions & 43 deletions Installer/package.txt
Expand Up @@ -42,6 +42,12 @@ installer LiveCode
include Externals
with TargetFolder as [[ToolsFolder]]/Runtime/Windows/x86-32 do
set TargetPlatform to Windows
set TargetArchitecture to x86
include Runtime
include Externals
with TargetFolder as [[ToolsFolder]]/Runtime/Windows/x86-64 do
set TargetPlatform to Windows
set TargetArchitecture to x86_64
include Runtime
include Externals
with TargetFolder as [[ToolsFolder]]/Runtime/Linux/x86-32 do
Expand Down Expand Up @@ -492,10 +498,10 @@ component Toolchain.MacOSX

component Toolchain.Windows
into [[ToolsFolder]]/Toolchain place
executable windows:lc-compile.exe as lc-compile.exe
executable windows:lc-run.exe as lc-run.exe
executable windows:lc-compile-ffi-java.exe as lc-compile-ffi-java.exe
rfolder windows:modules
executable win-[[TargetArchitecture]]:lc-compile.exe as lc-compile.exe
executable win-[[TargetArchitecture]]:lc-run.exe as lc-run.exe
executable win-[[TargetArchitecture]]:lc-compile-ffi-java.exe as lc-compile-ffi-java.exe
rfolder win-[[TargetArchitecture]]:modules

component Toolchain.Linux
into [[ToolsFolder]]/Toolchain place
Expand All @@ -520,13 +526,13 @@ component Mobile.Linux

component Engine.Windows
into [[TargetFolder]] place
executable windows:LiveCode[[EditionTagUpper]].exe as [[ProductName]].exe
executable windows:revpdfprinter.dll
executable windows:revsecurity.dll
executable win-[[TargetArchitecture]]:LiveCode[[EditionTagUpper]].exe as [[ProductName]].exe
executable win-[[TargetArchitecture]]:revpdfprinter.dll
executable win-[[TargetArchitecture]]:revsecurity.dll

component Mobile.Windows
into "[[ToolsFolder]]/Externals" place
executable windows:revandroid.dll
executable win-[[TargetArchitecture]]:revandroid.dll

//////////

Expand Down Expand Up @@ -571,13 +577,13 @@ component Runtime.Linux

component Runtime.Windows
into [[TargetFolder]] place
executable windows:standalone[[BaseEditionTagLower]].exe as Standalone
file "windows:w32-manifest-template.xml"
file "windows:w32-manifest-template-dpiaware.xml"
file "windows:w32-manifest-template-trustinfo.xml"
executable win-[[TargetArchitecture]]:standalone[[BaseEditionTagLower]].exe as Standalone
file "win-[[TargetArchitecture]]:w32-manifest-template.xml"
file "win-[[TargetArchitecture]]:w32-manifest-template-dpiaware.xml"
file "win-[[TargetArchitecture]]:w32-manifest-template-trustinfo.xml"
into [[TargetFolder]]/Support place
executable windows:revpdfprinter.dll
executable windows:revsecurity.dll
executable win-[[TargetArchitecture]]:revpdfprinter.dll
executable win-[[TargetArchitecture]]:revsecurity.dll
into "[[TargetFolder]]/Support/Sample Icons" place
file "ide:Resources/Sample Icons/genericapp.ico"
file "ide:Resources/Sample Icons/genericdoc.ico"
Expand Down Expand Up @@ -812,10 +818,10 @@ component Externals.Linux

component Externals.Windows
into [[TargetFolder]]/Externals place
executable windows:revspeech.dll
executable windows:revxml.dll
executable windows:revbrowser.dll
executable windows:revzip.dll
executable win-[[TargetArchitecture]]:revspeech.dll
executable win-[[TargetArchitecture]]:revxml.dll
executable win-[[TargetArchitecture]]:revbrowser.dll
executable win-[[TargetArchitecture]]:revzip.dll
declare external "Speech" using revspeech.dll
declare external "XML" using revxml.dll
declare external "Browser" using revbrowser.dll
Expand Down Expand Up @@ -856,26 +862,26 @@ component Externals.CEF.Linux

component Externals.CEF.Windows
into [[TargetFolder]]/Externals/CEF place
executable windows:libbrowser-cefprocess.exe
executable windows:revbrowser-cefprocess.exe
executable windows:Externals/CEF/libcef.dll
executable windows:Externals/CEF/d3dcompiler_43.dll
executable windows:Externals/CEF/d3dcompiler_47.dll
executable windows:Externals/CEF/libEGL.dll
executable windows:Externals/CEF/libGLESv2.dll
executable windows:Externals/CEF/chrome_elf.dll
rfolder windows:Externals/CEF/locales
file windows:Externals/CEF/cef.pak
file windows:Externals/CEF/cef_100_percent.pak
file windows:Externals/CEF/cef_200_percent.pak
file windows:Externals/CEF/cef_extensions.pak
file windows:Externals/CEF/icudtl.dat
file windows:Externals/CEF/natives_blob.bin
file windows:Externals/CEF/snapshot_blob.bin
file windows:Externals/CEF/v8_context_snapshot.bin
executable win-[[TargetArchitecture]]:libbrowser-cefprocess.exe
executable win-[[TargetArchitecture]]:revbrowser-cefprocess.exe
executable win-[[TargetArchitecture]]:Externals/CEF/libcef.dll
executable win-[[TargetArchitecture]]:Externals/CEF/d3dcompiler_43.dll
executable win-[[TargetArchitecture]]:Externals/CEF/d3dcompiler_47.dll
executable win-[[TargetArchitecture]]:Externals/CEF/libEGL.dll
executable win-[[TargetArchitecture]]:Externals/CEF/libGLESv2.dll
executable win-[[TargetArchitecture]]:Externals/CEF/chrome_elf.dll
rfolder win-[[TargetArchitecture]]:Externals/CEF/locales
file win-[[TargetArchitecture]]:Externals/CEF/cef.pak
file win-[[TargetArchitecture]]:Externals/CEF/cef_100_percent.pak
file win-[[TargetArchitecture]]:Externals/CEF/cef_200_percent.pak
file win-[[TargetArchitecture]]:Externals/CEF/cef_extensions.pak
file win-[[TargetArchitecture]]:Externals/CEF/icudtl.dat
file win-[[TargetArchitecture]]:Externals/CEF/natives_blob.bin
file win-[[TargetArchitecture]]:Externals/CEF/snapshot_blob.bin
file win-[[TargetArchitecture]]:Externals/CEF/v8_context_snapshot.bin
into [[TargetFolder]]/Externals/CEF/swiftshader place
executable windows:Externals/CEF/swiftshader/libEGL.dll
executable windows:Externals/CEF/swiftshader/libGLESv2.dll
executable win-[[TargetArchitecture]]:Externals/CEF/swiftshader/libEGL.dll
executable win-[[TargetArchitecture]]:Externals/CEF/swiftshader/libGLESv2.dll

////////////////////////////////////////////////////////////////////////////////

Expand All @@ -897,12 +903,12 @@ component Databases.Linux

component Databases.Windows
into "[[TargetFolder]]/Externals" place
executable windows:revdb.dll
executable win-[[TargetArchitecture]]:revdb.dll
into "[[TargetFolder]]/Externals/Database Drivers" place
executable windows:dbmysql.dll
executable windows:dbodbc.dll
executable windows:dbpostgresql.dll
executable windows:dbsqlite.dll
executable win-[[TargetArchitecture]]:dbmysql.dll
executable win-[[TargetArchitecture]]:dbodbc.dll
executable win-[[TargetArchitecture]]:dbpostgresql.dll
executable win-[[TargetArchitecture]]:dbsqlite.dll
declare external "Database" using revdb.dll
declare dbdriver "MySQL" using dbmysql.dll
declare dbdriver "ODBC" using dbodbc.dll
Expand Down Expand Up @@ -977,7 +983,9 @@ component TimeZone
into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
rfolder ios:iphoneos12.1/packaged_extensions/com.livecode.library.timezone/code
into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
rfolder windows:packaged_extensions/com.livecode.library.timezone/code
rfolder win-x86:packaged_extensions/com.livecode.library.timezone/code
into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
rfolder win-x86_64:packaged_extensions/com.livecode.library.timezone/code
into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
rfolder linux-x86_64:packaged_extensions/com.livecode.library.timezone/code
into [[ToolsFolder]]/Extensions/com.livecode.library.timezone place
Expand Down
6 changes: 4 additions & 2 deletions buildbot.mk
Expand Up @@ -191,11 +191,13 @@ distmac-bundle-business:
dist-upload-files.txt sha1sum.txt:
set -e; \
find . -maxdepth 1 -name 'LiveCode*-*-Mac.dmg' \
-o -name 'LiveCode*Installer-*-Windows.exe' \
-o -name 'LiveCode*Installer-*-Windows-x86.exe' \
-o -name 'LiveCode*Installer-*-Windows-x86_64.exe' \
-o -name 'LiveCode*Installer-*-Linux.*' \
-o -name 'LiveCode*Server-*-Linux*.zip' \
-o -name 'LiveCode*Server-*-Mac.zip' \
-o -name 'LiveCode*Server-*-Windows.zip' \
-o -name 'LiveCode*Server-*-Windows-x86.zip' \
-o -name 'LiveCode*Server-*-Windows-x86_64.zip' \
-o -name 'LiveCode*Docs-*.zip' \
-o -name '*-bin.tar.xz' \
-o -name '*-bin.tar.bz2' \
Expand Down
4 changes: 3 additions & 1 deletion builder/builder_tool.livecodescript
Expand Up @@ -44,8 +44,10 @@ on startup
if it is "linux" then
put true into tPlatforms["linux-x86"]
put true into tPlatforms["linux-x86_64"]
else if it is "win" then
put true into tPlatforms["win-x86"]
put true into tPlatforms["win-x86_64"]
else
if it begins with "win" then get "windows"
if it is "mac" then get "macosx"
put true into tPlatforms[it]
end if
Expand Down
18 changes: 14 additions & 4 deletions builder/builder_utilities.livecodescript
Expand Up @@ -133,7 +133,13 @@ function builderPlatform
end if
throw "Unknown Linux architecture:" && the processor
case "win32"
return "windows"
if the processor is "x86" then
return "win-x86"
end if
if the processor is "x86_64" then
return "win-x86_64"
end if
throw "Unknown Windows architecture:" && the processor
case "macos"
return "macosx"
case "iphone"
Expand All @@ -153,8 +159,10 @@ command builderFetchEngine pVersion, pPlatform
end if
if sEngineDir is not empty then
switch pPlatform
case "windows"
case "win-x86"
return sEngineDir & slash & "win-x86-bin"
case "win-x86_64"
return sEngineDir & slash & "win-x86_64-bin"
case "linux-x86"
return sEngineDir & slash & "linux-x86-bin"
case "linux-x86_64"
Expand Down Expand Up @@ -183,7 +191,8 @@ command builderFetchEngine pVersion, pPlatform
end if
local tPlatform
switch pPlatform
case "windows"
case "win-x86"
case "win-x86_64"
get "windows/release"
break
case "linux-x86"
Expand Down Expand Up @@ -453,7 +462,8 @@ function builderInstallerEngine pPlatform
put the result into tEngineFolder

switch pPlatform
case "windows"
case "win-x86"
case "win-x86_64"
return tEngineFolder & slash & "installer.exe"
case "linux-x86"
return tEngineFolder & slash & "installer"
Expand Down
12 changes: 7 additions & 5 deletions builder/server_builder.livecodescript
Expand Up @@ -36,7 +36,7 @@ command serverBuilderRun pPlatform, pEdition
-- Clean up any existing output file
delete file tOutputFile

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

local tExeExtension, tOutExeExtension
if pPlatform is "windows" then
if pPlatform begins with "win-" then
put ".exe" into tExeExtension
put ".exe" into tOutExeExtension
--else if pPlatform is "linux" then
Expand All @@ -73,7 +73,7 @@ command serverBuilderRun pPlatform, pEdition
end if

local tLibExtension
if pPlatform is "windows" then
if pPlatform begins with "win-" then
put ".dll" into tLibExtension
else if pPlatform is "macosx" then
put ".dylib" into tLibExtension
Expand Down Expand Up @@ -173,8 +173,10 @@ function getZipFilenameStub pVersion, pPlatform, pEdition
replace "." with "_" in pVersion
if pPlatform is "macosx" then
put "Mac" into pPlatform
else if pPlatform is "windows" then
put "Windows" into pPlatform
else if pPlatform is "win-x86" then
put "Windows-x86" into pPlatform
else if pPlatform is "win-x86_64" then
put "Windows-x86_64" into pPlatform
else if pPlatform is "linux-x86" then
put "Linux" into pPlatform
else if pPlatform is "linux-x86_64" then
Expand Down
33 changes: 19 additions & 14 deletions builder/tools_builder.livecodescript
Expand Up @@ -15,7 +15,7 @@ command toolsBuilderRun pPlatform, pEdition, pVersion
-- If on windows or linux, we can't do anything macosxy due to lack of lipo/strip :o(
local tEngineFolders

get "windows linux-x86 linux-x86_64 linux-armv6hf macosx ios android-armeabi-v7a android-arm64-v8a android-x86 android-x86_64 emscripten"
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"

repeat for each word tPlatform in it
builderFetchEngine pVersion, tPlatform
Expand Down Expand Up @@ -112,9 +112,6 @@ private command toolsBuilderFilterExternals pFolder, pPlatform
end repeat
end if

-- remove windows 64 bit builds only required for filemaker
get shell("rm -fv *x86_64.dll")

-- If the directory contains no code any more, remove it
put the files & return & the folders into tFiles
filter lines of tFiles with regex pattern "^.*\.(so|dylib|bundle|dll|lcext)$"
Expand Down Expand Up @@ -195,7 +192,8 @@ private command toolsBuilderMakePackage pVersion, pEdition, pPlatform, pEngineFo
packageCompilerConfigureSource tPackager, "linux-x86", pEngineFolders["linux-x86"]
packageCompilerConfigureSource tPackager, "linux-x86_64", pEngineFolders["linux-x86_64"]
packageCompilerConfigureSource tPackager, "linux-armv6-hf", pEngineFolders["linux-armv6hf"]
packageCompilerConfigureSource tPackager, "windows", pEngineFolders["windows"]
packageCompilerConfigureSource tPackager, "win-x86", pEngineFolders["win-x86"]
packageCompilerConfigureSource tPackager, "win-x86_64", pEngineFolders["win-x86_64"]
packageCompilerConfigureSource tPackager, "ios", pEngineFolders["ios"]
packageCompilerConfigureSource tPackager, "android-armeabi-v7a", pEngineFolders["android-armeabi-v7a"]
packageCompilerConfigureSource tPackager, "android-arm64-v8a", pEngineFolders["android-arm64-v8a"]
Expand Down Expand Up @@ -223,6 +221,8 @@ private command toolsBuilderMakePackage pVersion, pEdition, pPlatform, pEngineFo
end if
if pPlatform begins with "linux" then
packageCompilerConfigureVariable tPackager, "TargetPlatform", "linux"
else if pPlatform begins with "win" then
packageCompilerConfigureVariable tPackager, "TargetPlatform", "windows"
else
packageCompilerConfigureVariable tPackager, "TargetPlatform", pPlatform
end if
Expand All @@ -231,11 +231,11 @@ private command toolsBuilderMakePackage pVersion, pEdition, pPlatform, pEngineFo
packageCompilerConfigureVariable tPackager, "EscapedVersionTag", tVersionEscaped
packageCompilerConfigureVariable tPackager, "ProductBranch", char 1 to 3 of pVersion
packageCompilerConfigureVariable tPackager, "TargetArchitectures", "i386"
if pPlatform is "linux-x86" then
if pPlatform ends with "-x86" then
packageCompilerConfigureVariable tPackager, "TargetArchitecture", "x86"
else if pPlatform is "linux-x86_64" then
else if pPlatform ends with "-x86_64" then
packageCompilerConfigureVariable tPackager, "TargetArchitecture", "x86_64"
else if pPlatform is "linux-armv6hf" then
else if pPlatform ends with "-armv6hf" then
packageCompilerConfigureVariable tPackager, "TargetArchitecture", "armv6-hf"
end if

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

switch pPlatform
case "windows"
case "win-x86"
case "win-x86_64"
-- Process the manifest appropriately
local tManifestFile
get windowsManifest()
Expand All @@ -434,7 +435,7 @@ private command toolsBuilderMakeInstaller pVersion, pEdition, pPlatform, pIdeFol
put tManifestFile into tParams["manifest"]

-- First we deploy the installer unsigned
put abstractPinFile(builderInstallerEngine("windows")) into tParams["engine"]
put abstractPinFile(builderInstallerEngine(pPlatform)) into tParams["engine"]
put tInstallerStackfile into tParams["stackfile"]
put pPackageFile into tParams["payload"]
put tOutputFileStub & ".unsigned.exe" into tParams["output"]
Expand Down Expand Up @@ -938,8 +939,10 @@ function getInstallerFilenameStub pVersion, pPlatform, pEdition
replace "." with "_" in pVersion
if pPlatform is "macosx" then
put "Mac" into pPlatform
else if pPlatform is "windows" then
put "Windows" into pPlatform
else if pPlatform is "win-x86" then
put "Windows-x86" into pPlatform
else if pPlatform is "win-x86_64" then
put "Windows-x86_64" into pPlatform
else if pPlatform begins with "linux" then
put "Linux" into pPlatform
end if
Expand All @@ -956,8 +959,10 @@ function getDmgFilenameStub pVersion, pPlatform, pEdition
replace "." with "_" in pVersion
if pPlatform is "macosx" then
put "Mac" into pPlatform
else if pPlatform is "windows" then
put "Windows" into pPlatform
else if pPlatform is "win-x86" then
put "Windows-x86" into pPlatform
else if pPlatform is "win-x86_64" then
put "Windows-x86_64" into pPlatform
else if pPlatform is "linux" or pPlatform is "linux-x64" or pPlatform is "linux-armv6hf" then
put "Linux" into pPlatform
end if
Expand Down
2 changes: 1 addition & 1 deletion builder/windows_manifest.xml
Expand Up @@ -18,6 +18,6 @@
</trustInfo>

<dependency><dependentAssembly>
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" />
<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="*" publicKeyToken="6595b64144ccf1df" language="*" />
</dependentAssembly></dependency>
</assembly>
2 changes: 1 addition & 1 deletion configure.bat
Expand Up @@ -13,7 +13,7 @@ REM When calling configure.bat from the command line, BUILD_EDITION is not defin
IF NOT DEFINED BUILD_EDITION SET BUILD_EDITION="community"

REM Target architecture currently defaults to 32-bit x86
IF NOT DEFINED TARGET_ARCH SET TARGET_ARCH=x86
IF NOT DEFINED TARGET_ARCH SET TARGET_ARCH=x64

REM Make sure TARGET_ARCH is always x86 or x86_64

Expand Down
5 changes: 5 additions & 0 deletions docs/notes/feature-win64-deployment.md
@@ -0,0 +1,5 @@
# Deploy 64-bit Windows standalones

You can now deploy 64-bit standalones for Windows. The `Standalone Settings`
dialog now has a `Windows x86` and a `Windows x86_64` checkbox allowing you to
choose to build either or both 32-bit and 64-bit executables.

0 comments on commit a32c635

Please sign in to comment.