def fix_arguments(callerArguments): stripVars(callerArguments, "\"") if callerArguments.qt5path != os.path.abspath(callerArguments.qt5path): print("changing the value of --qt5path from {0} to {1}".format( callerArguments.qt5path, os.path.abspath(callerArguments.qt5path))) callerArguments.qt5path = os.path.abspath(callerArguments.qt5path) return callerArguments
def fix_arguments(callerArguments): stripVars(callerArguments, "\"") if callerArguments.qt5path != os.path.abspath(callerArguments.qt5path): print("changing the value of --qt5path from {0} to {1}".format(callerArguments.qt5path, os.path.abspath(callerArguments.qt5path))) callerArguments.qt5path = os.path.abspath(callerArguments.qt5path) return callerArguments
def parse_arguments(): parser = argparse.ArgumentParser(description='Build Qt Creator plugins', formatter_class=argparse.RawTextHelpFormatter) add_common_commandline_arguments(parser) parser.add_argument('--build-path', help='The path to use as a base for all build results', required=True) build_group = parser.add_mutually_exclusive_group(required=True) build_group.add_argument('--qtc-build-url', help='Path to the Qt Creator build to use') build_group.add_argument('--qtc-build', help='Path to the Qt Creator build to use') dev_group = parser.add_mutually_exclusive_group(required=True) dev_group.add_argument('--qtc-dev-url', help='Path to the Qt Creator dev source to use') dev_group.add_argument('--qtc-dev', help='Path to the Qt Creator dev source to use') parser.add_argument('--plugin-search-path', help='Adds search path for plugin dependencies (QTC_PLUGIN_DIRS)', dest='plugin_search_paths', action='append') parser.add_argument('--plugin-path', help='Path to the plugin sources to build', required=True, dest='plugin_path') parser.add_argument('--deploy-command', help='Command to execute for custom deployment before deploying and packaging the target directory.' + 'The command gets the Qt prefix and plugin target directory as command line parameters. Pass multiple times for commands that have arguments.', action='append', default=[]) parser.add_argument('--deploy', help='Run "make deploy" for additional deployment to IDE_OUTPUT_PATH.', action='store_true') parser.add_argument('--out-dev', help='Target 7z file name for plugin dev package', dest='target_dev7zfile') parser.add_argument('--cleanup', help='Clean temporary directories (download path, Qt path, build path) at the end', dest='cleanup', action='store_true') parser.add_argument('target_7zfile') parser.epilog += ' --build-path /tmp/plugin_build' parser.epilog += ' --qt-module http://myserver/path/qt_all.7z' parser.epilog += ' --qtc-build-url http://myserver/path/qtcreator_build.7z' parser.epilog += ' --qtc-dev-url http://myserver/path/qtcreator_dev.7z' parser.epilog += ' --plugin-path /home/myplugin' parser.epilog += ' --deploy-command python --deploy-command "/path to/mydeployscript.py" --deploy-command=-v' parser.epilog += ' --out-dev /tmp/plugin_build/myplugin_dev.7z' parser.epilog += ' /tmp/plugin_build/myplugin.7z' caller_arguments = parser.parse_args() # normalize arguments stripVars(caller_arguments, "\"") caller_arguments.build_path = os.path.abspath(caller_arguments.build_path) caller_arguments.plugin_path = os.path.abspath(caller_arguments.plugin_path) caller_arguments.qtc_build = (os.path.abspath(caller_arguments.qtc_build) if caller_arguments.qtc_build else os.path.join(caller_arguments.build_path, 'qtc_build')) caller_arguments.qtc_dev = (os.path.abspath(caller_arguments.qtc_dev) if caller_arguments.qtc_dev else os.path.join(caller_arguments.build_path, 'qtc_dev')) return caller_arguments
# install an argument parser parser = argparse.ArgumentParser(description="build Qt 5 based Qt Creator", formatter_class=argparse.RawTextHelpFormatter) add_common_commandline_arguments(parser) parser.add_argument('--qt5path', help="here it expects a compiled Qt5", required=True) if bldinstallercommon.is_mac_platform(): parser.add_argument('--keychain_unlock_script', help="script for unlocking the keychain used for signing") parser.epilog += " --keychain_unlock_script $HOME/unlock-keychain.sh" if bldinstallercommon.is_win_platform(): parser.add_argument('--python_path', help="path to python libraries for use by cdbextension") parser.epilog += " --qt5path qtcreator_qt5" callerArguments = parser.parse_args() # cleanup some values inside the callerArguments object stripVars(callerArguments, "\"") if callerArguments.qt5path != os.path.abspath(callerArguments.qt5path): print("changing the value of --qt5path from {0} to {1}".format(callerArguments.qt5path, os.path.abspath(callerArguments.qt5path))) callerArguments.qt5path = os.path.abspath(callerArguments.qt5path) qtCreatorSourceDirectory = os.path.abspath('qt-creator') qtCreatorBuildDirectory = os.path.abspath(os.path.join(qtCreatorSourceDirectory, '..', 'qt-creator_build')) qtCreatorInstallDirectory = os.path.abspath(os.path.join(qtCreatorSourceDirectory, '..', 'qt-creator_install')) qtCreatorTempDevDirectory = os.path.abspath(os.path.join(qtCreatorSourceDirectory, '..', 'qt-creator_dev')) if bldinstallercommon.is_win_platform(): cdbextSourceDirectory = os.path.join(qtCreatorSourceDirectory, 'src', 'libs', 'qtcreatorcdbext') cdbextBuildDirectory = os.path.abspath(os.path.join(qtCreatorSourceDirectory,
def parse_arguments(): parser = argparse.ArgumentParser( description='Build Qt Creator plugins', formatter_class=argparse.RawTextHelpFormatter) add_common_commandline_arguments(parser) parser.add_argument('--build-path', help='The path to use as a base for all build results', required=True) build_group = parser.add_mutually_exclusive_group(required=True) build_group.add_argument('--qtc-build-url', help='Path to the Qt Creator build to use') build_group.add_argument('--qtc-build', help='Path to the Qt Creator build to use') dev_group = parser.add_mutually_exclusive_group(required=True) dev_group.add_argument('--qtc-dev-url', help='Path to the Qt Creator dev source to use') dev_group.add_argument('--qtc-dev', help='Path to the Qt Creator dev source to use') parser.add_argument( '--plugin-search-path', help='Adds search path for plugin dependencies (QTC_PLUGIN_DIRS)', dest='plugin_search_paths', action='append') parser.add_argument('--add-qmake-argument', help='Adds an argument to the qmake command line', dest='additional_qmake_arguments', action='append') parser.add_argument('--plugin-path', help='Path to the plugin sources to build', required=True, dest='plugin_path') parser.add_argument( '--deploy-command', help= 'Command to execute for custom deployment before deploying and packaging the target directory.' + 'The command gets the Qt prefix and plugin target directory as command line parameters. Pass multiple times for commands that have arguments.', action='append', default=[]) parser.add_argument( '--deploy', help='Run "make deploy" for additional deployment to IDE_OUTPUT_PATH.', action='store_true') parser.add_argument('--out-dev', help='Target 7z file name for plugin dev package', dest='target_dev7zfile') parser.add_argument('target_7zfile') parser.epilog += ' --build-path /tmp/plugin_build' parser.epilog += ' --qt-module http://myserver/path/qt_all.7z' parser.epilog += ' --qtc-build-url http://myserver/path/qtcreator_build.7z' parser.epilog += ' --qtc-dev-url http://myserver/path/qtcreator_dev.7z' parser.epilog += ' --plugin-path /home/myplugin' parser.epilog += ' --deploy-command python --deploy-command "/path to/mydeployscript.py" --deploy-command=-v' parser.epilog += ' --out-dev /tmp/plugin_build/myplugin_dev.7z' parser.epilog += ' /tmp/plugin_build/myplugin.7z' caller_arguments = parser.parse_args() # normalize arguments stripVars(caller_arguments, "\"") caller_arguments.build_path = os.path.abspath(caller_arguments.build_path) caller_arguments.plugin_path = os.path.abspath( caller_arguments.plugin_path) caller_arguments.qtc_build = (os.path.abspath(caller_arguments.qtc_build) if caller_arguments.qtc_build else os.path.join(caller_arguments.build_path, 'qtc_build')) caller_arguments.qtc_dev = (os.path.abspath(caller_arguments.qtc_dev) if caller_arguments.qtc_dev else os.path.join( caller_arguments.build_path, 'qtc_dev')) return caller_arguments
# install an argument parser parser = argparse.ArgumentParser(description="build Qt 5 based Qt Creator", formatter_class=argparse.RawTextHelpFormatter) add_common_commandline_arguments(parser) parser.add_argument('--qt5path', help="here it expects a compiled Qt5", required=True) parser.add_argument('--versiondescription', help="version description to be shown in the about dialog, e.g. 'pre-2.7.2") if bldinstallercommon.is_mac_platform(): parser.add_argument('--keychain_unlock_script', help="script for unlocking the keychain used for signing") parser.epilog += " --keychain_unlock_script $HOME/unlock-keychain.sh" parser.epilog += " --qt5path qtcreator_qt5" callerArguments = parser.parse_args() # cleanup some values inside the callerArguments object stripVars(callerArguments, "\"") if callerArguments.qt5path != os.path.abspath(callerArguments.qt5path): print("changing the value of --qt5path from {0} to {1}".format(callerArguments.qt5path, os.path.abspath(callerArguments.qt5path))) callerArguments.qt5path = os.path.abspath(callerArguments.qt5path) qtCreatorSourceDirectory = os.path.abspath('qt-creator') qtCreatorBuildDirectory = os.path.abspath(os.path.join(qtCreatorSourceDirectory, '..', 'qt-creator_build')) qtCreatorInstallDirectory = os.path.abspath(os.path.join(qtCreatorSourceDirectory, '..', 'qt-creator_install')) tempPath = os.path.abspath(os.path.join(qtCreatorSourceDirectory, '..', 'qt-creator_temp')) # check mac setup