mirror of
https://github.com/JulianGro/overte.git
synced 2025-08-07 18:40:54 +02:00
Merge pull request #15987 from danteruiz/launcher-zip
DEV-317: Edit postbiuld.py to produce zip file for the Mac Launcher.
This commit is contained in:
commit
4dc67b5c58
1 changed files with 25 additions and 3 deletions
|
@ -148,9 +148,30 @@ def signBuild(executablePath):
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|
||||||
|
def zipDarwinLauncher():
|
||||||
|
launcherSourcePath = os.path.join(SOURCE_PATH, 'launchers', sys.platform)
|
||||||
|
launcherBuildPath = os.path.join(BUILD_PATH, 'launcher')
|
||||||
|
|
||||||
|
archiveName = computeArchiveName('HQ Launcher')
|
||||||
|
|
||||||
|
cpackCommand = [
|
||||||
|
'cpack',
|
||||||
|
'-G', 'ZIP',
|
||||||
|
'-D', "CPACK_PACKAGE_FILE_NAME={}".format(archiveName),
|
||||||
|
'-D', "CPACK_INCLUDE_TOPLEVEL_DIRECTORY=OFF"
|
||||||
|
]
|
||||||
|
print("Create ZIP version of installer archive")
|
||||||
|
print(cpackCommand)
|
||||||
|
hifi_utils.executeSubprocess(cpackCommand, folder=launcherBuildPath)
|
||||||
|
launcherZipDestFile = os.path.join(BUILD_PATH, "{}.zip".format(archiveName))
|
||||||
|
launcherZipSourceFile = os.path.join(launcherBuildPath, "{}.zip".format(archiveName))
|
||||||
|
print("Moving {} to {}".format(launcherZipSourceFile, launcherZipDestFile))
|
||||||
|
shutil.move(launcherZipSourceFile, launcherZipDestFile)
|
||||||
|
|
||||||
|
|
||||||
def buildLightLauncher():
|
def buildLightLauncher():
|
||||||
launcherSourcePath = os.path.join(SOURCE_PATH, 'launchers', sys.platform)
|
launcherSourcePath = os.path.join(SOURCE_PATH, 'launchers', sys.platform)
|
||||||
launcherBuildPath = os.path.join(BUILD_PATH, 'launcher')
|
launcherBuildPath = os.path.join(BUILD_PATH, 'launcher')
|
||||||
if not os.path.exists(launcherBuildPath):
|
if not os.path.exists(launcherBuildPath):
|
||||||
os.makedirs(launcherBuildPath)
|
os.makedirs(launcherBuildPath)
|
||||||
# configure launcher build
|
# configure launcher build
|
||||||
|
@ -169,12 +190,13 @@ def buildLightLauncher():
|
||||||
if sys.platform == 'win32':
|
if sys.platform == 'win32':
|
||||||
buildTarget = 'ALL_BUILD'
|
buildTarget = 'ALL_BUILD'
|
||||||
hifi_utils.executeSubprocess([
|
hifi_utils.executeSubprocess([
|
||||||
'cmake',
|
'cmake',
|
||||||
'--build', launcherBuildPath,
|
'--build', launcherBuildPath,
|
||||||
'--config', 'Release',
|
'--config', 'Release',
|
||||||
'--target', buildTarget
|
'--target', buildTarget
|
||||||
], folder=launcherBuildPath)
|
], folder=launcherBuildPath)
|
||||||
if sys.platform == 'darwin':
|
if sys.platform == 'darwin':
|
||||||
|
zipDarwinLauncher()
|
||||||
launcherDestFile = os.path.join(BUILD_PATH, "{}.dmg".format(computeArchiveName('Launcher')))
|
launcherDestFile = os.path.join(BUILD_PATH, "{}.dmg".format(computeArchiveName('Launcher')))
|
||||||
launcherSourceFile = os.path.join(launcherBuildPath, "HQ Launcher.dmg")
|
launcherSourceFile = os.path.join(launcherBuildPath, "HQ Launcher.dmg")
|
||||||
elif sys.platform == 'win32':
|
elif sys.platform == 'win32':
|
||||||
|
|
Loading…
Reference in a new issue