Files
modorganizer-umbrella/config.py
T

176 lines
8.0 KiB
Python
Raw Normal View History

2018-02-25 13:23:21 +01:00
# Copyright (C) 2015 Sebastian Herbord. All rights reserved.
2019-07-08 17:30:49 -05:00
# Copyright (C) 2016 - 2019 Mod Organizer contributors.
2015-11-02 18:34:36 +01:00
#
# 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/>.
2019-11-19 12:19:11 -06:00
2016-11-20 17:35:36 +02:00
import multiprocessing
2017-09-21 16:34:22 +02:00
import os
from unibuild.utility import config_utility
2017-09-21 16:34:22 +02:00
from unibuild.utility.lazy import Lazy
def path_or_default(filename, default):
from distutils.spawn import find_executable
for path in default:
defaults = gen_search_folders(*path)
res = find_executable(filename, os.environ['PATH'] + ";" + ";".join(defaults))
if res is None:
2019-05-22 13:33:18 -05:00
print('Cannot find', filename, 'on your path or in', os.path.join('', *default[0]))
return res
def gen_search_folders(*subpath):
return [
os.path.join(search_folder, *subpath)
for search_folder in config_utility.program_files_folders
]
2015-09-23 20:59:01 +02:00
config = {
2019-01-05 19:43:47 +02:00
'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
2019-04-26 07:09:06 +02:00
#eg. Using the usvfs_version below instead of the Main_Branch config
2020-05-01 01:38:14 -04:00
'override_build_version': '', #used to override the modorganizer.exe output version, useful for Appveyor nightlies and dev builds.
2020-05-01 01:38:14 -04:00
2017-09-21 16:34:22 +02:00
'vc_CustomInstallPath': '', # If you installed VC to a custom location put the full path here
# eg. 'E:\Microsoft Visual Studio 14.0'
2018-12-30 11:55:21 +02:00
'qt_CustomInstallPath': r'', # If you installed QT to a custom location put the full path here
# eg. r'Z:\Dev\QT' if you have Z:\Dev\QT\5.10.0\msvc2017_64\bin\qmake.exe
# The r before the start of the string prevents backslashes being treated as special characters
'build_type': "RelWithDebInfo", # build type. other possible types could be Debug. not tested
'rebuild': True, # if set, does a clean build of the VS projects (for now only usvfs)
'offline': False, # if set, non-mandatory network requests won't be made eg: updating source repositories.
# The initial download of course can't be supressed.
'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
2019-05-21 10:38:47 -05:00
'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
2016-11-20 17:35:36 +02:00
'num_jobs': multiprocessing.cpu_count() + 1,
2016-11-24 16:04:52 +02:00
'progress_method': 'folders', # Changes how the progress files are generated
2018-12-17 10:52:40 -06:00
# flat: All files in one folder, <project>_complete_<task>.txt (default)
# folders: <project>\<task>_complete.txt
'Main_Author': 'ModOrganizer2', # the current maintainer
2020-01-13 17:38:12 -06:00
'Dev_Branch': "master",
2020-09-29 17:39:41 -05:00
'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
2016-11-24 16:04:52 +02:00
# manualy set all versions
'7zip_version': '19.00',
2021-01-28 13:13:54 -06:00
'boost_version': '1.75.0',
2018-04-12 11:50:28 -05:00
'boost_version_tag': '',
2021-01-28 13:13:54 -06:00
'fmt_version': '7.1.3',
2018-03-06 22:10:53 +01:00
'googletest_version': '1.8.0', # unused. We use the latest source
2019-09-27 23:46:26 -05:00
'grep_version': '3.3',
2021-01-28 13:13:54 -06:00
'icu_version': '68',
'icu_version_minor': '2',
2021-12-23 14:23:24 -07:00
'loot_version': '0.17.1',
'loot_commit': 'ge670605',
'loot_branch': '0.17.1',
2021-01-28 13:13:54 -06:00
'lz4_version': '1.9.3',
2018-10-07 21:44:08 -05:00
'lz4_version_minor': '', # leave empty if no patch version (1.2.3.x)
2020-09-29 17:39:41 -05:00
'nasm_version': '2.15.05',
2021-01-28 13:13:54 -06:00
'nuget_version': '5.8.1',
'nmm_version': '0.71.2',
2021-01-28 13:13:54 -06:00
'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
2021-01-28 13:13:54 -06:00
'pyqt_builder_version': '1.7.0',
2020-09-08 12:13:16 -05:00
'pyqt_sip_version': '12.8.1',
2019-12-13 03:02:22 -06:00
'python_version': '3.8',
2021-01-28 13:13:54 -06:00
'python_version_minor': '.7',
'bzip2_version': '1.0.6', # For python
2021-01-28 13:13:54 -06:00
'sip_version': '5.5.0',
'sip_dev_version': '', # leave empty for a standard release
2021-01-28 13:13:54 -06:00
'spdlog_version': 'v1.8.2',
2020-09-08 12:13:16 -05:00
'qt_version': '5.15',
2020-12-30 22:21:46 +01:00
'qt_version_minor': '2',
2020-09-08 12:13:16 -05:00
'qt_version_appveyor': '5.15',
2020-12-16 12:30:53 +01:00
'qt_version_minor_appveyor': '2',
2020-09-29 19:22:00 -05:00
'qt_vs_version': '16.0',
'vc_platformtoolset': 'v142',
2020-09-29 17:39:41 -05:00
'vc_TargetPlatformVersion': '10.0.19041.0',
2020-09-29 19:22:00 -05:00
'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',
2017-10-19 16:46:11 +02:00
2019-12-04 15:35:45 -05:00
#stylesheets
2020-07-10 13:11:05 -04:00
'paper-light-and-dark_version': '6.0',
2019-12-04 15:35:45 -05:00
'paper-automata_version': '2.2',
'paper-mono_version': '2.1',
2020-07-10 13:11:05 -04:00
'1809-dark-mode_version': '2.0',
2022-01-15 12:09:59 -07:00
'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',
2019-12-04 15:35:45 -05:00
#the usvfs version below will only be used if
2020-09-29 17:39:41 -05:00
'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
2019-07-10 19:58:48 -05:00
'Installer': False, # Used to create installer at end of build, Forces everything to be built
2017-10-19 16:46:11 +02:00
'show_only': False,
2018-02-24 09:40:12 +01:00
'retrieve_only': False, # download everything as a reference (to keep track of local edits). Do modorganizer_super first :)
2017-10-19 16:46:11 +02:00
'tools_only': False, # Build dependencies except modorganizer targets
'tools': {'make': "nmake"},
2018-03-10 01:33:59 +02:00
'architecture': 'x86_64', # Don't change this as we spawn the usvfs x86 build later on.
# Transifex Translation configuration
2018-12-30 11:55:21 +02:00
'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.6',
'transifex_minimum_percentage': '60',
#url used for all prebuilt downloads
'prebuilt_url': "https://github.com/ModOrganizer2/modorganizer-umbrella/releases/download/1.1/"
2015-09-23 20:59:01 +02:00
}
config['paths'] = {
2017-09-21 16:34:22 +02:00
'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"], ["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
2018-03-20 14:51:09 +01:00
'python': "", # Registry Key can be in multiple places. set in config_setup.py
'jom': "",
2017-03-27 14:31:14 +02:00
'visual_studio_base': "",
2017-09-21 16:34:22 +02:00
'qt_binary_install': "",
'visual_studio': "" # will be set in unimake.py after args are evaluated
}