From 96895aa5bf53c15d217f760e60f452a1d3ff3c18 Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Wed, 12 Feb 2025 22:20:00 +0100 Subject: [PATCH 01/26] Ignore Pycache and generated artifacts --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 11246a5..53a3961 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ builds/ build/ .DS_Store +artifacts +__pycache__ From a7d68a7d84d001854aed0703c43413c2c67d322e Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Wed, 12 Feb 2025 22:27:07 +0100 Subject: [PATCH 02/26] Add some common handling for building software --- scripts/common.py | 121 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 121 insertions(+) create mode 100644 scripts/common.py diff --git a/scripts/common.py b/scripts/common.py new file mode 100644 index 0000000..222d6b1 --- /dev/null +++ b/scripts/common.py @@ -0,0 +1,121 @@ +from abc import abstractmethod +from pathlib import Path +import platform +import shutil +import subprocess +import sys + +SCRIPT_DIR = Path(__file__).resolve().parent +ROOT_DIR = SCRIPT_DIR.parent +BUILD_DIR = ROOT_DIR.joinpath("build") +ARTIFACT_DIR = ROOT_DIR.joinpath("artifacts") + + +class Github: + @staticmethod + def log(msg: str) -> None: + print(msg, flush=True) + + @staticmethod + def notice(msg: str) -> None: + print(f"::notice::{msg}", flush=True) + + @staticmethod + def warning(msg: str) -> None: + print(f"::warning::{msg}", flush=True) + + @staticmethod + def error(msg: str) -> None: + print(f"::error::{msg}", flush=True) + + @staticmethod + def bail(msg: str) -> None: + Github.error(msg) + sys.exit(1) + + class LogGroup: + def __init__(self, msg: str) -> None: + self.msg = msg + + def __enter__(self) -> None: + print(f"::group::{self.msg}", flush=True) + + def __exit__(self, type, value, traceback) -> None: + print(f"::endgroup::", flush=True) + + +def dump_build_notes(name: str, working_dir: Path, output: Path, contents: list[str]): + # Check if the source directory is a git one, if so we can add some cool + # git information to the output directory for storage later. + try: + remote = subprocess.check_output( + ["git", "remote", "get-url", "origin"], text=True, cwd=working_dir + ).strip() + commit_hash = subprocess.check_output( + ["git", "rev-parse", "HEAD"], text=True, cwd=working_dir + ).strip() + + note_text = f"""# {name} + +Compiled from `{remote}`:`{commit_hash}` + +Contains: + +""" + note_text += "\n".join(contents) + output.write_text(note_text) + + except Exception as e: + # Not a git directory or some other failure, don't need to fail anything though + Github.notice( + f"Skipping git information for {working_dir} due to exception: {e}" + ) + pass + + +class Software: + def __init__(self, name: str, dir: str) -> None: + self.name = name + self.source_dir: Path = ROOT_DIR.joinpath(dir) + self.dest_dir: Path = BUILD_DIR.joinpath(dir) + if self.dest_dir.exists(): + shutil.rmtree(self.dest_dir) + self.dest_dir.mkdir(exist_ok=True, parents=True) + + self.outputs: dict[str, list[str]] = [] + self.tools: dict[str, Path] = {} + + @abstractmethod + def build(self) -> None: + pass + + def publish(self) -> None: + publish_dir = ARTIFACT_DIR.joinpath(self.name) + if publish_dir.exists(): + shutil.rmtree(publish_dir) + publish_dir.mkdir(exist_ok=True, parents=True) + + os = platform.system() + if os not in self.outputs.keys(): + Github.bail(f"Unknown platform {os}, unable to handle outputs") + + for output in self.outputs[os]: + output_path = self.dest_dir.joinpath( + output + ).resolve() # Ensure we have resolved symlinks + if not output_path.exists(): + Github.bail(f"Failed to find output [{output_path}]") + continue # Shouldn't be hit, but leaving this here anyway + + # Since output_path might have changed (due to symlinks), re-use the expected + # output name here + new_path = publish_dir.joinpath(Path(output).name) + Github.log(f"[{output_path}] => [{new_path}]") + output_path.rename(new_path) + + dump_build_notes( + self.name, + self.source_dir, + publish_dir.joinpath("notes.md"), + [f"- {self.dest_dir.joinpath(output).name}" for output in self.outputs[os]], + ) From 4d4e05660d439ecd667ec639cf7a92348beedb84 Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Fri, 14 Feb 2025 17:45:25 +0100 Subject: [PATCH 03/26] Add all known software for native-builds --- scripts/software/fluidsynth.py | 65 ++++++++++++++++++++++++++++++++++ scripts/software/freetype.py | 56 +++++++++++++++++++++++++++++ scripts/software/glfw.py | 54 ++++++++++++++++++++++++++++ scripts/software/openal.py | 53 +++++++++++++++++++++++++++ scripts/software/sdl.py | 54 ++++++++++++++++++++++++++++ scripts/software/zstd.py | 57 +++++++++++++++++++++++++++++ 6 files changed, 339 insertions(+) create mode 100644 scripts/software/fluidsynth.py create mode 100644 scripts/software/freetype.py create mode 100644 scripts/software/glfw.py create mode 100644 scripts/software/openal.py create mode 100644 scripts/software/sdl.py create mode 100644 scripts/software/zstd.py diff --git a/scripts/software/fluidsynth.py b/scripts/software/fluidsynth.py new file mode 100644 index 0000000..baf5802 --- /dev/null +++ b/scripts/software/fluidsynth.py @@ -0,0 +1,65 @@ +#!/bin/bash python3 + +import subprocess +import shutil +from common import Software, Github + + +class Fluidsynth(Software): + def __init__(self) -> None: + super().__init__("Fluidsynth", "fluidsynth") + + self.outputs = { + "Windows": [], + "Linux": ["src/libfluidsynth.so"], + "Darwin": ["src/FluidSynth.framework"], + } + + def build(self) -> None: + cmake = shutil.which("cmake") + + Github.log("Setting up CMake...") + result = subprocess.call( + [ + cmake, + f"-B{self.dest_dir}", + "-GNinja", + "-Denable-aufile=OFF", + "-Denable-dbus=OFF", + "-Denable-ipv6=OFF", + "-Denable-jack=OFF", + "-Denable-ladspa=OFF", + "-Denable-libsndfile=OFF", + "-Denable-midishare=OFF", + "-Denable-network=OFF", + "-Denable-oss=OFF", + "-Denable-sdl2=OFF", + "-Denable-pulseaudio=OFF", + "-Denable-readline=OFF", + "-Denable-lash=OFF", + "-DCMAKE_BUILD_TYPE=RelWithDebInfo", + ], + text=True, + cwd=self.source_dir, + ) + if result != 0: + Github.bail("Failed to setup CMake") + + Github.log("Building up CMake...") + subprocess.call( + [ + cmake, + "--build", + ".", + ], + text=True, + cwd=self.dest_dir, + ) + if result != 0: + Github.bail("Failed to build") + + +if __name__ == "__main__": + library = Fluidsynth() + library.build() + library.publish() diff --git a/scripts/software/freetype.py b/scripts/software/freetype.py new file mode 100644 index 0000000..2e3d14b --- /dev/null +++ b/scripts/software/freetype.py @@ -0,0 +1,56 @@ +#!/bin/bash python3 + +import subprocess +import shutil +from common import Software, Github + + +class Freetype(Software): + def __init__(self) -> None: + super().__init__("Freetype", "freetype") + + self.outputs = { + "Windows": [ + "freetype.dll", + "freetype.pdb", + ], + "Linux": ["libfreetype.so"], + "Darwin": ["libfreetype.dylib"], + } + + def build(self) -> None: + cmake = shutil.which("cmake") + + Github.log("Setting up CMake...") + result = subprocess.call( + [ + cmake, + f"-B{self.dest_dir}", + "-GNinja", + "-DBUILD_SHARED_LIBS=On", + "-DCMAKE_BUILD_TYPE=RelWithDebInfo", + ], + text=True, + cwd=self.source_dir, + ) + if result != 0: + Github.bail("Failed to setup CMake") + + Github.log("Building up CMake...") + subprocess.call( + [ + cmake, + "--build", + ".", + ], + text=True, + cwd=self.dest_dir, + ) + if result != 0: + Github.bail("Failed to build") + + +if __name__ == "__main__": + library = Freetype() + library.build() + library.publish() diff --git a/scripts/software/glfw.py b/scripts/software/glfw.py new file mode 100644 index 0000000..39272a7 --- /dev/null +++ b/scripts/software/glfw.py @@ -0,0 +1,54 @@ +#!/bin/bash python3 + +import subprocess +import shutil +from common import Software, Github + + +class GLFW(Software): + def __init__(self) -> None: + super().__init__("GLFW", "glfw") + + self.outputs = { + "Windows": [ + "src/glfw3.dll", + "src/glfw3.pdb", + ], + "Linux": ["src/libglfw.so"], + "Darwin": ["src/libglfw.dylib"], + } + + def build(self) -> None: + cmake = shutil.which("cmake") + + Github.log("Setting up CMake...") + result = subprocess.call( + [ + cmake, + f"-B{self.dest_dir}", + "-GNinja", + "-DBUILD_SHARED_LIBS=On", + "-DGLFW_BUILD_EXAMPLES=Off", + "-DGLFW_BUILD_TESTS=Off", + "-DGLFW_BUILD_DOCS=Off", + "-DGLFW_INSTALL=Off", + "-DCMAKE_BUILD_TYPE=RelWithDebInfo", + ], + text=True, + cwd=self.source_dir, + ) + if result != 0: + Github.bail("Failed to setup CMake") + + Github.log("Building up CMake...") + subprocess.call( + [ + cmake, + "--build", + ".", + ], + text=True, + cwd=self.dest_dir, + ) + if result != 0: + Github.bail("Failed to build") diff --git a/scripts/software/openal.py b/scripts/software/openal.py new file mode 100644 index 0000000..b4cf25c --- /dev/null +++ b/scripts/software/openal.py @@ -0,0 +1,53 @@ +#!/bin/bash python3 + +import subprocess +import shutil +from common import Software, Github + + +class OpenAL(Software): + def __init__(self) -> None: + super().__init__("OpenAL-Soft", "openal-soft") + + self.outputs = { + "Windows": [ + "OpenAL32.dll", + "OpenAL32.pdb", + ], + "Linux": ["libopenal.so"], + "Darwin": ["libopenal.dylib"], + } + + def build(self) -> None: + cmake = shutil.which("cmake") + + Github.log("Setting up CMake...") + result = subprocess.call( + [ + cmake, + f"-B{self.dest_dir}", + "-GNinja", + "-DALSOFT_UTILS=Off", + "-DALSOFT_EXAMPLES=Off", + "-DALSOFT_TESTS=Off", + "-DALSOFT_INSTALL=Off", + "-DCMAKE_BUILD_TYPE=RelWithDebInfo", + ], + text=True, + cwd=self.source_dir, + ) + if result != 0: + Github.bail("Failed to setup CMake") + + Github.log("Building up CMake...") + subprocess.call( + [ + cmake, + "--build", + ".", + ], + text=True, + cwd=self.dest_dir, + ) + if result != 0: + Github.bail("Failed to build") diff --git a/scripts/software/sdl.py b/scripts/software/sdl.py new file mode 100644 index 0000000..a7e38ac --- /dev/null +++ b/scripts/software/sdl.py @@ -0,0 +1,54 @@ +#!/bin/bash python3 + +import subprocess +import shutil +from common import Software, Github + + +class SDL(Software): + def __init__(self) -> None: + super().__init__("SDL", "SDL") + + self.outputs = { + "Windows": [ + "SDL2.dll", + "SDL2.pdb", + ], + "Linux": ["libSDL2-2.0.so"], + "Darwin": ["libSDL2-2.0.dylib"], + } + + def build(self) -> None: + cmake = shutil.which("cmake") + + Github.log("Setting up CMake...") + result = subprocess.call( + [ + cmake, + f"-B{self.dest_dir}", + "-GNinja", + "-DSDL_SHARED=On", + "-DSDL_STATIC=Off", + "-DSDL_WERROR=Off", + "-DSDL_TESTS=Off", + "-DSDL_INSTALL_TESTS=Off", + "-DCMAKE_BUILD_TYPE=RelWithDebInfo", + ], + text=True, + cwd=self.source_dir, + ) + if result != 0: + Github.bail("Failed to setup CMake") + + Github.log("Building up CMake...") + subprocess.call( + [ + cmake, + "--build", + ".", + ], + text=True, + cwd=self.dest_dir, + ) + if result != 0: + Github.bail("Failed to build") diff --git a/scripts/software/zstd.py b/scripts/software/zstd.py new file mode 100644 index 0000000..7132fab --- /dev/null +++ b/scripts/software/zstd.py @@ -0,0 +1,57 @@ +#!/bin/bash python3 + +import subprocess +import shutil +from common import Software, Github + + +class ZStd(Software): + def __init__(self) -> None: + super().__init__("zstd", "zstd") + + self.outputs = { + "Windows": [ + "lib/zstd.dll", + "lib/zstd.pdb", + ], + "Linux": ["lib/libzstd.so"], + "Darwin": ["lib/libzstd.dylib"], + } + + def build(self) -> None: + cmake = shutil.which("cmake") + + Github.log("Setting up CMake...") + result = subprocess.call( + [ + cmake, + "build/cmake", + f"-B{self.dest_dir}", + "-GNinja", + "-DZSTD_BUILD_SHARED=ON", + "-DZSTD_BUILD_STATIC=OFF", + "-DZSTD_BUILD_PROGRAMS=OFF", + "-DZSTD_BUILD_TESTS=OFF", + "-DZSTD_MULTITHREAD_SUPPORT=ON", + "-DZSTD_BUILD_CONTRIB=OFF", + "-DZSTD_LEGACY_SUPPORT=OFF", + "-DCMAKE_BUILD_TYPE=RelWithDebInfo", + ], + text=True, + cwd=self.source_dir, + ) + if result != 0: + Github.bail("Failed to setup CMake") + + Github.log("Building up CMake...") + subprocess.call( + [ + cmake, + "--build", + ".", + ], + text=True, + cwd=self.dest_dir, + ) + if result != 0: + Github.bail("Failed to build") From 7f8e7f375a79dc3dd2d01370c16b64c246b32029 Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Fri, 14 Feb 2025 17:46:25 +0100 Subject: [PATCH 04/26] Add scripts for building on each major platform --- scripts/linux.py | 33 +++++++++++++++++++++++++++++++++ scripts/osx.py | 33 +++++++++++++++++++++++++++++++++ scripts/windows.py | 31 +++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 scripts/linux.py create mode 100644 scripts/osx.py create mode 100644 scripts/windows.py diff --git a/scripts/linux.py b/scripts/linux.py new file mode 100644 index 0000000..0d6fdc4 --- /dev/null +++ b/scripts/linux.py @@ -0,0 +1,33 @@ +#!/bin/bash python3 +from software.zstd import ZStd +from software.glfw import GLFW +from software.sdl import SDL +from software.openal import OpenAL +from software.freetype import Freetype +from software.fluidsynth import Fluidsynth + +from common import Github, Software, dump_build_notes, ARTIFACT_DIR + +from pathlib import Path + +if __name__ == "__main__": + to_build: list[Software] = [ + ZStd(), + GLFW(), + SDL(), + OpenAL(), + Freetype(), + Fluidsynth(), + ] + + for build in to_build: + with Github.LogGroup(f"Building {build.name}"): + build.build() + build.publish() + + dump_build_notes( + "native-build (Linux x64)", + Path("."), + ARTIFACT_DIR.joinpath("notes.md"), + [f"- {build.name}" for build in to_build], + ) diff --git a/scripts/osx.py b/scripts/osx.py new file mode 100644 index 0000000..e470b72 --- /dev/null +++ b/scripts/osx.py @@ -0,0 +1,33 @@ +#!/bin/bash python3 +from software.zstd import ZStd +from software.glfw import GLFW +from software.sdl import SDL +from software.openal import OpenAL +from software.freetype import Freetype +from software.fluidsynth import Fluidsynth + +from common import Github, Software, dump_build_notes, ARTIFACT_DIR + +from pathlib import Path + +if __name__ == "__main__": + to_build: list[Software] = [ + ZStd(), + GLFW(), + SDL(), + OpenAL(), + Freetype(), + Fluidsynth(), + ] + + for build in to_build: + with Github.LogGroup(f"Building {build.name}"): + build.build() + build.publish() + + dump_build_notes( + "native-build (OSX x64)", + Path("."), + ARTIFACT_DIR.joinpath("notes.md"), + [f"- {build.name}" for build in to_build], + ) diff --git a/scripts/windows.py b/scripts/windows.py new file mode 100644 index 0000000..ad163d0 --- /dev/null +++ b/scripts/windows.py @@ -0,0 +1,31 @@ +#!/bin/bash python3 +from software.zstd import ZStd +from software.glfw import GLFW +from software.sdl import SDL +from software.openal import OpenAL +from software.freetype import Freetype + +from common import Github, Software, dump_build_notes, ARTIFACT_DIR + +from pathlib import Path + +if __name__ == "__main__": + to_build: list[Software] = [ + ZStd(), + GLFW(), + SDL(), + OpenAL(), + Freetype(), + ] + + for build in to_build: + with Github.LogGroup(f"Building {build.name}"): + build.build() + build.publish() + + dump_build_notes( + "native-build (Windows x64)", + Path("."), + ARTIFACT_DIR.joinpath("notes.md"), + [f"- {build.name}" for build in to_build], + ) From 35497b14058ea88eb552d6d457e8aa219da04e7c Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Fri, 14 Feb 2025 17:46:38 +0100 Subject: [PATCH 05/26] Update workflow file --- .github/workflows/build.yml | 68 ++++++++++++++++++------------------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 728cc53..b1d4a7f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,68 +4,66 @@ on: workflow_dispatch: jobs: - #osx-x64: - #osx-arm64: - win-x64: - runs-on: windows-2022 + osx-arm64: + runs-on: macos-15 steps: - uses: actions/checkout@v3 with: submodules: true fetch-depth: 0 - - name: bootstrap vcpkg - run: ./vcpkg/bootstrap-vcpkg.bat + - name: Install Deps + run: brew install ninja - - name: build vcpkg packages - run: ./windows/build-vcpkg.ps1 x64-windows win-x64 + - name: Build + run: python ./scripts/osx.py - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: win-x64 - path: builds/win-x64/*.dll + name: osx-arm64 + path: artifacts + if-no-files-found: error - win-arm64: - runs-on: windows-2022 + linux-x64: + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v3 with: submodules: true fetch-depth: 0 - - name: bootstrap vcpkg - run: ./vcpkg/bootstrap-vcpkg.bat + - name: Install Deps + run: sudo apt install -y --no-install-recommends ninja-build libwayland-dev libxkbcommon-dev xorg-dev libgtk-4-dev - - name: build vcpkg packages - run: ./windows/build-vcpkg.ps1 arm64-windows win-arm64 + - name: Build + run: python ./scripts/linux.py - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: win-arm64 - path: builds/win-arm64/*.dll + name: linux-x64 + path: artifacts + if-no-files-found: error - linux-x64: - runs-on: ubuntu-latest + win-x64: + runs-on: windows-2022 steps: - uses: actions/checkout@v3 with: submodules: true fetch-depth: 0 - - name: bootstrap vcpkg - run: ./vcpkg/bootstrap-vcpkg.sh - - - name: create build container - run: | - cd linux - ./build-build-env.sh + - name: Install Deps + shell: cmd + run: choco install ninja --limit-output --no-progress - - name: build vcpkg packages + - name: Build + shell: cmd run: | - cd linux - ./build-vcpkg.sh x64-linux-dynamic linux-x64 + call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Common7\\Tools\\VsDevCmd.bat" + python ./scripts/windows.py - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: - name: linux-x64 - path: builds/linux-x64/*.so* + name: win-x64 + path: artifacts + if-no-files-found: error From 714b4b93261db84c951238c7796e2571b0877395 Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Fri, 14 Feb 2025 17:51:51 +0100 Subject: [PATCH 06/26] Set SDL to cross build a fat binary --- scripts/software/sdl.py | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/scripts/software/sdl.py b/scripts/software/sdl.py index a7e38ac..e5c778e 100644 --- a/scripts/software/sdl.py +++ b/scripts/software/sdl.py @@ -1,5 +1,6 @@ #!/bin/bash python3 +import platform import subprocess import shutil from common import Software, Github @@ -21,19 +22,29 @@ def __init__(self) -> None: def build(self) -> None: cmake = shutil.which("cmake") + cmake_args = [ + cmake, + f"-B{self.dest_dir}", + "-GNinja", + "-DSDL_SHARED=On", + "-DSDL_STATIC=Off", + "-DSDL_WERROR=Off", + "-DSDL_TESTS=Off", + "-DSDL_INSTALL_TESTS=Off", + "-DCMAKE_BUILD_TYPE=RelWithDebInfo", + ] + + if platform.system() == "Darwin": + cmake_args.extend( + [ + "-DCMAKE_OSX_DEPLOYMENT_TARGET=11", + "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64", + ] + ) + Github.log("Setting up CMake...") result = subprocess.call( - [ - cmake, - f"-B{self.dest_dir}", - "-GNinja", - "-DSDL_SHARED=On", - "-DSDL_STATIC=Off", - "-DSDL_WERROR=Off", - "-DSDL_TESTS=Off", - "-DSDL_INSTALL_TESTS=Off", - "-DCMAKE_BUILD_TYPE=RelWithDebInfo", - ], + cmake_args, text=True, cwd=self.source_dir, ) From d89ae29bd16b495169959b3e1271738e520b198f Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Fri, 14 Feb 2025 17:52:58 +0100 Subject: [PATCH 07/26] Delete old scripts for building natives --- build_freetype_macos.ps1 | 17 ------------ linux/.gitignore | 1 - linux/__build-glfw-openal.sh | 34 ----------------------- linux/__build-sdl.sh | 16 ----------- linux/__build-zstd.sh | 21 --------------- linux/build-build-env.sh | 3 --- linux/build-env.Dockerfile | 8 ------ linux/build-glfw-openal-linux.ps1 | 16 ----------- linux/build-sdl.ps1 | 7 ----- linux/build-vcpkg.sh | 14 ---------- linux/build-zstd.ps1 | 7 ----- macos/.gitignore | 1 - macos/build-sdl.sh | 45 ------------------------------- macos/build-zstd.sh | 27 ------------------- windows/.gitignore | 1 - windows/build-vcpkg.ps1 | 21 --------------- windows/build_zstd.ps1 | 22 --------------- 17 files changed, 261 deletions(-) delete mode 100755 build_freetype_macos.ps1 delete mode 100644 linux/.gitignore delete mode 100755 linux/__build-glfw-openal.sh delete mode 100755 linux/__build-sdl.sh delete mode 100755 linux/__build-zstd.sh delete mode 100755 linux/build-build-env.sh delete mode 100644 linux/build-env.Dockerfile delete mode 100755 linux/build-glfw-openal-linux.ps1 delete mode 100755 linux/build-sdl.ps1 delete mode 100755 linux/build-vcpkg.sh delete mode 100755 linux/build-zstd.ps1 delete mode 100644 macos/.gitignore delete mode 100755 macos/build-sdl.sh delete mode 100755 macos/build-zstd.sh delete mode 100644 windows/.gitignore delete mode 100644 windows/build-vcpkg.ps1 delete mode 100644 windows/build_zstd.ps1 diff --git a/build_freetype_macos.ps1 b/build_freetype_macos.ps1 deleted file mode 100755 index 5ea60c3..0000000 --- a/build_freetype_macos.ps1 +++ /dev/null @@ -1,17 +0,0 @@ -#!/usr/bin/env pwsh - -if (test-path builds/freetype) -{ - write-host "removing previous build directory" - remove-item -recurse builds/freetype -} - -new-item -itemtype directory builds/freetype | Out-Null - -push-location builds/freetype - -cmake ../../freetype -DCMAKE_RELEASE_TYPE=Release -DBUILD_SHARED_LIBS=true -$procCount = [Environment]::ProcessorCount -make "-j$procCount" - -pop-location \ No newline at end of file diff --git a/linux/.gitignore b/linux/.gitignore deleted file mode 100644 index c795b05..0000000 --- a/linux/.gitignore +++ /dev/null @@ -1 +0,0 @@ -build \ No newline at end of file diff --git a/linux/__build-glfw-openal.sh b/linux/__build-glfw-openal.sh deleted file mode 100755 index 9e85c10..0000000 --- a/linux/__build-glfw-openal.sh +++ /dev/null @@ -1,34 +0,0 @@ -#!/bin/bash - -# This script is used internally in the Docker container. -# Don't run it directly. Run build-glfw-openal-linux.ps1 instead - -cd /opt - -# Build GLFW. -pushd glfw -mkdir build -cd build -cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -make -j $(nproc) -popd - -# Build OpenAL. -pushd openal-soft -mkdir build -cd build -cmake .. -DCMAKE_BUILD_TYPE=Release -make -j $(nproc) -popd - -# Build FluidSynth -pushd fluidsynth -mkdir build -cd build -cmake .. -DCMAKE_BUILD_TYPE=Release \ --Denable-aufile=OFF -Denable-dbus=OFF -Denable-ipv6=OFF -Denable-jack=OFF -Denable-ladspa=OFF \ --Denable-libsndfile=OFF -Denable-midishare=OFF -Denable-network=OFF -Denable-oss=OFF -Denable-sdl2=OFF -Denable-pulseaudio=OFF -Denable-readline=OFF \ --Denable-lash=OFF -make -j $(nproc) -popd - diff --git a/linux/__build-sdl.sh b/linux/__build-sdl.sh deleted file mode 100755 index 6f542f6..0000000 --- a/linux/__build-sdl.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -cd /opt/linux - -mkdir -p build/sdl - -cd build/sdl - -cmake ../../../SDL/ \ - -DCMAKE_BUILD_TYPE=Release \ - -DSDL_STATIC=OFF \ - -DSDL_SHARED=ON \ - -DSDL_TEST=OFF - -make -j $(nproc) - diff --git a/linux/__build-zstd.sh b/linux/__build-zstd.sh deleted file mode 100755 index 57998a0..0000000 --- a/linux/__build-zstd.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -cd /opt/linux - -mkdir build/ -mkdir build/zstd - -cd build/zstd - -cmake ../../../zstd/build/cmake \ - -DZSTD_BUILD_SHARED=ON \ - -DZSTD_BUILD_STATIC=OFF \ - -DZSTD_BUILD_PROGRAMS=OFF \ - -DZSTD_BUILD_TESTS=OFF \ - -DZSTD_MULTITHREAD_SUPPORT=ON \ - -DZSTD_BUILD_CONTRIB=OFF \ - -DZSTD_LEGACY_SUPPORT=OFF \ - -DCMAKE_BUILD_TYPE=Release - -make -j $(nproc) - diff --git a/linux/build-build-env.sh b/linux/build-build-env.sh deleted file mode 100755 index ca401dd..0000000 --- a/linux/build-build-env.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -docker build -t ss14-native-build:1.0 -f build-env.Dockerfile . diff --git a/linux/build-env.Dockerfile b/linux/build-env.Dockerfile deleted file mode 100644 index 58586f8..0000000 --- a/linux/build-env.Dockerfile +++ /dev/null @@ -1,8 +0,0 @@ -FROM ubuntu:20.04 - -RUN apt-get update -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends xorg-dev gcc build-essential git make cmake libpulse-dev libasound-dev zip tar curl unzip ca-certificates -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libglib2.0-dev -# SDL2 dependencies -RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends build-essential git make autoconf automake libtool pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev libaudio-dev libjack-dev libsndio-dev libsamplerate0-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev -RUN DEBIAN_FRONTEND=noninteractive apt-get upgrade -y diff --git a/linux/build-glfw-openal-linux.ps1 b/linux/build-glfw-openal-linux.ps1 deleted file mode 100755 index 01a16b4..0000000 --- a/linux/build-glfw-openal-linux.ps1 +++ /dev/null @@ -1,16 +0,0 @@ -#!/usr/bin/env pwsh - -# Make sure to run build-build-env.ps1 first to build the Docker container. - -Set-Location .. - -docker run --rm -v "${pwd}:/opt" ss14-native-build:1.0 "/bin/bash" "/opt/linux/__build-glfw-openal.sh" - -new-item -Force -itemtype Directory builds/glfw/ -new-item -Force -itemtype Directory builds/openal/ -new-item -Force -itemtype Directory builds/fluidsynth/ - -copy-item glfw/build/src/libglfw.so.3.3 builds/glfw/libglfw.so -copy-item openal-soft/build/libopenal.so.1.20.1 builds/openal/libopenal.so -copy-item fluidsynth/build/src/libfluidsynth.so.2.3.3 builds/fluidsynth/libfluidsynth.so - diff --git a/linux/build-sdl.ps1 b/linux/build-sdl.ps1 deleted file mode 100755 index 982153b..0000000 --- a/linux/build-sdl.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env pwsh - -docker run --rm -v "${pwd}/..:/opt" ss14-native-build:1.0 "/bin/bash" "/opt/linux/__build-sdl.sh" - -new-item -Force -itemtype Directory ../builds/sdl/ -copy-item build/sdl/libSDL2-2.0.so ../builds/sdl/ - diff --git a/linux/build-vcpkg.sh b/linux/build-vcpkg.sh deleted file mode 100755 index 1d89a92..0000000 --- a/linux/build-vcpkg.sh +++ /dev/null @@ -1,14 +0,0 @@ -# Build all vcpkg-provided packages on Windows. - -TRIPLET=$1 -RID=$2 - -docker run --rm -v "$(pwd)/..:/opt" ss14-native-build:1.0 /opt/vcpkg/vcpkg install --triplet "$TRIPLET" "sdl2[vulkan]" "openal-soft" "freetype[core]" "glfw3" - -TO_COPY=("libSDL2-2.0.so.0" "libfreetype.so.6" "libglfw.so.3" "libopenal.so.1") - -mkdir -p "../builds/$RID" - -for native in ${TO_COPY[@]}; do - cp "../vcpkg/installed/$TRIPLET/lib/$native" "../builds/$RID/$native" -done diff --git a/linux/build-zstd.ps1 b/linux/build-zstd.ps1 deleted file mode 100755 index 3b4f951..0000000 --- a/linux/build-zstd.ps1 +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env pwsh - -docker run --rm -v "${pwd}/..:/opt" ss14-native-build:1.0 "/bin/bash" "/opt/linux/__build-zstd.sh" - -new-item -Force -itemtype Directory ../builds/zstd/ -copy-item build/zstd/lib/libzstd.so ../builds/zstd/ - diff --git a/macos/.gitignore b/macos/.gitignore deleted file mode 100644 index c795b05..0000000 --- a/macos/.gitignore +++ /dev/null @@ -1 +0,0 @@ -build \ No newline at end of file diff --git a/macos/build-sdl.sh b/macos/build-sdl.sh deleted file mode 100755 index c70ced8..0000000 --- a/macos/build-sdl.sh +++ /dev/null @@ -1,45 +0,0 @@ -#!/bin/bash - -set -e - -mkdir -p "build/sdl/" -pushd "build/sdl" - -mkdir "arm64" -mkdir "x64" - -( - # ARM64 build - cmake -S ../../../SDL/ -B arm64 \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=11 \ - -DCMAKE_OSX_ARCHITECTURES=arm64 \ - -DSDL_STATIC=OFF \ - -DSDL_SHARED=ON \ - -DSDL_TEST=OFF - - cmake --build arm64 --parallel -) & - -( - # x64 build - cmake -S ../../../SDL/ -B x64 \ - -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_OSX_DEPLOYMENT_TARGET=10.15 \ - -DCMAKE_OSX_ARCHITECTURES=x86_64 \ - -DSDL_STATIC=OFF \ - -DSDL_SHARED=ON \ - -DSDL_TEST=OFF - - cmake --build x64 --parallel -) & - -wait - -popd - -mkdir -p builds/sdl/osx-arm64 -mkdir -p builds/sdl/osx-x64 - -cp build/sdl/arm64/libSDL2-2.0.0.dylib builds/sdl/osx-arm64/ -cp build/sdl/x64/libSDL2-2.0.0.dylib builds/sdl/osx-x64/ \ No newline at end of file diff --git a/macos/build-zstd.sh b/macos/build-zstd.sh deleted file mode 100755 index 99173fa..0000000 --- a/macos/build-zstd.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -mkdir build/ -mkdir build/zstd - -pushd build/zstd - -cmake ../../../zstd/build/cmake \ - -DZSTD_BUILD_SHARED=ON \ - -DZSTD_BUILD_STATIC=OFF \ - -DZSTD_BUILD_PROGRAMS=OFF \ - -DZSTD_BUILD_TESTS=OFF \ - -DZSTD_MULTITHREAD_SUPPORT=ON \ - -DZSTD_BUILD_CONTRIB=OFF \ - -DZSTD_LEGACY_SUPPORT=OFF \ - -DCMAKE_BUILD_TYPE=Release - -# I don't know how to do nproc on mac and this 10 year old iMac has 4 cores so have fun. -make -j 4 - -popd - -mkdir ../builds -mkdir ../builds/zstd -mkdir ../builds/zstd/osx-x64 -cp build/zstd/lib/libzstd.dylib ../builds/zstd/osx-x64/libzstd.dylib - diff --git a/windows/.gitignore b/windows/.gitignore deleted file mode 100644 index c795b05..0000000 --- a/windows/.gitignore +++ /dev/null @@ -1 +0,0 @@ -build \ No newline at end of file diff --git a/windows/build-vcpkg.ps1 b/windows/build-vcpkg.ps1 deleted file mode 100644 index 7ec2d03..0000000 --- a/windows/build-vcpkg.ps1 +++ /dev/null @@ -1,21 +0,0 @@ -# Build all vcpkg-provided packages on Windows. - -param( - [Parameter(Position = 0, mandatory = $true)] - [string]$triplet, - - [Parameter(Position = 1, mandatory = $true)] - [string]$rid -) - -Push-Location $(Join-Path $PSScriptRoot "..") - -vcpkg\vcpkg.exe install --triplet $triplet "sdl2[vulkan]" "openal-soft" "freetype[core]" "glfw3" - -$files_to_copy = @("glfw3.dll", "SDL2.dll", "OpenAL32.dll", "freetype.dll") -New-Item -ItemType Directory -Force "builds" -New-Item -ItemType Directory -Force "builds\$rid" - -$files_to_copy | ForEach-Object { - Copy-Item "vcpkg\installed\$triplet\bin\$_" "builds\$rid\$_" -} diff --git a/windows/build_zstd.ps1 b/windows/build_zstd.ps1 deleted file mode 100644 index d7f71b6..0000000 --- a/windows/build_zstd.ps1 +++ /dev/null @@ -1,22 +0,0 @@ -# Run from VS 2015 native tools (x64) - -$dir = New-Item -Force -ItemType Directory build/zstd -Push-Location $dir - -cmake ../../../zstd/build/cmake ` - -GNinja ` - -DZSTD_BUILD_SHARED=ON ` - -DZSTD_BUILD_STATIC=OFF ` - -DZSTD_BUILD_PROGRAMS=OFF ` - -DZSTD_BUILD_TESTS=OFF ` - -DZSTD_MULTITHREAD_SUPPORT=ON ` - -DZSTD_BUILD_CONTRIB=OFF ` - -DZSTD_LEGACY_SUPPORT=OFF ` - -DCMAKE_BUILD_TYPE=Release - -cmake --build . - -$dest = New-Item -Force -ItemType Directory ../../../builds/zstd -Copy-Item lib/zstd.dll $dest - -Pop-Location \ No newline at end of file From 2cf9f5fde21fda826724b3c1937a4536de06daf5 Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Fri, 14 Feb 2025 18:01:43 +0100 Subject: [PATCH 08/26] Add a short readme --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..9735abc --- /dev/null +++ b/README.md @@ -0,0 +1,8 @@ +# SS14 Native-Build + +A collection of submodules providing dependencies for building [Space Station 14](https://github.com/space-wizards/space-station-14). + +Building is handled through the `Build Natives` workflow action and relies on Github's runners to perform the actual compilation. +Local building is possible by running your platform's python file under the [scripts](./scripts/) directory. Though you will need to make sure you have all dependencies setup to actually build. Consult the [workflow](./.github/workflows/build.yml) file for your platform and see what's installed from the `Install Deps` step. + +Each platform produces an zip file containing all relevant shared libs for it, any debug symbols, and a `notes.md` giving information on where and what commit the code came from. From 6bd2bfe9edee38b3eb755197bc55269085e0cfdb Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Sun, 16 Feb 2025 08:56:59 +0100 Subject: [PATCH 09/26] Don't build freetype on linux --- scripts/linux.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/linux.py b/scripts/linux.py index 0d6fdc4..2664f9e 100644 --- a/scripts/linux.py +++ b/scripts/linux.py @@ -3,7 +3,6 @@ from software.glfw import GLFW from software.sdl import SDL from software.openal import OpenAL -from software.freetype import Freetype from software.fluidsynth import Fluidsynth from common import Github, Software, dump_build_notes, ARTIFACT_DIR @@ -16,7 +15,6 @@ GLFW(), SDL(), OpenAL(), - Freetype(), Fluidsynth(), ] From b0fb5f00f508411b49ddb677ed41a4946bb676af Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Sun, 16 Feb 2025 09:12:33 +0100 Subject: [PATCH 10/26] Use older ubuntu version for linux builds --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b1d4a7f..6ec9ef7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,7 +25,7 @@ jobs: if-no-files-found: error linux-x64: - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 with: From 0139029c5089dceaa7c028a914d41910de5c826a Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Sun, 16 Feb 2025 18:27:08 +0100 Subject: [PATCH 11/26] Add specific Platform enum --- scripts/common.py | 23 +++++++++++++++++++++-- scripts/software/fluidsynth.py | 8 ++++---- scripts/software/freetype.py | 8 ++++---- scripts/software/glfw.py | 8 ++++---- scripts/software/openal.py | 8 ++++---- scripts/software/sdl.py | 10 +++++----- scripts/software/zstd.py | 8 ++++---- 7 files changed, 46 insertions(+), 27 deletions(-) diff --git a/scripts/common.py b/scripts/common.py index 222d6b1..eb8d963 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -1,6 +1,7 @@ from abc import abstractmethod from pathlib import Path -import platform +from enum import Enum +import platform as _platform # Python gets confused with similar names here import shutil import subprocess import sys @@ -11,6 +12,24 @@ ARTIFACT_DIR = ROOT_DIR.joinpath("artifacts") +class Platform(Enum): + Windows = (1,) + Linux = (2,) + OSX = (3,) + + @staticmethod + def get() -> "Platform": + platform = _platform.system() + if platform == "Windows": + return Platform.Windows + elif platform == "Linux": + return Platform.Linux + elif platform == "Darwin": + return Platform.OSX + else: + raise RuntimeError(f"Unknown platform {platform}") + + class Github: @staticmethod def log(msg: str) -> None: @@ -95,7 +114,7 @@ def publish(self) -> None: shutil.rmtree(publish_dir) publish_dir.mkdir(exist_ok=True, parents=True) - os = platform.system() + os = Platform.get() if os not in self.outputs.keys(): Github.bail(f"Unknown platform {os}, unable to handle outputs") diff --git a/scripts/software/fluidsynth.py b/scripts/software/fluidsynth.py index baf5802..d5d3c4a 100644 --- a/scripts/software/fluidsynth.py +++ b/scripts/software/fluidsynth.py @@ -2,7 +2,7 @@ import subprocess import shutil -from common import Software, Github +from common import Software, Github, Platform class Fluidsynth(Software): @@ -10,9 +10,9 @@ def __init__(self) -> None: super().__init__("Fluidsynth", "fluidsynth") self.outputs = { - "Windows": [], - "Linux": ["src/libfluidsynth.so"], - "Darwin": ["src/FluidSynth.framework"], + Platform.Windows: [], + Platform.Linux: ["src/libfluidsynth.so"], + Platform.OSX: ["src/FluidSynth.framework"], } def build(self) -> None: diff --git a/scripts/software/freetype.py b/scripts/software/freetype.py index 2e3d14b..334841a 100644 --- a/scripts/software/freetype.py +++ b/scripts/software/freetype.py @@ -2,7 +2,7 @@ import subprocess import shutil -from common import Software, Github +from common import Software, Github, Platform class Freetype(Software): @@ -10,12 +10,12 @@ def __init__(self) -> None: super().__init__("Freetype", "freetype") self.outputs = { - "Windows": [ + Platform.Windows: [ "freetype.dll", "freetype.pdb", ], - "Linux": ["libfreetype.so"], - "Darwin": ["libfreetype.dylib"], + Platform.Linux: ["libfreetype.so"], + Platform.OSX: ["libfreetype.dylib"], } def build(self) -> None: diff --git a/scripts/software/glfw.py b/scripts/software/glfw.py index 39272a7..824998b 100644 --- a/scripts/software/glfw.py +++ b/scripts/software/glfw.py @@ -2,7 +2,7 @@ import subprocess import shutil -from common import Software, Github +from common import Software, Github, Platform class GLFW(Software): @@ -10,12 +10,12 @@ def __init__(self) -> None: super().__init__("GLFW", "glfw") self.outputs = { - "Windows": [ + Platform.Windows: [ "src/glfw3.dll", "src/glfw3.pdb", ], - "Linux": ["src/libglfw.so"], - "Darwin": ["src/libglfw.dylib"], + Platform.Linux: ["src/libglfw.so"], + Platform.OSX: ["src/libglfw.dylib"], } def build(self) -> None: diff --git a/scripts/software/openal.py b/scripts/software/openal.py index b4cf25c..a03379e 100644 --- a/scripts/software/openal.py +++ b/scripts/software/openal.py @@ -2,7 +2,7 @@ import subprocess import shutil -from common import Software, Github +from common import Software, Github, Platform class OpenAL(Software): @@ -10,12 +10,12 @@ def __init__(self) -> None: super().__init__("OpenAL-Soft", "openal-soft") self.outputs = { - "Windows": [ + Platform.Windows: [ "OpenAL32.dll", "OpenAL32.pdb", ], - "Linux": ["libopenal.so"], - "Darwin": ["libopenal.dylib"], + Platform.Linux: ["libopenal.so"], + Platform.OSX: ["libopenal.dylib"], } def build(self) -> None: diff --git a/scripts/software/sdl.py b/scripts/software/sdl.py index e5c778e..f30b7c9 100644 --- a/scripts/software/sdl.py +++ b/scripts/software/sdl.py @@ -3,7 +3,7 @@ import platform import subprocess import shutil -from common import Software, Github +from common import Software, Github, Platform class SDL(Software): @@ -11,12 +11,12 @@ def __init__(self) -> None: super().__init__("SDL", "SDL") self.outputs = { - "Windows": [ + Platform.Windows: [ "SDL2.dll", "SDL2.pdb", ], - "Linux": ["libSDL2-2.0.so"], - "Darwin": ["libSDL2-2.0.dylib"], + Platform.Linux: ["libSDL2-2.0.so"], + Platform.OSX: ["libSDL2-2.0.dylib"], } def build(self) -> None: @@ -34,7 +34,7 @@ def build(self) -> None: "-DCMAKE_BUILD_TYPE=RelWithDebInfo", ] - if platform.system() == "Darwin": + if platform.system() == Platform.OSX: cmake_args.extend( [ "-DCMAKE_OSX_DEPLOYMENT_TARGET=11", diff --git a/scripts/software/zstd.py b/scripts/software/zstd.py index 7132fab..5dbc04d 100644 --- a/scripts/software/zstd.py +++ b/scripts/software/zstd.py @@ -2,7 +2,7 @@ import subprocess import shutil -from common import Software, Github +from common import Software, Github, Platform class ZStd(Software): @@ -10,12 +10,12 @@ def __init__(self) -> None: super().__init__("zstd", "zstd") self.outputs = { - "Windows": [ + Platform.Windows: [ "lib/zstd.dll", "lib/zstd.pdb", ], - "Linux": ["lib/libzstd.so"], - "Darwin": ["lib/libzstd.dylib"], + Platform.Linux: ["lib/libzstd.so"], + Platform.OSX: ["lib/libzstd.dylib"], } def build(self) -> None: From 135832e5222fe71191d661abaa325f54f78767fe Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Sun, 16 Feb 2025 18:28:13 +0100 Subject: [PATCH 12/26] Build OSX binaries as x64 only --- .github/workflows/build.yml | 6 +++--- scripts/software/sdl.py | 9 --------- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 6ec9ef7..359efbc 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -4,8 +4,8 @@ on: workflow_dispatch: jobs: - osx-arm64: - runs-on: macos-15 + osx-x64: + runs-on: macos-13 steps: - uses: actions/checkout@v3 with: @@ -20,7 +20,7 @@ jobs: - uses: actions/upload-artifact@v4 with: - name: osx-arm64 + name: osx-x64 path: artifacts if-no-files-found: error diff --git a/scripts/software/sdl.py b/scripts/software/sdl.py index f30b7c9..e8cbfe6 100644 --- a/scripts/software/sdl.py +++ b/scripts/software/sdl.py @@ -1,6 +1,5 @@ #!/bin/bash python3 -import platform import subprocess import shutil from common import Software, Github, Platform @@ -34,14 +33,6 @@ def build(self) -> None: "-DCMAKE_BUILD_TYPE=RelWithDebInfo", ] - if platform.system() == Platform.OSX: - cmake_args.extend( - [ - "-DCMAKE_OSX_DEPLOYMENT_TARGET=11", - "-DCMAKE_OSX_ARCHITECTURES=arm64;x86_64", - ] - ) - Github.log("Setting up CMake...") result = subprocess.call( cmake_args, From b42d8fe94e792be4baabc5070ce5be6fcd838b61 Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Sun, 16 Feb 2025 21:26:18 +0100 Subject: [PATCH 13/26] Strip debug information out of linux files and place them into .debug ones --- scripts/common.py | 14 +++++++------- scripts/linux.py | 20 +++++++++++++++++++- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/scripts/common.py b/scripts/common.py index eb8d963..de011b5 100644 --- a/scripts/common.py +++ b/scripts/common.py @@ -101,6 +101,11 @@ def __init__(self, name: str, dir: str) -> None: shutil.rmtree(self.dest_dir) self.dest_dir.mkdir(exist_ok=True, parents=True) + self.publish_dir = ARTIFACT_DIR.joinpath(self.name) + if self.publish_dir.exists(): + shutil.rmtree(self.publish_dir) + self.publish_dir.mkdir(exist_ok=True, parents=True) + self.outputs: dict[str, list[str]] = [] self.tools: dict[str, Path] = {} @@ -109,11 +114,6 @@ def build(self) -> None: pass def publish(self) -> None: - publish_dir = ARTIFACT_DIR.joinpath(self.name) - if publish_dir.exists(): - shutil.rmtree(publish_dir) - publish_dir.mkdir(exist_ok=True, parents=True) - os = Platform.get() if os not in self.outputs.keys(): Github.bail(f"Unknown platform {os}, unable to handle outputs") @@ -128,13 +128,13 @@ def publish(self) -> None: # Since output_path might have changed (due to symlinks), re-use the expected # output name here - new_path = publish_dir.joinpath(Path(output).name) + new_path = self.publish_dir.joinpath(Path(output).name) Github.log(f"[{output_path}] => [{new_path}]") output_path.rename(new_path) dump_build_notes( self.name, self.source_dir, - publish_dir.joinpath("notes.md"), + self.publish_dir.joinpath("notes.md"), [f"- {self.dest_dir.joinpath(output).name}" for output in self.outputs[os]], ) diff --git a/scripts/linux.py b/scripts/linux.py index 2664f9e..f5fabf2 100644 --- a/scripts/linux.py +++ b/scripts/linux.py @@ -5,9 +5,10 @@ from software.openal import OpenAL from software.fluidsynth import Fluidsynth -from common import Github, Software, dump_build_notes, ARTIFACT_DIR +from common import Github, Software, dump_build_notes, ARTIFACT_DIR, Platform from pathlib import Path +import subprocess if __name__ == "__main__": to_build: list[Software] = [ @@ -21,6 +22,23 @@ for build in to_build: with Github.LogGroup(f"Building {build.name}"): build.build() + + # Strip debug information out per build's outputs + new_outputs = [] + for output_name in build.outputs[Platform.Linux]: + Github.log(f"Moving debug information for {output_name}") + debug_name = f"{output_name}.debug" + subprocess.call( + [ + "objcopy", + "--only-keep-debug", + str(build.dest_dir.joinpath(output_name)), + str(build.dest_dir.joinpath(debug_name)), + ] + ) + new_outputs.append(debug_name) + build.outputs[Platform.Linux].extend(new_outputs) + build.publish() dump_build_notes( From c1bcb9fd63af16f939ab2dfd781814ad865de8c2 Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Tue, 18 Feb 2025 16:56:09 +0100 Subject: [PATCH 14/26] Re-add docker file for linux and use it during builds --- .github/workflows/build.yml | 15 ++++++++++----- scripts/linux-build-env.Dockerfile | 8 ++++++++ 2 files changed, 18 insertions(+), 5 deletions(-) create mode 100644 scripts/linux-build-env.Dockerfile diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 359efbc..0ae10ee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -25,18 +25,23 @@ jobs: if-no-files-found: error linux-x64: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v3 with: submodules: true fetch-depth: 0 - - name: Install Deps - run: sudo apt install -y --no-install-recommends ninja-build libwayland-dev libxkbcommon-dev xorg-dev libgtk-4-dev + - uses: docker/build-push-action@v2 + with: + tags: native-build:latest + file: scripts/linux-build-env.Dockerfile + push: false - - name: Build - run: python ./scripts/linux.py + - uses: addnab/docker-run-action@v3 + with: + image: native-build:latest + run: python ./scripts/linux.py - uses: actions/upload-artifact@v4 with: diff --git a/scripts/linux-build-env.Dockerfile b/scripts/linux-build-env.Dockerfile new file mode 100644 index 0000000..a437d86 --- /dev/null +++ b/scripts/linux-build-env.Dockerfile @@ -0,0 +1,8 @@ +FROM ubuntu:20.04 + +RUN apt-get update +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends xorg-dev gcc build-essential git make cmake libpulse-dev libasound-dev zip tar curl unzip ca-certificates +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends libglib2.0-dev +# SDL2 dependencies +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends build-essential git make autoconf automake libtool pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev libaudio-dev libjack-dev libsndio-dev libsamplerate0-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev +RUN DEBIAN_FRONTEND=noninteractive apt-get upgrade -y From 9805b9c47f42d0bc9180195a9609441a98a37fae Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Sun, 16 Feb 2025 08:57:34 +0100 Subject: [PATCH 15/26] Build fluidsynth on Windows --- scripts/windows.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/windows.py b/scripts/windows.py index ad163d0..295abcd 100644 --- a/scripts/windows.py +++ b/scripts/windows.py @@ -3,6 +3,7 @@ from software.glfw import GLFW from software.sdl import SDL from software.openal import OpenAL +from software.fluidsynth import Fluidsynth from software.freetype import Freetype from common import Github, Software, dump_build_notes, ARTIFACT_DIR @@ -15,6 +16,7 @@ GLFW(), SDL(), OpenAL(), + Fluidsynth(), Freetype(), ] From 4114732c47a09a22b38285adfa9fefcc98111c03 Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Mon, 17 Feb 2025 21:27:57 +0100 Subject: [PATCH 16/26] Add fluidsynth build setup for windows --- .gitignore | 1 + scripts/software/fluidsynth.py | 66 ++++++++++++++++++++++------------ scripts/windows.py | 9 +++-- vcpkg-configuration.json | 14 ++++++++ vcpkg.json | 6 ++++ 5 files changed, 71 insertions(+), 25 deletions(-) create mode 100644 vcpkg-configuration.json create mode 100644 vcpkg.json diff --git a/.gitignore b/.gitignore index 53a3961..80a5dcf 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,4 @@ build/ .DS_Store artifacts __pycache__ +vcpkg_installed diff --git a/scripts/software/fluidsynth.py b/scripts/software/fluidsynth.py index d5d3c4a..7663bb8 100644 --- a/scripts/software/fluidsynth.py +++ b/scripts/software/fluidsynth.py @@ -1,8 +1,9 @@ #!/bin/bash python3 +import os import subprocess import shutil -from common import Software, Github, Platform +from common import Software, Github, Platform, ROOT_DIR class Fluidsynth(Software): @@ -10,7 +11,7 @@ def __init__(self) -> None: super().__init__("Fluidsynth", "fluidsynth") self.outputs = { - Platform.Windows: [], + Platform.Windows: ["src/fluidsynth.lib", "src/fluidsynth.pdb"], Platform.Linux: ["src/libfluidsynth.so"], Platform.OSX: ["src/FluidSynth.framework"], } @@ -19,28 +20,47 @@ def build(self) -> None: cmake = shutil.which("cmake") Github.log("Setting up CMake...") + generation_args = [ + cmake, + f"-B{self.dest_dir}", + "-GNinja", + "-Denable-aufile=OFF", + "-Denable-dbus=OFF", + "-Denable-ipv6=OFF", + "-Denable-jack=OFF", + "-Denable-ladspa=OFF", + "-Denable-libsndfile=OFF", + "-Denable-midishare=OFF", + "-Denable-network=OFF", + "-Denable-oss=OFF", + "-Denable-sdl2=OFF", + "-Denable-pulseaudio=OFF", + "-Denable-readline=OFF", + "-Denable-lash=OFF", + "-DCMAKE_BUILD_TYPE=RelWithDebInfo", + ] + + generation_env = os.environ.copy() + + if Platform.get() == Platform.Windows: + vc_install_dir = ROOT_DIR.joinpath("vcpkg_installed/x64-windows") + tools_directories = [ + str(vc_install_dir.joinpath("tools/pkgconf")), + str(vc_install_dir.joinpath("lib")), + ] + + generation_args += [ + "-DCMAKE_WARN_DEPRECATED=Off", # So much spam from the vcpkg.cmake file + f"-DCMAKE_TOOLCHAIN_FILE={os.getenv('VCPKG_ROOT')}/scripts/buildsystems/vcpkg.cmake", + f"-DCMAKE_PROGRAM_PATH={';'.join(tools_directories)}", + ] + + generation_env["PKG_CONFIG_PATH"] = str( + vc_install_dir.joinpath("lib\\pkgconfig") + ) + result = subprocess.call( - [ - cmake, - f"-B{self.dest_dir}", - "-GNinja", - "-Denable-aufile=OFF", - "-Denable-dbus=OFF", - "-Denable-ipv6=OFF", - "-Denable-jack=OFF", - "-Denable-ladspa=OFF", - "-Denable-libsndfile=OFF", - "-Denable-midishare=OFF", - "-Denable-network=OFF", - "-Denable-oss=OFF", - "-Denable-sdl2=OFF", - "-Denable-pulseaudio=OFF", - "-Denable-readline=OFF", - "-Denable-lash=OFF", - "-DCMAKE_BUILD_TYPE=RelWithDebInfo", - ], - text=True, - cwd=self.source_dir, + generation_args, text=True, cwd=self.source_dir, env=generation_env ) if result != 0: Github.bail("Failed to setup CMake") diff --git a/scripts/windows.py b/scripts/windows.py index 295abcd..8341a7e 100644 --- a/scripts/windows.py +++ b/scripts/windows.py @@ -6,20 +6,25 @@ from software.fluidsynth import Fluidsynth from software.freetype import Freetype -from common import Github, Software, dump_build_notes, ARTIFACT_DIR +from common import Github, Software, dump_build_notes, ARTIFACT_DIR, ROOT_DIR from pathlib import Path if __name__ == "__main__": to_build: list[Software] = [ + Fluidsynth(), ZStd(), GLFW(), SDL(), OpenAL(), - Fluidsynth(), Freetype(), ] + # We expect vcpkg_installed to exist on system, else Fluidsynth is going to fail + vcpkg_dir = ROOT_DIR.joinpath("vcpkg_installed") + if not vcpkg_dir.exists(): + Github.notice("VCPkgs are not installed to {vcpkg_dir}, some builds may fail") + for build in to_build: with Github.LogGroup(f"Building {build.name}"): build.build() diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json new file mode 100644 index 0000000..ba06dad --- /dev/null +++ b/vcpkg-configuration.json @@ -0,0 +1,14 @@ +{ + "default-registry": { + "kind": "git", + "baseline": "2960d7d80e8d09c84ae8abf15c12196c2ca7d39a", + "repository": "https://github.com/microsoft/vcpkg" + }, + "registries": [ + { + "kind": "artifact", + "location": "https://github.com/microsoft/vcpkg-ce-catalog/archive/refs/heads/main.zip", + "name": "microsoft" + } + ] +} diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 0000000..730c812 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,6 @@ +{ + "dependencies": [ + "glib", + "pkgconf" + ] +} From 720243f90fc78dcb97c7c6494cc181488b290785 Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Mon, 17 Feb 2025 21:40:49 +0100 Subject: [PATCH 17/26] Add vcpkg install step to windows --- .github/workflows/build.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0ae10ee..7d311ba 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -61,6 +61,12 @@ jobs: shell: cmd run: choco install ninja --limit-output --no-progress + - name: Install VCPkg dependencies + uses: lukka/run-vcpkg@v11 + with: + runVcpkgInstall: true + vcpkgJsonGlob: 'vcpkg.json' + - name: Build shell: cmd run: | From c6ce82de7795a52db37558ac009522b2bdbb2041 Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Tue, 18 Feb 2025 17:27:57 +0100 Subject: [PATCH 18/26] Add python setup to docker file --- .github/workflows/build.yml | 3 ++- scripts/linux-build-env.Dockerfile | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7d311ba..462b9b7 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -41,7 +41,8 @@ jobs: - uses: addnab/docker-run-action@v3 with: image: native-build:latest - run: python ./scripts/linux.py + run: python /work/scripts/linux.py + options: -v ${{ github.workspace }}:/work - uses: actions/upload-artifact@v4 with: diff --git a/scripts/linux-build-env.Dockerfile b/scripts/linux-build-env.Dockerfile index a437d86..61f19ad 100644 --- a/scripts/linux-build-env.Dockerfile +++ b/scripts/linux-build-env.Dockerfile @@ -6,3 +6,14 @@ RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends li # SDL2 dependencies RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends build-essential git make autoconf automake libtool pkg-config cmake ninja-build gnome-desktop-testing libasound2-dev libpulse-dev libaudio-dev libjack-dev libsndio-dev libsamplerate0-dev libx11-dev libxext-dev libxrandr-dev libxcursor-dev libxfixes-dev libxi-dev libxss-dev libwayland-dev libxkbcommon-dev libdrm-dev libgbm-dev libgl1-mesa-dev libgles2-mesa-dev libegl1-mesa-dev libdbus-1-dev libibus-1.0-dev libudev-dev fcitx-libs-dev RUN DEBIAN_FRONTEND=noninteractive apt-get upgrade -y + +# Python setup +RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends python3-openssl libssl-dev +ENV HOME="/root" +WORKDIR $HOME +RUN git clone --depth=1 https://github.com/pyenv/pyenv.git .pyenv +ENV PYENV_ROOT="$HOME/.pyenv" +ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" +RUN pyenv install 3.11 +RUN pyenv global 3.11 + From 753371be7be43984d93709a8863ac192122ff0b6 Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Tue, 18 Feb 2025 22:20:09 +0100 Subject: [PATCH 19/26] Set default triplets for vcpkg --- .github/workflows/build.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 462b9b7..44b18d0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -52,6 +52,10 @@ jobs: win-x64: runs-on: windows-2022 + env: + VCPKG_DEFAULT_TRIPLET: x64-windows-release + VCPKG_DEFAULT_HOST_TRIPLET: x64-windows-release + steps: - uses: actions/checkout@v3 with: From 21084d7e0ee32bf4551dc51f19ece0452e544f08 Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Wed, 19 Feb 2025 20:15:43 +0100 Subject: [PATCH 20/26] Checkout vcpkg to 2025.02.14 --- vcpkg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vcpkg b/vcpkg index 36fb233..d5ec528 160000 --- a/vcpkg +++ b/vcpkg @@ -1 +1 @@ -Subproject commit 36fb23307e10cc6ffcec566c46c4bb3f567c82c6 +Subproject commit d5ec528843d29e3a52d745a64b469f810b2cedbf From 10be6f3606e10c061a2aab0a7b4948673bd6683b Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Wed, 19 Feb 2025 20:59:46 +0100 Subject: [PATCH 21/26] Ensure git ownership isn't a problem for docker runs --- scripts/linux-build-env.Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/linux-build-env.Dockerfile b/scripts/linux-build-env.Dockerfile index 61f19ad..c72192c 100644 --- a/scripts/linux-build-env.Dockerfile +++ b/scripts/linux-build-env.Dockerfile @@ -17,3 +17,5 @@ ENV PATH="$PYENV_ROOT/shims:$PYENV_ROOT/bin:$PATH" RUN pyenv install 3.11 RUN pyenv global 3.11 +# Remove dubious ownership check from git +RUN git config --global --add safe.directory '*' From 57e1165a8ccfd686be2f03164754c65026dc4a5c Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Wed, 19 Feb 2025 21:49:22 +0100 Subject: [PATCH 22/26] Ensure we properly get the git information from the root dir at the end --- scripts/linux.py | 5 ++--- scripts/osx.py | 6 ++---- scripts/windows.py | 4 +--- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/scripts/linux.py b/scripts/linux.py index f5fabf2..8a840aa 100644 --- a/scripts/linux.py +++ b/scripts/linux.py @@ -5,9 +5,8 @@ from software.openal import OpenAL from software.fluidsynth import Fluidsynth -from common import Github, Software, dump_build_notes, ARTIFACT_DIR, Platform +from common import Github, Software, dump_build_notes, ARTIFACT_DIR, Platform, ROOT_DIR -from pathlib import Path import subprocess if __name__ == "__main__": @@ -43,7 +42,7 @@ dump_build_notes( "native-build (Linux x64)", - Path("."), + ROOT_DIR, ARTIFACT_DIR.joinpath("notes.md"), [f"- {build.name}" for build in to_build], ) diff --git a/scripts/osx.py b/scripts/osx.py index e470b72..dc46c35 100644 --- a/scripts/osx.py +++ b/scripts/osx.py @@ -6,9 +6,7 @@ from software.freetype import Freetype from software.fluidsynth import Fluidsynth -from common import Github, Software, dump_build_notes, ARTIFACT_DIR - -from pathlib import Path +from common import Github, Software, dump_build_notes, ARTIFACT_DIR, ROOT_DIR if __name__ == "__main__": to_build: list[Software] = [ @@ -27,7 +25,7 @@ dump_build_notes( "native-build (OSX x64)", - Path("."), + ROOT_DIR, ARTIFACT_DIR.joinpath("notes.md"), [f"- {build.name}" for build in to_build], ) diff --git a/scripts/windows.py b/scripts/windows.py index 8341a7e..2a99f44 100644 --- a/scripts/windows.py +++ b/scripts/windows.py @@ -8,8 +8,6 @@ from common import Github, Software, dump_build_notes, ARTIFACT_DIR, ROOT_DIR -from pathlib import Path - if __name__ == "__main__": to_build: list[Software] = [ Fluidsynth(), @@ -32,7 +30,7 @@ dump_build_notes( "native-build (Windows x64)", - Path("."), + ROOT_DIR, ARTIFACT_DIR.joinpath("notes.md"), [f"- {build.name}" for build in to_build], ) From 4685eb0cebeaa86875b68adc3302dd95f0d61ce1 Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Wed, 19 Feb 2025 22:46:17 +0100 Subject: [PATCH 23/26] Set glib version to 2.80.0 --- vcpkg.json | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vcpkg.json b/vcpkg.json index 730c812..75e4cf4 100644 --- a/vcpkg.json +++ b/vcpkg.json @@ -1,6 +1,9 @@ { "dependencies": [ - "glib", + { + "name": "glib", + "version>=": "2.80.0" + }, "pkgconf" ] } From 44a0c2f55ae0e8c64db2b0df3fb701b08010ed31 Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Thu, 20 Feb 2025 15:44:17 +0100 Subject: [PATCH 24/26] Set default installed dir --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 44b18d0..67c2112 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -55,6 +55,7 @@ jobs: env: VCPKG_DEFAULT_TRIPLET: x64-windows-release VCPKG_DEFAULT_HOST_TRIPLET: x64-windows-release + VCPKG_INSTALLED_DIR: ${{ github.workspace }}/vcpkg_installed steps: - uses: actions/checkout@v3 From 5ffd6fb4191ba61c3f8e831974cc23489fce80fe Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Thu, 20 Feb 2025 15:49:52 +0100 Subject: [PATCH 25/26] Ensure we're using the release triplet here --- scripts/software/fluidsynth.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/software/fluidsynth.py b/scripts/software/fluidsynth.py index 7663bb8..2f4876f 100644 --- a/scripts/software/fluidsynth.py +++ b/scripts/software/fluidsynth.py @@ -43,7 +43,7 @@ def build(self) -> None: generation_env = os.environ.copy() if Platform.get() == Platform.Windows: - vc_install_dir = ROOT_DIR.joinpath("vcpkg_installed/x64-windows") + vc_install_dir = ROOT_DIR.joinpath("vcpkg_installed/x64-windows-release") tools_directories = [ str(vc_install_dir.joinpath("tools/pkgconf")), str(vc_install_dir.joinpath("lib")), From 27d301fca3351336bc9b8a42ddad3b60b08d3e37 Mon Sep 17 00:00:00 2001 From: BarryNorfolk Date: Thu, 20 Feb 2025 15:59:31 +0100 Subject: [PATCH 26/26] Ensure we're running and compiling for x64 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 67c2112..ff195de 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -76,7 +76,7 @@ jobs: - name: Build shell: cmd run: | - call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Common7\\Tools\\VsDevCmd.bat" + call "C:\\Program Files\\Microsoft Visual Studio\\2022\\Enterprise\\Common7\\Tools\\VsDevCmd.bat" -arch=x64 -host_arch=x64 python ./scripts/windows.py - uses: actions/upload-artifact@v4