mirror of
https://github.com/ModOrganizer2/modorganizer-umbrella.git
synced 2026-07-27 13:58:32 -07:00
Compare commits
216
Commits
1.2
...
new-versions
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1ae0db7992 | ||
|
|
e35c105416 | ||
|
|
0a53f9c433 | ||
|
|
dc283726b9 | ||
|
|
9246dc0301 | ||
|
|
0573b66702 | ||
|
|
5edc593bd1 | ||
|
|
69e5ac8b94 | ||
|
|
aa62fc344c | ||
|
|
1c270d6ffc | ||
|
|
5dbf6af2f8 | ||
|
|
c7ab0511a2 | ||
|
|
de26d16555 | ||
|
|
a3b278b70b | ||
|
|
e1efc257fa | ||
|
|
4d89e7850e | ||
|
|
92a6039d84 | ||
|
|
447212fa5c | ||
|
|
d3c8a61727 | ||
|
|
727d8e4e57 | ||
|
|
66b85d4fe1 | ||
|
|
1150c9b512 | ||
|
|
cfabc94dea | ||
|
|
be1d50c3d3 | ||
|
|
6f90d5b334 | ||
|
|
dad4962a8a | ||
|
|
43b3aaf7b9 | ||
|
|
a42e00b2e8 | ||
|
|
10f477bcbc | ||
|
|
8df33103bf | ||
|
|
b8d4e78bb2 | ||
|
|
177f979d6b | ||
|
|
c488ed087f | ||
|
|
2c9c4afb66 | ||
|
|
6288b85688 | ||
|
|
dfe6ef8d93 | ||
|
|
8719a0dbf5 | ||
|
|
d5efb3de50 | ||
|
|
2b7a474494 | ||
|
|
7c3c68092c | ||
|
|
afa0c60a0d | ||
|
|
51f896498d | ||
|
|
aa02c4e938 | ||
|
|
12d93ba2f1 | ||
|
|
2fb4672863 | ||
|
|
fb93d0e170 | ||
|
|
9b59a2bac5 | ||
|
|
3dbfba0437 | ||
|
|
d38605c91d | ||
|
|
ea24f744aa | ||
|
|
b4c27b4421 | ||
|
|
ae9cf5b4fc | ||
|
|
043eb0e0a9 | ||
|
|
21343a082b | ||
|
|
823c98fa9a | ||
|
|
8dde4039f9 | ||
|
|
b17eacc525 | ||
|
|
b381c7191c | ||
|
|
41b834b89a | ||
|
|
72314a1fa2 | ||
|
|
9591f889ab | ||
|
|
f266c2000c | ||
|
|
612516d546 | ||
|
|
daf9456b0b | ||
|
|
98df2b5f46 | ||
|
|
d3d9f4fe88 | ||
|
|
0c8e49b275 | ||
|
|
58385b94c3 | ||
|
|
4a7e99a120 | ||
|
|
a67ffc3108 | ||
|
|
4fcab2d8ed | ||
|
|
02579f4179 | ||
|
|
dbc89f9c3a | ||
|
|
3779f01a24 | ||
|
|
6a50d52df3 | ||
|
|
2130313aa9 | ||
|
|
30da163f02 | ||
|
|
bf8be4b6f5 | ||
|
|
ddd749cd7d | ||
|
|
023740f0d4 | ||
|
|
14f7ff5752 | ||
|
|
4aece64e5a | ||
|
|
7211153b77 | ||
|
|
5e2dea6e40 | ||
|
|
bc4ddc771e | ||
|
|
39a01b62f1 | ||
|
|
b0677dbcb3 | ||
|
|
a134228ea8 | ||
|
|
8d63cb63d7 | ||
|
|
f60c0d1cd0 | ||
|
|
9a35555324 | ||
|
|
bc6d98abf2 | ||
|
|
aa1707d58f | ||
|
|
ad5bf6d802 | ||
|
|
87e60b474b | ||
|
|
e4a54b1bf6 | ||
|
|
014fe35728 | ||
|
|
346fadda11 | ||
|
|
619d53d62c | ||
|
|
8d4753913e | ||
|
|
0aaa7197c8 | ||
|
|
9752748a0b | ||
|
|
fb1b964a1d | ||
|
|
e5d34f6355 | ||
|
|
d52ad7f70c | ||
|
|
417dc28beb | ||
|
|
3b329da9f2 | ||
|
|
af8b68a223 | ||
|
|
f0e987f33d | ||
|
|
ba65c1eee7 | ||
|
|
20a090fe0e | ||
|
|
e9f2cef641 | ||
|
|
eaaa8cfce6 | ||
|
|
0d48b26c41 | ||
|
|
92901de614 | ||
|
|
fa727a82d8 | ||
|
|
d23ab7efdd | ||
|
|
270be1a652 | ||
|
|
88325e0b1a | ||
|
|
4dfe6261ab | ||
|
|
84c1ce48c6 | ||
|
|
0c0ea34931 | ||
|
|
9e6ac86aaa | ||
|
|
80fd6ff192 | ||
|
|
806952e828 | ||
|
|
894e1a798c | ||
|
|
cb511cf0ec | ||
|
|
2869a3253a | ||
|
|
c6dcc7b703 | ||
|
|
3effeb1203 | ||
|
|
882199b077 | ||
|
|
df7b11c38c | ||
|
|
1432f04b99 | ||
|
|
db07d4219b | ||
|
|
17fecf77c2 | ||
|
|
c80fea8b16 | ||
|
|
d0bee7bb98 | ||
|
|
5e724e8a8a | ||
|
|
d6c22b9dc4 | ||
|
|
a34c453a78 | ||
|
|
c2ffad707a | ||
|
|
1f1e1b20f9 | ||
|
|
5a6bc3e91b | ||
|
|
f4b48e02aa | ||
|
|
0a8c28b216 | ||
|
|
5a7b8972fe | ||
|
|
5e8e05ba8f | ||
|
|
bbc64f2817 | ||
|
|
eafa310a6d | ||
|
|
21e8891617 | ||
|
|
3eabe1d3f9 | ||
|
|
076ad2403f | ||
|
|
0e1eb57bcd | ||
|
|
4a2f36693e | ||
|
|
740eb5ee12 | ||
|
|
6965450496 | ||
|
|
023794a14c | ||
|
|
34fba3bcba | ||
|
|
113c5f82d9 | ||
|
|
bc11b71ae2 | ||
|
|
f5495a7125 | ||
|
|
44056169a6 | ||
|
|
d6b72b8a18 | ||
|
|
201cc57365 | ||
|
|
e82898ac9c | ||
|
|
e8547a76b3 | ||
|
|
0fd9365142 | ||
|
|
84c38d6d4a | ||
|
|
3cb50b0767 | ||
|
|
58d116a327 | ||
|
|
18c81a63cc | ||
|
|
18412990d0 | ||
|
|
0d18b9f395 | ||
|
|
32a3cf1b22 | ||
|
|
f3f001ff24 | ||
|
|
a32159a3f0 | ||
|
|
a374e68d3d | ||
|
|
0608e1c829 | ||
|
|
bd31722c7d | ||
|
|
a753950cbb | ||
|
|
07a208ebb1 | ||
|
|
83186d8219 | ||
|
|
ca78973f2a | ||
|
|
6c8709c0dd | ||
|
|
21124d0bc7 | ||
|
|
5843df1f11 | ||
|
|
569bfa9e62 | ||
|
|
3062d177ab | ||
|
|
9ad48ae53f | ||
|
|
559961c65a | ||
|
|
d8bfd1b9ee | ||
|
|
1ffc73ebd2 | ||
|
|
160ede3dc9 | ||
|
|
2c43536a28 | ||
|
|
86f5bd3060 | ||
|
|
32879159ca | ||
|
|
0120ed2eb0 | ||
|
|
fa842ed2f1 | ||
|
|
cbe9c8a4be | ||
|
|
4956a4fa37 | ||
|
|
c71ada86b3 | ||
|
|
c73fb89585 | ||
|
|
20aa1436e0 | ||
|
|
a5426ae46d | ||
|
|
d1f3f5046f | ||
|
|
92b93c9696 | ||
|
|
321436d896 | ||
|
|
bbe2a66b16 | ||
|
|
92b33e224f | ||
|
|
227cdd01ef | ||
|
|
659bfdfc40 | ||
|
|
dd6c0c27f4 | ||
|
|
31df9b0324 | ||
|
|
a638754eab | ||
|
|
7a40dd871d | ||
|
|
663e3c1350 |
@@ -31,3 +31,6 @@ graph.png
|
||||
Thumbs.db
|
||||
graph.dot
|
||||
graph.pdf
|
||||
/eggs/requests
|
||||
/eggs/colorama
|
||||
/eggs/tqdm
|
||||
|
||||
@@ -15,39 +15,59 @@ First you need to clone the umbrella repository. We recommend that you clone it
|
||||
Open there a console and copy in: ``git clone https://github.com/Modorganizer2/modorganizer-umbrella``
|
||||
|
||||
### Software Requirements
|
||||
|
||||
Now you need to install all required software to build Mod Organizer.
|
||||
* If you want to install everything by hand you need all this stuff:
|
||||
* 7zip (Latest 64Bit) Link: http://www.7-zip.org/a/7z1700-x64.exe
|
||||
* Inno (Only required to build Installer) Setup Link: http://www.jrsoftware.org/download.php/is.exe
|
||||
* CMake (latest 64bit) Link: https://cmake.org/files/v3.10/cmake-3.10.2-win64-x64.msi
|
||||
* Git Link: https://github.com/git-for-windows/git/releases/download/v2.16.2.windows.1/Git-2.16.2-64-bit.exe
|
||||
* ~~Python 2.7.14 (64Bit) Link: https://www.python.org/ftp/python/2.7.14/python-2.7.14.msi~~ *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.*
|
||||
* Python 3.7.1 (64Bit) Link: https://www.python.org/downloads/windows/
|
||||
* Qt 5.12.0 http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe
|
||||
#### Qt Packages required:
|
||||
* msvc2017-64
|
||||
* qtwebengine
|
||||
|
||||
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.
|
||||
#### Manual Requirements
|
||||
* Qt 5.15.0: [Download Manager](http://download.qt.io/official_releases/online_installers/qt-unified-windows-x86-online.exe)
|
||||
#### Qt Packages required:
|
||||
* msvc2019-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: [Download Link](https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16)
|
||||
#### Visual Studio Packages required:
|
||||
* .NET desktop development
|
||||
* Desktop development for C++
|
||||
|
||||
Additionally you need to activate under Individual components:
|
||||
* "Windows Universal C Runtime" (Under SDKs, libraries, and frameworks)
|
||||
* "Windows 10 SDK (10.0.19041.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
|
||||
* *v141 build tools may no longer be needed*
|
||||
* 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.19041.0 SDK.
|
||||
* .NET Framework 3.5: [Download Link](https://www.microsoft.com/en-us/download/details.aspx?id=21)
|
||||
* *This is a dependency of the NCC install tool, which may be deprecated soon*
|
||||
|
||||
* Strawberry Perl Link: http://strawberryperl.com/download/5.26.1.1/strawberry-perl-5.26.1.1-64bit.msi
|
||||
* Visual Studio Community 2017 Link: https://www.visualstudio.com/thank-you-downloading-visual-studio/?sku=Community&rel=15
|
||||
#### Visual Studio Packages required:
|
||||
* .NET desktop development
|
||||
* Desktop development for C++
|
||||
#### Additional Requirements
|
||||
##### Manual Install
|
||||
* 7zip (Latest 64Bit): [Download Link](https://www.7-zip.org/a/7z1900-x64.exe)
|
||||
* Inno 5 or 6 (Only required to build Installer): [Download Link](https://www.jrsoftware.org/download.php/is.exe)
|
||||
* CMake (latest 64bit): [Download Link](https://github.com/Kitware/CMake/releases/download/v3.18.3/cmake-3.18.3-win64-x64.msi)
|
||||
* Git: [Download Link](https://github.com/git-for-windows/git/releases/download/v2.28.0.windows.1/Git-2.28.0-64-bit.exe)
|
||||
* Python 3 (64Bit): [Download Link](https://www.python.org/ftp/python/3.8.6/python-3.8.6-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: [Download Link](http://strawberryperl.com/download/5.32.0.1/strawberry-perl-5.32.0.1-64bit.msi)
|
||||
##### Chocolatey
|
||||
Optionally, you can use [Chocolatey](https://chocolatey.org/install) to install these dependencies. The packages are:
|
||||
* 7zip
|
||||
* cmake
|
||||
* git
|
||||
* InnoSetup
|
||||
* python
|
||||
* strawberyperl
|
||||
|
||||
Additionally you need to activate under Individual components:
|
||||
* "Windows Universal CRT SDK" (Under Compilers, build tools, and runtimes)
|
||||
* "Windows 8.1 SDK" (Under SDKs, libraries, and frameworks)
|
||||
* "Windows 10 SDK (10.0.16299.0) for Desktop C++ [x86 and x64]" (Under SDKs, libraries, and frameworks
|
||||
* 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.16299.0 SDK.
|
||||
|
||||
#### Build
|
||||
Now we can finally start the build process. Just run the following command in the modorganizer-umbrella folder: ``python.exe unimake.py``
|
||||
|
||||
If you wish to rebuild only one target once everything is complete, you simply delete the relevant txt file in the progress folder, e.g C:\modorganizer-umbrella\progress\modorganizer_complete_cmake modorganizer.txt
|
||||
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.
|
||||
@@ -103,4 +123,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
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
|
||||
# Copyright (C) 2016 - 2018 Mod Organizer contributors.
|
||||
# Copyright (C) 2016 - 2019 Mod Organizer contributors.
|
||||
#
|
||||
# This file is part of Mod Organizer.
|
||||
#
|
||||
@@ -15,6 +15,7 @@
|
||||
#
|
||||
# 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 multiprocessing
|
||||
import os
|
||||
|
||||
@@ -22,12 +23,13 @@ from unibuild.utility import config_utility
|
||||
from unibuild.utility.lazy import Lazy
|
||||
|
||||
|
||||
def path_or_default(filename, *default):
|
||||
def path_or_default(filename, default):
|
||||
from distutils.spawn import find_executable
|
||||
defaults = gen_search_folders(*default)
|
||||
for path in default:
|
||||
defaults = gen_search_folders(*path)
|
||||
res = find_executable(filename, os.environ['PATH'] + ";" + ";".join(defaults))
|
||||
if res is None:
|
||||
print('Cannot find', filename, 'on your path or in', os.path.join('', *default))
|
||||
print('Cannot find', filename, 'on your path or in', os.path.join('', *default[0]))
|
||||
return res
|
||||
|
||||
|
||||
@@ -37,26 +39,16 @@ def gen_search_folders(*subpath):
|
||||
for search_folder in config_utility.program_files_folders
|
||||
]
|
||||
|
||||
def check_prerequisites_config():
|
||||
if not config['paths']['cmake']:
|
||||
return False
|
||||
if not config['paths']['git']:
|
||||
return False
|
||||
if not config['paths']['perl']:
|
||||
return False
|
||||
if config["Installer"]:
|
||||
if not config['paths']['InnoSetup']:
|
||||
return False
|
||||
if not config['paths']['7z']:
|
||||
return False
|
||||
return True
|
||||
|
||||
|
||||
config = {
|
||||
|
||||
'Appveyor_Build': False, #Should only be used for the AppVeyor build as it will use as many prebuilt binaries as possible
|
||||
'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,7 +62,8 @@ config = {
|
||||
'prefer_binary_dependencies': True, # Try to use official binary package/SDKs. Won't work for all stuff
|
||||
# works for: 7z, CMake, Git, Perl, Python, Visual Studio
|
||||
'binary_qt': True, # use binary Qt5 from the offical website
|
||||
'binary_boost': True, # Custom prebuilt boost compiled by MO2 team and uploaded to https://github.com/Modorganizer2/3rdParty_Dependencies
|
||||
'binary_boost': True, # Custom prebuilt boost compiled by MO2 team and uploaded to https://github.com/ModOrganizer2/3rdParty_Dependencies
|
||||
'binary_lz4': True, # Custom prebuilt lz4 to get around issues with latest releases uploaded to https://github.com/ModOrganizer2/3rdParty_Dependencies
|
||||
'shallowclone': True, # reduces size of repos drastically
|
||||
'repo_update_frequency': 60 * 60 * 12, # in seconds
|
||||
'num_jobs': multiprocessing.cpu_count() + 1,
|
||||
@@ -80,44 +73,63 @@ config = {
|
||||
# folders: <project>\<task>_complete.txt
|
||||
|
||||
'Main_Author': 'ModOrganizer2', # the current maintainer
|
||||
'Main_Branch': "Develop",
|
||||
'Dev_Branch': "master",
|
||||
'Release_Branch': "2_3_0",
|
||||
'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.69.0',
|
||||
'boost_version': '1.74.0',
|
||||
'boost_version_tag': '',
|
||||
'fmt_version': '7.0.3',
|
||||
'googletest_version': '1.8.0', # unused. We use the latest source
|
||||
'grep_version': '2.5.4',
|
||||
'icu_version': '63',
|
||||
'grep_version': '3.3',
|
||||
'icu_version': '67',
|
||||
'icu_version_minor': '1',
|
||||
'loot_version': '0.14.5',
|
||||
'loot_commit': 'g68ecc02',
|
||||
'lz4_version': '1.8.3',
|
||||
'loot_version': '0.16.1',
|
||||
'loot_commit': 'gd8c9b98',
|
||||
'loot_branch': '0.16.1',
|
||||
'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.65.11',
|
||||
'openssl_version': '1.0.2r',
|
||||
'pyqt_version': '5.12',
|
||||
'nasm_version': '2.15.05',
|
||||
'nuget_version': '5.7.0',
|
||||
'nmm_version': '0.71.2',
|
||||
'openssl_version': '1.1.1h',
|
||||
'pyqt_version': '5.15.1',
|
||||
'pyqt_pypi_hash': '1d/31/896dc3dfb6c81c70164019a6cbba6ab037e3af7653d9ca60ccc874ee4c27',
|
||||
'pyqt_dev_version': '', # leave empty for a standard release
|
||||
'python_version': '3.7',
|
||||
'python_version_minor': '.1',
|
||||
'sip_version': '4.19.14',
|
||||
'pyqt_builder_version': '1.5.0',
|
||||
'pyqt_sip_version': '12.8.1',
|
||||
'python_version': '3.8',
|
||||
'python_version_minor': '.6',
|
||||
'bzip2_version': '1.0.6', # For python
|
||||
'sip_version': '5.4.0',
|
||||
'sip_dev_version': '', # leave empty for a standard release
|
||||
'qt_version': '5.12',
|
||||
'qt_version_minor': '1',
|
||||
'vc_platformtoolset': 'v141',
|
||||
'vc_TargetPlatformVersion': '10.0.17763.0',
|
||||
'vc_version': '15.0',
|
||||
'vc_version_for_boost': '14.1',
|
||||
'spdlog_version': 'v1.8.0',
|
||||
'qt_version': '5.15',
|
||||
'qt_version_minor': '0',
|
||||
'qt_version_appveyor': '5.15',
|
||||
'qt_version_minor_appveyor': '0',
|
||||
'qt_vc_version': '16.0',
|
||||
'vc_platformtoolset': 'v142',
|
||||
'vc_TargetPlatformVersion': '10.0.19041.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.8',
|
||||
|
||||
#stylesheets
|
||||
'paper-light-and-dark_version': '6.0',
|
||||
'paper-automata_version': '2.2',
|
||||
'paper-mono_version': '2.1',
|
||||
'1809-dark-mode_version': '2.0',
|
||||
|
||||
#the usvfs version below will only be used if
|
||||
'usvfs_version': 'v0.4.2',
|
||||
|
||||
'usvfs_version': 'v0.4.8',
|
||||
|
||||
'optimize': True, # activate link-time code generation and other optimization. This massively increases build time but
|
||||
# produces smaller binaries and marginally faster code
|
||||
@@ -137,25 +149,23 @@ config = {
|
||||
#url used for all prebuilt downloads
|
||||
'prebuilt_url': "https://github.com/ModOrganizer2/modorganizer-umbrella/releases/download/1.1/"
|
||||
}
|
||||
|
||||
|
||||
config['paths'] = {
|
||||
'download': "{base_dir}\\downloads",
|
||||
'build': "{base_dir}\\{build_dir}",
|
||||
'progress': "{base_dir}\\{progress_dir}",
|
||||
'install': "{base_dir}\\{install_dir}",
|
||||
# 'graphviz': path_or_default("dot.exe", "Graphviz2.38", "bin"),
|
||||
'cmake': path_or_default("cmake.exe", "CMake", "bin"),
|
||||
'git': path_or_default("git.exe", "Git", "bin"),
|
||||
'perl': path_or_default("perl.exe", "StrawberryPerl", "perl", "bin"),
|
||||
'InnoSetup': path_or_default("ISCC.exe", "Inno Setup 5"),
|
||||
#'svn': path_or_default("svn.exe", "SlikSvn", "bin"),
|
||||
'7z': path_or_default("7z.exe", "7-Zip"),
|
||||
# 'graphviz': path_or_default("dot.exe", [["Graphviz2.38", "bin"]]),
|
||||
'cmake': path_or_default("cmake.exe", [["CMake", "bin"]]),
|
||||
'git': path_or_default("git.exe", [["Git", "bin"]]),
|
||||
'perl': path_or_default("perl.exe", [["StrawberryPerl", "perl", "bin"], ["Strawberry", "perl", "bin"]]),
|
||||
#'svn': path_or_default("svn.exe", [["SlikSvn", "bin"]]),
|
||||
'7z': path_or_default("7z.exe", [["7-Zip"]]),
|
||||
# we need a python that matches the build architecture
|
||||
'python': "", # Registry Key can be in multiple places. set in config_setup.py
|
||||
'jom': "",
|
||||
'visual_studio_base': "",
|
||||
'qt_binary_install': "",
|
||||
'visual_studio': "" # will be set in unimake.py after args are evaluated
|
||||
}
|
||||
|
||||
if not check_prerequisites_config():
|
||||
print('\nMissing prerequisites listed above - cannot continue')
|
||||
exit(1)
|
||||
|
||||
+6
-4
@@ -1,5 +1,5 @@
|
||||
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
|
||||
# Copyright (C) 2016 - 2018 Mod Organizer contributors.
|
||||
# Copyright (C) 2016 - 2019 Mod Organizer contributors.
|
||||
#
|
||||
# This file is part of Mod Organizer.
|
||||
#
|
||||
@@ -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)
|
||||
@@ -43,8 +45,8 @@ for dep in [
|
||||
download(dep, eggpath)
|
||||
sys.path.append(eggpath)
|
||||
|
||||
for dep in ["decorator", "lxml", "PyYAML", "six", "jinja2", "psutil", "patch", "networkx", "pydot", "pydotplus","colorama","tqdm"]:
|
||||
destpath = "{0}/{1}".format(path, dep)
|
||||
for dep in ["decorator", "lxml", "PyYAML", "six", "jinja2", "psutil", "patch", "networkx", "pydot", "pydotplus", "colorama", "tqdm", "requests"]:
|
||||
destpath = "{0}/{1}".format(path, dep.split("==")[0])
|
||||
if not os.path.exists(destpath):
|
||||
subprocess.check_call(["python", "-m", "pip", "install", "--target={0}".format(destpath), dep])
|
||||
sys.path.append(destpath)
|
||||
|
||||
+135
-74
@@ -1,5 +1,5 @@
|
||||
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
|
||||
# Copyright (C) 2016 - 2018 Mod Organizer contributors.
|
||||
# Copyright (C) 2016 - 2019 Mod Organizer contributors.
|
||||
#
|
||||
# This file is part of Mod Organizer.
|
||||
#
|
||||
@@ -17,12 +17,15 @@
|
||||
# along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
import os.path
|
||||
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, googletest, libloot, lz4, nasm, ncc, openssl, sevenzip, sip, usvfs, python, pyqt5, qt5, zlib, nuget
|
||||
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
|
||||
|
||||
@@ -41,76 +44,86 @@ def gen_userfile_content(project):
|
||||
|
||||
|
||||
for author, git_path, path, branch, dependencies, Build in [
|
||||
(config['Main_Author'], "modorganizer-game_features", "game_features", config['Main_Branch'], [], False),
|
||||
(config['Main_Author'], "modorganizer-archive", "archive", config['Main_Branch'], ["7zip", "Qt5", "boost"], True),
|
||||
(config['Main_Author'], "modorganizer-uibase", "uibase", config['Main_Branch'], ["Qt5", "boost"], True),
|
||||
(config['Main_Author'], "modorganizer-lootcli", "lootcli", config['Main_Branch'], ["libloot", "boost"], True),
|
||||
(config['Main_Author'], "modorganizer-esptk", "esptk", config['Main_Branch'], ["boost"], True),
|
||||
(config['Main_Author'], "modorganizer-bsatk", "bsatk", config['Main_Branch'], ["zlib", "boost", "lz4"], True),
|
||||
(config['Main_Author'], "modorganizer-nxmhandler", "nxmhandler", config['Main_Branch'], ["Qt5", "modorganizer-uibase"], True),
|
||||
(config['Main_Author'], "modorganizer-helper", "helper", config['Main_Branch'], ["Qt5","boost"], True),
|
||||
(config['Main_Author'], "modorganizer-game_gamebryo", "game_gamebryo", config['Main_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
(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", "modorganizer-uibase"], True),
|
||||
(config['Main_Author'], "modorganizer-game_gamebryo", "game_gamebryo", config['Build_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
"modorganizer-game_features",
|
||||
"lz4"], True),
|
||||
(config['Main_Author'], "modorganizer-game_oblivion", "game_oblivion", config['Main_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
(config['Main_Author'], "modorganizer-game_oblivion", "game_oblivion", config['Build_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
"modorganizer-game_gamebryo",
|
||||
"modorganizer-game_features"], True),
|
||||
(config['Main_Author'], "modorganizer-game_fallout3", "game_fallout3", config['Main_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
(config['Main_Author'], "modorganizer-game_fallout3", "game_fallout3", config['Build_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
"modorganizer-game_gamebryo",
|
||||
"modorganizer-game_features"], True),
|
||||
(config['Main_Author'], "modorganizer-game_fallout4", "game_fallout4", config['Main_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
(config['Main_Author'], "modorganizer-game_fallout4", "game_fallout4", config['Build_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
"modorganizer-game_gamebryo",
|
||||
"modorganizer-game_features"], True),
|
||||
(config['Main_Author'], "modorganizer-game_fallout4vr", "game_fallout4vr", config['Main_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
(config['Main_Author'], "modorganizer-game_fallout4vr", "game_fallout4vr", config['Build_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
"modorganizer-game_gamebryo",
|
||||
"modorganizer-game_features"], True),
|
||||
(config['Main_Author'], "modorganizer-game_falloutnv", "game_falloutnv", config['Main_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
(config['Main_Author'], "modorganizer-game_falloutnv", "game_falloutnv", config['Build_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
"modorganizer-game_gamebryo",
|
||||
"modorganizer-game_features"], True),
|
||||
(config['Main_Author'], "modorganizer-game_morrowind", "game_morrowind", config['Main_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
(config['Main_Author'], "modorganizer-game_morrowind", "game_morrowind", config['Build_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
"modorganizer-game_gamebryo",
|
||||
"modorganizer-game_features"], True),
|
||||
(config['Main_Author'], "modorganizer-game_skyrim", "game_skyrim", config['Main_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
(config['Main_Author'], "modorganizer-game_skyrim", "game_skyrim", config['Build_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
"modorganizer-game_gamebryo",
|
||||
"modorganizer-game_features"], True),
|
||||
(config['Main_Author'], "modorganizer-game_skyrimse", "game_skyrimse", config['Main_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
(config['Main_Author'], "modorganizer-game_skyrimse", "game_skyrimse", config['Build_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
"modorganizer-game_gamebryo",
|
||||
"modorganizer-game_features"], True),
|
||||
(config['Main_Author'], "modorganizer-game_skyrimvr", "game_skyrimvr", config['Main_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
(config['Main_Author'], "modorganizer-game_skyrimvr", "game_skyrimvr", config['Build_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
"modorganizer-game_gamebryo",
|
||||
"modorganizer-game_features"], True),
|
||||
(config['Main_Author'], "modorganizer-game_ttw", "game_ttw", config['Main_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
(config['Main_Author'], "modorganizer-game_ttw", "game_ttw", config['Build_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
"modorganizer-game_gamebryo",
|
||||
"modorganizer-game_features"], True),
|
||||
(config['Main_Author'], "modorganizer-game_enderal", "game_enderal", config['Main_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
(config['Main_Author'], "modorganizer-game_enderal", "game_enderal", config['Build_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
"modorganizer-game_gamebryo",
|
||||
"modorganizer-game_features"], True),
|
||||
(config['Main_Author'], "modorganizer-tool_inieditor", "tool_inieditor", config['Main_Branch'], ["Qt5", "modorganizer-uibase"], True),
|
||||
(config['Main_Author'], "modorganizer-tool_inibakery", "tool_inibakery", config['Main_Branch'], ["modorganizer-uibase"], True),
|
||||
(config['Main_Author'], "modorganizer-tool_configurator", "tool_configurator", config['Main_Branch'], ["PyQt5"], True),
|
||||
(config['Main_Author'], "modorganizer-fnistool", "fnistool", config['Main_Branch'], ["PyQt5"], True),
|
||||
(config['Main_Author'], "modorganizer-preview_base", "preview_base", config['Main_Branch'], ["Qt5", "modorganizer-uibase"], True),
|
||||
(config['Main_Author'], "modorganizer-diagnose_basic", "diagnose_basic", config['Main_Branch'], ["Qt5", "modorganizer-uibase"], True),
|
||||
(config['Main_Author'], "modorganizer-script_extender_plugin_checker", "script_extender_plugin_checker", config['Main_Branch'], ["PyQt5"], True),
|
||||
(config['Main_Author'], "modorganizer-check_fnis", "check_fnis", config['Main_Branch'], ["Qt5", "modorganizer-uibase"], True),
|
||||
(config['Main_Author'], "modorganizer-installer_bain", "installer_bain", config['Main_Branch'], ["Qt5", "modorganizer-uibase"], True),
|
||||
(config['Main_Author'], "modorganizer-installer_manual", "installer_manual", config['Main_Branch'], ["Qt5", "modorganizer-uibase"], True),
|
||||
(config['Main_Author'], "modorganizer-installer_bundle", "installer_bundle", config['Main_Branch'], ["Qt5", "modorganizer-uibase"], True),
|
||||
(config['Main_Author'], "modorganizer-installer_quick", "installer_quick", config['Main_Branch'], ["Qt5", "modorganizer-uibase"], True),
|
||||
(config['Main_Author'], "modorganizer-installer_fomod", "installer_fomod", config['Main_Branch'], ["Qt5", "modorganizer-uibase"], True),
|
||||
(config['Main_Author'], "modorganizer-installer_ncc", "installer_ncc", config['Main_Branch'], ["Qt5", "modorganizer-uibase", "ncc"], True),
|
||||
(config['Main_Author'], "modorganizer-bsa_extractor", "bsa_extractor", config['Main_Branch'], ["Qt5", "modorganizer-uibase"], True),
|
||||
(config['Main_Author'], "modorganizer-plugin_python", "plugin_python", config['Main_Branch'], ["Qt5", "boost", "Python",
|
||||
"modorganizer-uibase", "sip"], True),
|
||||
(config['Main_Author'], "githubpp", "githubpp", config['Main_Branch'], ["Qt5"], True),
|
||||
(config['Main_Author'], "modorganizer", "modorganizer", config['Main_Branch'], ["Qt5", "boost", "usvfs_32",
|
||||
(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-preview_base", "preview_base", config['Build_Branch'], ["Qt5", "modorganizer-uibase"], True),
|
||||
(config['Main_Author'], "modorganizer-diagnose_basic", "diagnose_basic", config['Build_Branch'], ["Qt5", "modorganizer-uibase"], 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_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", "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",
|
||||
"modorganizer-bsatk",
|
||||
"modorganizer-esptk",
|
||||
"modorganizer-game_features",
|
||||
"modorganizer-bsapacker",
|
||||
"modorganizer-lootcli",
|
||||
"usvfs", "githubpp",
|
||||
"ncc", "openssl"], True),]:
|
||||
"ncc", "openssl",
|
||||
"paper-light-and-dark", "paper-automata", "paper-mono", "1809-dark-mode"], True),
|
||||
]:
|
||||
cmake_param = cmake_parameters() + ["-DCMAKE_INSTALL_PREFIX:PATH={}".format(config["paths"]["install"])]
|
||||
# build_step = cmake.CMake().arguments(cmake_param).install()
|
||||
|
||||
@@ -120,37 +133,83 @@ 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']))
|
||||
|
||||
vs_cmake_step = cmake.CMakeVS().arguments(cmake_param).install()
|
||||
if config['Appveyor_Build']:
|
||||
appveyor_cmake_step = cmake.CMakeJOM().arguments(cmake_param).install()
|
||||
|
||||
for dep in dependencies:
|
||||
vs_cmake_step.depend(dep)
|
||||
if git_path != "cmake_common":
|
||||
appveyor_cmake_step.depend("cmake_common")
|
||||
|
||||
build_path = config["paths"]["build"]
|
||||
vs_target = "Clean;Build" if config['rebuild'] else "Build"
|
||||
vs_msbuild_step = msbuild.MSBuild(os.path.join("vsbuild", "INSTALL.vcxproj"), None, None,
|
||||
"{}".format("x64" if config['architecture'] == 'x86_64' else "x86"),
|
||||
"RelWithDebInfo")
|
||||
for dep in dependencies:
|
||||
appveyor_cmake_step.depend(dep)
|
||||
|
||||
if config['Appveyor_Build'] and os.getenv("APPVEYOR_PROJECT_NAME","") == git_path:
|
||||
project.depend(vs_msbuild_step.depend(vs_cmake_step.depend(appveyor.SetProjectFolder(os.getenv("APPVEYOR_BUILD_FOLDER","")))))
|
||||
if os.getenv("APPVEYOR_PROJECT_NAME","") == git_path:
|
||||
source_retrieval_step = appveyor.SetProjectFolder(os.getenv("APPVEYOR_BUILD_FOLDER", ""))
|
||||
else:
|
||||
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:
|
||||
project.depend(vs_msbuild_step.depend(vs_cmake_step.depend(github.Source(author, git_path, branch, super_repository=tl_repo).set_destination(path))))
|
||||
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)
|
||||
|
||||
#vs_target = "Clean;Build" if config['rebuild'] else "Build"
|
||||
vs_msbuild_step = msbuild.MSBuild(os.path.join("vsbuild", "INSTALL.vcxproj"), None, None,
|
||||
"{}".format("x64" if config['architecture'] == 'x86_64' else "x86"),
|
||||
config['build_type'])
|
||||
|
||||
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))
|
||||
|
||||
|
||||
def python_core_collect(context):
|
||||
ip = os.path.join(config["paths"]["install"], "bin")
|
||||
bp = python.python['build_path']
|
||||
path_segments = [bp, "PCbuild"]
|
||||
if config['architecture'] == "x86_64":
|
||||
path_segments.append("amd64")
|
||||
path_segments.append("pythoncore")
|
||||
|
||||
try:
|
||||
shutil.rmtree(os.path.join(ip, "pythoncore"))
|
||||
except OSError:
|
||||
pass
|
||||
|
||||
shutil.copytree(os.path.join(bp, "Lib"), os.path.join(ip, "pythoncore"), ignore=shutil.ignore_patterns("site-packages", '__pycache__'))
|
||||
shutil.copyfile(os.path.join(*path_segments, "python{}.zip".format(config["python_version"].replace(".", ""))), os.path.join(ip, "pythoncore.zip"))
|
||||
|
||||
#shutil.copytree(os.path.join(bp, "Lib"), os.path.join(ip, "pythoncore"), ignore=shutil.ignore_patterns("site-packages", '__pycache__'))
|
||||
|
||||
os.mkdir(os.path.join(ip, "pythoncore"))
|
||||
for f in glob(os.path.join(*path_segments,"*.pyd")):
|
||||
shutil.copy(f, os.path.join(ip, "pythoncore"))
|
||||
|
||||
return True
|
||||
|
||||
@@ -176,7 +235,7 @@ def copy_licenses(context):
|
||||
pass
|
||||
shutil.copy(os.path.join(config["paths"]["download"], "gpl-3.0.txt"), os.path.join(license_path, "GPL-v3.0.txt"))
|
||||
shutil.copy(os.path.join(config["paths"]["download"], "lgpl-3.0.txt"), os.path.join(license_path, "LGPL-v3.0.txt"))
|
||||
#shutil.copy(os.path.join(config["paths"]["download"], "BY-SA-v3.0.txt"), os.path.join(license_path, "BY-SA-v3.0.txt")) figure out a source, creative commons download doesn't work...
|
||||
shutil.copy(os.path.join(config["paths"]["download"], "BY-SA-v3.0.txt"), os.path.join(license_path, "BY-SA-v3.0.txt"))
|
||||
shutil.copy(os.path.join(build_path, "usvfs", "udis86", "LICENSE"), os.path.join(license_path, "udis86.txt"))
|
||||
shutil.copy(os.path.join(build_path, "usvfs", "spdlog", "LICENSE"), os.path.join(license_path, "spdlog.txt"))
|
||||
shutil.copy(os.path.join(build_path, "usvfs", "fmt", "LICENSE.rst"), os.path.join(license_path, "fmt.txt"))
|
||||
@@ -184,22 +243,22 @@ 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"))
|
||||
shutil.copy(os.path.join(build_path, "NexusClientCli", "NexusClientCLI", "Castle_License.txt"), os.path.join(license_path, "Castle.txt"))
|
||||
shutil.copy(os.path.join(build_path, "Nexus-Mod-Manager", "lib", "Antlr", "LICENSE.txt"), os.path.join(license_path, "AntlrBuildTask.txt"))
|
||||
shutil.copy(os.path.join(config["paths"]["download"], "LICENSE"), os.path.join(license_path, "DXTex.txt"))
|
||||
shutil.copy(os.path.join(config["paths"]["download"], "DXTex.txt"), os.path.join(license_path, "DXTex.txt"))
|
||||
return True
|
||||
|
||||
|
||||
@@ -207,29 +266,31 @@ Project("licenses") \
|
||||
.depend(build.Execute(copy_licenses)
|
||||
.depend(urldownload.URLDownload("https://www.gnu.org/licenses/lgpl-3.0.txt", 0))
|
||||
.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_destination("DXTex.txt"))
|
||||
.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://ci.appveyor.com/api/projects/derceg/explorerplusplus/artifacts/explorer++_x64.zip?branch=master&job=Platform%3A%20x64", 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"))
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
--- builder.py (date 1575938575861)
|
||||
+++ builder.py (date 1575938575861)
|
||||
@@ -386,17 +386,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
|
||||
@@ -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" />
|
||||
@@ -0,0 +1,9 @@
|
||||
--- siputils.py Sat Sep 7 20:22:30 2019
|
||||
+++ siputils.py Fri Oct 4 04:42:15 2019
|
||||
@@ -441,3 +441,5 @@
|
||||
if self._python:
|
||||
- incdir.append(self.config.py_inc_dir)
|
||||
+ for inc_dir in self.config.py_inc_dir.split(";"):
|
||||
+ incdir.append(inc_dir)
|
||||
+
|
||||
incdir.append(self.config.py_conf_inc_dir)
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
|
||||
# Copyright (C) 2016 - 2018 Mod Organizer contributors.
|
||||
# Copyright (C) 2016 - 2019 Mod Organizer contributors.
|
||||
#
|
||||
# This file is part of Mod Organizer.
|
||||
#
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
|
||||
# Copyright (C) 2016 - 2018 Mod Organizer contributors.
|
||||
# Copyright (C) 2016 - 2019 Mod Organizer contributors.
|
||||
#
|
||||
# This file is part of Mod Organizer.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
|
||||
# Copyright (C) 2016 - 2018 Mod Organizer contributors.
|
||||
# Copyright (C) 2016 - 2019 Mod Organizer contributors.
|
||||
#
|
||||
# This file is part of Mod Organizer.
|
||||
#
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
|
||||
# Copyright (C) 2016 - 2018 Mod Organizer contributors.
|
||||
# Copyright (C) 2016 - 2019 Mod Organizer contributors.
|
||||
#
|
||||
# This file is part of Mod Organizer.
|
||||
#
|
||||
@@ -54,7 +54,7 @@ class TaskManager(object, metaclass=Singleton):
|
||||
"""
|
||||
for suc in graph.neighbors(node):
|
||||
self.enable(graph, suc)
|
||||
graph.node[node]["enable"] = True
|
||||
graph.nodes[node]["enable"] = True
|
||||
|
||||
def enable_all(self, graph):
|
||||
for node in graph.nodes():
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
|
||||
# Copyright (C) 2016 - 2018 Mod Organizer contributors.
|
||||
# Copyright (C) 2016 - 2019 Mod Organizer contributors.
|
||||
#
|
||||
# This file is part of Mod Organizer.
|
||||
#
|
||||
@@ -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):
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
|
||||
# Copyright (C) 2016 - 2018 Mod Organizer contributors.
|
||||
# Copyright (C) 2016 - 2019 Mod Organizer contributors.
|
||||
#
|
||||
# This file is part of Mod Organizer.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
|
||||
# Copyright (C) 2016 - 2018 Mod Organizer contributors.
|
||||
# Copyright (C) 2016 - 2019 Mod Organizer contributors.
|
||||
#
|
||||
# This file is part of Mod Organizer.
|
||||
#
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
|
||||
# Copyright (C) 2016 - 2018 Mod Organizer contributors.
|
||||
# Copyright (C) 2016 - 2019 Mod Organizer contributors.
|
||||
#
|
||||
# This file is part of Mod Organizer.
|
||||
#
|
||||
|
||||
+23
-11
@@ -1,5 +1,5 @@
|
||||
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
|
||||
# Copyright (C) 2016 - 2018 Mod Organizer contributors.
|
||||
# Copyright (C) 2016 - 2019 Mod Organizer contributors.
|
||||
#
|
||||
# This file is part of Mod Organizer.
|
||||
#
|
||||
@@ -210,20 +210,25 @@ class Execute(Builder):
|
||||
@property
|
||||
def name(self):
|
||||
if self._context is None:
|
||||
return "execute {}".format(self.__name or self.__function.__name__)
|
||||
return "execute {}_{}".format(self._context.name, self.__name or self.__function.__name__)
|
||||
return "execute {}".format(self.__name or self.sanitize(self.__function.__name__))
|
||||
return "execute {}_{}".format(self._context.name, self.__name or self.sanitize(self.__function.__name__))
|
||||
|
||||
def process(self, progress):
|
||||
return self.__function(context=self._context)
|
||||
|
||||
def sanitize(self, f):
|
||||
# this is mostly for "<lambda>"
|
||||
return f.replace("<", "_").replace(">", "_")
|
||||
|
||||
|
||||
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)
|
||||
|
||||
@@ -238,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:
|
||||
@@ -250,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
|
||||
|
||||
+119
-1
@@ -1,5 +1,5 @@
|
||||
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
|
||||
# Copyright (C) 2016 - 2018 Mod Organizer contributors.
|
||||
# Copyright (C) 2016 - 2019 Mod Organizer contributors.
|
||||
#
|
||||
# This file is part of Mod Organizer.
|
||||
#
|
||||
@@ -17,6 +17,7 @@
|
||||
# along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
import logging
|
||||
import os.path
|
||||
import multiprocessing
|
||||
import re
|
||||
import shutil
|
||||
from subprocess import PIPE, Popen
|
||||
@@ -166,6 +167,10 @@ class CMakeEdit(Builder):
|
||||
return "2013"
|
||||
elif version == "14.0":
|
||||
return "2015"
|
||||
elif version == "15.0":
|
||||
return "2017"
|
||||
elif version == "16.0":
|
||||
return "2019"
|
||||
|
||||
def __generator_name(self):
|
||||
if self.__type == CMakeEdit.Type.VC:
|
||||
@@ -272,3 +277,116 @@ class CMakeVS(Builder):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
class CMakeJOM(Builder):
|
||||
def __init__(self):
|
||||
super(CMakeJOM, self).__init__()
|
||||
self.__arguments = []
|
||||
self.__install = False
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
if config['architecture'] == 'x86_64':
|
||||
suffix = ""
|
||||
else:
|
||||
suffix = "_32"
|
||||
|
||||
if self._context is None:
|
||||
return "cmake" + suffix
|
||||
return "cmake{} {}".format(suffix, self._context.name)
|
||||
|
||||
def applies(self, parameters):
|
||||
return True
|
||||
|
||||
def fulfilled(self):
|
||||
return False
|
||||
|
||||
def arguments(self, arguments):
|
||||
self.__arguments = arguments
|
||||
return self
|
||||
|
||||
def install(self):
|
||||
self.__install = True
|
||||
return self
|
||||
|
||||
def jom_environment(self):
|
||||
result = config["__environment"].copy()
|
||||
result["PATH"] += ";{}".format(os.path.dirname(os.path.abspath(config["paths"]["jom"])))
|
||||
return result
|
||||
|
||||
def process(self, progress):
|
||||
if "build_path" not in self._context:
|
||||
logging.error("source path not known for {},"
|
||||
" are you missing a matching retrieval script?".format(self._context.name))
|
||||
return False
|
||||
|
||||
if config['architecture'] == 'x86_64':
|
||||
suffix = ""
|
||||
else:
|
||||
suffix = "_32"
|
||||
|
||||
# prepare for out-of-source build
|
||||
build_path = os.path.join(self._context["build_path"], "build" + suffix)
|
||||
# if os.path.exists(build_path):
|
||||
# shutil.rmtree(build_path)
|
||||
try:
|
||||
os.mkdir(build_path)
|
||||
except Exception:
|
||||
pass
|
||||
soutpath = os.path.join(self._context["build_path"], "stdout" + suffix + ".log")
|
||||
serrpath = os.path.join(self._context["build_path"], "stderr" + suffix + ".log")
|
||||
|
||||
try:
|
||||
with on_exit(lambda: progress.finish()):
|
||||
with open(soutpath, "w") as sout:
|
||||
with open(serrpath, "w") as serr:
|
||||
cmdline = [config["paths"]["cmake"], "-G", "NMake Makefiles JOM", ".."] + self.__arguments
|
||||
print("{}> {}".format(build_path, ' '.join(cmdline)))
|
||||
proc = Popen(cmdline,
|
||||
cwd=build_path,
|
||||
env=self.jom_environment(),
|
||||
stdout=sout, stderr=serr)
|
||||
proc.communicate()
|
||||
if proc.returncode != 0:
|
||||
raise Exception("failed to generate makefile (returncode %s), see %s and %s" % (proc.returncode, soutpath, serrpath))
|
||||
|
||||
cmdline = [config['paths']['jom'], "/D", "/J", multiprocessing.cpu_count().__str__()]
|
||||
print("{}> {}".format(build_path, ' '.join(cmdline)))
|
||||
proc = Popen(cmdline,
|
||||
shell=True,
|
||||
env=config["__environment"],
|
||||
cwd=build_path,
|
||||
stdout=PIPE, stderr=serr)
|
||||
progress.job = "Compiling"
|
||||
progress.maximum = 100
|
||||
while proc.poll() is None:
|
||||
while True:
|
||||
line = proc.stdout.readline().decode("utf-8")
|
||||
if line != '':
|
||||
match = re.search("^\\[([0-9 ][0-9 ][0-9])%\\]", line)
|
||||
if match is not None:
|
||||
progress.value = int(match.group(1))
|
||||
sout.write(line)
|
||||
else:
|
||||
break
|
||||
|
||||
if proc.returncode != 0:
|
||||
raise Exception("failed to build (returncode %s), see %s and %s" % (proc.returncode, soutpath, serrpath))
|
||||
|
||||
if self.__install:
|
||||
cmdline = [config['paths']['jom'], "install", "/D", "/J", multiprocessing.cpu_count().__str__()]
|
||||
print("{}> {}".format(build_path, ' '.join(cmdline)))
|
||||
proc = Popen(cmdline,
|
||||
shell=True,
|
||||
env=config["__environment"],
|
||||
cwd=build_path,
|
||||
stdout=sout, stderr=serr)
|
||||
proc.communicate()
|
||||
if proc.returncode != 0:
|
||||
raise Exception("failed to install (returncode %s), see %s and %s" % (proc.returncode, soutpath, serrpath))
|
||||
|
||||
except Exception as e:
|
||||
logging.exception(e)
|
||||
return False
|
||||
return True
|
||||
@@ -1,5 +1,5 @@
|
||||
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
|
||||
# Copyright (C) 2016 - 2018 Mod Organizer contributors.
|
||||
# Copyright (C) 2016 - 2019 Mod Organizer contributors.
|
||||
#
|
||||
# This file is part of Mod Organizer.
|
||||
#
|
||||
|
||||
+16
-4
@@ -1,5 +1,5 @@
|
||||
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
|
||||
# Copyright (C) 2016 - 2018 Mod Organizer contributors.
|
||||
# Copyright (C) 2016 - 2019 Mod Organizer contributors.
|
||||
#
|
||||
# This file is part of Mod Organizer.
|
||||
#
|
||||
@@ -26,7 +26,10 @@ from unibuild import Task
|
||||
def Popen(cmd, **kwargs):
|
||||
pc = ''
|
||||
if 'cwd' in kwargs:
|
||||
pc += os.path.relpath(kwargs['cwd'],os.path.abspath('..'))
|
||||
try:
|
||||
pc += os.path.relpath(kwargs['cwd'],os.path.abspath('..'))
|
||||
except ValueError:
|
||||
pc += kwargs['cwd']
|
||||
pc += '>'
|
||||
for arg in cmd:
|
||||
pc += ' ' + arg
|
||||
@@ -77,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)
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user