def main(): opt = ParseOption() if not opt.pkgproj: PrintErrorAndExit('--pkgproj option is mandatory.') pkgproj = os.path.abspath(opt.pkgproj) if not opt.product_dir: PrintErrorAndExit('--product_dir option is mandatory.') product_dir = os.path.abspath(opt.product_dir) # Make sure Packages is installed packagesbuild_path = '' if os.path.exists('/usr/local/bin/packagesbuild'): packagesbuild_path = '/usr/local/bin/packagesbuild' elif os.path.exists('/usr/bin/packagesbuild'): packagesbuild_path = '/usr/bin/packagesbuild' else: logging.critical('error: Cannot find "packagesbuild"') sys.exit(1) # codesign CodesignPackage(product_dir) # Build the package cmd = [packagesbuild_path, pkgproj] RunOrDie(cmd)
def main(): opt = ParseOption() if not opt.qtdir: PrintErrorAndExit('--qtdir option is mandatory.') if not opt.target: PrintErrorAndExit('--target option is mandatory.') qtdir = os.path.abspath(opt.qtdir) target = os.path.abspath(opt.target) # Changes the reference to QtCore framework from the target application cmd = ["install_name_tool", "-change", "%s/lib/QtCore.framework/Versions/4/QtCore" % qtdir, "@executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore", "%s" % target] RunOrDie(cmd) # Changes the reference to QtGui framework from the target application cmd = ["install_name_tool", "-change", "%s/lib/QtGui.framework/Versions/4/QtGui" % qtdir, "@executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui", "%s" % target] RunOrDie(cmd)
def main(): opt = ParseOption() if not opt.qtdir: PrintErrorAndExit('--qtdir option is mandatory.') if not opt.target: PrintErrorAndExit('--target option is mandatory.') qtdir = os.path.abspath(opt.qtdir) target = os.path.abspath(opt.target) # Copies QtCore. For codesign, Info.plist should be copied to Resources/. CopyFiles(['%s/lib/QtCore.framework/Versions/4/QtCore' % qtdir], '%s/QtCore.framework/Versions/4/QtCore' % target) CopyFiles(['%s/lib/QtCore.framework/Contents/Info.plist' % qtdir], '%s/QtCore.framework/Resources/' % target) # Copies QtGui. For codesign, Info.plist should be copied to Resources/. CopyFiles(['%s/lib/QtGui.framework/Versions/4/QtGui' % qtdir], '%s/QtGui.framework/Versions/4/QtGui' % target) CopyFiles(['%s/lib/QtGui.framework/Contents/Info.plist' % qtdir], '%s/QtGui.framework/Resources/' % target) # Copies Resources of QtGui CopyFiles(['%s/lib/QtGui.framework/Versions/4/Resources' % qtdir], '%s/QtGui.framework/Resources' % target, recursive=True) # Changes QtGui id cmd = [ "install_name_tool", "-id", "@executable_path/../Frameworks/QtGui.framework/Versions/4/QtGui", "%s/QtGui.framework/Versions/4/QtGui" % target ] RunOrDie(cmd) # Changes QtCore id cmd = [ "install_name_tool", "-id", "@executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore", '%s/QtCore.framework/Versions/4/QtCore' % target ] RunOrDie(cmd) # Changes the reference to QtCore framework from QtGui cmd = [ "install_name_tool", "-change", "%s/lib/QtCore.framework/Versions/4/QtCore" % qtdir, "@executable_path/../Frameworks/QtCore.framework/Versions/4/QtCore", "%s/QtGui.framework/Versions/4/QtGui" % target ] RunOrDie(cmd)
def main(): opts = ParseOption() if not opts.basenames: PrintErrorAndExit('--basenames option is mandatory.') if not opts.target_dir: PrintErrorAndExit('--target_dir option is mandatory.') target_absdir = os.path.abspath(opts.target_dir) for basename in opts.basenames.split(os.pathsep): DeployMain(basename + '.dll', opts.dll_paths, target_absdir) DeployMain(basename + '.pdb', opts.pdb_paths, target_absdir)
def main(): opt = ParseOption() if not opt.qtdir: PrintErrorAndExit('--qtdir option is mandatory.') if not opt.target: PrintErrorAndExit('--target option is mandatory.') qtdir = os.path.abspath(opt.qtdir) target = os.path.abspath(opt.target) ref_to = '@executable_path/../../../ConfigDialog.app/Contents/Frameworks' CopyQt(qtdir, 'QtCore', '5', target, copy_resources=True) CopyQt(qtdir, 'QtGui', '5', target, copy_resources=True) CopyQt(qtdir, 'QtWidgets', '5', target, copy_resources=True) CopyQt(qtdir, 'QtPrintSupport', '5', target, copy_resources=True) ChangeReferences(qtdir, GetFrameworkPath('QtCore', '5'), '5', target, ref_to) ChangeReferences(qtdir, GetFrameworkPath('QtGui', '5'), '5', target, ref_to, references=['QtCore']) ChangeReferences(qtdir, GetFrameworkPath('QtWidgets', '5'), '5', target, ref_to, references=['QtCore', 'QtGui']) ChangeReferences(qtdir, GetFrameworkPath('QtPrintSupport', '5'), '5', target, ref_to, references=['QtCore', 'QtGui', 'QtWidgets']) libqcocoa = 'QtCore.framework/Resources/plugins/platforms/libqcocoa.dylib' CopyFiles(['%s/plugins/platforms/libqcocoa.dylib' % qtdir], '%s/%s' % (target, libqcocoa)) ChangeReferences( qtdir, libqcocoa, '5', target, ref_to, references=['QtCore', 'QtGui', 'QtWidgets', 'QtPrintSupport'])
def main(): opt = ParseOption() if not opt.qtdir: PrintErrorAndExit('--qtdir option is mandatory.') if not opt.target: PrintErrorAndExit('--target option is mandatory.') qtver = opt.qtver qtdir = os.path.abspath(opt.qtdir) target = os.path.abspath(opt.target) # Changes the reference to QtCore framework from the target application # From: /path/to/qt/lib/QtCore.framework/Versions/4/QtCore # To: @executable_path/../../../MozcTool.app/Contents/Frameworks/... qtcore_framework = GetFrameworkPath('QtCore', qtver) InstallNameTool(target, '%s/lib/%s' % (qtdir, qtcore_framework), GetReferenceTo(qtcore_framework)) # Changes the reference to QtGui framework from the target application qtgui_framework = GetFrameworkPath('QtGui', qtver) InstallNameTool(target, '%s/lib/%s' % (qtdir, qtgui_framework), GetReferenceTo(qtgui_framework)) if qtver == '5': # Changes the reference to QtWidgets framework from the target application qtwidgets_framework = GetFrameworkPath('QtWidgets', '5') InstallNameTool(target, '%s/lib/%s' % (qtdir, qtwidgets_framework), GetReferenceTo(qtwidgets_framework)) # Change the reference to $(branding)Tool_lib from the target application # From: @executable_path/../Frameworks/MozcTool_lib.framework/... # To: @executable_path/../../../MozcTool.app/Contents/Frameworks/... toollib_framework = GetFrameworkPath('GuiTool_lib', 'A') InstallNameTool(target, '@executable_path/../Frameworks/%s' % toollib_framework, GetReferenceTo(toollib_framework)) # Change the reference to GoogleBreakpad from the target application breakpad_framework = GetFrameworkPath('GoogleBreakpad', 'A') InstallNameTool(target, '@executable_path/../Frameworks/%s' % breakpad_framework, GetReferenceTo(breakpad_framework))
def main(): opt = ParseOption() if not opt.qtdir: PrintErrorAndExit('--qtdir option is mandatory.') if not opt.target: PrintErrorAndExit('--target option is mandatory.') unused_qtdir = os.path.abspath(opt.qtdir) # TODO(komatsu): remove this. target = os.path.abspath(opt.target) # Changes the reference to QtCore framework from the target application # From: @rpath/QtCore.framework/Versions/5/QtCore # To: @executable_path/../../../MozcTool.app/Contents/Frameworks/... qtcore_framework = GetFrameworkPath('QtCore', '5') InstallNameTool(target, '@rpath/%s' % qtcore_framework, GetReferenceTo(qtcore_framework)) # Changes the reference to QtGui framework from the target application qtgui_framework = GetFrameworkPath('QtGui', '5') InstallNameTool(target, '@rpath/%s' % qtgui_framework, GetReferenceTo(qtgui_framework)) # Changes the reference to QtWidgets framework from the target application qtwidgets_framework = GetFrameworkPath('QtWidgets', '5') InstallNameTool(target, '@rpath/%s' % qtwidgets_framework, GetReferenceTo(qtwidgets_framework)) # Change the reference to $(branding)Tool_lib from the target application # From: @executable_path/../Frameworks/MozcTool_lib.framework/... # To: @executable_path/../../../ConfigDialog.app/Contents/Frameworks/... toollib_framework = GetFrameworkPath('GuiTool_lib', 'A') InstallNameTool(target, '@executable_path/../Frameworks/%s' % toollib_framework, GetReferenceTo(toollib_framework))