# 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"))) )
# # 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)))
(config['Main_Author'], "modorganizer-installer_ncc", "installer_ncc", "master", ["Qt5", "modorganizer-uibase", "NCC"], True), (config['Main_Author'], "modorganizer-bsa_extractor", "bsa_extractor", "master", ["Qt5", "modorganizer-uibase"], True), (config['Main_Author'], "modorganizer-plugin_python", "plugin_python", "master", ["Qt5", "boost", "Python", "modorganizer-uibase", "sip"], True), (config['Main_Author'], "githubpp", "githubpp", "master", ["Qt5"], True), (config['Main_Author'], "modorganizer", "modorganizer", "new_vfs_library", [ "Qt5", "boost", "usvfs_32", "modorganizer-uibase", "modorganizer-archive", "modorganizer-bsatk", "modorganizer-esptk", "modorganizer-game_features", "usvfs", "githubpp", "NCC", "openssl" ], True), ]: build_step = cmake.CMake().arguments(cmake_parameters + ["-DCMAKE_INSTALL_PREFIX:PATH={}".format(config["paths"]["install"])]) \ .install() for dep in dependencies: build_step.depend(dep) project = Project(git_path) if Build: vs_step = cmake.CMakeVS().arguments(cmake_parameters + ["-DCMAKE_INSTALL_PREFIX:PATH={}".format(config["paths"]["install"])]) \ .install() for dep in dependencies: vs_step.depend(dep)
# 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, github from config import config # asmjit doesn't currently have any tags/branches but not every commit is usable asmjit_tag = "master" Project("AsmJit") \ .depend(cmake.CMake().arguments( [ "-DASMJIT_STATIC=TRUE", "-DASMJIT_DISABLE_COMPILER=TRUE", "-DCMAKE_INSTALL_PREFIX:PATH={}/install".format(config['__build_base_path'].replace('\\', '/')), "-DCMAKE_BUILD_TYPE={0}".format(config["build_type"]), ]).install() .depend(github.Source("kobalicek", "asmjit", asmjit_tag, update=False) .set_destination("asmjit")) )
# 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 Project("GTest") \ .depend(cmake.CMake().arguments(["-DCMAKE_BUILD_TYPE={0}".format(config["build_type"])]) .depend(github.Source("google", "googletest", "main"))) #.depend(github.Source("google", "googletest", "release-{}".format(googletest_version))))
# 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/>. # TODO This is really old, should by updated to 0.13 from unibuild import Project from unibuild.modules import cmake, github from config import config Project("spdlog") \ .depend(cmake.CMake().arguments( [ "-DCMAKE_INSTALL_PREFIX:PATH={}/install".format(config['__build_base_path'].replace('\\', '/')), "-DCMAKE_BUILD_TYPE={0}".format(config["build_type"]), ]).install() .depend(github.Source("TanninOne", "spdlog", "master").set_destination("spdlog") ) )
# # 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 Project("fmtlib") \ .depend(cmake.CMake().arguments( [ "-DCMAKE_INSTALL_PREFIX:PATH={}".format(config["paths"]["install"].replace('\\', '/')), "-DCMAKE_BUILD_TYPE={0}".format(config["build_type"]), ]).install() .depend(github.Source("fmtlib", "fmt", "3.0.0").set_destination("fmt") ) )
# 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 Project("GTest") \ .depend(cmake.CMake().arguments(["-DCMAKE_BUILD_TYPE={0}".format(config["build_type"])]) .depend(github.Source("google", "googletest", "master", commit="07d4a6e93de43ab47f5a5a3994009f53360e06c8"))) #.depend(github.Source("google", "googletest", "release-{}".format(googletest_version))))
] 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 + ["-DCMAKE_INSTALL_PREFIX:PATH={}".format(config["paths"]["install"])] + [ "-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( github.Source(config['Main_Author'], "usvfs", "master").set_destination("usvfs")).depend( "AsmJit").depend("Udis86").depend("GTest").depend( "fmtlib").depend("spdlog").depend("boost")) if config['architecture'] == 'x86_64': usvfs_32 = Project("usvfs_32") usvfs_32.depend( build.Run_With_Output( r'"{0}" unimake.py -d "{1}" --set architecture="x86" -b "build_32" -p "progress_32" -i "install_32" usvfs' .format(sys.executable, config['__build_base_path']), name="Building usvfs 32bit Dll", environment=config['__Default_environment'],
# 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 fmt_version = config['fmt_version'] Project("fmt") \ .depend(cmake.CMake().arguments(["-DCMAKE_BUILD_TYPE={0}".format(config["build_type"]), "-DFMT_TEST=OFF", "-DFMT_DOC=OFF"]) .depend(github.Release("fmtlib", "fmt", fmt_version, "fmt-" + fmt_version, tree_depth=1)))
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") # )_ )) for author, git_path, path, branch, dependencies in [ (config['Main_Author'], "modorganizer-archive", "archive", "master", ["7zip", "Qt5"]), (config['Main_Author'], "modorganizer-uibase", "uibase", "new_vfs_library", ["Qt5", "boost"]), (config['Main_Author'], "modorganizer-lootcli", "lootcli", "master", ["LootApi", "boost"]),
"-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 [ ("modorganizer-archive", "archive", "master", ["7zip", "Qt5"]), ("modorganizer-uibase", "uibase", "new_vfs_library", ["Qt5", "boost"]), ("modorganizer-lootcli", "lootcli", "master", ["LootApi", "boost"]), ("modorganizer-esptk", "esptk", "master", ["boost"]), ("modorganizer-bsatk", "bsatk", "master", ["zlib"]), ("modorganizer-nxmhandler", "nxmhandler", "master", ["Qt5"]), ("modorganizer-helper", "helper", "master", ["Qt5"]), ("modorganizer-game_gamebryo", "game_gamebryo", "new_vfs_library",