mirror of
https://github.com/ModOrganizer2/modorganizer-umbrella.git
synced 2026-07-27 13:58:32 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
92154e7434 | ||
|
|
3cdef2f391 | ||
|
|
6a7c14e418 | ||
|
|
58f6ac7ce9 | ||
|
|
fe0da0e0c8 | ||
|
|
99ae56d650 | ||
|
|
6f05a070b8 | ||
|
|
e71164f3b8 | ||
|
|
19344619b0 | ||
|
|
882d946770 | ||
|
|
941e89e12a | ||
|
|
d067c7a582 | ||
|
|
ce7090edaf | ||
|
|
60e7712c83 | ||
|
|
b6a389f66f | ||
|
|
1f4873f7d4 | ||
|
|
9ca74c1449 | ||
|
|
6bba8eb2a9 | ||
|
|
95176cc155 | ||
|
|
e11cd5eed0 | ||
|
|
ca7b0938d8 | ||
|
|
a429c982ea | ||
|
|
754a03c486 | ||
|
|
6afa3eef10 | ||
|
|
d8804d7006 | ||
|
|
3728a265be | ||
|
|
dfb097be8b | ||
|
|
5dd778aff0 | ||
|
|
68982e0a39 | ||
|
|
93815b400c | ||
|
|
c710353eeb | ||
|
|
73af81a6f2 | ||
|
|
2a29e356df | ||
|
|
0f32491974 | ||
|
|
9e40c4a5cd | ||
|
|
2c1fb80959 | ||
|
|
1ae0db7992 | ||
|
|
e35c105416 | ||
|
|
f2b9601c54 | ||
|
|
e987d1d61b | ||
|
|
677e403421 | ||
|
|
eb0e1a8923 | ||
|
|
69cb3db2ad | ||
|
|
6aade3c7b4 | ||
|
|
96db40b252 | ||
|
|
c847da5463 | ||
|
|
ed3a0d5671 | ||
|
|
8aee0938b5 | ||
|
|
9b3d30c565 | ||
|
|
4136ec4086 | ||
|
|
6bc7428db5 | ||
|
|
5a4a20ec0c | ||
|
|
24c546c671 | ||
|
|
f4f79516e3 | ||
|
|
11be255641 | ||
|
|
a3b89b18af | ||
|
|
f8489eaca0 | ||
|
|
91a3f8ef43 | ||
|
|
df793597b8 | ||
|
|
0c757b90d0 | ||
|
|
8ba9c8334c | ||
|
|
4eccb42d85 | ||
|
|
23360ca838 | ||
|
|
47760e4d60 | ||
|
|
dbdada7caa | ||
|
|
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 | ||
|
|
0a79e53979 | ||
|
|
2f23cf7b1a | ||
|
|
2c0aa10aca | ||
|
|
7a0c7c9b59 | ||
|
|
e3ce7fa856 | ||
|
|
7e8064e570 | ||
|
|
c4da97ac28 | ||
|
|
92790986b1 | ||
|
|
80190560de | ||
|
|
a4ee451132 | ||
|
|
0fdcce3e05 | ||
|
|
968a49df26 | ||
|
|
876af53cba | ||
|
|
f7c8b81b28 | ||
|
|
54e141e5a6 | ||
|
|
0f9c497cc1 | ||
|
|
7da3177aaa | ||
|
|
6af30a2e08 | ||
|
|
e58b1fd568 | ||
|
|
db6a38218a | ||
|
|
eec32ca93b | ||
|
|
98c89b8538 | ||
|
|
c735239c71 | ||
|
|
7da8eae53b | ||
|
|
bb2036496a | ||
|
|
9c0c9e9219 | ||
|
|
368fd4de11 | ||
|
|
2202404fe8 | ||
|
|
4c1c9e6b57 | ||
|
|
a7dcb3e4ba | ||
|
|
cfaf5d1611 | ||
|
|
6b5767d3a1 | ||
|
|
833cbcd718 | ||
|
|
5777e103cd | ||
|
|
6e9912be18 | ||
|
|
16084dc0de | ||
|
|
f3c18b1509 | ||
|
|
20a407e309 | ||
|
|
dc386b492d | ||
|
|
4aad87c158 | ||
|
|
d41628fce7 | ||
|
|
d663de632b | ||
|
|
a3a87eb9d9 | ||
|
|
9a5d37cbfe | ||
|
|
d0d0cfbe74 | ||
|
|
576ab4aab0 | ||
|
|
b554108e44 | ||
|
|
61d6c2b610 | ||
|
|
d5c1664f7e | ||
|
|
393e93c8c7 | ||
|
|
d1c33e2b1c | ||
|
|
4d1224590a | ||
|
|
98fd9d74e4 | ||
|
|
7df79baeef | ||
|
|
64ed95187f | ||
|
|
bbe2a66b16 | ||
|
|
150543fff0 | ||
|
|
4db9e411ff | ||
|
|
5ac9d6ec26 | ||
|
|
18b23f4190 | ||
|
|
a9650b90a7 | ||
|
|
7de3ee1b19 | ||
|
|
a7aa01a589 | ||
|
|
3d1ed32b51 | ||
|
|
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
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
<!-- [](https://ci.appveyor.com/project/Modorganizer2/modorganizer-umbrella) -->
|
||||
[](https://unmaintained.tech/)
|
||||
|
||||
> Tthis repository is archived and obsolete, see
|
||||
> https://github.com/ModOrganizer2/mob if you want to build ModOrganizer2.
|
||||
|
||||
|
||||
# modorganizer-umbrella
|
||||
An umbrella- (super-) project for [modorganizer](https://github.com/Modorganizer2/modorganizer).
|
||||
|
||||
@@ -13,37 +20,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
|
||||
* 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 (64Bit) Link: https://www.python.org/downloads/windows/
|
||||
* Qt 5.11.2 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.2: [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++
|
||||
|
||||
Additionally you need to activate under Individual components:
|
||||
|
||||
* "Windows 8.1 SDK and UCRT SDK" (Under Compilers, build tools, and runtimes)
|
||||
* "Windows 10 SDK (10.0.16299.0) for Desktop c++" (near the bottom)
|
||||
#### 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
|
||||
|
||||
#### 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.
|
||||
@@ -99,4 +128,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,24 +15,21 @@
|
||||
#
|
||||
# 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
|
||||
|
||||
from unibuild.utility import config_utility
|
||||
from unibuild.utility.lazy import Lazy
|
||||
|
||||
global missing_prerequisites
|
||||
missing_prerequisites = False
|
||||
|
||||
|
||||
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))
|
||||
global missing_prerequisites
|
||||
missing_prerequisites = True
|
||||
print('Cannot find', filename, 'on your path or in', os.path.join('', *default[0]))
|
||||
return res
|
||||
|
||||
|
||||
@@ -45,8 +42,13 @@ def gen_search_folders(*subpath):
|
||||
|
||||
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
|
||||
@@ -60,46 +62,78 @@ 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_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,
|
||||
|
||||
'Main_Author': 'Modorganizer2', # the current maintainer
|
||||
'Main_Branch': "Develop",
|
||||
'progress_method': 'folders', # Changes how the progress files are generated
|
||||
# flat: All files in one folder, <project>_complete_<task>.txt (default)
|
||||
# folders: <project>\<task>_complete.txt
|
||||
|
||||
'Main_Author': 'ModOrganizer2', # the current maintainer
|
||||
'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': '18.05',
|
||||
'boost_version': '1.68.0',
|
||||
'7zip_version': '19.00',
|
||||
'boost_version': '1.75.0',
|
||||
'boost_version_tag': '',
|
||||
'fmt_version': '7.1.3',
|
||||
'googletest_version': '1.8.0', # unused. We use the latest source
|
||||
'grep_version': '2.5.4',
|
||||
'icu_version': '62',
|
||||
'icu_version_minor': '1',
|
||||
'loot_version': '0.13.7',
|
||||
'loot_commit': 'g3a747b8',
|
||||
'lz4_version': '1.8.3',
|
||||
'grep_version': '3.3',
|
||||
'icu_version': '68',
|
||||
'icu_version_minor': '2',
|
||||
'loot_version': '0.17.1',
|
||||
'loot_commit': 'ge670605',
|
||||
'loot_branch': '0.17.1',
|
||||
'lz4_version': '1.9.3',
|
||||
'lz4_version_minor': '', # leave empty if no patch version (1.2.3.x)
|
||||
'nasm_version': '2.13.03',
|
||||
'nuget_version': '4.7.1',
|
||||
'nmm_version': '0.65.10',
|
||||
'openssl_version': '1.0.2p',
|
||||
'pyqt_version': '5.11.3',
|
||||
'python_version': '3.7',
|
||||
'python_version_minor': '.0',
|
||||
'sip_version': '4.19.13',
|
||||
'qt_version': '5.11',
|
||||
'nasm_version': '2.15.05',
|
||||
'nuget_version': '5.8.1',
|
||||
'nmm_version': '0.71.2',
|
||||
'openssl_version': '1.1.1i',
|
||||
'pyqt_version': '5.15.2',
|
||||
'pyqt_pypi_hash': '28/6c/640e3f5c734c296a7193079a86842a789edb7988dca39eab44579088a1d1',
|
||||
'pyqt_dev_version': '', # leave empty for a standard release
|
||||
'pyqt_builder_version': '1.7.0',
|
||||
'pyqt_sip_version': '12.8.1',
|
||||
'python_version': '3.8',
|
||||
'python_version_minor': '.7',
|
||||
'bzip2_version': '1.0.6', # For python
|
||||
'sip_version': '5.5.0',
|
||||
'sip_dev_version': '', # leave empty for a standard release
|
||||
'spdlog_version': 'v1.8.2',
|
||||
'qt_version': '5.15',
|
||||
'qt_version_minor': '2',
|
||||
'vc_platformtoolset': 'v141',
|
||||
'vc_version': '15.0',
|
||||
'vc_version_for_boost': '14.1',
|
||||
'qt_version_appveyor': '5.15',
|
||||
'qt_version_minor_appveyor': '2',
|
||||
'qt_vs_version': '16.0',
|
||||
'vc_platformtoolset': 'v142',
|
||||
'vc_TargetPlatformVersion': '10.0.19041.0',
|
||||
'vs_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',
|
||||
'ModOrganizer_Style_Morrowind_version': '1.1',
|
||||
'Mod-Organizer-2-Skyrim-Stylesheet_version': '1.1',
|
||||
'ModOrganizer_Style_Fallout3_version': '1.1',
|
||||
'Mod-Organizer2-Fallout-4-Stylesheet_version': '1.1',
|
||||
|
||||
#the usvfs version below will only be used if
|
||||
'usvfs_version': '0.4.1',
|
||||
|
||||
'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
|
||||
@@ -113,27 +147,29 @@ config = {
|
||||
# Transifex Translation configuration
|
||||
'transifex_Enable': False, # this should only be changed to true when doing a release
|
||||
'transifex_API': '', # you can generate an api at https://www.transifex.com/user/settings/api/
|
||||
'transifex-client_version': '0.13.4',
|
||||
'transifex_minimum_percentage': '60'
|
||||
'transifex-client_version': '0.13.6',
|
||||
'transifex_minimum_percentage': '60',
|
||||
|
||||
#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"),
|
||||
#'ruby': path_or_default("ruby.exe", "Ruby22-x64", "bin"),
|
||||
#'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 missing_prerequisites:
|
||||
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)
|
||||
|
||||
+146
-60
@@ -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
|
||||
from unibuild.projects import boost, googletest, lootapi, lz4, nasm, ncc, openssl, sevenzip, sip, usvfs, python, pyqt5, qt5, WixToolkit, 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
|
||||
|
||||
@@ -40,73 +43,99 @@ def gen_userfile_content(project):
|
||||
return res
|
||||
|
||||
|
||||
# Set the feature branch on appveyor if the build branch is not the default branch
|
||||
if config['Appveyor_Build']:
|
||||
branch = os.getenv('APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH')
|
||||
branch = branch if branch is not None else os.getenv('APPVEYOR_REPO_BRANCH')
|
||||
if branch is not None and branch != 'master':
|
||||
config['Feature_Branch'] = branch
|
||||
|
||||
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'], ["lootapi", "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", "GTest"], 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_nehrim", "game_nehrim", config['Build_Branch'], ["Qt5", "modorganizer-uibase",
|
||||
"modorganizer-game_gamebryo",
|
||||
"modorganizer-game_features"], True),
|
||||
(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-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-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-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['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", "modorganizer-game_features"], True),
|
||||
(config['Main_Author'], "modorganizer-installer_manual", "installer_manual", config['Build_Branch'], ["Qt5", "modorganizer-uibase", "modorganizer-game_features"], 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", "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_wizard", "installer_wizard", config['Build_Branch'], ["Python", "PyQt5"], True),
|
||||
(config['Main_Author'], "modorganizer-installer_omod", "installer_omod", 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", "ModOrganizer_Style_Morrowind"], True),
|
||||
]:
|
||||
cmake_param = cmake_parameters() + ["-DCMAKE_INSTALL_PREFIX:PATH={}".format(config["paths"]["install"])]
|
||||
# build_step = cmake.CMake().arguments(cmake_param).install()
|
||||
|
||||
@@ -116,31 +145,61 @@ 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']))
|
||||
|
||||
#begin build
|
||||
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)
|
||||
|
||||
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")
|
||||
#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'])
|
||||
|
||||
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))
|
||||
|
||||
|
||||
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
|
||||
|
||||
@@ -166,21 +225,30 @@ 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"))
|
||||
shutil.copy(os.path.join(build_path, "sip-{}".format(config['sip_version']), "LICENSE"), os.path.join(license_path, "sip.txt"))
|
||||
shutil.copy(os.path.join(build_path, "sip-{}".format(config['sip_version']), "LICENSE-GPL2"), os.path.join(license_path, "GPL-v2.0.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"))
|
||||
if config['sip_dev_version']:
|
||||
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"))
|
||||
# license path is different in the prebuilt archive
|
||||
if config['Appveyor_Build']:
|
||||
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(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, "modorganizer_super", "lootcli", "vsbuild", "src", "external", "src", "cpptoml", "LICENSE"), os.path.join(license_path, "cpptoml.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, "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
|
||||
|
||||
|
||||
@@ -188,13 +256,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 = 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++")))
|
||||
|
||||
|
||||
if config['Installer']:
|
||||
# build_installer = cmake.CMake().arguments(cmake_parameters
|
||||
# +["-DCMAKE_INSTALL_PREFIX:PATH={}/installer".format(config["__build_base_path"])]).install()
|
||||
wixinstaller = Project("WixInstaller") \
|
||||
.depend(github.Source(config['Main_Author'], "modorganizer-WixInstaller", "master", super_repository=tl_repo)
|
||||
.set_destination("WixInstaller")) \
|
||||
.depend("modorganizer").depend("usvfs").depend("usvfs_32").depend("WixToolkit")
|
||||
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", 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)
|
||||
@@ -441,17 +441,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)
|
||||
@@ -50,6 +50,8 @@ modorganizer-game_gamebryo
|
||||
|
||||
modorganizer-game_oblivion
|
||||
|
||||
modorganizer-game_nehrim
|
||||
|
||||
modorganizer-game_fallout3
|
||||
|
||||
modorganizer-game_fallout4
|
||||
|
||||
@@ -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.
|
||||
#
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
# 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
|
||||
|
||||
from unibuild import Task
|
||||
|
||||
|
||||
class SetProjectFolder(Task):
|
||||
def __init__(self, projectpath):
|
||||
super(SetProjectFolder, self).__init__()
|
||||
self.__projectpath = projectpath
|
||||
|
||||
def prepare(self):
|
||||
if 'build_path' not in self._context:
|
||||
output_file_path = os.path.join(self.__projectpath)
|
||||
self._context['build_path'] = output_file_path
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return "setting appveyor project path to {}".format(self.__projectpath)
|
||||
|
||||
def process(self, progress):
|
||||
if not os.path.isdir(self.__projectpath):
|
||||
logging.error("failed to set appveyor project dir to %s, doesn't exist", self.__projectpath)
|
||||
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.
|
||||
#
|
||||
|
||||
+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
|
||||
|
||||
+126
-6
@@ -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,11 +167,15 @@ 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:
|
||||
return "Visual Studio {} {}" \
|
||||
.format(config['vc_version'].split('.')[0], self.__vc_year(config['vc_version']))
|
||||
.format(config['vs_version'].split('.')[0], self.__vc_year(config['vs_version']))
|
||||
elif self.__type == CMakeEdit.Type.CodeBlocks:
|
||||
return "CodeBlocks - NMake Makefiles"
|
||||
|
||||
@@ -249,15 +254,17 @@ class CMakeVS(Builder):
|
||||
soutpath = os.path.join(self._context["build_path"], "vs_stdout.log")
|
||||
serrpath = os.path.join(self._context["build_path"], "vs_stderr.log")
|
||||
|
||||
vs_generator = "Visual Studio {0} {1}".format(config['vc_version'].split(".", 1)[0],vc_year(config['vc_version']))
|
||||
if config["architecture"] == "x86_64":
|
||||
vs_generator += " Win64"
|
||||
vs_generator = "Visual Studio {0} {1}".format(config['vs_version'].split(".", 1)[0],vc_year(config['vs_version']))
|
||||
# Updated for latest versions of CMake > 3.1 - VS 2019 does not allow use of the deprecated method
|
||||
vs_generator_arch = "x64"
|
||||
if config["architecture"] == "x86":
|
||||
vs_generator_arch = "Win32"
|
||||
|
||||
try:
|
||||
with on_exit(lambda: progress.finish()):
|
||||
with open(soutpath, "w") as sout:
|
||||
with open(serrpath, "w") as serr:
|
||||
proc = Popen([config["paths"]["cmake"], "-G", vs_generator, ".."] + self.__arguments,
|
||||
proc = Popen([config["paths"]["cmake"], "-G", vs_generator, "-A", vs_generator_arch, ".."] + self.__arguments,
|
||||
cwd=build_path,
|
||||
env=config["__environment"],
|
||||
stdout=sout, stderr=serr)
|
||||
@@ -270,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.
|
||||
#
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user