name="Install OpenSSL", working_directory=lambda: os.path.join(openssl_path)) OpenSSL_Build = build.Run(r"nmake", environment=openssl_environment(), name="Building OpenSSL", working_directory=lambda: os.path.join(openssl_path)) Configure_openssl = build.Run( r"{} Configure --openssldir={} --prefix={} 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.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(Configure_openssl .depend(urldownload.URLDownload(url, tree_depth=1) .depend("nasm"))))))
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]))), os.path.join(config["paths"]["install"], "bin")) boost.depend(boost_stage) else:
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( "https://www.riverbankcomputing.com/static/Downloads/PyQt5/{0}/PyQt5_gpl-{0}.zip"
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(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]))),
shutil.copy(os.path.join(build_path, "modorganizer_super", "lootcli", "vsbuild", "src", "external", "src", "cpptoml", "LICENSE"), os.path.join(license_path, "cpptoml.txt")) shutil.copy(os.path.join(build_path, "python-{}{}".format(config['python_version'], config['python_version_minor']),"LICENSE"), os.path.join(license_path, "python.txt")) shutil.copy(os.path.join(build_path, "openssl-{}".format(config['openssl_version']), "LICENSE"), os.path.join(license_path, "openssl.txt")) shutil.copy(os.path.join(build_path, "boost_{}".format(boost_tag_version.replace(".", "_")), "LICENSE_1_0.txt"), os.path.join(license_path, "boost.txt")) shutil.copy(os.path.join(build_path, "7zip-{}".format(config['7zip_version']), "DOC", "License.txt"), os.path.join(license_path, "7zip.txt")) shutil.copy(os.path.join(build_path, "7zip-{}".format(config['7zip_version']), "DOC", "copying.txt"), os.path.join(license_path, "GNU-LGPL-v2.1.txt")) shutil.copy(os.path.join(build_path, "NexusClientCli", "NexusClientCLI", "Castle_License.txt"), os.path.join(license_path, "Castle.txt")) shutil.copy(os.path.join(build_path, "Nexus-Mod-Manager", "lib", "Antlr", "LICENSE.txt"), os.path.join(license_path, "AntlrBuildTask.txt")) shutil.copy(os.path.join(config["paths"]["download"], "DXTex.txt"), os.path.join(license_path, "DXTex.txt")) return True Project("licenses") \ .depend(build.Execute(copy_licenses) .depend(urldownload.URLDownload("https://www.gnu.org/licenses/lgpl-3.0.txt", 0)) .depend(urldownload.URLDownload("https://www.gnu.org/licenses/gpl-3.0.txt", 0)) .depend(urldownload.URLDownload("https://raw.githubusercontent.com/Microsoft/DirectXTex/master/LICENSE", 0).set_download_filename("DXTex.txt")) .depend(urldownload.URLDownload("https://creativecommons.org/licenses/by-sa/3.0/legalcode.txt", 0).set_download_filename("BY-SA-v3.0.txt")) .depend("sip") .depend("modorganizer")) def copy_explorerpp(context): target_path = Path(config["paths"]["install"]) / "bin" / "explorer++" build_path = Path(config["paths"]["build"]) / "explorer++" shutil.copytree(build_path, target_path, dirs_exist_ok = True) return True Project("explorerpp") \
# 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/>. import os.path import shutil from config import config from unibuild import Project from unibuild.modules import build, urldownload def copy(context): shutil.copy2(os.path.join(config["paths"]["download"], "gpl-3.0.txt"), os.path.join(config["paths"]["install"], "bin", "LICENSE")) return True Project("copyright") \ .depend(build.Execute(copy) .depend(urldownload.URLDownload("https://www.gnu.org/licenses/gpl-3.0.txt", 0)))
# 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", "-opensource", "-confirm-license", "-icu",
environment=openssl_environment(), name="Install OpenSSL", working_directory=lambda: os.path.join(openssl_path)) OpenSSL_Build = build.Run(r"nmake -f ms\ntdll.mak", environment=openssl_environment(), name="Building OpenSSL", working_directory=lambda: os.path.join(openssl_path)) OpenSSL_Prep = build.Run(r"ms\do_win64a", environment=openssl_environment(), name="Prepping OpenSSL", working_directory=lambda: os.path.join(openssl_path)) Configure_openssl = build.Run( r"{} Configure --openssldir={} VC-WIN{}A".format(config['paths']['perl'], openssl_path, bitness()), environment=openssl_environment(), name="Configure OpenSSL", 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")))))))
return False 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(build.Execute(copy_init_patch) .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), urldownload.URLDownload( "https://www.riverbankcomputing.com/static/Downloads/PyQt5/PyQt5_gpl-{0}.zip"
# Copyright (C) 2015 Sebastian Herbord. All rights reserved. # Copyright (C) 2016 - 2018 Mod Organizer contributors. # # This file is part of Mod Organizer. # # Mod Organizer is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Mod Organizer is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Mod Organizer. If not, see <http://www.gnu.org/licenses/>. import os from config import config from unibuild import Project from unibuild.modules import cmake, urldownload nuget_version = config['nuget_version'] Project("nuget").depend(urldownload.URLDownload("https://dist.nuget.org/win-x86-commandline/v{}/nuget.exe" .format(nuget_version)) .set_destination("NuGet"))
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 = urldownloadany.URLDownloadAny( (urldownload.URLDownload( "https://www.riverbankcomputing.com/static/Downloads/sip/{0}/sip-{0}.zip" .format(sip_version), 1), urldownload.URLDownload( "https://www.riverbankcomputing.com/static/Downloads/sip/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() result['LIB'] += os.path.join(python_path, "PCbuild", "amd64") logging.debug( os.path.join( os.path.join( config['paths']['build'],
shutil.copy( os.path.join(build_path, "NexusClientCli", "NexusClientCLI", "Castle_License.txt"), os.path.join(license_path, "Castle.txt")) shutil.copy( os.path.join(build_path, "Nexus-Mod-Manager", "lib", "Antlr", "LICENSE.txt"), os.path.join(license_path, "AntlrBuildTask.txt")) shutil.copy(os.path.join(config["paths"]["download"], "LICENSE"), os.path.join(license_path, "DXTex.txt")) return True Project("licenses") \ .depend(build.Execute(copy_licenses) .depend(urldownload.URLDownload("https://www.gnu.org/licenses/lgpl-3.0.txt", 0)) .depend(urldownload.URLDownload("https://www.gnu.org/licenses/gpl-3.0.txt", 0)) .depend(urldownload.URLDownload("https://raw.githubusercontent.com/Microsoft/DirectXTex/master/LICENSE", 0).set_destination("DXTex.txt")) .depend("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)
# # 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)))
os.path.join(build_path, "7zip-{}".format(config['7zip_version']), "DOC", "copying.txt"), os.path.join(license_path, "GNU-LGPL-v2.1.txt")) shutil.copy( os.path.join(build_path, "NexusClientCli", "NexusClientCLI", "Castle_License.txt"), os.path.join(license_path, "Castle.txt")) shutil.copy( os.path.join(build_path, "Nexus-Mod-Manager", "AntlrBuildTask", "LICENSE.txt"), os.path.join(license_path, "AntlrBuildTask.txt")) shutil.copy(os.path.join(config["paths"]["download"], "LICENSE"), os.path.join(license_path, "DXTex.txt")) return True Project("licenses") \ .depend(build.Execute(copy_licenses) .depend(urldownload.URLDownload("https://www.gnu.org/licenses/lgpl-3.0.txt", 0)) .depend(urldownload.URLDownload("https://www.gnu.org/licenses/gpl-3.0.txt", 0)) .depend(urldownload.URLDownload("https://raw.githubusercontent.com/Microsoft/DirectXTex/master/LICENSE", 0).set_destination("DXTex.txt")) .depend("modorganizer")) 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")
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")))))
# 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))
# 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"))
# 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, build, patch from config import config import os # newer versions are beta as of now. They have slightly (?) different api as well sevenzip_version = "16.04" # TODO build sevenzip, we require the dll in install/bin/dlls. # sevenzip is not built here as we only use its source Project("7zip") \ .depend(patch.Copy(os.path.join(config['paths']['build'], "7zip", "CPP", "7zip","Bundles","Format7zF","{}" .format("x86" if config['architecture'] == 'x86' else "AMD64"),"7z.dll"), os.path.join(config['__build_base_path'], "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(config['paths']['build'], "7zip", "CPP", "7zip")) .depend(urldownload.URLDownload("http://www.7-zip.org/a/7z{}-src.7z".format(sevenzip_version.replace(".", ""))).set_destination("7zip"))))
# 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"))
nomake_list = ["tests", "examples"] configure_cmd = lambda: " ".join(["configure.bat", "-platform", platform, "-debug-and-release", "-force-debug-info", "-opensource", "-confirm-license", "-icu", "-mp", "-no-compile-examples", "-no-angle", "-opengl", "desktop", "-ssl", "-openssl-linked", "OPENSSL_LIBS=\"-lssleay32MD -llibeay32MD -lgdi32 -lUser32\"", "-prefix", qt_inst_path] \ + list(itertools.chain(*[("-skip", s) for s in skip_list])) \ + list(itertools.chain(*[("-nomake", n) for n in nomake_list]))) jom = Project("jom") \ .depend(urldownload.URLDownload("http://download.qt.io/official_releases/jom/jom.zip")) def qt5_environment(): result = config['__environment'].copy() result['Path'] = ";".join([ os.path.join(config['paths']['build'], "icu", "dist", "bin"), os.path.join(config['paths']['build'], "icu", "dist", "lib"), os.path.join(config['paths']['build'], "jom") ]) + ";" + result['Path'] result['INCLUDE'] = os.path.join(config['paths']['build'], "icu", "dist", "include") + ";" + \ os.path.join(config['paths']['build'], "Win{}OpenSSL-{}".format(bitness(), openssl_version.replace(".", "_")), "include") + ";" + \ result['INCLUDE'] result['LIB'] = os.path.join(config['paths']['build'], "icu", "dist", "lib") + ";" + \ os.path.join(config['paths']['build'],
#if config.get('prefer_binary_dependencies', False): if False: # the python installer registers in windows and prevent further installations. This means this installation # would interfere with the rest of the system filename = "python-{0}{1}.msi".format( python_version, ".amd64" if config['architecture'] == "x86_64" else "") python = Project("Python") \ .depend(build.Run("msiexec /i {0} TARGETDIR={1} /qn ADDLOCAL=DefaultFeature,SharedCRT" .format(os.path.join(config['paths']['download'], filename), os.path.join(config['paths']['build'], "python-{}".format(python_version)) ) ) .depend(urldownload.URLDownload("{0}/{1}/{2}" .format(python_url, python_version, filename ) ) ) ) else: def install(context): make_sure_path_exists( os.path.join(config["__build_base_path"], "install", "libs")) path_segments = [context['build_path'], "PCbuild"] if config['architecture'] == "x86_64": path_segments.append("amd64") path_segments.append("*.lib") shutil.copy( os.path.join(python['build_path'], "PC", "pyconfig.h"),
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)) )
if config['architecture'] == "x86_64": path_segments.append("amd64") 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")): shutil.copy(f, os.path.join(path_install, "bin")) shutil.copy(os.path.join(path_install, "libs", "python{}.lib".format(python_version.replace(".", ""))), os.path.join(path_install, "libs", "python3.lib")) return True 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)))))))
# 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 # newer versions are beta as of now. They have slightly (?) different api as well sevenzip_version = "9.20" # sevenzip is not built here as we only use its source Project("7zip") \ .depend(urldownload.URLDownload("http://www.7-zip.org/a/7z{}.tar.bz2".format(sevenzip_version.replace(".", ""))))