diff options
author | joaijala <johanna.aijala@digia.com> | 2012-08-17 09:36:38 +0300 |
---|---|---|
committer | Iikka Eklund <iikka.eklund@digia.com> | 2012-08-21 08:53:27 +0200 |
commit | f7850e09778b831fbec58b1ac66be8ad24e262db (patch) | |
tree | 55175a954d41025b69af55ac6a53965f52f93de6 | |
parent | cfcd006082d58557c12c9e846660497a56c529c8 (diff) |
Fix for executing patch file, update to build script.
Added missing space to if sentence executing the patch file.
Configure options updated on build script, qtphonon and
qtdocgallery removed from modules default list.
Change-Id: I5f88c858a7443d5c142499d84b7fa9250e1d1ae2
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
-rw-r--r-- | release-tools/bldinstallercommon.py | 3 | ||||
-rw-r--r-- | release-tools/mkqt5bld.py | 36 | ||||
-rwxr-xr-x | release-tools/mksrc.sh | 2 |
3 files changed, 30 insertions, 11 deletions
diff --git a/release-tools/bldinstallercommon.py b/release-tools/bldinstallercommon.py index ae756ee..d5244d1 100644 --- a/release-tools/bldinstallercommon.py +++ b/release-tools/bldinstallercommon.py @@ -260,7 +260,6 @@ def copy_tree(source_dir, dest_dir): src_files = os.listdir(source_dir) for file_name in src_files: full_file_name = os.path.join(source_dir, file_name) - if not full_file_name: print '*** Fatal error! Unable to create source file path, too long path name!' sys.exit(-1) @@ -681,7 +680,7 @@ def extract_file(path, to_directory='.'): elif path.endswith('.tar.gz') or path.endswith('.tgz'): cmd_args = ['tar', '-xzf', path] elif path.endswith('.tar.bz2') or path.endswith('.tbz'): - cmd_args = ['tar', '-xzf', path] + cmd_args = ['tar', '-xjf', path] elif path.endswith('.7z'): cmd_args = ['7z', 'x', path] # 7z does not have silent operation so we do it the hard way.... diff --git a/release-tools/mkqt5bld.py b/release-tools/mkqt5bld.py index de60a35..5763b67 100644 --- a/release-tools/mkqt5bld.py +++ b/release-tools/mkqt5bld.py @@ -57,15 +57,15 @@ SUBMODULE_INSTALL_BASE_DIR_NAME = "submodule_install_" QT5_MODULES_LIST = [ 'qt3d', 'qlalr', 'qtactiveqt', 'qtbase', \ 'qtconnectivity', 'qtdeclarative', 'qtdoc', \ - 'qtdocgallery', 'qtfeedback', 'qtgraphicaleffects', \ + 'qtfeedback', 'qtgraphicaleffects', \ 'qtimageformats', 'qtjsondb', 'qtjsbackend', \ - 'qtlocation', 'qtmultimedia', 'qtphonon', 'qtpim', \ + 'qtlocation', 'qtmultimedia', 'qtpim', \ 'qtqa', 'qtquick1', 'qtrepotools', 'qtscript', \ 'qtsensors', 'qtsvg', 'qtsystems', 'qttools', \ 'qttranslations', 'qtwayland', 'webkit', \ 'qtwebkit-examples-and-demos', 'qtxmlpatterns'] -CONFIGURE_OPTIONS = '-opensource -nomake tests -confirm-license' #-make examples +CONFIGURE_OPTIONS = '-opensource -debug-and-release -release -nomake tests -confirm-license' #-make examples DEVEL_MODE = 0 FORCE_MAKE = 0 RUN_RPATH = False @@ -73,6 +73,7 @@ ORIGINAL_QMAKE_QT_PRFXPATH = '' BUILD_WEBKIT = True BUILD_TRANSLATIONS = False PADDING = "______________________________PADDING______________________________" +FILES_TO_REMOVE_LIST = ['Makefile', '.o', '.moc', '.pro', '.init-repository', '.cpp', '.gitignore'] ############################### @@ -237,6 +238,11 @@ def build_qt(): index = submodule_name.index('-make_first') submodule_list.append(submodule_name[:index]) modules_found = 1 + #webkit is listed with different syntax: sub-webkit-pri-make_first + elif item.startswith('sub-') and BUILD_WEBKIT: + submodule_name = item[4:] #4 <- sub- + index = submodule_name.index('-pri-make_first') + submodule_list.append(submodule_name[:index]) if modules_found == 1: QT5_MODULES_LIST = submodule_list @@ -246,6 +252,7 @@ def build_qt(): else: print_wrap('*** Error! Main Makefile not found. Build failed!') sys.exit(-1) + #remove if old dir exists if os.path.exists(MAKE_INSTALL_ROOT_DIR): shutil.rmtree(MAKE_INSTALL_ROOT_DIR) @@ -295,7 +302,7 @@ def install_qt(): cmd_args += MAKE_INSTALL_CMD + ' INSTALL_ROOT=' + install_root_path print_wrap(' Running main level make install with install root ' + install_root_path) bldinstallercommon.do_execute_sub_process(cmd_args.split(' '), QT_SOURCE_DIR, True) -#end - main level install with install root + #end - main level install with install root #make install for each module with INSTALL_ROOT print_wrap(' Install modules to INSTALL_ROOT') @@ -357,16 +364,30 @@ def save_original_qt_prfxpath(): # function ############################### def replace_build_paths(path_to_checked): - print_wrap('---------------- Replacing build paths -----------------------------') + print_wrap('------------ Replacing build paths in ' + path_to_checked + '----------------') + qt_source_dir_delimeter_2 = QT_SOURCE_DIR.replace('/', os.sep) for root, dirs, files in os.walk(path_to_checked): for name in files: if name.endswith('.prl') or name.endswith('.la') or name.endswith('.pc') or name.endswith('.pri'): path = os.path.join(root, name) print_wrap('---> Replacing build path in: ' + path) print_wrap('---> String to match: ' + QT_SOURCE_DIR) + print_wrap('---> String to match: ' + qt_source_dir_delimeter_2) print_wrap('---> Replacement: ' + ORIGINAL_QMAKE_QT_PRFXPATH) for line in fileinput.FileInput(path,inplace=1): - line = line.replace(QT_SOURCE_DIR, ORIGINAL_QMAKE_QT_PRFXPATH) + output1 = line.replace(QT_SOURCE_DIR, ORIGINAL_QMAKE_QT_PRFXPATH) + if line != output1: + # we had a match + print output1.rstrip('\n') + continue + else: + output2 = line.replace(qt_source_dir_delimeter_2, ORIGINAL_QMAKE_QT_PRFXPATH) + if line != output2: + # we had a match for the second replacement + print output2.rstrip('\n') + continue + # no match so write original line back to file + print line.rstrip('\n') print_wrap('--------------------------------------------------------------------') @@ -375,10 +396,9 @@ def replace_build_paths(path_to_checked): ############################### def clean_up(install_dir): print_wrap('---------------- Cleaning unnecessary files from ' + install_dir + '----------') - file_list = ['Makefile', '.o', '.moc', '.pro', '.pri', '.init-repository', '.cpp', '.h', '.gitignore', '.qmlproject'] for root, dirs, files in os.walk(install_dir): for name in files: - if name in file_list: + if name in FILES_TO_REMOVE_LIST: path = os.path.join(root, name) print_wrap(' ---> Deleting file: ' + name) os.remove(path) diff --git a/release-tools/mksrc.sh b/release-tools/mksrc.sh index 62c73b5..72e1a51 100755 --- a/release-tools/mksrc.sh +++ b/release-tools/mksrc.sh @@ -307,7 +307,7 @@ fi # if needed #------------------------------------------------------------------ if [ $PATCH_FILE ]; then - if [ $LICENSE = commercial]; then + if [ $LICENSE = commercial ]; then # when doing commercial build, patch file needs src folder and qt version no as parameters $PATCH_FILE $CUR_DIR/$PACKAGE_NAME/ $QTVER else |