mirror of
https://github.com/ModOrganizer2/modorganizer-umbrella.git
synced 2026-07-27 13:58:32 -07:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
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 | ||
|
|
150543fff0 | ||
|
|
4db9e411ff | ||
|
|
5ac9d6ec26 | ||
|
|
18b23f4190 | ||
|
|
a9650b90a7 | ||
|
|
7de3ee1b19 | ||
|
|
a7aa01a589 | ||
|
|
3d1ed32b51 |
@@ -1,3 +1,5 @@
|
||||
[](https://ci.appveyor.com/project/Modorganizer2/modorganizer-umbrella)
|
||||
|
||||
# modorganizer-umbrella
|
||||
An umbrella- (super-) project for [modorganizer](https://github.com/Modorganizer2/modorganizer).
|
||||
|
||||
@@ -17,11 +19,12 @@ Open there a console and copy in: ``git clone https://github.com/Modorganizer2/m
|
||||
Now you need to install all required software to build Mod Organizer.
|
||||
* 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 (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
|
||||
* 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
|
||||
@@ -35,10 +38,11 @@ Now you need to install all required software to build Mod Organizer.
|
||||
* 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)
|
||||
|
||||
* "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.
|
||||
|
||||
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
|
||||
|
||||
@@ -21,9 +21,6 @@ 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):
|
||||
from distutils.spawn import find_executable
|
||||
@@ -31,8 +28,6 @@ def path_or_default(filename, *default):
|
||||
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
|
||||
return res
|
||||
|
||||
|
||||
@@ -42,9 +37,24 @@ 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
|
||||
'vc_CustomInstallPath': '', # If you installed VC to a custom location put the full path here
|
||||
@@ -60,45 +70,53 @@ 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
|
||||
'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
|
||||
'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
|
||||
'Main_Branch': "Develop",
|
||||
'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.69.0',
|
||||
'boost_version_tag': '',
|
||||
'googletest_version': '1.8.0', # unused. We use the latest source
|
||||
'grep_version': '2.5.4',
|
||||
'icu_version': '62',
|
||||
'icu_version': '63',
|
||||
'icu_version_minor': '1',
|
||||
'loot_version': '0.13.7',
|
||||
'loot_commit': 'g3a747b8',
|
||||
'loot_version': '0.14.5',
|
||||
'loot_commit': 'g68ecc02',
|
||||
'lz4_version': '1.8.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',
|
||||
'nasm_version': '2.14.02',
|
||||
'nuget_version': '4.9.3',
|
||||
'nmm_version': '0.65.11',
|
||||
'openssl_version': '1.0.2r',
|
||||
'pyqt_version': '5.12',
|
||||
'pyqt_dev_version': '', # leave empty for a standard release
|
||||
'python_version': '3.7',
|
||||
'python_version_minor': '.0',
|
||||
'sip_version': '4.19.13',
|
||||
'qt_version': '5.11',
|
||||
'qt_version_minor': '2',
|
||||
'python_version_minor': '.1',
|
||||
'sip_version': '4.19.14',
|
||||
'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',
|
||||
'WixToolset_version': '311',
|
||||
'zlib_version': '1.2.11',
|
||||
|
||||
#the usvfs version below will only be used if
|
||||
'usvfs_version': '0.4.1',
|
||||
'usvfs_version': 'v0.4.2',
|
||||
|
||||
|
||||
'optimize': True, # activate link-time code generation and other optimization. This massively increases build time but
|
||||
@@ -113,8 +131,11 @@ 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",
|
||||
@@ -125,7 +146,7 @@ config['paths'] = {
|
||||
'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"),
|
||||
'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"),
|
||||
# we need a python that matches the build architecture
|
||||
@@ -134,6 +155,7 @@ config['paths'] = {
|
||||
'qt_binary_install': "",
|
||||
'visual_studio': "" # will be set in unimake.py after args are evaluated
|
||||
}
|
||||
if missing_prerequisites:
|
||||
|
||||
if not check_prerequisites_config():
|
||||
print('\nMissing prerequisites listed above - cannot continue')
|
||||
exit(1)
|
||||
|
||||
+50
-15
@@ -21,8 +21,8 @@ import shutil
|
||||
from config import config
|
||||
from string import Formatter
|
||||
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
|
||||
from unibuild.projects import boost, googletest, libloot, lz4, nasm, ncc, openssl, sevenzip, sip, usvfs, python, pyqt5, qt5, zlib, nuget
|
||||
from unibuild.utility import FormatDict
|
||||
from unibuild.utility.config_utility import cmake_parameters, qt_inst_path
|
||||
|
||||
@@ -44,7 +44,7 @@ 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-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),
|
||||
@@ -82,12 +82,16 @@ for author, git_path, path, branch, dependencies, Build in [
|
||||
(config['Main_Author'], "modorganizer-game_ttw", "game_ttw", config['Main_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",
|
||||
"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-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),
|
||||
@@ -116,6 +120,7 @@ for author, git_path, path, branch, dependencies, Build in [
|
||||
project = Project(git_path)
|
||||
|
||||
if Build:
|
||||
|
||||
vs_cmake_step = cmake.CMakeVS().arguments(cmake_param).install()
|
||||
|
||||
for dep in dependencies:
|
||||
@@ -123,9 +128,14 @@ for author, git_path, path, branch, dependencies, Build in [
|
||||
|
||||
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_msbuild_step = msbuild.MSBuild(os.path.join("vsbuild", "INSTALL.vcxproj"), None, None,
|
||||
"{}".format("x64" if config['architecture'] == 'x86_64' else "x86"),
|
||||
"RelWithDebInfo")
|
||||
|
||||
project.depend(vs_msbuild_step.depend(vs_cmake_step.depend(github.Source(author, git_path, branch, super_repository=tl_repo).set_destination(path))))
|
||||
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","")))))
|
||||
else:
|
||||
project.depend(vs_msbuild_step.depend(vs_cmake_step.depend(github.Source(author, git_path, branch, super_repository=tl_repo).set_destination(path))))
|
||||
else:
|
||||
project.depend(github.Source(author, git_path, branch, super_repository=tl_repo)
|
||||
.set_destination(path))
|
||||
@@ -170,9 +180,18 @@ def copy_licenses(context):
|
||||
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"))
|
||||
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']))
|
||||
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, "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, "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"))
|
||||
@@ -191,10 +210,26 @@ Project("licenses") \
|
||||
.depend(urldownload.URLDownload("https://raw.githubusercontent.com/Microsoft/DirectXTex/master/LICENSE", 0).set_destination("DXTex.txt"))
|
||||
.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)
|
||||
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++")))
|
||||
|
||||
|
||||
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", "Develop", super_repository=tl_repo)
|
||||
.set_destination("Installer")) \
|
||||
.depend("modorganizer").depend("usvfs").depend("usvfs_32").depend("translationsBuild").depend("modorganizer-fnistool"))
|
||||
|
||||
@@ -15,12 +15,28 @@
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>.
|
||||
from config import config
|
||||
from unibuild import Project
|
||||
from unibuild.modules import github
|
||||
import logging
|
||||
import os
|
||||
|
||||
WixToolset_version = config['WixToolset_version']
|
||||
from unibuild import Task
|
||||
|
||||
Project("WixToolkit") \
|
||||
.depend(github.Release("wixtoolset", "wix3", "wix{}rtm".format(WixToolset_version), "wix{}-binaries".format(WixToolset_version))
|
||||
.set_destination("WixToolkit-{}".format(WixToolset_version)))
|
||||
|
||||
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
|
||||
@@ -250,14 +250,16 @@ class CMakeVS(Builder):
|
||||
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"
|
||||
# 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)
|
||||
|
||||
@@ -28,7 +28,7 @@ from config import config
|
||||
|
||||
class MSBuild(Builder):
|
||||
def __init__(self, solution, project=None, working_directory=None, project_platform=None,
|
||||
reltarget=None, project_PlatformToolset=None, verbosity=None, environment=None):
|
||||
reltarget=None, project_PlatformToolset=None, verbosity=None, environment=None, project_WindowsTargetPlatformVersion=None):
|
||||
super(MSBuild, self).__init__()
|
||||
self.__solution = solution
|
||||
self.__project = project
|
||||
@@ -36,6 +36,7 @@ class MSBuild(Builder):
|
||||
self.__project_platform = project_platform
|
||||
self.__reltarget = reltarget
|
||||
self.__project_platformtoolset = project_PlatformToolset
|
||||
self.__project_WindowsTargetPlatformVersion = project_WindowsTargetPlatformVersion
|
||||
self.__verbosity = verbosity
|
||||
self.__environment = Lazy(environment)
|
||||
|
||||
@@ -87,6 +88,7 @@ class MSBuild(Builder):
|
||||
"/fileLogger",
|
||||
"/fileloggerparameters:Summary;Verbosity=" + lverbosity]
|
||||
|
||||
|
||||
if self.__project_platform is None:
|
||||
args.append("/property:Platform={}"
|
||||
.format("x64" if config['architecture'] == 'x86_64' else "win32"))
|
||||
@@ -100,6 +102,11 @@ class MSBuild(Builder):
|
||||
if self.__project:
|
||||
args.append("/target:{}".format(self.__project))
|
||||
|
||||
if self.__project_WindowsTargetPlatformVersion is None:
|
||||
args.append("/p:WindowsTargetPlatformVersion={}".format(config['vc_TargetPlatformVersion']))
|
||||
else:
|
||||
args.append("/p:WindowsTargetPlatformVersion={}".format(self.__project_WindowsTargetPlatformVersion))
|
||||
|
||||
wdir = str(self.__working_directory or self._context["build_path"])
|
||||
print("{}> {}".format(wdir, ' '.join(args)))
|
||||
proc = Popen(args,
|
||||
|
||||
@@ -34,10 +34,12 @@ from unibuild.utility.context_objects import on_failure
|
||||
class URLDownload(Retrieval):
|
||||
BLOCK_SIZE = 8192
|
||||
|
||||
def __init__(self, url, tree_depth=0):
|
||||
def __init__(self, url, tree_depth=0, name=None, clean=True):
|
||||
super(URLDownload, self).__init__()
|
||||
self.__url = url
|
||||
self.__tree_depth = tree_depth
|
||||
self.__name = name
|
||||
self.__clean = clean
|
||||
# strip trailing slashes from urlparse().path that are generated if they url ends with questionmark
|
||||
# eg: github blobs (file.zip?taw=true) otherwise os.path.basename return no file extension
|
||||
self.__file_name = os.path.basename(urlparse(self.__url).path.rstrip("/"))
|
||||
@@ -45,7 +47,9 @@ class URLDownload(Retrieval):
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return "download {0}".format(self.__file_name)
|
||||
if self.__name is None:
|
||||
return "download {0}".format(self.__file_name)
|
||||
return "download {0}".format(self.__name)
|
||||
|
||||
def set_destination(self, destination_name):
|
||||
name, ext = os.path.splitext(self.__file_name)
|
||||
@@ -118,7 +122,7 @@ class URLDownload(Retrieval):
|
||||
# it does matter if the directory already exists otherwise downloads with tree_depth will fail if the are
|
||||
# extracted a second time on a dirty build environment
|
||||
sub_dirs = os.listdir(output_file_path)
|
||||
if not len(sub_dirs) == 0:
|
||||
if not len(sub_dirs) == 0 and self.__clean:
|
||||
logging.info("Cleaning {}".format(output_file_path))
|
||||
for ls in sub_dirs:
|
||||
try:
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
# Copyright (C) 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/>.
|
||||
|
||||
from unibuild.retrieval import Retrieval
|
||||
from unibuild.modules.urldownload import URLDownload
|
||||
import urllib.error
|
||||
|
||||
class URLDownloadAny(Retrieval):
|
||||
'''Downloads and uses any of the available downloads from a given tuple of URLDownload objects.'''
|
||||
|
||||
def __init__(self, url_list, tree_depth=0):
|
||||
assert isinstance(url_list, tuple), "url_list must be a tuple"
|
||||
assert len(url_list) > 0, "url_list can not be empty"
|
||||
for url in url_list:
|
||||
assert isinstance(url, URLDownload), "url must be a URLDownload"
|
||||
|
||||
super(URLDownloadAny, self).__init__()
|
||||
self.__url_list = url_list
|
||||
self.__tree_depth = tree_depth
|
||||
|
||||
@property
|
||||
def name(self):
|
||||
return self.__url_list[0].name
|
||||
|
||||
def set_destination(self, destination_name):
|
||||
for url in self.__url_list:
|
||||
url.set_destination(destination_name)
|
||||
return self
|
||||
|
||||
def prepare(self):
|
||||
for url in self.__url_list:
|
||||
url.set_context(self._context)
|
||||
url.prepare()
|
||||
|
||||
def process(self, progress):
|
||||
for url in self.__url_list:
|
||||
try:
|
||||
if url.process(progress):
|
||||
return True
|
||||
except (urllib.error.HTTPError, urllib.error.URLError):
|
||||
continue
|
||||
return False
|
||||
|
||||
def download(self, output_file_path, progress):
|
||||
for url in self.__url_list:
|
||||
try:
|
||||
url.download(output_file_path, progress)
|
||||
except (urllib.error.HTTPError, urllib.error.URLError):
|
||||
continue
|
||||
+69
-47
@@ -48,6 +48,7 @@ config_template = ("using python\n"
|
||||
" : <define>BOOST_ALL_NO_LIB=1\n"
|
||||
" ;")
|
||||
|
||||
|
||||
def patchboost(context):
|
||||
try:
|
||||
savedpath = os.getcwd()
|
||||
@@ -59,56 +60,77 @@ def patchboost(context):
|
||||
except OSError:
|
||||
return False
|
||||
|
||||
if config.get('binary_boost', True):
|
||||
boost_prepare = Project("boost_prepare")
|
||||
boost = Project("boost").depend(urldownload.URLDownload("https://github.com/ModOrganizer2/modorganizer-umbrella/releases/download/1.1/boost_prebuilt_{}.7z"
|
||||
.format(boost_tag_version.replace(".", "_"))).set_destination("boost_{}".format(boost_tag_version.replace(".", "_"))))
|
||||
if config['architecture'] == 'x86_64':
|
||||
boost_stage = Patch.Copy(os.path.join("{}/lib{}-msvc-{}/lib/boost_python{}-vc{}-mt-{}-{}.dll"
|
||||
.format(boost_path,
|
||||
"64" if config['architecture'] == 'x86_64' else "32",
|
||||
vc_version,
|
||||
config["python_version"].replace(".", ""),
|
||||
vc_version.replace(".", ""),
|
||||
"x64" if config['architecture'] == "x86_64" else "x86",
|
||||
"_".join(boost_version.split(".")[:-1]))),
|
||||
os.path.join(config["paths"]["install"], "bin"))
|
||||
boost.depend(boost_stage)
|
||||
|
||||
boost_prepare = Project("boost_prepare") \
|
||||
.depend(b2.Bootstrap()
|
||||
.depend(Patch.CreateFile(user_config_jam,
|
||||
lambda: config_template.format(
|
||||
python_version,
|
||||
os.path.join(
|
||||
python.python['build_path'], "PCBuild",
|
||||
"{}".format("" if config['architecture'] == 'x86' else "amd64"))
|
||||
.replace("\\", '/'),
|
||||
os.path.join(python.python['build_path']).replace("\\", '/'),
|
||||
"64" if config['architecture'] == "x86_64" else "32"))
|
||||
.depend(urldownload.URLDownload("https://dl.bintray.com/boostorg/release/{}/source/boost_{}.7z"
|
||||
.format(boost_version,boost_tag_version.replace(".", "_"))
|
||||
, tree_depth=1)
|
||||
.set_destination("boost_{}".format(boost_tag_version.replace(".", "_"))))))
|
||||
|
||||
if config['architecture'] == 'x86_64':
|
||||
# This is a convient way to make each boost flavors we build have these dependencies:
|
||||
boost_prepare.depend("Python")
|
||||
|
||||
boost = Project("boost")
|
||||
|
||||
if config['architecture'] == 'x86_64':
|
||||
boost_stage = Patch.Copy(os.path.join("{}/stage/lib/boost_python{}-vc{}-mt-{}-{}.dll"
|
||||
.format(boost_path,
|
||||
config["python_version"].replace(".", ""),
|
||||
vc_version.replace(".", ""),
|
||||
"x64" if config['architecture'] == "x86_64" else "x86",
|
||||
"_".join(boost_version.split(".")[:-1]))),
|
||||
os.path.join(config["paths"]["install"], "bin"))
|
||||
boost.depend(boost_stage)
|
||||
else:
|
||||
boost_stage = boost
|
||||
boost_prepare = Project("boost_prepare") \
|
||||
.depend(b2.Bootstrap()
|
||||
.depend(Patch.CreateFile(user_config_jam,
|
||||
lambda: config_template.format(
|
||||
python_version,
|
||||
os.path.join(
|
||||
python.python['build_path'], "PCBuild",
|
||||
"{}".format("" if config['architecture'] == 'x86' else "amd64"))
|
||||
.replace("\\", '/'),
|
||||
os.path.join(python.python['build_path']).replace("\\", '/'),
|
||||
"64" if config['architecture'] == "x86_64" else "32"))
|
||||
.depend(urldownload.URLDownload("https://dl.bintray.com/boostorg/release/{}/source/boost_{}.7z"
|
||||
.format(boost_version,boost_tag_version.replace(".", "_"))
|
||||
, tree_depth=1)
|
||||
.set_destination("boost_{}".format(boost_tag_version.replace(".", "_"))))))
|
||||
|
||||
with_for_all = ["--with-{0}".format(component) for component in boost_components]
|
||||
with_for_shared = ["--with-{0}".format(component) for component in boost_components_shared]
|
||||
commonargs = ["address-model={}".format("64" if config['architecture'] == 'x86_64' else "32"),
|
||||
"-a",
|
||||
"--user-config={}".format(os.path.join(boost_path,user_config_jam)),
|
||||
"-j {}".format(config['num_jobs']),
|
||||
"toolset=msvc-" + vc_version]
|
||||
if config['architecture'] == 'x86_64':
|
||||
# This is a convient way to make each boost flavors we build have these dependencies:
|
||||
boost_prepare.depend("Python")
|
||||
|
||||
if config['architecture'] == 'x86_64':
|
||||
b2tasks = [("Shared", ["link=shared"] + with_for_all + with_for_shared),
|
||||
("Static", ["link=static", "runtime-link=shared"] + with_for_all),
|
||||
("StaticCRT64", ["link=static", "runtime-link=static"] + with_for_all)]
|
||||
else:
|
||||
b2tasks = [("StaticCRT32", ["link=static", "runtime-link=static", "--buildid=x86"] + with_for_all)]
|
||||
boost = Project("boost")
|
||||
|
||||
for (taskname, taskargs) in b2tasks:
|
||||
boost_stage.depend(b2.B2(taskname,boost_path).arguments(commonargs + taskargs)
|
||||
.depend(boost_prepare))
|
||||
if config['architecture'] == 'x86_64':
|
||||
boost_stage = Patch.Copy(os.path.join("{}/lib{}-msvc-{}/lib/boost_python{}-vc{}-mt-{}-{}.dll"
|
||||
.format(boost_path,
|
||||
"64" if config['architecture'] == 'x86_64' else "32",
|
||||
vc_version,
|
||||
config["python_version"].replace(".", ""),
|
||||
vc_version.replace(".", ""),
|
||||
"x64" if config['architecture'] == "x86_64" else "x86",
|
||||
"_".join(boost_version.split(".")[:-1]))),
|
||||
os.path.join(config["paths"]["install"], "bin"))
|
||||
boost.depend(boost_stage)
|
||||
else:
|
||||
boost_stage = boost
|
||||
|
||||
with_for_all = ["--with-{0}".format(component) for component in boost_components]
|
||||
with_for_shared = ["--with-{0}".format(component) for component in boost_components_shared]
|
||||
commonargs = ["address-model={}".format("64" if config['architecture'] == 'x86_64' else "32"),
|
||||
"-a",
|
||||
"--user-config={}".format(os.path.join(boost_path,user_config_jam)),
|
||||
"-j {}".format(config['num_jobs']),
|
||||
"toolset=msvc-" + vc_version,
|
||||
"--stagedir=lib{}-msvc-{}".format("64" if config['architecture'] == 'x86_64' else "32",vc_version),
|
||||
"--libdir=lib{}-msvc-{}".format("64" if config['architecture'] == 'x86_64' else "32",vc_version)]
|
||||
|
||||
if config['architecture'] == 'x86_64':
|
||||
b2tasks = [("Shared", ["link=shared"] + with_for_all + with_for_shared),
|
||||
("Static", ["link=static", "runtime-link=shared"] + with_for_all),
|
||||
("StaticCRT64", ["link=static", "runtime-link=static"] + with_for_all)]
|
||||
else:
|
||||
b2tasks = [("StaticCRT32", ["link=static", "runtime-link=static"] + with_for_all)]
|
||||
|
||||
for (taskname, taskargs) in b2tasks:
|
||||
boost_stage.depend(b2.B2(taskname,boost_path).arguments(commonargs + taskargs)
|
||||
.depend(boost_prepare))
|
||||
|
||||
@@ -28,8 +28,8 @@ def bitnessLoot():
|
||||
return "64" if config['architecture'] == "x86_64" else "32"
|
||||
|
||||
# TODO modorganizer-lootcli needs an overhaul as the api has changed alot
|
||||
Project("lootapi") \
|
||||
.depend(Patch.Copy("loot_api.dll", os.path.join(config["paths"]["install"], "bin", "loot"))
|
||||
.depend(github.Release("loot", "loot-api", loot_version,
|
||||
"loot_api-{}-0-{}_dev-win{}".format(loot_version, loot_commit, bitnessLoot()), "7z", tree_depth=1)
|
||||
.set_destination("lootapi-{}-{}".format(loot_version, loot_commit))))
|
||||
Project("libloot") \
|
||||
.depend(Patch.Copy("loot.dll", os.path.join(config["paths"]["install"], "bin", "loot"))
|
||||
.depend(github.Release("loot", "libloot", loot_version,
|
||||
"libloot-{}-0-{}_dev-win{}".format(loot_version, loot_commit, bitnessLoot()), "7z", tree_depth=1)
|
||||
.set_destination("libloot-{}-{}".format(loot_version, loot_commit))))
|
||||
@@ -19,12 +19,17 @@ import os
|
||||
|
||||
from config import config
|
||||
from unibuild import Project
|
||||
from unibuild.modules import cmake, urldownload
|
||||
from unibuild.modules import cmake, urldownload, urldownloadany
|
||||
|
||||
nasm_version = config['nasm_version']
|
||||
|
||||
def bitness():
|
||||
return "64" if config['architecture'] == "x86_64" else "32"
|
||||
|
||||
Project("nasm").depend(urldownload.URLDownload("http://www.nasm.us/pub/nasm/releasebuilds/{}/win{}/nasm-{}-win{}.zip"
|
||||
.format(nasm_version, bitness(), nasm_version, bitness()),tree_depth=1))
|
||||
|
||||
Project("nasm").depend(urldownloadany.URLDownloadAny((
|
||||
urldownload.URLDownload("http://www.nasm.us/pub/nasm/releasebuilds/{}/win{}/nasm-{}-win{}.zip"
|
||||
.format(nasm_version, bitness(), nasm_version, bitness()), tree_depth=1),
|
||||
urldownload.URLDownload("https://fossies.org/windows/misc/nasm-{}-win{}.zip"
|
||||
.format(nasm_version, bitness(), nasm_version, bitness()), tree_depth=1))))
|
||||
|
||||
|
||||
@@ -100,11 +100,18 @@ Configure_openssl = build.Run(r"{} Configure --openssldir={} VC-WIN{}A".format(c
|
||||
working_directory=lambda: os.path.join(openssl_path))
|
||||
|
||||
|
||||
openssl = Project("openssl") \
|
||||
.depend(build.Execute(openssl_stage)
|
||||
.depend(OpenSSL_Install
|
||||
.depend(OpenSSL_Build
|
||||
.depend(OpenSSL_Prep
|
||||
.depend(Configure_openssl
|
||||
.depend(urldownload.URLDownload(url, tree_depth=1)
|
||||
.depend("nasm")))))))
|
||||
if config.get('Appveyor_Build', True):
|
||||
openssl = Project("openssl") \
|
||||
.depend(build.Execute(openssl_stage)
|
||||
.depend(urldownload.URLDownload(config.get('prebuilt_url') + "openssl-prebuilt-{}.7z"
|
||||
.format(openssl_version))
|
||||
.set_destination("openssl-{}".format(openssl_version))))
|
||||
else:
|
||||
openssl = Project("openssl") \
|
||||
.depend(build.Execute(openssl_stage)
|
||||
.depend(OpenSSL_Install
|
||||
.depend(OpenSSL_Build
|
||||
.depend(OpenSSL_Prep
|
||||
.depend(Configure_openssl
|
||||
.depend(urldownload.URLDownload(url, tree_depth=1)
|
||||
.depend("nasm")))))))
|
||||
|
||||
@@ -25,7 +25,7 @@ from subprocess import Popen
|
||||
|
||||
from config import config
|
||||
from unibuild import Project
|
||||
from unibuild.modules import build, sourceforge, Patch
|
||||
from unibuild.modules import build, sourceforge, urldownload, urldownloadany, Patch
|
||||
from unibuild.projects import python, sip, qt5
|
||||
from unibuild.utility import lazy
|
||||
from unibuild.utility.config_utility import qt_inst_path
|
||||
@@ -33,6 +33,11 @@ from unibuild.utility.lazy import doclambda
|
||||
|
||||
icu_version = config['icu_version']
|
||||
pyqt_version = config['pyqt_version']
|
||||
python_version = config.get('python_version', "3.7") + config.get('python_version_minor', ".0")
|
||||
pyqt_dev = False
|
||||
if config['pyqt_dev_version']:
|
||||
pyqt_version += ".dev" + config['pyqt_dev_version']
|
||||
pyqt_dev = True
|
||||
qt_binary_install = config["paths"]["qt_binary_install"]
|
||||
__build_base_path = config["__build_base_path"]
|
||||
|
||||
@@ -49,7 +54,7 @@ def make_sure_path_exists(path):
|
||||
def pyqt5_env():
|
||||
res = config['__environment'].copy()
|
||||
res['path'] = ";".join([os.path.join(qt_binary_install, "bin"),
|
||||
os.path.join(config['paths']['build'], "sip-{}".format(sip.sip_version), "sipgen"),]) + ";" + res['path']
|
||||
os.path.join(python.python['build_path'])]) + ";" + res['path']
|
||||
res['LIB'] = os.path.join(__build_base_path, "install", "libs") + ";" + res['LIB']
|
||||
res['CL'] = "/MP"
|
||||
res['PYTHONHOME'] = python.python['build_path']
|
||||
@@ -89,9 +94,10 @@ class PyQt5Configure(build.Builder):
|
||||
proc = Popen([os.path.join(python.python['build_path'], "PCbuild", "amd64", "python.exe"), "configure.py",
|
||||
"--confirm-license",
|
||||
"-b", bp,
|
||||
"--verbose",
|
||||
"-d", os.path.join(bp, "Lib", "site-packages"),
|
||||
"-v", os.path.join(bp, "sip", "PyQt5"),
|
||||
"--sip-incdir", os.path.join(bp, "Include")] \
|
||||
"--sip-incdir", os.path.join(bp, "Include")]
|
||||
+ list(itertools.chain(*[("--enable", s) for s in enabled_modules])),
|
||||
env=pyqt5_env(),
|
||||
cwd=self._context["build_path"],
|
||||
@@ -105,9 +111,24 @@ class PyQt5Configure(build.Builder):
|
||||
|
||||
return True
|
||||
|
||||
if config.get('Appveyor_Build', True):
|
||||
Project("PyQt5") \
|
||||
.depend(build.Execute(copy_pyd)
|
||||
.depend(Patch.Copy([os.path.join(qt_inst_path(), "bin", "Qt5Core.dll"),
|
||||
os.path.join(qt_inst_path(), "bin", "Qt5Xml.dll")],
|
||||
doclambda(lambda: python.python['build_path'], "python path"))
|
||||
.depend(urldownload.URLDownload(config.get('prebuilt_url') + "PyQt5_gpl-prebuilt-{0}.7z"
|
||||
.format(pyqt_version), name="PyQt5-prebuilt", clean=False)
|
||||
.set_destination("python-{}".format(python_version))
|
||||
.depend("sip")
|
||||
.depend("Qt5"))))
|
||||
else:
|
||||
pyqt_source = urldownloadany.URLDownloadAny((
|
||||
urldownload.URLDownload("https://www.riverbankcomputing.com/static/Downloads/PyQt5/{0}/PyQt5_gpl-{0}.zip".format(pyqt_version), tree_depth=1),
|
||||
sourceforge.Release("pyqt", "PyQt5/PyQt-{0}/PyQt5_gpl-{0}.zip".format(pyqt_version), tree_depth=1)))
|
||||
|
||||
Project("PyQt5") \
|
||||
.depend(build.Execute(copy_pyd)
|
||||
Project("PyQt5") \
|
||||
.depend(build.Execute(copy_pyd)
|
||||
.depend(Patch.Copy([os.path.join(qt_inst_path(), "bin", "Qt5Core.dll"),
|
||||
os.path.join(qt_inst_path(), "bin", "Qt5Xml.dll")],
|
||||
doclambda(lambda: python.python['build_path'], "python path"))
|
||||
@@ -115,5 +136,5 @@ Project("PyQt5") \
|
||||
.depend(PyQt5Configure()
|
||||
.depend("sip")
|
||||
.depend("Qt5")
|
||||
.depend(sourceforge.Release("pyqt", "PyQt5/PyQt-{0}/PyQt5_gpl-{0}.zip"
|
||||
.format(pyqt_version), tree_depth=1))))))
|
||||
.depend(pyqt_source)))))
|
||||
|
||||
|
||||
+29
-15
@@ -21,7 +21,7 @@ import shutil
|
||||
from glob import glob
|
||||
|
||||
from config import config
|
||||
from unibuild.modules import build, github, msbuild
|
||||
from unibuild.modules import build, github, msbuild, urldownload
|
||||
from unibuild.project import Project
|
||||
from unibuild.utility.visualstudio import get_visual_studio_2017
|
||||
|
||||
@@ -45,9 +45,9 @@ def python_environment():
|
||||
|
||||
|
||||
def upgrade_args():
|
||||
env = config['__environment']
|
||||
devenv_path = os.path.join(config['paths']['visual_studio_base'], "Common7", "IDE")
|
||||
# MSVC2017 supports building with the MSVC2015 toolset though this will break here, Small work around to make sure devenv.exe exists
|
||||
# MSVC2017 supports building with the MSVC2015 toolset though this will break here,
|
||||
# Small work around to make sure devenv.exe exists
|
||||
# If not try MSVC2017 instead
|
||||
res = os.path.isfile(os.path.join(devenv_path, "devenv.exe"))
|
||||
if res:
|
||||
@@ -57,13 +57,18 @@ def upgrade_args():
|
||||
return [os.path.join(get_visual_studio_2017('15.0'), "..", "..", "..", "Common7", "IDE", "devenv.exe"),
|
||||
"PCBuild/pcbuild.sln", "/upgrade"]
|
||||
|
||||
|
||||
def python_prepare(context):
|
||||
shutil.copy(os.path.join(python['build_path'], "PC", "pyconfig.h"),
|
||||
os.path.join(python['build_path'], "Include", "pyconfig.h"))
|
||||
return True
|
||||
|
||||
|
||||
def install(context):
|
||||
make_sure_path_exists(os.path.join(path_install, "libs"))
|
||||
path_segments = [context['build_path'], "PCbuild"]
|
||||
if config['architecture'] == "x86_64":
|
||||
path_segments.append("amd64")
|
||||
shutil.copy(os.path.join(python['build_path'], "PC", "pyconfig.h"),
|
||||
os.path.join(python['build_path'], "Include", "pyconfig.h"))
|
||||
for f in glob(os.path.join(*path_segments,"*.lib")):
|
||||
shutil.copy(f, os.path.join(path_install, "libs"))
|
||||
for f in glob(os.path.join(*path_segments,"*.dll")):
|
||||
@@ -72,14 +77,23 @@ def install(context):
|
||||
os.path.join(path_install, "libs", "python3.lib"))
|
||||
return True
|
||||
|
||||
def download(context):
|
||||
return True
|
||||
|
||||
|
||||
python = Project("Python") \
|
||||
.depend(build.Execute(install)
|
||||
.depend(msbuild.MSBuild("PCBuild/PCBuild.sln", "python,pyexpat",
|
||||
project_PlatformToolset=config['vc_platformtoolset'])
|
||||
.depend(build.Run(upgrade_args, name="upgrade python project")
|
||||
.depend(github.Source("python", "cpython", "v{}{}".format(config['python_version'], config['python_version_minor']), shallowclone=True)
|
||||
.set_destination("python-{}".format(python_version + python_version_minor))))))
|
||||
if config.get('Appveyor_Build', True):
|
||||
python = Project("Python") \
|
||||
.depend(build.Execute(install)
|
||||
.depend(urldownload.URLDownload(
|
||||
config.get('prebuilt_url') + "python-prebuilt-{}.7z"
|
||||
.format(python_version + python_version_minor)).
|
||||
set_destination("python-{}".format(python_version + python_version_minor))))
|
||||
else:
|
||||
python = Project("Python") \
|
||||
.depend(build.Execute(install)
|
||||
.depend(build.Execute(python_prepare)
|
||||
.depend(msbuild.MSBuild("PCBuild/PCBuild.sln", "python,pyexpat",
|
||||
project_PlatformToolset=config['vc_platformtoolset'])
|
||||
.depend(build.Run(upgrade_args, name="upgrade python project")
|
||||
.depend(github.Source("python", "cpython", "v{}{}"
|
||||
.format(config['python_version'],
|
||||
config['python_version_minor'])
|
||||
, shallowclone=True)
|
||||
.set_destination("python-{}".format(python_version + python_version_minor)))))))
|
||||
|
||||
@@ -54,6 +54,9 @@ else:
|
||||
# import source packages only if we build from source
|
||||
from unibuild.projects.icu import icu
|
||||
|
||||
#We should probably nuke this section as it is not being used, this is to git rid of the error from flake8.
|
||||
qt_inst_path = ""
|
||||
|
||||
skip_list = ["qtactiveqt", "qtandroidextras", "qtenginio",
|
||||
"qtserialport", "qtsvg",
|
||||
"qtwayland", "qtdoc", "qtconnectivity"]
|
||||
|
||||
@@ -21,30 +21,16 @@ from config import config
|
||||
from unibuild import Project
|
||||
from unibuild.modules import urldownload, build, Patch
|
||||
|
||||
# newer versions are beta as of now. They have slightly (?) different api as well
|
||||
sevenzip_version = config['7zip_version']
|
||||
build_path = os.path.join(config['paths']['build'], "7zip-{}".format(sevenzip_version))
|
||||
|
||||
# Project("7zip") \
|
||||
# .depend(Patch.Copy(os.path.join(build_path, "CPP", "7zip", "Bundles", "Format7zF", "{}"
|
||||
# .format("x86" if config['architecture'] == 'x86' else "AMD64"), "7z.dll"),
|
||||
# os.path.join(config["paths"]["install"], "bin", "dlls"))
|
||||
# .depend(build.Run(r"nmake CPU={} NEW_COMPILER=1 MY_STATIC_LINK=1 NO_BUFFEROVERFLOWU=1".format("x86" if config['architecture'] == 'x86' else "AMD64"),
|
||||
# working_directory=os.path.join(build_path, "CPP", "7zip","Bundles", "Format7zF"))
|
||||
# .depend(Patch.Replace("CPP/Build.mak", "-WX", "")
|
||||
# .depend(Patch.Replace("CPP/7zip/Bundles/Format7zF/Format7z.dsp", "-WX", "")
|
||||
# .depend(urldownload.URLDownload("http://www.7-zip.org/a/7z{}.tar.bz2".format(sevenzip_version.replace(".", "")))
|
||||
# .set_destination("7zip-{}".format(sevenzip_version)))))))
|
||||
|
||||
# 7zip Code for 16.04
|
||||
# sevenzip is not built here as we only use its source
|
||||
Project("7zip") \
|
||||
.depend(Patch.Copy(os.path.join(build_path, "CPP", "7zip", "Bundles", "Format7zF", "{}"
|
||||
.format("x86" if config['architecture'] == 'x86' else "AMD64"), "7z.dll"),
|
||||
.format("x86" if config['architecture'] == 'x86' else "x64"), "7z.dll"),
|
||||
os.path.join(config["paths"]["install"], "bin", "dlls"))
|
||||
.depend(build.Run(r"nmake CPU={} NEW_COMPILER=1 MY_STATIC_LINK=1 NO_BUFFEROVERFLOWU=1".format("x86" if config['architecture'] == 'x86' else "AMD64"),
|
||||
.depend(build.Run(r"nmake CPU={} NEW_COMPILER=1 MY_STATIC_LINK=1 NO_BUFFEROVERFLOWU=1"
|
||||
.format("x86" if config['architecture'] == 'x86' else "x64"),
|
||||
working_directory=os.path.join(build_path, "CPP", "7zip","Bundles", "Format7zF"))
|
||||
# .depend(Patch.Replace("CPP/Build.mak", "-WX", "")
|
||||
# .depend(Patch.Replace("CPP/7zip/Bundles/Format7zF/Format7z.dsp", "-WX", "")
|
||||
.depend(urldownload.URLDownload("http://www.7-zip.org/a/7z{}-src.7z".format(sevenzip_version.replace(".", "")))
|
||||
.set_destination("7zip-{}".format(sevenzip_version)))))
|
||||
.depend(urldownload.URLDownload("http://www.7-zip.org/a/7z{}-src.7z"
|
||||
.format(sevenzip_version.replace(".", "")))
|
||||
.set_destination("7zip-{}".format(sevenzip_version)))))
|
||||
|
||||
@@ -24,14 +24,24 @@ from subprocess import Popen
|
||||
|
||||
from config import config
|
||||
from unibuild import Project
|
||||
from unibuild.modules import build, sourceforge, urldownload
|
||||
from unibuild.modules import build, sourceforge, urldownload, urldownloadany
|
||||
from unibuild.projects import python
|
||||
|
||||
sip_version = config['sip_version']
|
||||
sip_dev = False
|
||||
|
||||
|
||||
if config['sip_dev_version']:
|
||||
sip_version += ".dev" + config['sip_dev_version']
|
||||
sip_dev = True
|
||||
|
||||
|
||||
python_version = config.get('python_version', "3.7") + config.get('python_version_minor', ".0")
|
||||
python_path = os.path.join(config['paths']['build'], "python-{}".format(config['python_version'] + config['python_version_minor']))
|
||||
sip_url = sourceforge.Release("pyqt", "sip/sip-{0}/sip-{0}.zip".format(sip_version), 1)
|
||||
|
||||
sip_url = urldownloadany.URLDownloadAny((
|
||||
urldownload.URLDownload("https://www.riverbankcomputing.com/static/Downloads/sip/{0}/sip-{0}.zip".format(sip_version), 1),
|
||||
sourceforge.Release("pyqt", "sip/sip-{0}/sip-{0}.zip".format(sip_version), 1)))
|
||||
|
||||
def sip_environment():
|
||||
result = config['__environment'].copy()
|
||||
@@ -92,9 +102,18 @@ class SipConfigure(build.Builder):
|
||||
return True
|
||||
|
||||
|
||||
Project('sip') \
|
||||
.depend(build.Execute(copy_pyd)
|
||||
.depend(build.Make(environment=sip_environment()).install()
|
||||
.depend(SipConfigure()
|
||||
.depend("Python")
|
||||
.depend(sip_url))))
|
||||
if config.get('Appveyor_Build', True):
|
||||
Project('sip') \
|
||||
.depend(build.Execute(copy_pyd)
|
||||
.depend(urldownload.URLDownload(
|
||||
config.get('prebuilt_url') + "sip-prebuilt-{}.7z"
|
||||
.format(sip_version), name="Sip-Prebuilt", clean=False)
|
||||
.set_destination("python-{}".format(python_version))
|
||||
.depend("Python")))
|
||||
else:
|
||||
Project('sip') \
|
||||
.depend(build.Execute(copy_pyd)
|
||||
.depend(build.Make(environment=sip_environment()).install()
|
||||
.depend(SipConfigure()
|
||||
.depend("Python")
|
||||
.depend(sip_url))))
|
||||
|
||||
@@ -71,7 +71,6 @@ def GenerateFiles(path,data, c = 1):
|
||||
if filename.endswith(".ts"):
|
||||
data.update({os.path.join(filepath,filename):os.path.join(install_path, "bin", "translations",os.path.basename(filepath).split(".")[-1] + "_" + os.path.splitext(filename)[0] + ".qm")})
|
||||
elif os.path.isdir(i):
|
||||
dirname = os.path.basename(i)
|
||||
c+=1
|
||||
GenerateFiles(i,data,c)
|
||||
c-=1
|
||||
@@ -143,7 +142,7 @@ class PullTranslations(build.Builder):
|
||||
proc.communicate()
|
||||
if proc.returncode != 0:
|
||||
logging.error("failed to run %s (returncode %s), see %s and %s",
|
||||
self.__command(), proc.returncode, soutpath, serrpath)
|
||||
command, proc.returncode, soutpath, serrpath)
|
||||
return False
|
||||
|
||||
command = "{} pull -a -f --parallel --minimum-perc={}"\
|
||||
@@ -157,7 +156,7 @@ class PullTranslations(build.Builder):
|
||||
proc.communicate()
|
||||
if proc.returncode != 0:
|
||||
logging.error("failed to run %s (returncode %s), see %s and %s",
|
||||
self.__command(), proc.returncode, soutpath, serrpath)
|
||||
command, proc.returncode, soutpath, serrpath)
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
@@ -54,7 +54,7 @@ for (project32, dependencies) in [("boost", ["boost_prepare"]),
|
||||
("usvfs", [])]:
|
||||
if config['architecture'] == 'x86_64':
|
||||
unimake32 = \
|
||||
build.Run_With_Output(r'"{0}" unimake.py -d "{1}" --set architecture="x86" -b "build" -p "progress" -i "install" "{2}"'.format(sys.executable, config['__build_base_path'], project32),
|
||||
build.Run_With_Output(r'"{0}" unimake.py --set architecture="x86" -b "build" -p "progress" -i "install" -d "{1}" {2} "{3}"'.format(sys.executable, config['__build_base_path'],' -s ' + ' -s '.join(config['__Arguments'].set) if config['__Arguments'].set is not None else "", project32),
|
||||
name="unimake_x86_{}".format(project32),
|
||||
environment=config['__Default_environment'],
|
||||
working_directory=os.path.join(os.getcwd()))
|
||||
|
||||
@@ -27,7 +27,7 @@ class Retrieval(Task):
|
||||
super(Retrieval, self).__init__()
|
||||
try:
|
||||
os.makedirs(config["paths"]["download"])
|
||||
except Exception as e:
|
||||
except Exception:
|
||||
# ignore error, probably means the path already exists
|
||||
pass
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user