Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,14 @@ jobs:
- name: Create result directory
run: mkdir ${{ runner.temp }}/result
# -- Windows online-server
- name: Build Server Release Mingw32 GCC
run: nix build -L --keep-going '.?submodules=1#online-server.release.mingw32.gcc' -o ${{ runner.temp }}/result/online-server.release.mingw32.gcc
- name: Build Server Release UCRT64 GCC
run: nix build -L --keep-going '.?submodules=1#online-server.release.ucrt64.gcc' -o ${{ runner.temp }}/result/online-server.release.ucrt64.gcc
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: online-server-windows
path: |
${{ runner.temp }}/result/online-server.release.mingw32.gcc/
${{ runner.temp }}/result/online-server.release.ucrt64.gcc/

# -- Linux online-server
- name: Build Server Release Linux GCC
Expand Down
10 changes: 5 additions & 5 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@
gcc = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; inherit withDebug; };
clang = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; stdenv = clangStdenv; trustCompiler = true; inherit withDebug; };
};
ucrt64 = with pkgsCross.ucrt64; {
gcc = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; inherit withDebug; };
clang = callPackage ./mods/Windows/OnlineCTR/Network_PC/Server { ctrModSDK = self; stdenv = clangStdenv; trustCompiler = true; inherit withDebug; };
};
};
in
rec {
Expand Down
2 changes: 1 addition & 1 deletion mods/Windows/OnlineCTR/Network_PC/Server/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ endif()

# Compiler options
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
target_compile_options(ctr_srv PRIVATE -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-implicit-function-declaration -Wno-return-type)
target_compile_options(ctr_srv PRIVATE -Wno-int-conversion -Wno-incompatible-function-pointer-types -Wno-implicit-function-declaration -Wno-return-type -Wno-implicit-int)
else()
# Assume GCC
target_compile_options(ctr_srv PRIVATE -Wno-implicit-function-declaration -Wno-incompatible-pointer-types -Wno-implicit-int)
Expand Down
14 changes: 7 additions & 7 deletions mods/Windows/OnlineCTR/Network_PC/Server/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
, enet
, ctrModSDK ? ./../../../../..
, withDebug ? true
, trustCompiler ? false
}:

let
Expand All @@ -20,13 +21,11 @@ let
(previousAttrs: {
nativeBuildInputs = [ cmake ];

installPhase = ''
runHook preInstall
outputs = [ "out" "dev" ];

mkdir -p $out/lib
cp libenet.a $out/lib/

runHook postInstall
postInstall = ''
mkdir -p $dev/lib
cp libenet.a $dev/lib/
'';

meta = previousAttrs.meta // { platforms = lib.platforms.all; };
Expand All @@ -49,7 +48,8 @@ stdenv.mkDerivation (_: {
hardeningDisable = [ "format" ];

# Config
cmakeFlags = lib.optionals withDebug [ "-DCMAKE_BUILD_TYPE=Debug" ];
cmakeFlags = lib.optionals withDebug [ "-DCMAKE_BUILD_TYPE=Debug" ]
++ lib.optionals trustCompiler [ "-DCMAKE_C_COMPILER_WORKS=1" "-DCMAKE_CXX_COMPILER_WORKS=1" ];

installPhase = ''
runHook preInstall
Expand Down