Page 4 of 4

Re: Linux build makefile deployment?

Posted: Sun Oct 14, 2018 1:57 pm
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.

Re: Linux build makefile deployment?

Posted: Sun Oct 14, 2018 2:06 pm
by pango
Oooh...
I expected the hexadecimal number in the URL to be file-specific, but it is build-specific? Good spotting

Re: Linux build makefile deployment?

Posted: Tue Aug 10, 2021 1:08 pm
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).

Re: Linux build makefile deployment?

Posted: Tue Aug 10, 2021 10:20 pm
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.

Re: Linux build makefile deployment?

Posted: Wed Aug 11, 2021 12:16 am
by Jay_H
Fantastic, thank you jefetienne :D That's really helpful for Unity newcomers like me.

Re: Linux build makefile deployment?

Posted: Wed Aug 11, 2021 2:09 pm
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 :)