DaemonEngine / Urcheon

An asset builder and package manager for Dæmon based games
https://unvanquished.net
ISC License
12 stars 1 forks source link

Implement `urcheon init` #57

Open illwieckz opened 2 years ago

illwieckz commented 2 years ago

So that's yet another thing I want to implement in Urcheon since the very beginning but that always got de-prioritized because of other things like things actually needed to build a release.

The idea is that someone could do this:

mkdir package_src.dpkdir
cd package_src.dpkdir
urcheon --game unvanquished init

Or:

urcheon --game unvanquished init package_src.dpkdir

This would set up the basic configuration of an urcheon-driven dpkdir, here it's just about writing unvanquished in package_src.dpkdir/.urcheon/game.txt and may be write a default .gitignore.

This would also be doable:

urcheon --game unvanquished init --git package_src.dpkdir

This would create the dpkdir folder, write the configuration, call git init and commit the basic things.

For collections (like UnvanquishedAssets or InterstellarOasis parent directories), one would just do that:

mkdir MyAssets
cd MyAssets
urcheon init --collection

or

urcheon init --collection MyAssets

And of course that would be possible as well:

urcheon init --collection --git MyAssets

Writing the game name in the collection configuration would allow to not have to retype it when creating dpkdirs.

So a complete git-based scenario would be:

urcheon --game unvanquished init --collection --git MyAssets
cd MyAssets
urcheon init --git src/package0_src.dpkdir
urcheon init --git src/package1_src.dpkdir
urcheon init --git src/package2_src.dpkdir

This would be the same as:

mkdir MyAssets
cd MyAssets
urcheon --game unvanquished init --collection --git
urcheon init --git src/package0_src.dpkdir
urcheon init --git src/package1_src.dpkdir
urcheon init --git src/package2_src.dpkdir