diff --git a/.conan-profiles/ubuntu-debug b/.conan-profiles/ubuntu-debug new file mode 100644 index 0000000..5eff5dc --- /dev/null +++ b/.conan-profiles/ubuntu-debug @@ -0,0 +1,9 @@ +[settings] +arch=x86_64 +arch_build=x86_64 +build_type=Debug +compiler=gcc +compiler.libcxx=libstdc++11 +compiler.version=9 +os=Linux +os_build=Linux \ No newline at end of file diff --git a/.conan-profiles/ubuntu-release b/.conan-profiles/ubuntu-release new file mode 100644 index 0000000..e2fd2df --- /dev/null +++ b/.conan-profiles/ubuntu-release @@ -0,0 +1,9 @@ +[settings] +arch=x86_64 +arch_build=x86_64 +build_type=Release +compiler=gcc +compiler.libcxx=libstdc++11 +compiler.version=9 +os=Linux +os_build=Linux \ No newline at end of file diff --git a/.conan-profiles/vs-2016-debug b/.conan-profiles/vs-2016-debug new file mode 100644 index 0000000..44ab619 --- /dev/null +++ b/.conan-profiles/vs-2016-debug @@ -0,0 +1,8 @@ +[settings] +os=Windows +os_build=Windows +arch=x86_64 +arch_build=x86_64 +compiler=Visual Studio +compiler.version=16 +build_type=Debug \ No newline at end of file diff --git a/.conan-profiles/vs-2016-release b/.conan-profiles/vs-2016-release new file mode 100644 index 0000000..fb9f28c --- /dev/null +++ b/.conan-profiles/vs-2016-release @@ -0,0 +1,8 @@ +[settings] +os=Windows +os_build=Windows +arch=x86_64 +arch_build=x86_64 +compiler=Visual Studio +compiler.version=16 +build_type=Release \ No newline at end of file diff --git a/.conan-profiles/vs-2022-debug b/.conan-profiles/vs-2022-debug new file mode 100644 index 0000000..bc50e33 --- /dev/null +++ b/.conan-profiles/vs-2022-debug @@ -0,0 +1,8 @@ +[settings] +arch=x86_64 +arch_build=x86_64 +build_type=Debug +compiler=Visual Studio +compiler.version=17 +os=Windows +os_build=Windows \ No newline at end of file diff --git a/.conan-profiles/vs-2022-release b/.conan-profiles/vs-2022-release new file mode 100644 index 0000000..c4d9138 --- /dev/null +++ b/.conan-profiles/vs-2022-release @@ -0,0 +1,8 @@ +[settings] +arch=x86_64 +arch_build=x86_64 +build_type=Release +compiler=Visual Studio +compiler.version=17 +os=Windows +os_build=Windows diff --git a/.github/workflows/conan-pkg.yml b/.github/workflows/conan-pkg.yml index 0b1bf4c..f07ad64 100644 --- a/.github/workflows/conan-pkg.yml +++ b/.github/workflows/conan-pkg.yml @@ -12,10 +12,26 @@ jobs: fail-fast: true matrix: config: - - name: Ubuntu - os: ubuntu-latest - - name: Windows - os: windows-2016 + # - name: Ubuntu Debug + # os: ubuntu-latest + # conan-profile: ubuntu-debug + # - name: Ubuntu Release + # os: ubuntu-latest + # conan-profile: ubuntu-release + + # - name: Windows 2016 Debug + # os: windows-2016 + # conan-profile: vs-2016-debug + # - name: Windows 2016 Release + # os: windows-2016 + # conan-profile: vs-2016-release + + - name: Windows 2022 Debug + os: windows-2022 + conan-profile: vs-2022-debug + - name: Windows 2022 Release + os: windows-2022 + conan-profile: vs-2022-release name: ${{ matrix.config.name }} env: @@ -26,13 +42,13 @@ jobs: - uses: actions/setup-python@v2 - name: Install Conan - run: pip install -U conan pyyaml + run: | + pip install -U conan pyyaml + conan profile new default --detect - name: Fix libstdc++11 if: startsWith(matrix.config.os, 'ubuntu') - run: | - conan profile new default --detect - conan profile update settings.compiler.libcxx=libstdc++11 default + run: conan profile update settings.compiler.libcxx=libstdc++11 default - name: Install DX9 SDK if: startsWith(matrix.config.os, 'windows') @@ -46,6 +62,7 @@ jobs: env: CONAN_LOGIN_USERNAME: ${{ secrets.CONAN_LOGIN_USERNAME }} CONAN_PASSWORD: ${{ secrets.CONAN_PASSWORD }} + CONAN_PROFILE: ${{ matrix.config.conan-profile }} run: | conan remote add ror-v2 https://artifactory.anotherfoxguy.com/artifactory/api/conan/rigs-of-rods python build.py diff --git a/build.py b/build.py index d26e233..0810df3 100755 --- a/build.py +++ b/build.py @@ -15,6 +15,8 @@ dirs = glob("./*/") packages = [] +conan_profile = os.getenv('CONAN_PROFILE') + for p in dirs: path = f'{p}/config.yml' if not os.path.isfile(path): @@ -30,8 +32,7 @@ for pkg in packages: system(f"conan export {pkg}") for pkg in packages: - system(f"conan create {pkg} -s=build_type=Release -k -b=outdated") - system(f"conan create {pkg} -s=build_type=Debug -k -b=outdated") + system(f"conan create {pkg} -pr=\"./.conan-profiles/{conan_profile}\" -k -b=outdated") data = list(filter(lambda k: 'anotherfoxguy' in k, subprocess.run( diff --git a/freeimage/all/conanfile.py b/freeimage/all/conanfile.py index 2f62f1f..c727976 100644 --- a/freeimage/all/conanfile.py +++ b/freeimage/all/conanfile.py @@ -1,5 +1,6 @@ from conans import ConanFile, MSBuild, tools, AutoToolsBuildEnvironment from conans.tools import os_info +import glob class freeimageConan(ConanFile): @@ -18,6 +19,9 @@ class freeimageConan(ConanFile): def build(self): if os_info.is_windows: + for file in glob.glob("./**/*2017.vcxproj", recursive=True): + print(f"Patching winsdk in file {file}") + tools.replace_in_file(file, "10.0.16299.0", "10.0", strict=False) msbuild = MSBuild(self) msbuild.build("FreeImage.2017.sln") else: