Linux build makefile deployment?

Discuss coding questions, pull requests, and implementation details.
User avatar
noabody
Posts: 6
Joined: Tue Sep 25, 2018 1:32 pm

Re: Linux build makefile deployment?

Post by noabody »

Makefile

Code: Select all

name := DaggerfallUnity
version := 2018.2.11f1
.PHONY: all
all:
	$(HOME)/Unity/Hub/Editor/$(version)/Editor/Unity -quit -batchmode -logFile stdout.log -buildTarget linux64 -buildLinux64Player "build/$(name).x86_64"

.PHONY: clean
clean:
	rm -rf build/$(name)_Data
	rm -f "build/Daggerfall Unity Manual.pdf"
	rm -f build/$(name).x86_64

.PHONY: realclean
realclean: clean
	rm -rf Library

.PHONY: distclean
distclean: realclean
	rm -rf Assets
	git reset --hard
	git checkout . -f
	git submodule update --checkout -f
I've reduced the Makefile to just the portion required. Visit my github for the current patch:
unibuild - the little kludge that could

The key thing about this Makefile is how and when to use either "realclean" or "distclean":

realclean is going to clear out the "Library" cache which Unity generates on build - use this to do a clean rebuild

distclean is going to fully clear and reset changes that Unity caused - use this when changing unity versions

P.S.
You've probably noticed that I'm not a "constant-communication" type.
Beyond the fear I harbor toward all others, most people seem to find my communication annoying, needy, presumptuous, etc.
Last edited by noabody on Sun Oct 14, 2018 3:56 pm, edited 4 times in total.

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

Re: Linux build makefile deployment?

Post by pango »

Oooh...
I expected the hexadecimal number in the URL to be file-specific, but it is build-specific? Good spotting
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

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

Re: Linux build makefile deployment?

Post by pango »

Just some updates for people that want to build Daggerfall Unity on Linux from command-line:
I'm now using Unity Hub (as AppImage package) to manage Unity Editor versions and Unity projects; Current version doesn't propose installing Unity Editor 2019.4.28f1, so I had to use

Code: Select all

UnityHub.AppImage unityhub://2019.4.28f1/1381962e9d08
to install it.

Daggerfall Unity now uses addressables, that need to be built separately. To automate their rebuild during packaging, I copied this script under Assets/Editor/BuildAddressables.cs, and added -executeMethod BuildAddressablesProcessor.PreExport to the build command.

I'm attaching the full Makefile I use (you'll probably have to adjust some paths at the beginning).
Attachments
Makefile.zip
(790 Bytes) Downloaded 18 times
When a measure becomes a target, it ceases to be a good measure.
-- Charles Goodhart

User avatar
jefetienne
Posts: 151
Joined: Thu Jan 16, 2020 8:14 pm
Location: Gallomont, Wayrest
Contact:

Re: Linux build makefile deployment?

Post by jefetienne »

I also built a simple bash script to easily search and download any Unity version's installer (earliest version looks like 5.6.0f1) to make the search easier. You then just have to manually link that Unity version to Unity Hub by clicking the "Add" button under the "Installs" tab.
El jefe, Etienne
Nexus Mods | GitHub

User avatar
Jay_H
Posts: 3670
Joined: Tue Aug 25, 2015 1:54 am
Contact:

Re: Linux build makefile deployment?

Post by Jay_H »

Fantastic, thank you jefetienne :D That's really helpful for Unity newcomers like me.

User avatar
jefetienne
Posts: 151
Joined: Thu Jan 16, 2020 8:14 pm
Location: Gallomont, Wayrest
Contact:

Re: Linux build makefile deployment?

Post by jefetienne »

Jay_H wrote: Wed Aug 11, 2021 12:16 am Fantastic, thank you jefetienne :D That's really helpful for Unity newcomers like me.
You're welcome :)
El jefe, Etienne
Nexus Mods | GitHub

Post Reply