Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Package request: arma3-unix-launcher #319732

Closed
DrymarchonShaun opened this issue Jun 14, 2024 · 5 comments · Fixed by #324452
Closed

Package request: arma3-unix-launcher #319732

DrymarchonShaun opened this issue Jun 14, 2024 · 5 comments · Fixed by #324452

Comments

@DrymarchonShaun
Copy link
Contributor

DrymarchonShaun commented Jun 14, 2024

Project description
A clean, intuitive Arma 3 + DayZ SA Launcher for GNU/Linux and MacOS.

Metadata


Add a 👍 reaction to issues you find important.

@DrymarchonShaun
Copy link
Contributor Author

I was trying to package this myself, but the way cmake is set up has it trying to download dependencies with git, and modifying it to build properly with nix is over my head.

@DrymarchonShaun
Copy link
Contributor Author

With a lot of trial and error, I got this functioning here. No idea if my code is up to the standards for proper integration into nixpkgs, I'm not 100% sure if everything I have in there is even required, might have missed some failed attempts at fixes that aren't actually doing anything.

Also haven't tested the version of the launcher for DayZ.

@keenanweaver
Copy link
Member

Looks great to me! Run it through nixfmt-rfc-style to pretty it up and I think it'd fit in just fine in nixpkgs. I am getting a build error with the DayZ launcher, though:

[ 96%] Building CXX object src/dayz-linux-launcher/CMakeFiles/dayz-linux-launcher.dir/dayz-linux-launcher_autogen/EWIEGA46WW/qrc_stylesheet.cpp.o
/build/source/src/dayz-linux-launcher/mainwindow.cpp: In constructor 'MainWindow::MainWindow(std::unique_ptr<DayZ::Client>, const std::filesystem::__cxx11::path&, bool, QWidget*)':
/build/source/src/dayz-linux-launcher/mainwindow.cpp:50:29: warning: unused parameter 'use_steam_integration' [8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wunused-parameter-Wunused-parameter8;;]
   50 |                        bool use_steam_integration, QWidget *parent) :
      |                        ~~~~~^~~~~~~~~~~~~~~~~~~~~
In file included from /nix/store/fr5vsxz2py75m42kj1r3fqgc2ll7pjwa-fmt-10.2.1-dev/include/fmt/format.h:49,
                 from /build/source/src/arma3-unix-launcher-library/./mod.hpp:7,
                 from /build/source/src/dayz-linux-launcher-library/./dayzclient.hpp:8,
                 from /build/source/src/dayz-linux-launcher/mainwindow.h:16,
                 from /build/source/src/dayz-linux-launcher/mainwindow.cpp:2:
/nix/store/fr5vsxz2py75m42kj1r3fqgc2ll7pjwa-fmt-10.2.1-dev/include/fmt/core.h: In instantiation of 'constexpr fmt::v10::detail::value<Context> fmt::v10::detail::make_arg(T&) [with bool PACKED = true; Context = fmt::v10::basic_format_context<fmt::v10::appender, char>; T = const nlohmann::json_abi_v3_11_3::basic_json<>; typename std::enable_if<PACKED, int>::type <anonymous> = 0]':
/nix/store/fr5vsxz2py75m42kj1r3fqgc2ll7pjwa-fmt-10.2.1-dev/include/fmt/core.h:1842:51:   required from 'constexpr fmt::v10::format_arg_store<Context, Args>::format_arg_store(T& ...) [with T = {const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, const char*}; Context = fmt::v10::basic_format_context<fmt::v10::appender, char>; Args = {nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, const char*}]'
/nix/store/fr5vsxz2py75m42kj1r3fqgc2ll7pjwa-fmt-10.2.1-dev/include/fmt/core.h:1860:18:   required from 'constexpr fmt::v10::format_arg_store<Context, typename std::remove_cv<typename std::remove_reference<T>::type>::type ...> fmt::v10::make_format_args(T& ...) [with Context = basic_format_context<appender, char>; T = {const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, const char*}]'
/nix/store/r7f301cdb53hbsihbmivfq0zwz2vm3pr-spdlog-1.13.0-dev/include/spdlog/logger.h:328:75:   required from 'void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*}; spdlog::string_view_t = fmt::v10::basic_string_view<char>]'
/nix/store/r7f301cdb53hbsihbmivfq0zwz2vm3pr-spdlog-1.13.0-dev/include/spdlog/logger.h:80:13:   required from 'void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, fmt::v10::format_string<T ...>, Args&& ...) [with Args = {const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*>]'
/nix/store/r7f301cdb53hbsihbmivfq0zwz2vm3pr-spdlog-1.13.0-dev/include/spdlog/logger.h:85:12:   required from 'void spdlog::logger::log(spdlog::level::level_enum, fmt::v10::format_string<T ...>, Args&& ...) [with Args = {const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*>]'
/nix/store/r7f301cdb53hbsihbmivfq0zwz2vm3pr-spdlog-1.13.0-dev/include/spdlog/logger.h:145:12:   required from 'void spdlog::logger::warn(fmt::v10::format_string<T ...>, Args&& ...) [with Args = {const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*>]'
/nix/store/r7f301cdb53hbsihbmivfq0zwz2vm3pr-spdlog-1.13.0-dev/include/spdlog/spdlog.h:173:31:   required from 'void spdlog::warn(fmt::v10::format_string<T ...>, Args&& ...) [with Args = {const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*>]'
/build/source/src/dayz-linux-launcher/mainwindow.cpp:719:25:   required from here
/nix/store/fr5vsxz2py75m42kj1r3fqgc2ll7pjwa-fmt-10.2.1-dev/include/fmt/core.h:1600:63: error: 'fmt::v10::detail::type_is_unformattable_for<const nlohmann::json_abi_v3_11_3::basic_json<>, char> _' has incomplete type
 1600 |     type_is_unformattable_for<T, typename Context::char_type> _;
      |                                                               ^
