mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-12 05:16:25 +03:00
arma3-unix-launcher: 413-unstable-2025-02-10 -> 420
This commit is contained in:
parent
4fc0d1aceb
commit
ef5267ea61
4 changed files with 55 additions and 34 deletions
|
@ -1,18 +0,0 @@
|
||||||
diff --git a/src/arma3-unix-launcher/main.cpp b/src/arma3-unix-launcher/main.cpp
|
|
||||||
index 10f6ed9..c706734 100644
|
|
||||||
--- a/src/arma3-unix-launcher/main.cpp
|
|
||||||
+++ b/src/arma3-unix-launcher/main.cpp
|
|
||||||
@@ -216,3 +216,3 @@ int main(int argc, char *argv[])
|
|
||||||
|
|
||||||
- MainWindow w(std::move(client), config_file, parser.get<bool>("--disable-steam-integration"));
|
|
||||||
+ MainWindow w(std::move(client), config_file, !parser.get<bool>("--disable-steam-integration"));
|
|
||||||
w.show();
|
|
||||||
diff --git a/src/dayz-linux-launcher/main.cpp b/src/dayz-linux-launcher/main.cpp
|
|
||||||
index f30bf8a..e0cef66 100644
|
|
||||||
--- a/src/dayz-linux-launcher/main.cpp
|
|
||||||
+++ b/src/dayz-linux-launcher/main.cpp
|
|
||||||
@@ -216,3 +216,3 @@ int main(int argc, char *argv[])
|
|
||||||
|
|
||||||
- MainWindow w(std::move(client), config_file, parser.get<bool>("--disable-steam-integration"));
|
|
||||||
+ MainWindow w(std::move(client), config_file, !parser.get<bool>("--disable-steam-integration"));
|
|
||||||
w.show();
|
|
|
@ -1,8 +1,8 @@
|
||||||
diff --git a/cmake/external_dependencies.cmake b/cmake/external_dependencies.cmake
|
diff --git a/cmake/external_dependencies.cmake b/cmake/external_dependencies.cmake
|
||||||
index 2eb6ec5..9f1d67e 100644
|
index 76648b2..145e978 100644
|
||||||
--- a/cmake/external_dependencies.cmake
|
--- a/cmake/external_dependencies.cmake
|
||||||
+++ b/cmake/external_dependencies.cmake
|
+++ b/cmake/external_dependencies.cmake
|
||||||
@@ -4,7 +4,7 @@ include(FetchContent)
|
@@ -3,7 +3,7 @@ include(FetchContent)
|
||||||
|
|
||||||
function(setup_library SOURCE_TO_TEST)
|
function(setup_library SOURCE_TO_TEST)
|
||||||
set(boolArgs HEADER_ONLY)
|
set(boolArgs HEADER_ONLY)
|
||||||
|
@ -11,7 +11,7 @@ index 2eb6ec5..9f1d67e 100644
|
||||||
set(multiValueArgs WHEN)
|
set(multiValueArgs WHEN)
|
||||||
cmake_parse_arguments(LIB_SETUP "${boolArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
cmake_parse_arguments(LIB_SETUP "${boolArgs}" "${oneValueArgs}" "${multiValueArgs}" ${ARGN})
|
||||||
|
|
||||||
@@ -27,12 +27,11 @@ function(setup_library SOURCE_TO_TEST)
|
@@ -26,12 +26,11 @@ function(setup_library SOURCE_TO_TEST)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
FetchContent_Declare(${LIB_SETUP_NAME}
|
FetchContent_Declare(${LIB_SETUP_NAME}
|
||||||
|
@ -26,7 +26,7 @@ index 2eb6ec5..9f1d67e 100644
|
||||||
FetchContent_Populate(${LIB_SETUP_NAME})
|
FetchContent_Populate(${LIB_SETUP_NAME})
|
||||||
set(SRCDIR "${LIB_SETUP_NAME}_SOURCE_DIR")
|
set(SRCDIR "${LIB_SETUP_NAME}_SOURCE_DIR")
|
||||||
set(BINDIR "${LIB_SETUP_NAME}_BINARY_DIR")
|
set(BINDIR "${LIB_SETUP_NAME}_BINARY_DIR")
|
||||||
@@ -51,8 +50,7 @@ function(setup_argparse)
|
@@ -50,8 +49,7 @@ function(setup_argparse)
|
||||||
}")
|
}")
|
||||||
setup_library("${CHECK_SOURCE}"
|
setup_library("${CHECK_SOURCE}"
|
||||||
NAME argparse
|
NAME argparse
|
||||||
|
@ -36,7 +36,7 @@ index 2eb6ec5..9f1d67e 100644
|
||||||
HEADER_ONLY
|
HEADER_ONLY
|
||||||
)
|
)
|
||||||
if (NOT TARGET argparse::argparse)
|
if (NOT TARGET argparse::argparse)
|
||||||
@@ -64,7 +62,7 @@ function(setup_curlpp)
|
@@ -63,7 +61,7 @@ function(setup_curlpp)
|
||||||
set(CHECK_SOURCE "#error unimplemented}")
|
set(CHECK_SOURCE "#error unimplemented}")
|
||||||
setup_library("${CHECK_SOURCE}"
|
setup_library("${CHECK_SOURCE}"
|
||||||
NAME curlpp
|
NAME curlpp
|
||||||
|
|
|
@ -11,18 +11,19 @@
|
||||||
nlohmann_json,
|
nlohmann_json,
|
||||||
qt5,
|
qt5,
|
||||||
spdlog,
|
spdlog,
|
||||||
|
steam-run,
|
||||||
replaceVars,
|
replaceVars,
|
||||||
buildDayZLauncher ? false,
|
buildDayZLauncher ? false,
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "arma3-unix-launcher";
|
pname = "arma3-unix-launcher";
|
||||||
version = "413-unstable-2025-02-10";
|
version = "420";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "muttleyxd";
|
owner = "muttleyxd";
|
||||||
repo = "arma3-unix-launcher";
|
repo = "arma3-unix-launcher";
|
||||||
rev = "7d4bcb166da3bb64ef10af421619d0b00136ebd5";
|
tag = "commit-${finalAttrs.version}";
|
||||||
hash = "sha256-so7fjxESUAkQfO4hO5aQTzU5lHpeJlOOfEGp0Pb89sQ=";
|
hash = "sha256-QY3zDtfZt2ifF69Jzp0Ls1SpDCliKdkwLaGFXneT79o=";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
@ -52,8 +53,11 @@ stdenv.mkDerivation (finalAttrs: {
|
||||||
doctest_src = null;
|
doctest_src = null;
|
||||||
trompeloeil_src = null;
|
trompeloeil_src = null;
|
||||||
})
|
})
|
||||||
# game won't launch with steam integration anyways, disable it
|
|
||||||
./disable_steam_integration.patch
|
# use steam-run when running the game directly
|
||||||
|
(replaceVars ./steam-run.patch {
|
||||||
|
steamRun = lib.getExe steam-run;
|
||||||
|
})
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
|
35
pkgs/by-name/ar/arma3-unix-launcher/steam-run.patch
Normal file
35
pkgs/by-name/ar/arma3-unix-launcher/steam-run.patch
Normal file
|
@ -0,0 +1,35 @@
|
||||||
|
diff --git a/src/arma3-unix-launcher-library/arma3client.cpp b/src/arma3-unix-launcher-library/arma3client.cpp
|
||||||
|
index dbb17d0..ee8853c 100644
|
||||||
|
--- a/src/arma3-unix-launcher-library/arma3client.cpp
|
||||||
|
+++ b/src/arma3-unix-launcher-library/arma3client.cpp
|
||||||
|
@@ -63,7 +63,7 @@ namespace
|
||||||
|
disable_esync);
|
||||||
|
if (!is_proton)
|
||||||
|
{
|
||||||
|
- StdUtils::StartBackgroundProcess(fmt::format("env {} {} {}", user_environment_variables, executable_path, arguments),
|
||||||
|
+ StdUtils::StartBackgroundProcess(fmt::format("@steamRun@ env {} {} {}", user_environment_variables, executable_path, arguments),
|
||||||
|
arma_path.string());
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
@@ -83,7 +83,7 @@ namespace
|
||||||
|
|
||||||
|
auto const environment = fmt::format(R"env({} SteamGameId={} LD_PRELOAD={} STEAM_COMPAT_DATA_PATH="{}")env",
|
||||||
|
get_esync_prefix(disable_esync), arma3_id, ld_preload_path, steam_compat_data_path.string());
|
||||||
|
- auto const command = fmt::format(R"command(env {} {} {} {} {} "{}" {})command", environment, user_environment_variables,
|
||||||
|
+ auto const command = fmt::format(R"command(@steamRun@ env {} {} {} {} {} "{}" {})command", environment, user_environment_variables,
|
||||||
|
optional_steam_runtime(steam_utils), compatibility_tool.first,
|
||||||
|
get_verb(compatibility_tool.second), executable_path.string(), arguments);
|
||||||
|
spdlog::info("Running Arma:\n{}\n", command);
|
||||||
|
diff --git a/src/dayz-linux-launcher-library/dayzclient.cpp b/src/dayz-linux-launcher-library/dayzclient.cpp
|
||||||
|
index 5fc9027..d2b9e92 100644
|
||||||
|
--- a/src/dayz-linux-launcher-library/dayzclient.cpp
|
||||||
|
+++ b/src/dayz-linux-launcher-library/dayzclient.cpp
|
||||||
|
@@ -76,7 +76,7 @@ namespace
|
||||||
|
|
||||||
|
auto const environment = fmt::format(R"env({} SteamGameId={} LD_PRELOAD={} STEAM_COMPAT_DATA_PATH="{}")env",
|
||||||
|
get_esync_prefix(disable_esync), dayz_id, ld_preload_path, steam_compat_data_path.string());
|
||||||
|
- auto const command = fmt::format(R"command(env {} {} {} {} {} "{}" {})command", environment, user_environment_variables,
|
||||||
|
+ auto const command = fmt::format(R"command(@steamRun@ env {} {} {} {} {} "{}" {})command", environment, user_environment_variables,
|
||||||
|
optional_steam_runtime(steam_utils), compatibility_tool.first,
|
||||||
|
get_verb(compatibility_tool.second), executable_path.string(), arguments);
|
||||||
|
spdlog::info("Running DayZ:\n{}\n", command);
|
Loading…
Add table
Add a link
Reference in a new issue