forked from qt-creator/qt-creator
Make it possible to build Qt Creator installers on Mac too
Change-Id: Ic3e6f773cb0c2c41f83c6f8d54ed4e0151c69b40 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This commit is contained in:
@@ -57,7 +57,7 @@ Component.prototype.beginInstallation = function()
|
||||
else if (installer.value("os") == "x11")
|
||||
component.qtCreatorBinaryPath = component.qtCreatorBinaryPath + "/bin/qtcreator";
|
||||
else if (installer.value("os") == "mac")
|
||||
component.qtCreatorBinaryPath = "\"" + component.qtCreatorBinaryPath + "/Qt Creator.app/Contents/MacOS/Qt Creator\"";
|
||||
component.qtCreatorBinaryPath = component.qtCreatorBinaryPath + "/Qt Creator.app/Contents/MacOS/Qt Creator";
|
||||
|
||||
if ( installer.value("os") === "win" ) {
|
||||
component.setStopProcessForUpdateRequest(component.qtCreatorBinaryPath, true);
|
||||
|
@@ -50,6 +50,8 @@ else: PLATFORM = "unknown"
|
||||
|
||||
PATTERN = $${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)
|
||||
|
||||
INSTALLER_NAME = "qt-creator-$${PATTERN}"
|
||||
|
||||
macx {
|
||||
APPBUNDLE = "$$OUT_PWD/bin/Qt Creator.app"
|
||||
BINDIST_SOURCE = "$$OUT_PWD/bin/Qt Creator.app"
|
||||
@@ -83,7 +85,18 @@ bindist.commands = 7z a -mx9 $$OUT_PWD/qt-creator-$${PATTERN}.7z \"$$BINDIST_SOU
|
||||
bindist_installer.depends = deployqt
|
||||
bindist_installer.commands = 7z a -mx9 $${INSTALLER_ARCHIVE} \"$$BINDIST_INSTALLER_SOURCE\"
|
||||
installer.depends = bindist_installer
|
||||
installer.commands = $$PWD/scripts/packageIfw.py -i \"$(IFW_PATH)\" -v $${QTCREATOR_VERSION} -a \"$${INSTALLER_ARCHIVE}\" "qt-creator-$${PATTERN}"
|
||||
installer.commands = $$PWD/scripts/packageIfw.py -i \"$(IFW_PATH)\" -v $${QTCREATOR_VERSION} -a \"$${INSTALLER_ARCHIVE}\" "$$INSTALLER_NAME"
|
||||
|
||||
macx {
|
||||
# this should be very temporary:
|
||||
MENU_NIB = $$(MENU_NIB_FILE)
|
||||
isEmpty(MENU_NIB): MENU_NIB = "FATAT_SET_MENU_NIB_FILE_ENV"
|
||||
copy_menu_nib_installer.commands = cp -R \"$$MENU_NIB\" \"$${INSTALLER_NAME}.app/Contents/Resources\"
|
||||
|
||||
codesign_installer.commands = codesign -s \"$(SIGNING_IDENTITY)\" $(SIGNING_FLAGS) \"$${INSTALLER_NAME}.app\"
|
||||
dmg_installer.commands = hdiutil create -srcfolder "$${INSTALLER_NAME}.app" -volname \"Qt Creator\" -format UDBZ "qt-creator-$${PATTERN}-installer.dmg" -ov -scrub -stretch 2g
|
||||
QMAKE_EXTRA_TARGETS += codesign_installer dmg_installer copy_menu_nib_installer
|
||||
}
|
||||
|
||||
win32 {
|
||||
deployqt.commands ~= s,/,\\\\,g
|
||||
|
@@ -12,7 +12,7 @@ cp -a "${sourceFolder}/" "${intermediateFolder}"
|
||||
ln -s /Applications "${intermediateFolder}"
|
||||
cp "$(dirname "${BASH_SOURCE[0]}")/../LICENSE.LGPL" "${intermediateFolder}/LICENSE_LGPL.txt"
|
||||
echo Creating image...
|
||||
hdiutil create -srcfolder "${intermediateFolder}" -volname "${title}" -format UDBZ "${finalDMGName}" -ov -scrub -stretch 1g
|
||||
hdiutil create -srcfolder "${intermediateFolder}" -volname "${title}" -format UDBZ "${finalDMGName}" -ov -scrub -stretch 2g
|
||||
|
||||
# clean up
|
||||
rm -rf "${intermediateFolder}"
|
||||
|
@@ -88,7 +88,7 @@ def main():
|
||||
installer_name = args[0]
|
||||
config_postfix = ''
|
||||
if sys.platform == 'darwin':
|
||||
installer_name = installer_name + '.dmg'
|
||||
config_postfix = '-mac'
|
||||
if sys.platform.startswith('win'):
|
||||
config_postfix = '-windows'
|
||||
if sys.platform.startswith('linux'):
|
||||
|
Reference in New Issue
Block a user