79 Commits
Author SHA1 Message Date
isanae 9246dc0301 Merge pull request #72 from isanae/tx-fixes
Some translation fixes
2020-07-11 19:55:54 -04:00
isanae 0573b66702 some tasks were not found because the case is different on transifex
don't fail because the language doesn't exist in the gamebryo project
2020-07-11 19:55:02 -04:00
isanae 5edc593bd1 Merge pull request #71 from isanae/deps
Dependencies
2020-07-10 13:11:46 -04:00
isanae 69e5ac8b94 updated libloot and stylesheets 2020-07-10 13:11:05 -04:00
isanae aa62fc344c Merge pull request #70 from isanae/gamebryo-translations
Gamebryo translations
2020-07-10 11:50:46 -04:00
isanae 1c270d6ffc add gamebryo's ts files when invoking lrelease for tasks that depend on it
fixed bad decode for env strings, they're ACP, not utf8
2020-07-10 11:43:56 -04:00
Jeremy Rimpo 5dbf6af2f8 Add native c# fomod installer 2020-06-12 18:12:40 -05:00
Jeremy Rimpo c7ab0511a2 Fix flake tests 2020-06-12 10:47:42 -05:00
Jeremy Rimpo de26d16555 Fix flake tests 2020-06-12 10:43:25 -05:00
Jeremy Rimpo a3b278b70b Workaround for googletest compile issues 2020-06-12 10:35:19 -05:00
Chris Bessent e1efc257fa Change user agent to be MO2 related 2020-05-31 11:04:35 -07:00
cibrhusk 4d89e7850e 403 Forbidden fix 2020-05-31 11:03:36 -07:00
Al 92a6039d84 Merge pull request #68 from AnyOldName3/more-fixup
Cope with cleaning downloads with unwanted read only flag
2020-05-21 01:50:01 +02:00
AnyOldName3 447212fa5c Cope with cleaning downloads with unwanted read only flag 2020-05-20 23:52:59 +01:00
Al d3c8a61727 Update README.md 2020-05-08 01:52:19 +02:00
Al 727d8e4e57 Update README.md 2020-05-07 22:31:08 +02:00
Silarn 66b85d4fe1 Use uibase for helper 2020-05-01 15:37:24 -05:00
Silarn 1150c9b512 Add fmt to helper deps 2020-05-01 15:27:08 -05:00
Silarn cfabc94dea Temporary fix for appveyor dependencies 2020-05-01 04:01:33 -05:00
Silarn be1d50c3d3 Final version updates 2020-05-01 03:39:16 -05:00
isanae 6f90d5b334 Merge pull request #66 from isanae/cmake-dependencies-fix
Dependencies fix
2020-05-01 04:25:41 -04:00
isanae dad4962a8a made a few more projects depend on boost and uibase because common_cmake requires them 2020-05-01 04:18:26 -04:00
Silarn 43b3aaf7b9 Merge branch 'new-versions' 2020-05-01 00:46:26 -05:00
isanae a42e00b2e8 Merge pull request #65 from isanae/qt-5.14.2-appveyor
updated qt appveyor version to 5.14.2
2020-05-01 01:38:41 -04:00
isanae 10f477bcbc updated qt appveyor version to 5.14.2 2020-05-01 01:38:14 -04:00
isanae 8df33103bf Merge pull request #64 from isanae/new-versions
Updates to Qt, PyQt5, SIP, openssl, NMM, spdlog, python
2020-05-01 01:34:10 -04:00
Silarn b8d4e78bb2 Updates to Qt, PyQt5, SIP, openssl, NMM, spdlog, python 2020-05-01 01:32:35 -04:00
AL 177f979d6b Revert "Appveyor project build location test, will be reverted."
This reverts commit c488ed087f.
2020-04-26 14:30:47 +02:00
AL c488ed087f Appveyor project build location test, will be reverted. 2020-04-26 14:16:30 +02:00
isanae 2c9c4afb66 Merge pull request #63 from isanae/new-cmakefiles
New cmakefiles
2020-04-26 02:59:16 -04:00
isanae 6288b85688 added cmake_common as dependency for all projects 2020-04-26 02:57:41 -04:00
isanae dfe6ef8d93 added SEVENZ_ROOT 2020-04-26 00:47:28 -04:00
isanae 8719a0dbf5 added BOOST_LIBRARYDIR, that's the one that's used by FindBoost.cmake, not Boost_LIBRARY_DIRS 2020-04-24 15:32:53 -04:00
Al d5efb3de50 Merge pull request #61 from AnyOldName3/explorerpp-overwrite-mark-2
Overwrite existing Explorer++ install when rebuilding
2020-04-17 10:11:08 +02:00
Silarn 2b7a474494 Merge branch 'master' into new-versions 2020-04-14 21:01:06 -05:00
AnyOldName3 7c3c68092c Overwrite existing Explorer++ install when rebuilding
Stops umbrella crashing when attempting a clean-ish build.