/nix/store/fr5vsxz2py75m42kj1r3fqgc2ll7pjwa-fmt-10.2.1-dev/include/fmt/core.h:1604:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt
 1604 |       formattable,
      |       ^~~~~~~~~~~
/nix/store/fr5vsxz2py75m42kj1r3fqgc2ll7pjwa-fmt-10.2.1-dev/include/fmt/core.h:1604:7: note: 'formattable' evaluates to false
make[2]: *** [src/dayz-linux-launcher/CMakeFiles/dayz-linux-launcher.dir/build.make:189: src/dayz-linux-launcher/CMakeFiles/dayz-linux-launcher.dir/mainwindow.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:465: src/dayz-linux-launcher/CMakeFiles/dayz-linux-launcher.dir/all] Error 2
make: *** [Makefile:136: all] Error 2
error: builder for '/nix/store/1vpamslg482b1nzzz4vcj2w82ankadxf-arma3-unix-launcher-git.drv' failed with exit code 2;
       last 25 log lines:
       > In file included from /nix/store/fr5vsxz2py75m42kj1r3fqgc2ll7pjwa-fmt-10.2.1-dev/include/fmt/format.h:49,
       >                  from /build/source/src/arma3-unix-launcher-library/./mod.hpp:7,
       >                  from /build/source/src/dayz-linux-launcher-library/./dayzclient.hpp:8,
       >                  from /build/source/src/dayz-linux-launcher/mainwindow.h:16,
       >                  from /build/source/src/dayz-linux-launcher/mainwindow.cpp:2:
       > /nix/store/fr5vsxz2py75m42kj1r3fqgc2ll7pjwa-fmt-10.2.1-dev/include/fmt/core.h: In instantiation of 'constexpr fmt::v10::detail::value<Context> fmt::v10::detail::make_arg(T&) [with bool PACKED = true; Context = fmt::v10::basic_format_context<fmt::v10::appender, char>; T = const nlohmann::json_abi_v3_11_3::basic_json<>; typename std::enable_if<PACKED, int>::type <anonymous> = 0]':
       > /nix/store/fr5vsxz2py75m42kj1r3fqgc2ll7pjwa-fmt-10.2.1-dev/include/fmt/core.h:1842:51:   required from 'constexpr fmt::v10::format_arg_store<Context, Args>::format_arg_store(T& ...) [with T = {const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, const char*}; Context = fmt::v10::basic_format_context<fmt::v10::appender, char>; Args = {nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, const char*}]'
       > /nix/store/fr5vsxz2py75m42kj1r3fqgc2ll7pjwa-fmt-10.2.1-dev/include/fmt/core.h:1860:18:   required from 'constexpr fmt::v10::format_arg_store<Context, typename std::remove_cv<typename std::remove_reference<T>::type>::type ...> fmt::v10::make_format_args(T& ...) [with Context = basic_format_context<appender, char>; T = {const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>, const char*}]'
       > /nix/store/r7f301cdb53hbsihbmivfq0zwz2vm3pr-spdlog-1.13.0-dev/include/spdlog/logger.h:328:75:   required from 'void spdlog::logger::log_(spdlog::source_loc, spdlog::level::level_enum, spdlog::string_view_t, Args&& ...) [with Args = {const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*}; spdlog::string_view_t = fmt::v10::basic_string_view<char>]'
       > /nix/store/r7f301cdb53hbsihbmivfq0zwz2vm3pr-spdlog-1.13.0-dev/include/spdlog/logger.h:80:13:   required from 'void spdlog::logger::log(spdlog::source_loc, spdlog::level::level_enum, fmt::v10::format_string<T ...>, Args&& ...) [with Args = {const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*>]'
       > /nix/store/r7f301cdb53hbsihbmivfq0zwz2vm3pr-spdlog-1.13.0-dev/include/spdlog/logger.h:85:12:   required from 'void spdlog::logger::log(spdlog::level::level_enum, fmt::v10::format_string<T ...>, Args&& ...) [with Args = {const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*>]'
       > /nix/store/r7f301cdb53hbsihbmivfq0zwz2vm3pr-spdlog-1.13.0-dev/include/spdlog/logger.h:145:12:   required from 'void spdlog::logger::warn(fmt::v10::format_string<T ...>, Args&& ...) [with Args = {const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*>]'
       > /nix/store/r7f301cdb53hbsihbmivfq0zwz2vm3pr-spdlog-1.13.0-dev/include/spdlog/spdlog.h:173:31:   required from 'void spdlog::warn(fmt::v10::format_string<T ...>, Args&& ...) [with Args = {const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*}; fmt::v10::format_string<T ...> = fmt::v10::basic_format_string<char, const nlohmann::json_abi_v3_11_3::basic_json<std::map, std::vector, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, bool, long int, long unsigned int, double, std::allocator, nlohmann::json_abi_v3_11_3::adl_serializer, std::vector<unsigned char, std::allocator<unsigned char> >, void>&, const char*>]'
       > /build/source/src/dayz-linux-launcher/mainwindow.cpp:719:25:   required from here
       > /nix/store/fr5vsxz2py75m42kj1r3fqgc2ll7pjwa-fmt-10.2.1-dev/include/fmt/core.h:1600:63: error: 'fmt::v10::detail::type_is_unformattable_for<const nlohmann::json_abi_v3_11_3::basic_json<>, char> _' has incomplete type
       >  1600 |     type_is_unformattable_for<T, typename Context::char_type> _;
       >       |                                                               ^
       > /nix/store/fr5vsxz2py75m42kj1r3fqgc2ll7pjwa-fmt-10.2.1-dev/include/fmt/core.h:1604:7: error: static assertion failed: Cannot format an argument. To make type T formattable provide a formatter<T> specialization: https://fmt.dev/latest/api.html#udt
       >  1604 |       formattable,
       >       |       ^~~~~~~~~~~
       > /nix/store/fr5vsxz2py75m42kj1r3fqgc2ll7pjwa-fmt-10.2.1-dev/include/fmt/core.h:1604:7: note: 'formattable' evaluates to false
       > make[2]: *** [src/dayz-linux-launcher/CMakeFiles/dayz-linux-launcher.dir/build.make:189: src/dayz-linux-launcher/CMakeFiles/dayz-linux-launcher.dir/mainwindow.cpp.o] Error 1
       > make[2]: *** Waiting for unfinished jobs....
       > make[1]: *** [CMakeFiles/Makefile2:465: src/dayz-linux-launcher/CMakeFiles/dayz-linux-launcher.dir/all] Error 2
       > make: *** [Makefile:136: all] Error 2
       For full logs, run 'nix log /nix/store/1vpamslg482b1nzzz4vcj2w82ankadxf-arma3-unix-launcher-git.drv'.

This might inspire me to go back to arma 3. Longtime OFP/arma fan!

@DrymarchonShaun
Copy link
Contributor Author

What would I put for the license if the launcher itself is using MIT but the steam works sdk has its own custom license (not sure if it is considered unfree, either)

@keenanweaver
Copy link
Member

You can just include multiple licenses, though I'm not entirely sure what the Steamworks SDK license is, or if the license is in nixpkgs in the first place. I'd just mark it unfree if you don't know.

meta = {
  description = "Arma 3 + DayZ SA Launcher";
  homepage = "https://github.com/muttleyxd/arma3-unix-launcher/";
  license = with lib.licenses; [
    # Launcher
    mit
    # Steamworks SDK
    unfree
  ];
  maintainers = with lib.maintainers; [ DrymarchonShaun ];
  mainProgram = "arma3-unix-launcher";
  platforms = with lib.platforms; linux ++ darwin;
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants