Jump to content

Running A27 on any Linux distro and version (in theory)!


myliverhatesme
 Share

Did it work for you?  

9 members have voted

  1. 1. Did it work for you?

    • Yes
      5
    • No
      2
    • Didn't try
      2


Recommended Posts

  

I've noticed that whenever there's an upgrade, it's the Linux users who are left in the old lobby because they are unable to install the new version immediately. This is due to the way package management is done on Linux.

So for those of you on Linux who can't run the latest 0ad because it hasn't been packaged yet or won't be packaged for your OS, I have a solution that I hope works for you. It involves using the Nix package manager which in theory runs on every version of Linux and you only need to run 2 commands: one to install the package manager and one to download/compile/run 0ad.

First install the Nix package manager by running:

sh <(curl -L https://nixos.org/nix/install) --daemon

Further directions here: https://nixos.org/download/

After the package manager is installed you should be able to run:

nix run github:nixos/nixpkgs/master#zeroad

This will download and compile the latest nix packaged version of 0ad (27 as of yesterday) if it hasn't done so already, then run 0ad. Since it has to download/compile it takes some time the first time you run it; about 12 minutes the first time on my mediocre PC. But after that it opens normally.

To see what version of the code it's pulling down and compiling (as well as the build steps) you can look at this file:

https://github.com/NixOS/nixpkgs/blob/a19f7dcff880e1e6e82ea1b0f9155572b72385b2/pkgs/games/0ad/game.nix#L50

I'm curious if this works for you. Please let me know.

  • Like 3
Link to comment
Share on other sites

Great tip! I was just thinking why just play 0 A.D. when I can install one more package manager onto my system. Trust us, it's very safe. All you need to do is feed this freshly downloaded script directly to a root shell.

They sell you this illusion of consistently packaged, bleeding edge software, but then you end up using Snap, Flatpak, Wine, AUR, Nix. And in the end, you'll have to go build it yourself if you don't want to wait a week for someone to re-package it for your system of choice.

Rants aside, it did build after adding a few flags to the command, but I couldn't get it to run:

ERROR: SetVideoMode failed in SDL_CreateWindow: 1024x768:24 0 ("No GL driver has been loaded")

In the time needed to resolve all these issues, I could just go reinstall Windows and make a few tweaks to make them less annoying. I'll just install what I want and it will even run faster.
 

Link to comment
Share on other sites

2 hours ago, myliverhatesme said:

@poised What error did you get?

nix run github:nixos/nixpkgs/master#zeroad

zsh: no matches found: github:nixos/nixpkgs/master#zeroad

 

didn't wildfire use to keep their own repository link for the latest build? 

 

 

Link to comment
Share on other sites

WFG now has control of the flatpak repo and while we're still working on it behind the scenes we do have A27 on flathub!

 

The Nix package is pretty cool, by the way, I just wanted to put this here in case someone doesn't want to install Nix. Nix is cool, but it is a lot of work for someone to just play 0 A.D. keep it up with the nix package though.

Link to comment
Share on other sites

22 hours ago, Seleucids said:

A different strategy: download the released .zip file then build from there. 

Can't tell if you're just trying be a jerk, but obviously it's not that simple. You download the source, then what? You have to download and set up a bunch of dependencies. That's entire point of the nix package. It does for you and in isolation so it doesn't interfere with your existing system packages. I posted a link to the source which apparently you didn't look at. It downloads the source and compiles it for you. You can think of it like a bash script that handles the dependencies and compilation for you.

 

On 03/02/2025 at 11:06 AM, myliverhatesme said:

 

Link to comment
Share on other sites

I know that at some point it is adding more work to the devs but perhaps an official WildFires' AppImage would be the best approach. I don't doubt the good intentions of the github user "0ad-matters" but it is understandable that someone might doubt whether he is not incorporating some vulnerability in our system by installing this package.
In any case, since this is a free software development native to GNU/Linux environments, perhaps the best thing would be to officially announce the release when it is available in the repositories of, at least, the most important Linux distributions.
Afterall, having a new release that is first available with two clicks on Windows and MacOs before it is on Linux is a bit ironic.

Yes, people can learn to compile and become better computer users. But this is a video game and the best strategy for spreading it is to not put obstacles in people's way.

Just an opinion.

Edited by guerringuerrin
  • Like 1
Link to comment
Share on other sites

4 minutes ago, guerringuerrin said:

I know that at some point it is adding more work to the devs but perhaps an official WildFires' AppImage would be the best approach. I don't doubt the good intentions of the github user "0ad-matters" but it is understandable that someone might doubt whether he is not incorporating some vulnerability in our system by installing this package.
 

An official appimage is planned, but in the meantime I personnally trust @andy5995 We also made the flatpak official just a few days ago.

 

Quote

In any case, since this is a free software development native to GNU/Linux environments, perhaps the best thing would be to officially announce the release when it is available in the repositories of, at least, the most important Linux distributions.
Afterall, having a new release that is first available with two clicks on Windows and MacOs before it is on Linux is a bit ironic.

Yes, people can learn to compile and become better computer users. But this is a video game and the best strategy for spreading it is to not put obstacles in people's way.

Just an opinion.

It's as native on Windows than it is on macOS, BSD, Haiku and Linux. It's just that the distribution of the most performant version is a bit slower on Linux it's out of our control. We could wait for the maintainers to release but then just like when the trailer leaked, we'd get confusion in the lobby if they take 3 months like A26.






 

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...