def create_stylesheet_project(author, name, filename, extension="7z"): version = "v" + config[name + "_version"] dir = name + "-" + version Project(name) \ .depend(build.Execute(lambda context: copy_stylesheets(context, dir)) .depend(github.Release(author, name, version, filename, extension)))
proc = subprocess.Popen([res, "runConfigureICU", "Cygwin/MSVC", "--prefix" , "{}".format(current_dir_cygwin)], env=icu_environment(), cwd=os.path.join(self._context["build_path"], "source"), shell=True, stdout=sout, stderr=serr) proc.communicate() if proc.returncode != 0: logging.error("failed to run icu runConfigureICU (returncode %s), see %s and %s", proc.returncode, soutpath, serrpath) return False return True Convert_icu = build.Run(r"dos2unix -f configure", environment=icu_environment(), working_directory=lambda: os.path.join(config["paths"]["build"], "icu", "source")) icu = Project('icu') \ .depend(build_icu .depend(ConfigureIcu() .depend(Convert_icu .depend(Patch.Replace("source/io/ufile.cpp", "#if U_PLATFORM_USES_ONLY_WIN32_API", "#if U_PLATFORM_USES_ONLY_WIN32_API && _MSC_VER < 1900") .depend(sourceforge.Release("icu","ICU4C/{0}.{1}/icu4c-{0}_{1}-src.tgz" .format(icu_version,icu_version_minor),tree_depth=1) .set_destination("icu"))))))\ .depend("cygwin")
# 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 import Project from unibuild.modules import cmake, github, build from config import config import os import shutil import fnmatch googletest_version = "1.7.0" def install(context): for root, dirnames, filenames in os.walk( os.path.join(context['build_path'], "build")): for filename in fnmatch.filter(filenames, "*.lib"): shutil.copy(os.path.join(root, filename), os.path.join(config["paths"]["install"], "libs")) return True Project("GTest") \ .depend(build.Execute(install) .depend(cmake.CMake().arguments(["-Dgtest_force_shared_crt=ON", "-DCMAKE_BUILD_TYPE={0}".format(config["build_type"]) ]) .depend(github.Source("google", "googletest", "master"))) )
# Copyright (C) 2015 Sebastian Herbord. All rights reserved. # # 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 config import config from unibuild import Project from unibuild.modules import cmake, github, build googletest_version = "1.8.0" Project("GTest") \ .depend(cmake.CMake().arguments(["-DCMAKE_BUILD_TYPE={0}".format(config["build_type"])]) .depend(github.Source("google", "googletest", "master"))) #.depend(github.Source("google", "googletest", "release-{}".format(googletest_version))))
if "NexusClientCli" not in sln.projectsByName: newproj = sln.AddProject('NexusClientCli', ProjectType.CSHARP_PROJECT, ncc_csproj, guid=projguid) log.info('Adding project %s (%s) to NexusClient.sln', newproj.name, newproj.guid) changed = True else: newproj = sln.projectsByName['NexusClientCli'] log.info('Project %s (%s) already exists in NexusClient.sln', newproj.name, newproj.guid) if newproj.projectfile != ncc_csproj: log.info('Changing projectfile: %s -> %s', newproj.projectfile, ncc_csproj) newproj.projectfile = ncc_csproj changed = True if changed: log.info('Writing NexusClientCli.sln') sln.SaveToFile(os.path.relpath(os.path.join(build_path, "Nexus-Mod-Manager", 'NexusClientCli.sln'))) # So we dont get conflicts when pulling return True # https://github.com/Nexus-Mods/Nexus-Mod-Manager/commit/03448e0eb02e08f37d7b66507d0537ab67841321 broke fomod installation # until this is fixed we lock NMM to the latest nexus release. Project("ncc") \ .depend(build.Run(r"publish.bat".format("-debug" if config['build_type'] == "Debug" else "-release", os.path.join(config["paths"]["install"], "bin")), working_directory=lazy.Evaluate(lambda: os.path.join(build_path, "NexusClientCli"))) .depend(msbuild.MSBuild(os.path.join(build_path, "Nexus-Mod-Manager", 'NexusClientCli.sln'), working_directory=lazy.Evaluate(lambda: os.path.join(build_path, "Nexus-Mod-Manager")), project_platform="Any CPU") .depend(build.Execute(prepare_nmm, name="append NexusClientCli project to NMM") .depend(github.Source("Nexus-Mods", "Nexus-Mod-Manager", "0.63.15", None, False)) .depend(github.Source(config['Main_Author'], "modorganizer-NCC", "master") .set_destination("NexusClientCli")))))
# Copyright (C) 2015 Sebastian Herbord. All rights reserved. # # 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 import Project from unibuild.modules import urldownload from config import config import os WixToolSet_Version_Binary = config['WixToolSet_Version_Binary'] WixToolSet_Version_Build = config['WixToolSet_Version_Build'] Project("WixToolkit") \ .depend(urldownload.URLDownload("http://static.wixtoolset.org/releases/v{0}/wix{1}-binaries.zip" .format(WixToolSet_Version_Build,WixToolSet_Version_Binary)) .set_destination("WixToolkit"))
"modorganizer-bsatk", "modorganizer-esptk", "modorganizer-game_features", "modorganizer-bsapacker", "modorganizer-lootcli", "usvfs", "githubpp", "ncc", "openssl", "paper-light-and-dark", "paper-automata", "paper-mono", "1809-dark-mode"], True), ]: cmake_param = cmake_parameters() + ["-DCMAKE_INSTALL_PREFIX:PATH={}".format(config["paths"]["install"])] # build_step = cmake.CMake().arguments(cmake_param).install() # for dep in dependencies: # build_step.depend(dep) project = Project(git_path) if Build: #prepare build version override step patch_version_step = Patch.RegexReplace("src/version.rc", "#define VER_FILEVERSION_STR.*\n", "#define VER_FILEVERSION_STR \"{}\"\n" .format(config['override_build_version'])) if config['Appveyor_Build']: appveyor_cmake_step = cmake.CMakeJOM().arguments(cmake_param).install() if git_path != "cmake_common": appveyor_cmake_step.depend("cmake_common") for dep in dependencies:
# Copyright (C) 2015 Sebastian Herbord. All rights reserved. # # 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 os from config import config from unibuild import Project from unibuild.modules import cmake, urldownload 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).set_destination("NASM"))
logging.error( "failed to run pyqt configure.py (returncode %s), see %s and %s", proc.returncode, soutpath, serrpath) return False return True init_transifex_repo = build.Run( "{} init --token={} --force --no-interactive".format( transifex_client_binary, transifex_api), name="init transifex repository") config_transifex_repo = build.Run( "{} config mapping-remote https://www.transifex.com/tannin/mod-organizer/". format(transifex_client_binary), name="config transifex repository") pull_transifex_repo = build.Run("{} pull -a -f --minimum-perc={}".format( transifex_client_binary, transifex_minimum_percentage), name="pull transifex repository") Project("translations") \ .depend(GenerateTranslations() .depend(pull_transifex_repo .depend(config_transifex_repo .depend(init_transifex_repo .depend(build.Execute(translations_stage) .depend(github.Release("transifex", "transifex-client", transifex_version, "tx.py27.x64", extension="exe") .set_destination("transifex-translations")))))))
})) return res cmake_parameters = [ "-DCMAKE_BUILD_TYPE={}".format(config["build_type"]), "-DDEPENDENCIES_DIR={}/build".format(config["__build_base_path"]), "-DCMAKE_INSTALL_PREFIX:PATH={}/install".format(config["__build_base_path"]) ] if config.get('optimize', False): cmake_parameters.append("-DOPTIMIZE_LINK_FLAGS=\"/LTCG /INCREMENTAL:NO /OPT:REF /OPT:ICF\"") usvfs = Project("usvfs") usvfs.depend(cmake.CMake().arguments(cmake_parameters + ["-DPROJ_ARCH={}".format("x86" if config['architecture'] == 'x86' else "x64")]) .install() .depend(patch.CreateFile("CMakeLists.txt.user", partial(gen_userfile_content, usvfs)) .depend(cmake.CMakeEdit(cmake.CMakeEdit.Type.CodeBlocks).arguments(cmake_parameters) .depend(github.Source("TanninOne", "usvfs", "master") .set_destination("usvfs")) .depend("AsmJit").depend("Udis86").depend("GTest") ) ) ) for git_path, path, branch, dependencies in [
proc.communicate() if proc.returncode != 0: logging.error("failed to run installer (returncode %s)", proc.returncode) return False libeay_path = os.path.join(context['build_path'], "lib", "VC", "static", libeay) ssleay_path = os.path.join(context['build_path'], "lib", "VC", "static", ssleay) wait_counter = timeout while wait_counter > 0: if os.path.isfile(libeay_path) and os.path.isfile(ssleay_path): break else: time.sleep(1.0) wait_counter -= 1 # wait a bit longer because the installer may have been in the process of writing the file time.sleep(1.0) if wait_counter <= 0: logging.error("Unpacking of OpenSSL timed out") return False #We timed out and nothing was installed return True openssl = Project("openssl")\ .depend(build.Execute(build_func) .depend(urldownload.URLDownload(url)) )
ssleay_path = os.path.join(context['build_path'], "lib", "VC", "static", ssleay) wait_counter = timeout while wait_counter > 0: if os.path.isfile(libeay_path) and os.path.isfile(ssleay_path): break else: time.sleep(1.0) wait_counter -= 1 # wait a bit longer because the installer may have been in the process of writing the file time.sleep(1.0) if wait_counter <= 0: logging.error("Unpacking of OpenSSL timed out") return False #We timed out and nothing was installed return True openssl = Project("openssl") \ .depend(patch.Copy([os.path.join(config['paths']['build'], "Win{0}OpenSSL-{1}" .format("32" if config['architecture'] == 'x86' else "64", openssl_version.replace(".","_")), "ssleay32.dll"), os.path.join(config['paths']['build'], "Win{0}OpenSSL-{1}" .format("32" if config['architecture'] == 'x86' else "64", openssl_version.replace(".", "_")), "libeay32.dll"),], os.path.join(config['__build_base_path'], "install", "bin","dlls")) .depend(build.Execute(build_func) .depend(urldownload.URLDownload(url)) ))
" ;") def patchboost(context): try: return True except OSError: return False 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(build.Execute(patchboost) .depend(sourceforge.Release("boost", "boost/{0}/boost_{1}.tar.bz2" .format(boost_version, boost_version.replace(".", "_")),tree_depth=1) .set_destination("boost_{}".format(boost_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") boost = Project("boost") if config['architecture'] == 'x86_64': boost_stage = Patch.Copy( os.path.join("{}/stage/lib/boost_python-vc{}-mt-{}-{}.dll".format(
"-s", "{}".format(Cygwin_Mirror)],env=config['__environment']) proc.communicate() if proc.returncode != 0: logging.error("failed to run installer (returncode %s)", proc.returncode) return False dos2unix_path = os.path.join(context['build_path'],"../cygwin","bin", "dos2unix.exe") make_path = os.path.join(context['build_path'],"../cygwin", "bin", "make.exe") wait_counter = timeout while wait_counter > 0: if os.path.isfile(dos2unix_path) and os.path.isfile(make_path): break else: time.sleep(5.0) wait_counter -= 5 # wait a bit longer because the installer may have been in the process of writing the file time.sleep(5.0) if wait_counter<=0: logging.error("Unpacking of Cygwin timed out"); return False #We timed out and nothing was installed return True cygwin = Project("cygwin")\ .depend(build.Execute(build_func) .depend(urldownload.URLDownload(url)) )
# 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/>. from config import config from unibuild import Project from unibuild.modules import cmake, github, build #boost_di_version = config['boost_di_version'] Project("boost_di") \ .depend(github.Source("boost-experimental", "di", "cpp14"))
proc.communicate() if proc.returncode != 0: logging.error( "failed to run pyqt configure.py (returncode %s), see %s and %s", proc.returncode, soutpath, serrpath) return False return True Project("PyQt5") \ .depend(build.Execute(copy_pyd) .depend(Patch.Copy([os.path.join(qt5.qt_inst_path, "bin", "Qt5Core.dll"), os.path.join(qt5.qt_inst_path, "bin", "Qt5Xml.dll"), os.path.join(config['paths']['build'], "icu" , "dist", "lib", "icudt{}.dll".format(icu_version)), os.path.join(config['paths']['build'], "icu", "dist", "lib", "icuin{}.dll".format(icu_version)), os.path.join(config['paths']['build'], "icu", "dist", "lib", "icuuc{}.dll".format(icu_version))], doclambda(lambda: python.python['build_path'], "python path")) .depend(build.Make(environment=lazy.Evaluate(pyqt5_env)).install() .depend(PyQt5Configure() .depend("sip") .depend("Qt5") .depend(sourceforge.Release("pyqt", "PyQt5/PyQt-{0}.{1}/PyQt5_gpl-{0}.{1}.zip" .format(qt5.qt_version, qt5.qt_version_minor), tree_depth=1)) ) ) ) )
from unibuild.projects import sevenzip, qt5, boost, zlib, python, sip, pyqt5, ncc, nasm, openssl from unibuild.projects import googletest, lz4, WixToolkit # TODO modorganizer-lootcli needs an overhaul as the api has changed alot def bitness(): return "x64" if config['architecture'] == "x86_64" else "Win32" def bitnessLoot(): return "64" if config['architecture'] == "x86_64" else "32" 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-{}_update-deps-win{}".format(loot_version, commit_id, bitnessLoot()), "7z", tree_depth=1) .set_destination("lootapi")) ) tl_repo = git.SuperRepository("modorganizer_super") def gen_userfile_content(project): with open("CMakeLists.txt.user.template", 'r') as f: res = Formatter().vformat( f.read(), [], FormatDict({ 'build_dir': project['edit_path'], 'environment_id': config['qt_environment_id'], 'profile_name': config['qt_profile_name'],
(config['Main_Author'], "modorganizer", "modorganizer", "master", [ "Qt5", "boost", "usvfs_32", "modorganizer-uibase", "modorganizer-archive", "modorganizer-bsatk", "modorganizer-esptk", "modorganizer-game_features", "usvfs", "githubpp", "ncc", "openssl" ], True), ]: cmake_param = cmake_parameters() + [ "-DCMAKE_INSTALL_PREFIX:PATH={}".format(config["paths"]["install"]) ] # build_step = cmake.CMake().arguments(cmake_param).install() # for dep in dependencies: # build_step.depend(dep) project = Project(git_path) if Build: vs_step = cmake.CMakeVS().arguments(cmake_param).install() for dep in dependencies: vs_step.depend(dep) project.depend( vs_step.depend( github.Source(author, git_path, branch, super_repository=tl_repo).set_destination(path))) else: project.depend( github.Source(author, git_path, branch,
from config import config from unibuild import Project from unibuild.modules import build, github, Patch # TODO: transifex version = "v2.1.0" def translations_install(context): try: os.mkdir( os.path.join(config["paths"]["install"], "bin", "translations")) except: pass for file in glob.iglob( os.path.join(config["paths"]["build"], "translations-{}".format(version), "*.qm")): if os.path.isfile(file): shutil.copy2( file, os.path.join(config["paths"]["install"], "bin", "translations")) return True Project("translations") \ .depend(build.Execute(translations_install) .depend(github.Release("LePresidente", "modorganizer", version, "translations", extension="7z", tree_depth=1) .set_destination("translations-{}".format(version))))
def patchboost(context): try: savedpath = os.getcwd() os.chdir(boost_path) pset = patch.fromfile( os.path.join(config['__Umbrella_path'], "patches", "boost_python_libname.patch")) pset.apply() os.chdir(savedpath) return True 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]))),
"--confirm-license", "-b", bp, "-d", os.path.join(bp, "Lib", "site-packages"), "-v", os.path.join(bp, "sip", "PyQt5"), "--sip-incdir", os.path.join(bp, "Include"), "--spec=win32-msvc"], env=pyqt5_env(), cwd=self._context["build_path"], shell=True, stdout=sout, stderr=serr) proc.communicate() if proc.returncode != 0: logging.error("failed to run pyqt configure.py (returncode %s), see %s and %s", proc.returncode, soutpath, serrpath) return False return 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(build.Make(environment=lazy.Evaluate(pyqt5_env)).install() .depend(PyQt5Configure() .depend("sip") .depend("Qt5") .depend(sourceforge.Release("pyqt", "PyQt5/PyQt-{0}/PyQt5_gpl-{0}.zip" .format(pyqt_version), tree_depth=1))))))
import os.path import sys from config import config from unibuild import Project from unibuild.modules import build, cmake, dummy, msbuild, github build_path = config["paths"]["build"] suffix = "" if config['architecture'] == 'x86_64' else "_32" vs_target = "Clean;Build" if config['rebuild'] else "Build" # TODO change dynamicaly boost_folder = "boost_{}".format(config["boost_version"]) gtest_folder = "googletest" usvfs = Project("usvfs") for (project32, dependencies) in [("boost", ["boost_prepare"]), ("GTest", []), ("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), name="unimake_x86_{}".format(project32), environment=config['__Default_environment'], working_directory=os.path.join(os.getcwd())) for dep in dependencies: unimake32.depend(dep) Project(project32 + "_32").depend(unimake32) else: Project(project32 + "_32").dummy().depend(project32)
# 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 os from config import config from unibuild import Project 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( 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()), tree_depth=1))))
# # 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 import Project from unibuild.modules import cmake, urldownload from config import config import os zlib_version = config['zlib_version'] Project("zlib") \ .depend(cmake.CMake().arguments(["-DCMAKE_BUILD_TYPE={0}".format(config["build_type"]), "-DCMAKE_INSTALL_PREFIX:PATH={}".format( os.path.join(config["paths"]["build"], "zlib")) ]).install() .depend(urldownload.URLDownload("http://zlib.net/zlib-{}.tar.gz".format(zlib_version), 1)))
})) return res cmake_parameters = [ "-DCMAKE_BUILD_TYPE={}".format(config["build_type"]), "-DDEPENDENCIES_DIR={}/build".format(config["__build_base_path"]), "-DCMAKE_INSTALL_PREFIX:PATH={}/install".format(config["__build_base_path"]) ] if config.get('optimize', False): cmake_parameters.append("-DOPTIMIZE_LINK_FLAGS=\"/LTCG /INCREMENTAL:NO /OPT:REF /OPT:ICF\"") usvfs = Project("usvfs") usvfs.depend(cmake.CMake().arguments(cmake_parameters + ["-DPROJ_ARCH={}".format("x86" if config['architecture'] == 'x86' else "x64")]) .install() # TODO Not sure why this is required, will look into it at a later stage once we get the rest to build # .depend(patch.CreateFile("CMakeLists.txt.user", partial(gen_userfile_content, usvfs)) .depend(cmake.CMakeEdit(cmake.CMakeEdit.Type.CodeBlocks).arguments(cmake_parameters) .depend(github.Source(config['Main_Author'], "usvfs", "master") .set_destination("usvfs")) .depend("AsmJit") .depend("Udis86") .depend("GTest") .depend("fmtlib") .depend("spdlog") .depend("boost")
OpenSSL_Install = build.Run( "{} /D /J {} install_engines".format(config["paths"]["jom"], cpus), environment=openssl_environment(), name="Build & Install OpenSSL", working_directory=lambda: os.path.join(openssl_path), retries=5) Configure_openssl = build.Run( r"{} Configure --openssldir={} --prefix={} -FS VC-WIN{}A".format( config['paths']['perl'], os.path.join(openssl_path, "build"), os.path.join(openssl_path, "build"), bitness()), environment=openssl_environment(), name="Configure OpenSSL", working_directory=lambda: os.path.join(openssl_path)) if config['Appveyor_Build']: 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(Configure_openssl .depend(urldownloadany.URLDownloadAny(( urldownload.URLDownload(url_latest, tree_depth=1), urldownload.URLDownload(url_archive, tree_depth=1))) .depend("nasm")))))
logging.error( "failed to install PyQt5.sip (returncode %s), see %s and %s", proc.returncode, soutpath, serrpath) return False return True if config.get('Appveyor_Build', True): Project("PyQt5") \ .depend(build.Execute(copy_files) .depend(Patch.Copy([os.path.join(qt_inst_path(), "bin", "Qt5Core.dll"), os.path.join(qt_inst_path(), "bin", "Qt5Xml.dll")], doclambda(lambda: os.path.join(python.python["build_path"], "PCbuild", arch), "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: if pyqt_dev: pyqt_source = urldownloadany.URLDownloadAny(( urldownload.URLDownload( "https://www.riverbankcomputing.com/static/Downloads/PyQt5/{0}/PyQt5-{0}.zip" .format(pyqt_version), tree_depth=1), urldownload.URLDownload(
# if config.get('prefer_binary_dependencies', False): if False: # binary installation disabled because there is no support currently for headless installation filename = "qt-opensource-windows-x86-{variant}{arch}-{ver}.{ver_min}.exe".format( url=qt_download_url, ver=qt_version, ver_min=qt_version_minor, variant=qt_bin_variant, arch="_64" if config['architecture'] == 'x86_64' else "") qt5 = Project("Qt5") \ .depend(build.Run(filename, working_directory=config['paths']['download']) .depend(urldownload.URLDownload( "{url}/{ver}/{ver}.{ver_min}/{filename}" .format(url=qt_download_url, ver=qt_version, ver_min=qt_version_minor, filename=filename)))) else: skip_list = [ "qtactiveqt", "qtandroidextras", "qtenginio", "qtserialport", "qtsvg", "qtwebengine", "qtwayland", "qtdoc", "qtconnectivity", "qtwebkit-examples" ] nomake_list = ["tests", "examples"] configure_cmd = lambda: " ".join(["configure.bat", "-platform", platform, "-debug-and-release", "-force-debug-info",
# # 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 import Project from unibuild.modules import github, Patch from config import config import os lz4_version = "v1.7.4" Project("lz4") \ .depend(Patch.Copy(os.path.join(config['paths']['build'], "lz4", "dll", "liblz4.dll"), os.path.join(config["paths"]["install"], "bin", "dlls")) .depend(github.Release("lz4", "lz4", lz4_version, "lz4_{0}_win{1}".format(lz4_version.replace(".","_"),"64" if config['architecture'] == 'x86_64' else "32"),"zip") .set_destination("lz4") ) )
# 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 os.path from config import config from unibuild import Project from unibuild.modules import github, Patch lz4_version = config['lz4_version'] lz4_version_minor = ".".join(filter(None, [lz4_version, config['lz4_version_minor']])) lz_path = os.path.join(config['paths']['build'], "lz4-{}".format(lz4_version)) Project("lz4") \ .depend(Patch.Copy(os.path.join(lz_path, "dll", "liblz4.so.{0}.dll".format(lz4_version[1:])), os.path.join(config["paths"]["install"], "bin", "dlls")).set_filename("liblz4.dll") .depend(github.Release("lz4", "lz4", lz4_version_minor, "lz4_{0}_win{1}".format(lz4_version.replace(".", "_"), "64" if config['architecture'] == 'x86_64' else "32"), "zip") .set_destination("lz4-{}".format(lz4_version))))
except OSError as exception: if exception.errno != errno.EEXIST: raise def install(context): make_sure_path_exists(os.path.join(config["paths"]["install"], "libs")) for f in glob(os.path.join(context['build_path'], "*.lib")): shutil.copy(f, os.path.join(config["paths"]["install"], "libs")) return True Project("Udis86") \ .depend(build.Execute(install) .depend((build.CPP().type(build.STATIC_LIB) .sources("libudis86", ["libudis86/decode.c", "libudis86/itab.c", "libudis86/syn.c", "libudis86/syn-att.c", "libudis86/syn-intel.c", "libudis86/udis86.c"]) .custom("libudis86/itab.c", cmd="{python} scripts/ud_itab.py docs/x86/optable.xml" " libudis86".format(**config["__environment"])) ) .depend(sourceforge.Release("udis86", "udis86/{0}/udis86-{0}.{1}.tar.gz".format(udis_version, udis_version_minor), tree_depth=1)) ) )
os.path.join(bp, "sip"), "-e", os.path.join(bp, "include") ], env=config["__environment"], cwd=self._context["build_path"], shell=True, stdout=sout, stderr=serr) proc.communicate() if proc.returncode != 0: logging.error( "failed to run sip configure.py (returncode %s), see %s and %s", proc.returncode, soutpath, serrpath) return False return True Project('sip') \ .depend(build.Execute(copy_pyd) .depend(build.Make(environment=sip_environment()).install() .depend(SipConfigure() .depend("Python") .depend(sourceforge.Release("pyqt", "sip/sip-{0}/sip-{0}.zip".format(sip_version), 1) ) ) ) )