duality icon indicating copy to clipboard operation
duality copied to clipboard

Introduce a Build Pipeline

Open ilexp opened this issue 8 years ago • 9 comments

Summary

Building a Duality game ("Publish Game") is currently a very hardcoded process. Replace this with an extensible, modular build process that is configurable via the editor.

Analysis

  • The new build process should consist of a series of operations that are performed on the game data and binaries.
  • Every build step is represented by a user class that implements an interface. Each should be as self-contained as possible with the least possible shared state.
  • The current build process can be refactored to form the following build steps:
    • Copy to target directory, filtered with a blacklist.
    • Move to subdirectory, create batch file to run.
    • Zip target directory.
  • On the editor side, the build dialog should allow free editing of the list of build steps, including adding, removing, reordering or configuring steps.
    • Allow to maintain multiple distinct build configurations.
  • The set of available build steps can be derived from all available types in all editor plugins.
  • Things that additional build steps could potentially do:
    • Use IL magic to merge all assemblies and plugins into one.
    • Crawl all scenes to apply Prefabs and then remove their links to improve load times.
    • Crawl all scenes to perform additional optimization, like static batching or similar.
    • Run third-party tools for deployment on other platforms.
    • Rename the launcher file and set an icon.
    • Change the serialization format to binary, or something custom that discards compatibility features for speed.
    • ...

ilexp avatar Mar 24 '17 17:03 ilexp

I'd vote for this one. The possibility of merging all assemblies and plugins would be very useful. Also, there could be an option to remove the documentation to reduce the output size, or an asset packer to have only 2 files (exe & pak).

YMRYMR avatar Mar 29 '17 09:03 YMRYMR

Iam not really experienced with the editor UI itself but I could see if I can refactor the steps in PublishGameDialog to separate classes that each implement a 'IPublishStep' interface as a first step

Rick-van-Dam avatar Oct 17 '17 14:10 Rick-van-Dam

Actually, I'd be kinda interested to deal with this issue myself when I get around to it 🙂 That said, if this becomes a blocker or pain point for you or others before that happens, feel free to post a design proposal for this as a comment and we can start discussing it.

ilexp avatar Oct 17 '17 16:10 ilexp

Nah just looking for things to help with

Rick-van-Dam avatar Oct 17 '17 19:10 Rick-van-Dam

Has there been work on this front?

BobGneu avatar Jan 12 '18 04:01 BobGneu

Not yet, would have posted here otherwise. Caught up too much in other things and v3.0 so far, but definitely have it on my radar, and not with the lowest priority either. Having a proper, extensible build pipeline would be awesome.

ilexp avatar Jan 12 '18 18:01 ilexp

I havent done anything with this.

Rick-van-Dam avatar Jan 12 '18 18:01 Rick-van-Dam

I've found an open source alternative to ILMerge for merging all assemblie into one file. Maybe it can be useful at some point.

https://github.com/gluck/il-repack

ChristianGreiner avatar Aug 26 '18 19:08 ChristianGreiner

Nice. Thanks for the link!

ilexp avatar Aug 27 '18 05:08 ilexp