Build script?

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
Post Reply
l0b0
Posts: 5
Joined: Sat Nov 09, 2024 9:58 am

Build script?

Post by l0b0 »

I've packaged the latest DFU Linux binary using Nix. However, building things from source would be preferable for several reasons:
  • Security, by relying on the Nix build infrastructure rather than third parties.
  • Reproducibility, which is a big part of Nix's popularity.
  • Portability, since people can work out how to build on platforms other than the ones for which there are binaries.
  • Avoids having to patch library paths to work with the Nix directory structure.
  • Might enable building using only open source software, such as unity-builder.
Unfortunately I know virtually nothing about Unity, so I don't have the first clue how to translate the build instructions to a script. If anyone has a Linux build script I'd be really grateful if you could post it.

User avatar
pango
Posts: 3463
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Build script?

Post by pango »

Check viewtopic.php?p=56296#p56296 for a Makefile, and a file to add to the sources to execute a "rebuild addressables" pre-compilation step.
I can't test if everything is still working correctly at the moment, unity version is now 2019.4.40f1, so I'm crossing fingers

P.S. Did a quick check, you need to at least update the Unity Editor path; Say, if it was installed by UnityHub, the default path should be

Code: Select all

unitydir := $(HOME)/Unity/Hub/Editor/2019.4.40f1
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
pango
Posts: 3463
Joined: Wed Jul 18, 2018 6:14 pm
Location: France
Contact:

Re: Build script?

Post by pango »

Also, if you're packaging Daggerfall Unity for Linux, I recommend setting TERM=xterm in a wrapper to prevent an exception when loading source-based mods (say Distant Terrain).

The version of Mono embedded by Unity 2019.4.40f1

Code: Select all

~/Unity/Hub/Editor/2019.4.40f1/Editor/Data/MonoBleedingEdge/bin ᐅ monop2 --runtime-version mono 
runtime version: 4.0.30319.42000
doesn't know about terminfo2 file format, issue is fixed in 5.12 as far as I understand but I don't think we can't upgrade Mono, for one Unity use custom patched Mono builds.
And setting TERM inside Daggerfall Unity doesn't seem to prevent the exception :(
viewtopic.php?p=68366#p68366
Mastodon: @pango@fosstodon.org
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

l0b0
Posts: 5
Joined: Sat Nov 09, 2024 9:58 am

Re: Build script?

Post by l0b0 »

Thank you very much! I'll have a look into this when I can.

Post Reply