Also switch to Pathlib path joining becuase os.path must die.
2020-04-14 16:59:32 +01:00
Al afa0c60a0d Update qt version 2020-04-14 17:10:31 +02:00
LePresidente 51f896498d Try the archive download url for openssl aswell.
urldownload.py had to be updated to error correctly on tar read errors.
2020-04-09 11:03:18 +02:00
Silarn aa02c4e938 Updates to Qt, PyQt5, SIP, openssl, NMM, spdlog, python 2020-04-06 09:28:13 -05:00
AL 12d93ba2f1 Updated Appveyor builds to qt 5.14.1 2020-03-21 14:47:35 +01:00
LePresidente 2fb4672863 Fix Project Name for 64bit build 2020-03-03 15:00:14 +02:00
LePresidente fb93d0e170 Split the project to work on 32Bit And 64Bit build processes. 2020-03-03 14:45:02 +02:00
LePresidente 9b59a2bac5 Make sure the output paths exist before copying. 2020-03-03 13:05:19 +02:00
LePresidente 3dbfba0437 fixed download paths since the artifacts are seperated into two folders. 2020-03-03 12:53:10 +02:00
LePresidente d38605c91d Correct output folder for libs. 2020-03-03 12:23:19 +02:00
LePresidente ea24f744aa Fix Flake8 F632 Violation error. 2020-03-03 12:03:51 +02:00
LePresidente b4c27b4421 Grab the usvfs appveyor artifacts when doing a appveyor build, this should reduce build time of the main modorganizer build process 2020-03-03 11:50:41 +02:00
AL ae9cf5b4fc Add setting to override build version, useful for appveyor 2020-02-29 13:10:18 +01:00
Al 043eb0e0a9 Update README.md 2020-02-14 20:54:09 +01:00
Silarn 21343a082b Update Qt and SIP 2020-02-04 02:51:20 -06:00
AL 823c98fa9a Added BSA preview plugin 2020-02-02 01:51:41 +01:00
AL 8dde4039f9 Change libbsarch to use ModOrganizer2/libbsarch repo, maintained by deorder and G'k.
Updated libbsarch to 0.0.8
2020-01-30 02:58:34 +01:00
Silarn b17eacc525 Add feature branch option to git repos and config 2020-01-14 12:17:17 -06:00
Chris Bessent b381c7191c Make the installer use the same branch as everything else 2020-01-13 18:53:00 -07:00
Jeremy Rimpo 41b834b89a Merge pull request #59 from ModOrganizer2/new_branches
Update branch schemas
2020-01-13 17:38:44 -06:00
Jeremy Rimpo 72314a1fa2 Update branch schemas 2020-01-13 17:38:12 -06:00
Silarn 9591f889ab Use ExecutablePath in registry, if it exists 2020-01-12 00:32:15 -06:00
Silarn f266c2000c Detect python path based on running python 2020-01-12 00:18:29 -06:00
Silarn 612516d546 Clean up 2020-01-11 17:07:24 -06:00
Silarn daf9456b0b Updates to allow building in one pass
* Add configurable retries to Build.Run
* Use direct download link for PyQt5
2020-01-11 17:03:49 -06:00
Silarn 98df2b5f46 We need to make sure pdb is a directory 2020-01-07 16:28:45 -06:00
Silarn d3d9f4fe88 We probably don't need to 'set up' SIP for Appveyor 2020-01-07 15:46:26 -06:00
Silarn 0c8e49b275 Updates to fix PyQt5/sip prebuilts 2020-01-07 15:40:29 -06:00
Silarn 58385b94c3 Rework python plugin dependencies 2020-01-07 13:39:08 -06:00
Silarn 4a7e99a120 Update the dependency graph :) 2020-01-07 13:17:43 -06:00
Silarn a67ffc3108 Set another SDK reference 2020-01-07 13:03:17 -06:00
Silarn 4fcab2d8ed Update readme for latest versions 2020-01-07 13:02:08 -06:00
Silarn 02579f4179 Updating to latest PyQt5 and SIP 2020-01-07 12:33:48 -06:00
Silarn dbc89f9c3a Merge remote-tracking branch 'upstream/Develop' into new-versions 2020-01-07 12:08:21 -06:00
Silarn 6a50d52df3 Qt 5.14, PyQt 5.14, fmt 6.1.2, python 3.8.1, updated vc target platform 2019-12-31 03:01:25 -06:00
Silarn 30da163f02 Merge branch 'Develop' into new-versions 2019-12-30 19:48:07 -06:00
Silarn 023740f0d4 Update patch for latest pyqtbuilder package 2019-12-22 15:03:55 -06:00
Silarn 4aece64e5a Merge branch 'python38' into new-versions 2019-12-14 14:16:36 -06:00
Jeremy Rimpo 7211153b77 Fix build script to use flag and set pro flags correctly 2019-12-13 15:14:53 -06:00
Silarn 5e2dea6e40 Updated libloot and NMM core 2019-12-13 03:04:42 -06:00
Silarn bc4ddc771e Python 3.8 seems to compile and work 2019-12-13 03:02:22 -06:00
Silarn 39a01b62f1 Updates for prebuilt libraries and other fixes 2019-12-10 14:46:16 -06:00
Silarn b0677dbcb3 Clean up files 2019-12-10 11:41:26 -06:00
Silarn a134228ea8 Migrate pyqt/sip build tools to sip 5.0.0 mechanics 2019-12-10 11:28:29 -06:00
32 changed files with 818 additions and 402 deletions
+12 -9
View File
@@ -18,10 +18,11 @@ Open there a console and copy in: ``git clone https://github.com/Modorganizer2/m
Now you need to install all required software to build Mod Organizer.
#### Manual Requirements
* Qt 5.13.2 http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe
* Qt 5.14.2 http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe
#### Qt Packages required:
* msvc2017-64
* qtwebengine
* Optional: Sources and Windows debug files
Be sure to expand the options to show ALL the available choices and then select those packages. Failure to do so will result in a missing qmake.exe error or other build errors.
* Visual Studio Community 2019 Link: https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16
@@ -31,21 +32,21 @@ Now you need to install all required software to build Mod Organizer.
Additionally you need to activate under Individual components:
* "Windows Universal C Runtime" (Under SDKs, libraries, and frameworks)
* "Windows 10 SDK (10.0.17763.0) for Desktop C++ [x86 and x64]" (Under SDKs, libraries, and frameworks)
* "Windows 10 SDK (10.0.18362.0) for Desktop C++ \[x86 and x64\]" (Under SDKs, libraries, and frameworks)
* C++ ATL for v141/v142 build tools (x86 & x64) (Under SDKs, libraries, and frameworks)
* Ensure v141 build tools are selected for some dependencies that may not support v142 yet
* Note: If you have problems building Python due to a "missing SDK version", edit the registry key [HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Microsoft SDKs\Windows\v10.0] to point to the the 10.0.17763.0 SDK.
* Note: If you have problems building Python due to a "missing SDK version", edit the registry key \[HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Microsoft SDKs\\Windows\\v10.0\] to point to the the 10.0.18362.0 SDK.
* .NET Framework 3.5 Link: https://www.microsoft.com/en-us/download/details.aspx?id=21
#### Additional Requirements
##### Manual Install
* 7zip (Latest 64Bit) Link: http://www.7-zip.org/a/7z1900-x64.exe
* Inno 5 or 6(Only required to build Installer) Setup Link: http://www.jrsoftware.org/download.php/is.exe
* CMake (latest 64bit) Link: https://github.com/Kitware/CMake/releases/download/v3.14.5/cmake-3.14.5-win64-x64.msi
* Git Link: https://github.com/git-for-windows/git/releases/download/v2.22.0.windows.1/Git-2.22.0-64-bit.exe
* Python 3.7.4 (64Bit) Link: https://www.python.org/ftp/python/3.7.4/python-3.7.4-amd64.exe
* Inno 5 or 6 (Only required to build Installer) Setup Link: http://www.jrsoftware.org/download.php/is.exe
* CMake (latest 64bit) Link: https://github.com/Kitware/CMake/releases/download/v3.17.2/cmake-3.17.2-win64-x64.msi
* Git Link: https://github.com/git-for-windows/git/releases/download/v2.24.1.windows.2/Git-2.24.1.2-64-bit.exe
* Python 3 (64Bit) Link: https://www.python.org/ftp/python/3.8.2/python-3.8.2-amd64.exe
* *If you've previously used a Python 2 version of Umbrella, you may need to run `git clean -xdf` to remove cached data which interferes with Python 3.*
* Strawberry Perl Link: http://strawberryperl.com/download/5.30.0.1/strawberry-perl-5.30.0.1-64bit.msi
* Strawberry Perl Link: http://strawberryperl.com/download/5.30.1.1/strawberry-perl-5.30.1.1-64bit.msi
##### Chocolatey
Optionally, you can use [Chocolatey](https://chocolatey.org/install) to install these dependencies. The packages are:
* 7zip
@@ -63,6 +64,8 @@ You can specify a build location using ``-d <directory path>``
If you wish to rebuild only one target once everything is complete, you simply delete the relevant txt file or directory in the progress folder, e.g C:\modorganizer-umbrella\progress\modorganizer
Then rerun the build script and it will rebuild the relevant project.
To build an individual project once the umbrella script has completed successfully, you can also use the relative VS solution, making sure to set the configuration to RelWithDebugInfo.
## Purpose
This repository contains a meta build-system that is able to download and build MO subprojects and dependencies as necessary.
It can be used to build the whole project to produce a build that should be equivalent to the release or to build subprojects (i.e. plugins) with the minimum of dependencies.
@@ -118,4 +121,4 @@ optional arguments:
I'd suggest to use a destination folder that isn't too deep, some dependencies don't handle long paths well.
If the make target is left empty, everything is built. A incomplete lists of targets can be found [here](targets.md).
Here are the dependency graphs that currently unimake takes care of: https://imgur.com/TT7TFGg.png
Here are the dependency graphs that currently unimake takes care of: https://www.dropbox.com/s/rqi1wrboevrxelu/graph.pdf?dl=1
+27 -20
View File
@@ -46,6 +46,9 @@ config = {
'Release_Build': False, #Used to override certain versions in umbrella when doing an officail release
#eg. Using the usvfs_version below instead of the Main_Branch config
'override_build_version': '', #used to override the modorganizer.exe output version, useful for Appveyor nightlies and dev builds.
'vc_CustomInstallPath': '', # If you installed VC to a custom location put the full path here
# eg. 'E:\Microsoft Visual Studio 14.0'
'qt_CustomInstallPath': r'', # If you installed QT to a custom location put the full path here
@@ -70,56 +73,60 @@ config = {
# folders: <project>\<task>_complete.txt
'Main_Author': 'ModOrganizer2', # the current maintainer
'Dev_Branch': "Develop",
'Release_Branch': "master",
'Dev_Branch': "master",
'Release_Branch': "2_2_2",
'Feature_Branch': None, # Specify a branch or None to disable, used in place of the build branch when found
'Distrib_Author': 'TanninOne', # the current distribution (and the original Author)
'Work_Author': '', # yourself
# manualy set all versions
'7zip_version': '19.00',
'boost_version': '1.71.0',
'boost_version': '1.73.0',
'boost_version_tag': '',
'fmt_version': '6.0.0',
'fmt_version': '6.2.0',
'googletest_version': '1.8.0', # unused. We use the latest source
'grep_version': '3.3',
'icu_version': '65',
'icu_version': '66',
'icu_version_minor': '1',
'loot_version': '0.15.0',
'loot_commit': 'g629fdab',
'loot_version': '0.15.2',
'loot_commit': 'g3baa0e8',
'loot_branch': 'master',
'lz4_version': '1.9.2',
'lz4_version_minor': '', # leave empty if no patch version (1.2.3.x)
'nasm_version': '2.14.02',
'nuget_version': '4.9.3',
'nmm_version': '0.70.9',
'openssl_version': '1.1.1d',
'pyqt_version': '5.13.1',
'nmm_version': '0.71.2',
'openssl_version': '1.1.1g',
'pyqt_version': '5.14.2',
'pyqt_pypi_hash': '4d/81/b9a66a28fb9a7bbeb60e266f06ebc4703e7e42b99e3609bf1b58ddd232b9',
'pyqt_dev_version': '', # leave empty for a standard release
'python_version': '3.7',
'python_version_minor': '.5',
'pyqt_builder_version': '1.3.2',
'pyqt_sip_version': '12.7.2',
'python_version': '3.8',
'python_version_minor': '.2',
'bzip2_version': '1.0.6', # For python
'sip_version': '4.19.19',
'sip_version': '5.2.0',
'sip_dev_version': '', # leave empty for a standard release
'spdlog_version': 'v1.4.2',
'qt_version': '5.13',
'spdlog_version': 'v1.5.0',
'qt_version': '5.14',
'qt_version_minor': '2',
'qt_version_appveyor': '5.13',
'qt_version_appveyor': '5.14',
'qt_version_minor_appveyor': '2',
'qt_vc_version': '15.0',
'vc_platformtoolset': 'v142',
'vc_TargetPlatformVersion': '10.0.17763.0',
'vc_TargetPlatformVersion': '10.0.18362.0',
'vc_version': '16.0',
'vc_version_for_boost': '14.2',
'WixToolset_version': '311',
'zlib_version': '1.2.11',
'explorer++_version': '1.3.5',
'libbsarch_version': '0.0.7',
'libbsarch_version': '0.0.8',
#stylesheets
'paper-light-and-dark_version': '5.3',
'paper-light-and-dark_version': '6.0',
'paper-automata_version': '2.2',
'paper-mono_version': '2.1',
'1809-dark-mode_version': '1.3',
'1809-dark-mode_version': '2.0',
#the usvfs version below will only be used if
'usvfs_version': 'v0.4.6',
+3 -1
View File
@@ -25,7 +25,9 @@ def download(url, filename):
if os.path.exists(filename):
return False
data = urllib.request.urlopen(url)
user_agent = 'Mod Organizer 2/Umbrella'
req = urllib.request.Request(url, headers={'User-Agent' : user_agent})
data = urllib.request.urlopen(req)
with open(filename, 'wb') as outfile:
while True:
block = data.read(4096)
+74 -52
View File
@@ -20,11 +20,12 @@ import shutil
import zipfile
from config import config
from pathlib import Path
from string import Formatter
from glob import glob
from unibuild import Project
from unibuild.modules import build, cmake, git, github, urldownload, msbuild, appveyor
from unibuild.projects import boost, fmt, googletest, libloot, lz4, nasm, ncc, openssl, sevenzip, sip, usvfs, python, pyqt5, qt5, spdlog, zlib, nuget, libbsarch, boost_di, stylesheets
from unibuild.modules import build, cmake, git, github, urldownload, msbuild, appveyor, Patch
from unibuild.projects import boost, fmt, googletest, libloot, lz4, nasm, ncc, usvfs_bin, openssl, sevenzip, sip, usvfs, python, pyqt5, qt5, spdlog, zlib, nuget, libbsarch, boost_di, stylesheets
from unibuild.utility import FormatDict
from unibuild.utility.config_utility import cmake_parameters, qt_inst_path
@@ -43,14 +44,15 @@ def gen_userfile_content(project):
for author, git_path, path, branch, dependencies, Build in [
(config['Main_Author'], "modorganizer-game_features", "game_features", config['Build_Branch'], [], False),
(config['Main_Author'], "modorganizer-archive", "archive", config['Build_Branch'], ["7zip", "Qt5", "boost"], True),
(config['Main_Author'], "modorganizer-uibase", "uibase", config['Build_Branch'], ["Qt5", "boost", "fmt", "spdlog"], True),
(config['Main_Author'], "modorganizer-lootcli", "lootcli", config['Build_Branch'], ["libloot", "boost"], True),
(config['Main_Author'], "modorganizer-esptk", "esptk", config['Build_Branch'], ["boost"], True),
(config['Main_Author'], "modorganizer-bsatk", "bsatk", config['Build_Branch'], ["zlib", "boost", "lz4"], True),
(config['Main_Author'], "cmake_common", "cmake_common", config['Build_Branch'], ["boost", "zlib", "fmt"], False),
(config['Main_Author'], "modorganizer-uibase", "uibase", config['Build_Branch'], ["Qt5", "boost", "fmt", "spdlog", "lz4", "zlib"], True),
(config['Main_Author'], "modorganizer-game_features", "game_features", config['Build_Branch'], ["modorganizer-uibase"], False),
(config['Main_Author'], "modorganizer-archive", "archive", config['Build_Branch'], ["7zip", "Qt5", "boost", "modorganizer-uibase"], True),
(config['Main_Author'], "modorganizer-lootcli", "lootcli", config['Build_Branch'], ["libloot", "boost", "modorganizer-uibase"], True),
(config['Main_Author'], "modorganizer-esptk", "esptk", config['Build_Branch'], ["boost", "modorganizer-uibase"], True),
(config['Main_Author'], "modorganizer-bsatk", "bsatk", config['Build_Branch'], ["zlib", "boost", "lz4", "modorganizer-uibase"], True),
(config['Main_Author'], "modorganizer-nxmhandler", "nxmhandler", config['Build_Branch'], ["Qt5", "modorganizer-uibase"], True),
(config['Main_Author'], "modorganizer-helper", "helper", config['Build_Branch'], ["Qt5","boost"], True),
(config['Main_Author'], "modorganizer-helper", "helper", config['Build_Branch'], ["Qt5", "modorganizer-uibase"], True),
(config['Main_Author'], "modorganizer-game_gamebryo", "game_gamebryo", config['Build_Branch'], ["Qt5", "modorganizer-uibase",
"modorganizer-game_features",
"lz4"], True),
@@ -89,25 +91,27 @@ for author, git_path, path, branch, dependencies, Build in [
"modorganizer-game_features"], True),
(config['Main_Author'], "modorganizer-tool_inieditor", "tool_inieditor", config['Build_Branch'], ["Qt5", "modorganizer-uibase"], True),
(config['Main_Author'], "modorganizer-tool_inibakery", "tool_inibakery", config['Build_Branch'], ["modorganizer-uibase", "modorganizer-game_features"], True),
(config['Main_Author'], "modorganizer-tool_configurator", "tool_configurator", config['Build_Branch'], ["PyQt5"], True),
(config['Main_Author'], "modorganizer-fnistool", "fnistool", config['Build_Branch'], ["PyQt5"], True),
(config['Main_Author'], "modorganizer-preview_base", "preview_base", config['Build_Branch'], ["Qt5", "modorganizer-uibase"], True),
(config['Main_Author'], "modorganizer-preview_dds", "preview_dds", config['Build_Branch'], ["PyQt5"], True),
(config['Main_Author'], "modorganizer-diagnose_basic", "diagnose_basic", config['Build_Branch'], ["Qt5", "modorganizer-uibase"], True),
(config['Main_Author'], "modorganizer-script_extender_plugin_checker", "script_extender_plugin_checker", config['Build_Branch'], ["PyQt5"], True),
(config['Main_Author'], "modorganizer-form43_checker", "form43_checker", config['Build_Branch'], ["PyQt5"], True),
(config['Main_Author'], "modorganizer-check_fnis", "check_fnis", config['Build_Branch'], ["Qt5", "modorganizer-uibase"], True),
(config['Main_Author'], "modorganizer-installer_bain", "installer_bain", config['Build_Branch'], ["Qt5", "modorganizer-uibase"], True),
(config['Main_Author'], "modorganizer-installer_manual", "installer_manual", config['Build_Branch'], ["Qt5", "modorganizer-uibase"], True),
(config['Main_Author'], "modorganizer-installer_bundle", "installer_bundle", config['Build_Branch'], ["Qt5", "modorganizer-uibase"], True),
(config['Main_Author'], "modorganizer-installer_quick", "installer_quick", config['Build_Branch'], ["Qt5", "modorganizer-uibase"], True),
(config['Main_Author'], "modorganizer-installer_fomod", "installer_fomod", config['Build_Branch'], ["Qt5", "modorganizer-uibase","modorganizer-game_features"], True),
(config['Main_Author'], "modorganizer-installer_ncc", "installer_ncc", config['Build_Branch'], ["Qt5", "modorganizer-uibase", "ncc","modorganizer-game_features"], True),
(config['Main_Author'], "modorganizer-installer_fomod", "installer_fomod", config['Build_Branch'], ["Qt5", "modorganizer-uibase", "modorganizer-game_features"], True),
(config['Main_Author'], "modorganizer-installer_fomod_csharp", "installer_fomod_csharp", config['Build_Branch'], ["Qt5", "modorganizer-uibase", "modorganizer-game_features"], True),
(config['Main_Author'], "modorganizer-installer_ncc", "installer_ncc", config['Build_Branch'], ["Qt5", "modorganizer-uibase", "ncc", "modorganizer-game_features"], True),
(config['Main_Author'], "modorganizer-bsa_extractor", "bsa_extractor", config['Build_Branch'], ["Qt5", "modorganizer-uibase", "modorganizer-bsatk"], True),
(config['Main_Author'], "modorganizer-plugin_python", "plugin_python", config['Build_Branch'], ["Qt5", "boost", "Python",
"modorganizer-uibase", "sip","modorganizer-game_features"], True),
(config['Main_Author'], "githubpp", "githubpp", config['Build_Branch'], ["Qt5"], True),
(config['Main_Author'], "modorganizer-plugin_python", "plugin_python", config['Build_Branch'], ["Qt5", "boost", "modorganizer-uibase", "modorganizer-game_features",
"Python", "PyQt5", "sip"], True),
(config['Main_Author'], "modorganizer-tool_configurator", "tool_configurator", config['Build_Branch'], ["modorganizer-plugin_python"], True),
(config['Main_Author'], "modorganizer-fnistool", "fnistool", config['Build_Branch'], ["modorganizer-plugin_python"], True),
(config['Main_Author'], "modorganizer-script_extender_plugin_checker", "script_extender_plugin_checker", config['Build_Branch'], ["modorganizer-plugin_python"], True),
(config['Main_Author'], "modorganizer-form43_checker", "form43_checker", config['Build_Branch'], ["modorganizer-plugin_python"], True),
(config['Main_Author'], "modorganizer-preview_dds", "preview_dds", config['Build_Branch'], ["modorganizer-plugin_python"], True),
(config['Main_Author'], "githubpp", "githubpp", config['Build_Branch'], ["Qt5", "boost"], True),
(config['Main_Author'], "modorganizer-bsapacker", "bsapacker", config['Build_Branch'], ["Qt5", "modorganizer-uibase", "libbsarch", "boost_di"], True),
(config['Main_Author'], "modorganizer-preview_bsa", "preview_bsa", config['Build_Branch'], ["Qt5", "modorganizer-uibase", "libbsarch" ], True),
(config['Main_Author'], "modorganizer", "modorganizer", config['Build_Branch'], ["Qt5", "boost", "usvfs_32",
"modorganizer-uibase",
"modorganizer-archive",
@@ -129,26 +133,40 @@ for author, git_path, path, branch, dependencies, Build in [
project = Project(git_path)
if Build:
#prepare build version override step
patch_version_step = Patch.RegexReplace("src/version.rc",
"#define VER_FILEVERSION_STR.*\n",
"#define VER_FILEVERSION_STR \"{}\"\n"
.format(config['override_build_version']))
if config['Appveyor_Build']:
appveyor_cmake_step = cmake.CMakeJOM().arguments(cmake_param).install()
if git_path != "cmake_common":
appveyor_cmake_step.depend("cmake_common")
for dep in dependencies:
appveyor_cmake_step.depend(dep)
if os.getenv("APPVEYOR_PROJECT_NAME","") == git_path:
project.depend(
appveyor_cmake_step.depend(
appveyor.SetProjectFolder(os.getenv("APPVEYOR_BUILD_FOLDER", ""))
)
)
source_retrieval_step = appveyor.SetProjectFolder(os.getenv("APPVEYOR_BUILD_FOLDER", ""))
else:
project.depend(
appveyor_cmake_step.depend(
github.Source(author, git_path, branch, super_repository=tl_repo).set_destination(path)
)
)
source_retrieval_step = github.Source(author, git_path, branch, feature_branch=config['Feature_Branch'], super_repository=tl_repo).set_destination(path)
if git_path == "modorganizer" and config['override_build_version']:
#add patching step that depends on source retrieval
patch_version_step.depend(source_retrieval_step)
appveyor_cmake_step.depend(patch_version_step)
else:
appveyor_cmake_step.depend(source_retrieval_step)
project.depend(appveyor_cmake_step)
else:
vs_cmake_step = cmake.CMakeVS().arguments(cmake_param).install()
if git_path != "cmake_common":
vs_cmake_step.depend("cmake_common")
for dep in dependencies:
vs_cmake_step.depend(dep)
@@ -157,15 +175,18 @@ for author, git_path, path, branch, dependencies, Build in [
"{}".format("x64" if config['architecture'] == 'x86_64' else "x86"),
config['build_type'])
project.depend(
vs_msbuild_step.depend(
vs_cmake_step.depend(
github.Source(author, git_path, branch, super_repository=tl_repo).set_destination(path)
)
)
)
source_retrieval_step = github.Source(author, git_path, branch, feature_branch=config['Feature_Branch'], super_repository=tl_repo).set_destination(path)
if git_path == "modorganizer" and config['override_build_version']:
#add patching step that depends on source retrieval
patch_version_step.depend(source_retrieval_step)
vs_cmake_step.depend(patch_version_step)
else:
vs_cmake_step.depend(source_retrieval_step)
project.depend(vs_msbuild_step.depend(vs_cmake_step))
else:
project.depend(github.Source(author, git_path, branch, super_repository=tl_repo)
project.depend(github.Source(author, git_path, branch, feature_branch=config['Feature_Branch'], super_repository=tl_repo)
.set_destination(path))
@@ -222,16 +243,16 @@ def copy_licenses(context):
sip_path = os.path.join(build_path, "sip-{}.dev{}".format(config['sip_version'], config['sip_dev_version']))
else:
sip_path = os.path.join(build_path, "sip-{}".format(config['sip_version']))
shutil.copy(os.path.join(sip_path, "LICENSE"), os.path.join(license_path, "sip.txt"))
shutil.copy(os.path.join(sip_path, "LICENSE-GPL2"), os.path.join(license_path, "GPL-v2.0.txt"))
if config['Appveyor_Build']:
shutil.copy(os.path.join(build_path, "python-{}{}".format(config['python_version'], config['python_version_minor']),"Licenses","Sip", "LICENSE"), os.path.join(license_path, "sip.txt"))
shutil.copy(os.path.join(build_path, "python-{}{}".format(config['python_version'], config['python_version_minor']),"Licenses","Sip", "LICENSE-GPL2"), os.path.join(license_path, "GPL-v2.0.txt"))
shutil.copy(os.path.join(build_path, "modorganizer_super", "lootcli", "build", "src", "external", "src", "cpptoml", "LICENSE"), os.path.join(license_path, "cpptoml.txt"))
shutil.copy(os.path.join(build_path, "python-{}{}".format(config['python_version'], config['python_version_minor']),"Licenses","Python","LICENSE"), os.path.join(license_path, "python.txt"))
else:
shutil.copy(os.path.join(sip_path, "LICENSE"), os.path.join(license_path, "sip.txt"))
shutil.copy(os.path.join(sip_path, "LICENSE-GPL2"), os.path.join(license_path, "GPL-v2.0.txt"))
shutil.copy(os.path.join(build_path, "modorganizer_super", "lootcli", "vsbuild", "src", "external", "src", "cpptoml", "LICENSE"), os.path.join(license_path, "cpptoml.txt"))
shutil.copy(os.path.join(build_path, "python-{}{}".format(config['python_version'], config['python_version_minor']),"LICENSE"), os.path.join(license_path, "python.txt"))
shutil.copy(os.path.join(build_path, "openssl-{}".format(config['openssl_version']), "LICENSE"), os.path.join(license_path, "openssl.txt"))
shutil.copy(os.path.join(build_path, "modorganizer_super", "lootcli", "vsbuild", "src", "external", "src", "cpptoml", "LICENSE"), os.path.join(license_path, "cpptoml.txt"))
shutil.copy(os.path.join(build_path, "boost_{}".format(boost_tag_version.replace(".", "_")), "LICENSE_1_0.txt"), os.path.join(license_path, "boost.txt"))
shutil.copy(os.path.join(build_path, "7zip-{}".format(config['7zip_version']), "DOC", "License.txt"), os.path.join(license_path, "7zip.txt"))
shutil.copy(os.path.join(build_path, "7zip-{}".format(config['7zip_version']), "DOC", "copying.txt"), os.path.join(license_path, "GNU-LGPL-v2.1.txt"))
@@ -247,28 +268,29 @@ Project("licenses") \
.depend(urldownload.URLDownload("https://www.gnu.org/licenses/gpl-3.0.txt", 0))
.depend(urldownload.URLDownload("https://raw.githubusercontent.com/Microsoft/DirectXTex/master/LICENSE", 0).set_download_filename("DXTex.txt"))
.depend(urldownload.URLDownload("https://creativecommons.org/licenses/by-sa/3.0/legalcode.txt", 0).set_download_filename("BY-SA-v3.0.txt"))
.depend("sip")
.depend("modorganizer"))
def copy_explorerpp(context):
target_path = os.path.join(config["paths"]["install"], "bin", "explorer++")
build_path = os.path.join(config["paths"]["build"], "explorer++")
shutil.copytree(build_path, target_path)
target_path = Path(config["paths"]["install"]) / "bin" / "explorer++"
build_path = Path(config["paths"]["build"]) / "explorer++"
shutil.copytree(build_path, target_path, dirs_exist_ok = True)
return True
Project("explorerpp") \
.depend(build.Execute(copy_explorerpp)
.depend(urldownload.URLDownload("https://explorerplusplus.com/software/explorer++_{}_x64.zip".format(config["explorer++_version"]), 0)
.set_destination("explorer++")))
.depend(urldownload.URLDownload("https://explorerplusplus.com/software/explorer++_{}_x64.zip".format(config["explorer++_version"]), 0)
.set_destination("explorer++")))
if config['Installer']:
build_installer = build.Run(r'"{}" {}'.format(config["paths"]["InnoSetup"],"dist/MO2-Installer.iss"),
name="Build MO2 Installer")
build_installer = build.Run(r'"{}" {}'.format(config["paths"]["InnoSetup"],"dist/MO2-Installer.iss"),
name="Build MO2 Installer")
installer = Project("Installer") \
.depend(build_installer
.depend(github.Source(config['Main_Author'], "modorganizer-Installer", "Develop", super_repository=tl_repo)
.set_destination("Installer")) \
.depend("modorganizer").depend("usvfs").depend("usvfs_32").depend("translationsBuild").depend("modorganizer-fnistool"))
.depend(github.Source(config['Main_Author'], "modorganizer-Installer", config['Build_Branch'], feature_branch=config['Feature_Branch'], super_repository=tl_repo)
.set_destination("installer"))
.depend("modorganizer").depend("usvfs").depend("usvfs_32").depend("translationsBuild").depend("modorganizer-fnistool"))
-49
View File
@@ -1,49 +0,0 @@
# Copyright (c) 2019 Riverbank Computing Limited <info@riverbankcomputing.com>
#
# This file is part of PyQt5.
#
# This file may be used under the terms of the GNU General Public License
# version 3.0 as published by the Free Software Foundation and appearing in
# the file LICENSE included in the packaging of this file. Please review the
# following information to ensure the GNU General Public License version 3.0
# requirements will be met: http://www.gnu.org/copyleft/gpl.html.
#
# If you do not wish to use this file under the terms of the GPL version 3.0
# then you may purchase a commercial license. For more information contact
# info@riverbankcomputing.com.
#
# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
# flake8: noqa
from ctypes import CDLL
def find_qt():
import os
try:
qt5 = CDLL("Qt5Core")
except OSError as e:
path = os.environ['PATH']
dll_dir = os.path.dirname(__file__) + '\\Qt\\bin'
if os.path.isfile(dll_dir + '\\Qt5Core.dll'):
path = dll_dir + ';' + path
os.environ['PATH'] = path
else:
for dll_dir in path.split(';'):
if os.path.isfile(dll_dir + '\\Qt5Core.dll'):
break
else:
raise ImportError("unable to find Qt5Core.dll on PATH")
try:
os.add_dll_directory(dll_dir)
except AttributeError:
pass
find_qt()
del find_qt
+36
View File
@@ -0,0 +1,36 @@
--- builder.py (date 1575938575861)
+++ builder.py (date 1575938575861)
@@ -402,17 +402,29 @@
'QMAKE_LFLAGS += -Wl,--version-script={}.exp'.format(
buildable.target))
- pro_lines.append(
+ if project.py_platform == 'win32':
+ for include_dir in project.py_include_dir.split(';'):
+ pro_lines.append(
+ 'INCLUDEPATH += {}'.format(
+ self.qmake_quote(include_dir)))
+ else:
+ pro_lines.append(
'INCLUDEPATH += {}'.format(
- self.qmake_quote(project.py_include_dir)))
+ self.qmake_quote(project.py_include_dir)))
+ if project.py_pylib_shlib != "":
+ pro_lines.append(
+ 'DEFINES += {}'.format(
+ self.qmake_quote("PYTHON_LIB=\"{}\"".format(
+ project.py_pylib_shlib))))
+
# Python.h on Windows seems to embed the need for pythonXY.lib, so tell
# it where it is.
# TODO: is this still necessary for Python v3.8?
if not buildable.static:
pro_lines.extend(['win32 {',
- ' LIBS += -L{}'.format(
- self.qmake_quote(project.py_pylib_dir)),
+ ' LIBS += -L{}{}'.format(
+ self.qmake_quote(project.py_pylib_dir), '' if project.py_pylib_lib == '' else ' -l' + project.py_pylib_lib),
'}'])
# Add any installables from the buildable
-55
View File
@@ -1,55 +0,0 @@
Index: configure.py
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- configure.py (date 1562041436573)
+++ configure.py (date 1562041436573)
@@ -1552,26 +1552,32 @@
if target_config.py_platform == 'win32':
inf.write("""
+from ctypes import CDLL
+
+
def find_qt():
import os
- path = os.environ['PATH']
+ try:
+ qt5 = CDLL("Qt5Core")
+ except OSError as e:
+ path = os.environ['PATH']
- dll_dir = os.path.dirname(__file__) + '\\\\Qt\\\\bin'
- if os.path.isfile(dll_dir + '\\\\Qt5Core.dll'):
- path = dll_dir + ';' + path
- os.environ['PATH'] = path
- else:
- for dll_dir in path.split(';'):
- if os.path.isfile(dll_dir + '\\\\Qt5Core.dll'):
- break
- else:
- raise ImportError("unable to find Qt5Core.dll on PATH")
+ dll_dir = os.path.dirname(__file__) + '\\Qt\\bin'
+ if os.path.isfile(dll_dir + '\\Qt5Core.dll'):
+ path = dll_dir + ';' + path
+ os.environ['PATH'] = path
+ else:
+ for dll_dir in path.split(';'):
+ if os.path.isfile(dll_dir + '\\Qt5Core.dll'):
+ break
+ else:
+ raise ImportError("unable to find Qt5Core.dll on PATH")
- try:
- os.add_dll_directory(dll_dir)
- except AttributeError:
- pass
+ try:
+ os.add_dll_directory(dll_dir)
+ except AttributeError:
+ pass
find_qt()
+10
View File
@@ -0,0 +1,10 @@
--- PCbuild/openssl.props (revision 5c02a39a0b31a330e06b4d6f44835afb205dc7cc)
+++ PCbuild/openssl.props (date 1575994670797)
@@ -13,6 +13,7 @@
<_DLLSuffix>-1_1</_DLLSuffix>
<_DLLSuffix Condition="$(Platform) == 'ARM'">$(_DLLSuffix)-arm</_DLLSuffix>
<_DLLSuffix Condition="$(Platform) == 'ARM64'">$(_DLLSuffix)-arm64</_DLLSuffix>
+ <_DLLSuffix Condition="$(Platform) == 'x64'">$(_DLLSuffix)-x64</_DLLSuffix>
</PropertyGroup>
<ItemGroup>
<_SSLDLL Include="$(opensslOutDir)\libcrypto$(_DLLSuffix).dll" />
+22
View File
@@ -17,6 +17,7 @@
# along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
import os.path
import shutil
import re
from unibuild.task import Task
from unibuild.utility.lazy import Lazy
@@ -44,6 +45,27 @@ class Replace(Task):
f.write(data)
return True
class RegexReplace(Task):
def __init__(self, filename, search, substitute):
super(RegexReplace, self).__init__()
self.__file = filename
self.__search = search
self.__substitute = substitute
@property
def name(self):
return "Replace in {}".format(self.__file)
def process(self, progress):
full_path = os.path.join(self._context["build_path"], self.__file)
with open(full_path, "r") as f:
data = f.read()
data = re.sub(self.__search, self.__substitute, data)
with open(full_path, "w") as f:
f.write(data)
return True
class Copy(Task):
def __init__(self, source, destination):
+16 -8
View File
@@ -223,11 +223,12 @@ class Execute(Builder):
class Run(Builder):
def __init__(self, command, fail_behaviour=Task.FailBehaviour.FAIL, environment=None, working_directory=None,
name=None):
name=None, retries=0):
super(Run, self).__init__()
self.__command = Lazy(command)
self.__name = name
self.__fail_behaviour = fail_behaviour
self.__retries = retries
self.__environment = Lazy(environment)
self.__working_directory = Lazy(working_directory)
@@ -242,6 +243,8 @@ class Run(Builder):
logging.error("source path not known for {},"
" are you missing a matching retrieval script?".format(self.name))
tries = 0
return_code = -1
soutpath = os.path.join(self._context["build_path"], "stdout.log")
serrpath = os.path.join(self._context["build_path"], "stderr.log")
with open(soutpath, "w") as sout:
@@ -254,13 +257,18 @@ class Run(Builder):
else self._context["build_path"])
sout.write("running {} in {}".format(self.__command(), cwd))
proc = Popen(self.__command(),
env=environment,
cwd=cwd,
shell=True,
stdout=sout, stderr=serr)
proc.communicate()
if proc.returncode != 0:
while tries <= self.__retries and return_code != 0:
tries += 1
proc = Popen(self.__command(),
env=environment,
cwd=cwd,
shell=True,
stdout=sout, stderr=serr)
proc.communicate()
return_code = proc.returncode
if return_code != 0:
logging.error("failed to run %s (returncode %s), see %s and %s",
self.__command(), proc.returncode, soutpath, serrpath)
return False
+11 -2
View File
@@ -80,15 +80,24 @@ class SuperRepository(Task):
class Clone(Repository):
def __init__(self, url, branch, super_repository=None, update=True, commit=None, shallowclone=False):
def __init__(self, url, branch, feature_branch=None, super_repository=None, update=True, commit=None, shallowclone=False):
if config['shallowclone']:
self.shallowclone = True
super(Clone, self).__init__(url, branch)
super(Clone, self).__init__(url, branch, feature_branch)
self.__super_repository = super_repository
self.__base_name = os.path.basename(self._url)
self.__update = update
self.__commit = commit
self.__shallowclone = shallowclone
if self._feature_branch is not None:
proc = Popen([config['paths']['git'], "ls-remote", "--heads", "--exit-code", self._url, self._feature_branch],
env=config["__environment"])
if proc is not None:
proc.communicate()
if proc.returncode != 2:
self._branch = self._feature_branch
if self.__super_repository is not None:
self._output_file_path = os.path.join(self.__super_repository.path, self.__determine_name())
self.depend(super_repository)
+2 -2
View File
@@ -43,10 +43,10 @@ class Tag(URLDownload):
class Source(Clone):
def __init__(self, author, project, branch="master", super_repository=None, update=True, commit=None, shallowclone=False):
def __init__(self, author, project, branch="master", feature_branch=None, super_repository=None, update=True, commit=None, shallowclone=False):
if config['shallowclone']:
self.shallowclone = True
super(Source, self).__init__("https://github.com/{author}/{project}.git".format(author=author, project=project),
branch, super_repository, update, commit, shallowclone)
branch, feature_branch, super_repository, update, commit, shallowclone)
self.set_destination(project)
+145
View File
@@ -0,0 +1,145 @@
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
# Copyright (C) 2016 - 2019 Mod Organizer contributors.
#
# This file is part of Mod Organizer.
#
# Mod Organizer is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# Mod Organizer is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
import logging
import os
import shutil
import subprocess
import tarfile
from config import config
from unibuild.retrieval import Retrieval
from unibuild.utility import ProgressFile
from unibuild.utility.context_objects import on_failure
logging.getLogger("requests").setLevel(logging.WARNING)
class PIPDownload(Retrieval):
def __init__(self, package, version, tree_depth=0, name=None, clean=True):
super(PIPDownload, self).__init__()
self.__package = package
self.__version = version
self.__tree_depth = tree_depth
self.__clean = clean
self.__file_path = os.path.join(config['paths']['download'], "{}-{}.tar.gz".format(package, version))
self.__name = "{}-{}".format(package, version) if name is None else name
@property
def name(self):
if self.__name is None:
return "download {0}".format(self.__file_name)
return "download {0}".format(self.__name)
@name.setter
def name(self, value):
self.__name = value
@property
def package(self):
return self.__package
@package.setter
def package(self, value):
self.__package = value
@property
def version(self):
return self.__version
@version.setter
def version(self, value):
self.__version = value
def prepare(self):
if 'build_path' not in self._context:
output_file_path = os.path.join(config['paths']['build'], "{}-{}".format(self.__package, self.__version))
self._context['build_path'] = output_file_path
def process(self, progress):
logging.info("processing download")
output_file_path = self._context['build_path']
#archive_file_path = os.path.join(config['paths']['download'], self.__file_name)
if os.path.isfile(output_file_path):
logging.info("File already extracted: %s", self.__file_path)
else:
if os.path.isfile(self.__file_path):
logging.info("File already downloaded: %s", self.__file_path)
else:
logging.info("File not yet downloaded: %s", self.__file_path)
self.download(output_file_path, progress)
progress.finish()
if not self.extract(self.__file_path, output_file_path, progress):
return False
progress.finish()
builddir = os.listdir(self._context["build_path"])
if len(builddir) == 1:
self._context["build_path"] = os.path.join(self._context["build_path"], builddir[0])
return True
def download(self, output_file_path, progress):
logging.info("Downloading {}-{} to {}".format(self.__package, self.__version, output_file_path))
#progress.job = "Downloading"
subprocess.check_call(["python", "-m", "pip", "download", "--no-binary=:all:", "--no-deps", "-d", "{}".format(config['paths']['download']), "{}=={}".format(self.__package, self.__version)])
def extract(self, archive_file_path, output_file_path, progress):
def progress_func(pos, size):
progress.value = int(pos * 100 / size)
try:
os.makedirs(output_file_path)
except Exception:
# it does matter if the directory already exists otherwise downloads with tree_depth will fail if the are
# extracted a second time on a dirty build environment
sub_dirs = os.listdir(output_file_path)
if not len(sub_dirs) == 0 and self.__clean:
logging.info("Cleaning {}".format(output_file_path))
for ls in sub_dirs:
try:
shutil.rmtree(os.path.join(output_file_path, ls))
except Exception:
os.remove(os.path.join(output_file_path, ls))
logging.info("Extracting {}".format(self.__file_path))
output_file_path = "\\\\?\\" + os.path.abspath(output_file_path)
def extractProgress():
progress.value = 0
progress.job = "Extracting"
with on_failure(lambda: shutil.rmtree(output_file_path)):
extractProgress()
archive_file = ProgressFile(archive_file_path, progress_func)
with tarfile.open(fileobj=archive_file, mode='r:gz') as arch:
arch.extractall(output_file_path)
archive_file.close()
for i in range(self.__tree_depth):
sub_dirs = os.listdir(output_file_path)
if len(sub_dirs) != 1:
raise ValueError("unexpected archive structure,"
" expected exactly one directory in {}".format(output_file_path))
source_dir = os.path.join(output_file_path, sub_dirs[0])
for src in os.listdir(source_dir):
shutil.move(os.path.join(source_dir, src), output_file_path)
shutil.rmtree(source_dir)
return True
+2 -1
View File
@@ -22,10 +22,11 @@ from unibuild.retrieval import Retrieval
class Repository(Retrieval):
def __init__(self, url, branch):
def __init__(self, url, branch, feature_branch=None):
super(Repository, self).__init__()
self._url = url
self._branch = branch
self._feature_branch = feature_branch
self._dir_name = os.path.basename(self._url)
self._output_file_path = os.path.join(config["paths"]["build"], self._dir_name)
+15 -5
View File
@@ -19,6 +19,7 @@ import logging
import os
import io
import shutil
import stat
import subprocess
import sys
import tarfile
@@ -164,7 +165,10 @@ class URLDownload(Retrieval):
logging.info("Cleaning {}".format(output_file_path))
for ls in sub_dirs:
try:
shutil.rmtree(os.path.join(output_file_path, ls))
def ensureWritable(function, path, exc_info):
os.chmod(path, stat.S_IWRITE)
function(path)
shutil.rmtree(os.path.join(output_file_path, ls), onerror = ensureWritable)
except Exception:
os.remove(os.path.join(output_file_path, ls))
@@ -180,9 +184,15 @@ class URLDownload(Retrieval):
if extension == ".gz" or extension == ".tgz":
extractProgress()
archive_file = ProgressFile(archive_file_path, progress_func)
with tarfile.open(fileobj=archive_file, mode='r:gz') as arch:
arch.extractall(output_file_path)
archive_file.close()
try:
with tarfile.open(fileobj=archive_file, mode='r:gz') as arch:
arch.extractall(output_file_path)
archive_file.close()
except tarfile.ReadError:
logging.info("Extracting {} failed due to a Read Error".format(self.__file_path))
archive_file.close()
os.remove(archive_file_path)
return False
elif extension == ".bz2":
extractProgress()
archive_file = ProgressFile(archive_file_path, progress_func)
@@ -202,7 +212,7 @@ class URLDownload(Retrieval):
elif extension in [".exe", ".msi"]:
# installers need to be handled by the caller
return True
elif extension in [".md", ".txt", ""]:
elif extension in [".md", ".txt", ".pdb", ".lib", ".dll", ""]:
# we don't need todo anything
return True
else:
+1 -1
View File
@@ -22,5 +22,5 @@ from unibuild.modules import cmake, github, build
Project("GTest") \
.depend(cmake.CMake().arguments(["-DCMAKE_BUILD_TYPE={0}".format(config["build_type"])])
.depend(github.Source("google", "googletest", "master")))
.depend(github.Source("google", "googletest", "master", commit="07d4a6e93de43ab47f5a5a3994009f53360e06c8")))
#.depend(github.Source("google", "googletest", "release-{}".format(googletest_version))))
+1 -1
View File
@@ -52,7 +52,7 @@ def icu_environment():
# Warning, build_run only works for me if cygwin is first after VS in the path (as requested in readme)
# So I change my path before calling unimake.py
build_icu = build.Run("make && make install".format(os.path.join(config['paths']['build'], "cygwin", "bin")),
build_icu = build.Run("make && make install",
name="ICU Make",
environment=icu_environment(),
working_directory=lambda: os.path.join(config["paths"]["build"], "icu", "source"))
+1 -1
View File
@@ -46,7 +46,7 @@ def deploy_dll(context):
Project("libbsarch").depend(
build.Execute(deploy_dll).depend(
github.Release(
"deorder",
"ModOrganizer2",
"libbsarch",
version=libbsarch_version,
filename="libbsarch-{}-release-{}".format(libbsarch_version, bitness()),
-1
View File
@@ -100,7 +100,6 @@ else:
os.path.join(lz_path, "visual", "VS2017", 'lz4.sln'),
project="liblz4-dll",
working_directory=lazy.Evaluate(lambda: os.path.join(lz_path)),
project_platform=bitness(),
reltarget="Release"
).depend(
build.Run(
+1 -1
View File
@@ -31,5 +31,5 @@ Project("nasm").depend(urldownloadany.URLDownloadAny((
urldownload.URLDownload("http://www.nasm.us/pub/nasm/releasebuilds/{}/win{}/nasm-{}-win{}.zip"
.format(nasm_version, bitness(), nasm_version, bitness()), tree_depth=1),
urldownload.URLDownload("https://fossies.org/windows/misc/nasm-{}-win{}.zip"
.format(nasm_version, bitness(), nasm_version, bitness()), tree_depth=1))))
.format(nasm_version, bitness()), tree_depth=1))))

Some files were not shown because too many files have changed in this diff Show More