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:
Shannon Romano 2019-07-25 17:07:08 -07:00 committed by GitHub
commit 4dc67b5c58
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -148,6 +148,27 @@ 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():
launcherSourcePath = os.path.join(SOURCE_PATH, 'launchers', sys.platform)
launcherBuildPath = os.path.join(BUILD_PATH, 'launcher')
@ -175,6 +196,7 @@ def buildLightLauncher():
'--target', buildTarget
], folder=launcherBuildPath)
if sys.platform == 'darwin':
zipDarwinLauncher()
launcherDestFile = os.path.join(BUILD_PATH, "{}.dmg".format(computeArchiveName('Launcher')))
launcherSourceFile = os.path.join(launcherBuildPath, "HQ Launcher.dmg")
elif sys.platform == 'win32':