Commit 4babcabf authored by Eike Ziller's avatar Eike Ziller

Make it possible to build Qt Creator installers on Mac too

Change-Id: Ic3e6f773cb0c2c41f83c6f8d54ed4e0151c69b40
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 69da367a
...@@ -57,7 +57,7 @@ Component.prototype.beginInstallation = function() ...@@ -57,7 +57,7 @@ Component.prototype.beginInstallation = function()
else if (installer.value("os") == "x11") else if (installer.value("os") == "x11")
component.qtCreatorBinaryPath = component.qtCreatorBinaryPath + "/bin/qtcreator"; component.qtCreatorBinaryPath = component.qtCreatorBinaryPath + "/bin/qtcreator";
else if (installer.value("os") == "mac") 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" ) { if ( installer.value("os") === "win" ) {
component.setStopProcessForUpdateRequest(component.qtCreatorBinaryPath, true); component.setStopProcessForUpdateRequest(component.qtCreatorBinaryPath, true);
......
...@@ -50,6 +50,8 @@ else: PLATFORM = "unknown" ...@@ -50,6 +50,8 @@ else: PLATFORM = "unknown"
PATTERN = $${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX) PATTERN = $${PLATFORM}$(INSTALL_EDITION)-$${QTCREATOR_VERSION}$(INSTALL_POSTFIX)
INSTALLER_NAME = "qt-creator-$${PATTERN}"
macx { macx {
APPBUNDLE = "$$OUT_PWD/bin/Qt Creator.app" APPBUNDLE = "$$OUT_PWD/bin/Qt Creator.app"
BINDIST_SOURCE = "$$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 ...@@ -83,7 +85,18 @@ bindist.commands = 7z a -mx9 $$OUT_PWD/qt-creator-$${PATTERN}.7z \"$$BINDIST_SOU
bindist_installer.depends = deployqt bindist_installer.depends = deployqt
bindist_installer.commands = 7z a -mx9 $${INSTALLER_ARCHIVE} \"$$BINDIST_INSTALLER_SOURCE\" bindist_installer.commands = 7z a -mx9 $${INSTALLER_ARCHIVE} \"$$BINDIST_INSTALLER_SOURCE\"
installer.depends = bindist_installer 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 { win32 {
deployqt.commands ~= s,/,\\\\,g deployqt.commands ~= s,/,\\\\,g
......
...@@ -12,7 +12,7 @@ cp -a "${sourceFolder}/" "${intermediateFolder}" ...@@ -12,7 +12,7 @@ cp -a "${sourceFolder}/" "${intermediateFolder}"
ln -s /Applications "${intermediateFolder}" ln -s /Applications "${intermediateFolder}"
cp "$(dirname "${BASH_SOURCE[0]}")/../LICENSE.LGPL" "${intermediateFolder}/LICENSE_LGPL.txt" cp "$(dirname "${BASH_SOURCE[0]}")/../LICENSE.LGPL" "${intermediateFolder}/LICENSE_LGPL.txt"
echo Creating image... 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 # clean up
rm -rf "${intermediateFolder}" rm -rf "${intermediateFolder}"
...@@ -88,7 +88,7 @@ def main(): ...@@ -88,7 +88,7 @@ def main():
installer_name = args[0] installer_name = args[0]
config_postfix = '' config_postfix = ''
if sys.platform == 'darwin': if sys.platform == 'darwin':
installer_name = installer_name + '.dmg' config_postfix = '-mac'
if sys.platform.startswith('win'): if sys.platform.startswith('win'):
config_postfix = '-windows' config_postfix = '-windows'
if sys.platform.startswith('linux'): if sys.platform.startswith('linux'):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment