Hy there,
in the past years - while doing some Orbiter development and running open source projects - I have quickly become familiar with version control systems. At first it was CVS, then SVN, now Mercurial and Git...
In all those years I used them not only to version my code, but - almost naturally - to version my Orbiter environment, too.
Thinking about that, it left me with the feeling that this might be a nice solution for managing addons in Orbiter. So let me propose the
Common Orbiter Installation (COI) system
Using a distributed version control system for a radically new way of dealing with addons.
Let me start with the use cases I'm following to put my Orbiter environment under source control. I will skip installation of DVCS programm and such and only focus on the use cases themself. Just be aware of "hg" being the command-line tool used as DVCS programm...
First I put the base distribution under source control:
If I list my tags, i'll get this:
> hg tags
base
addon 1
addon 2
addon 3
addon 4
If I want to play with an addon, let's say 2, I just issue hg up "addon 2" and the dir will be reset to that state where addon 2 was installed.
If I want to play with all addons concurrently, i'd have to first check how many parallel "heads" there are:
> hg heads
addon 4
addon 3
Then I make a special revision, where i put together 2 heads with hg merge "addon 3" "addon 4". Now I can play around with it, or "save" this merge via hg ci -m "addon 3 and 4".
The nice thing here is, that whenever a conflict occurs - let's say both addon 3 and addon 4 modify the base.cfg file - the system launches a graphical merge tool and let the user decide what to do AFTER automatically solving obvious conflicts. Most of the time, you won't have to do anything...
The next thing to do would be a nice UI - shielding me from the version control chitchat... this would basically automate the above mentioned commands to a point where there are dialogs for
* adding/removing,
* activate/deactivate and
* upload/download addons
And now for the cool part: this can all be scaled up to something like OH, i.e. a common installation, where all addons are stored in installed manner, and where everyone can "pull" revisions from to "install" it in his/her system.
Imagine the above mentioned graph on 3 machines... the Common Orbiter Installation (COI) server, user 1 and user 2:
COI has
User 1, an addon-developer has
User 2, the regular addon-user has
User 2 uses the upload/download dialog mentioned above to get a list of all addons on the COI server... he'll get something like this:
User 1 uses the upload/download dialog to get a list of all addons FOR the COI server... he'll get something like this:
User 1 selects addon 4 and uploads it.
The next day, user 2 again checks COI...
He thinks "hey cool, addon 4 sounds promising" and selects it and downloads it. His graphs will look like this then:
Then he uses the select/unselect dialog to select addon 4 (or the recently downloaded addy is selected automatically) and immediately has a orbiter dir with all files set up properly to start orbiter right away. No install hazzle, no addon conflicts...
With this system you have some pretty neat advantages:
I'll try to come up with a first proof-of-concept for the GUI.
Questions or suggestions are welcome!
regards,
Face
in the past years - while doing some Orbiter development and running open source projects - I have quickly become familiar with version control systems. At first it was CVS, then SVN, now Mercurial and Git...
In all those years I used them not only to version my code, but - almost naturally - to version my Orbiter environment, too.
Thinking about that, it left me with the feeling that this might be a nice solution for managing addons in Orbiter. So let me propose the
Common Orbiter Installation (COI) system
Using a distributed version control system for a radically new way of dealing with addons.
Let me start with the use cases I'm following to put my Orbiter environment under source control. I will skip installation of DVCS programm and such and only focus on the use cases themself. Just be aware of "hg" being the command-line tool used as DVCS programm...
First I put the base distribution under source control:
- Create a dir for it - let's say "C:\Orbiter"
- > cd C:\Orbiter
- > hg init
- Unzip Orbiter's base package to the dir
- > hg addremove -s 100 (adds all files to the repository and detects copies or renames)
- > hg ci -m "Base" (commits this first changeset with comment "Base")
- > hg tag -l "Base" (tags the commit with the name "Base" locally)
- Unzip addon 1
- Follow addon-instructions to modify base files etc.
- > hg addremove -s 100
- > hg ci -m "addon 1"
- > hg tag -l "addon 1"
- > hg up Base
- Unzip addon 2
- Follow instructions to modify
- > hg addremove -s 100
- > hg ci -m "addon 2"
- > hg tag -l "addon 2"
- > hg up "addon 1"
- Unzip addon 3
- Again modify
- > hg addremove -s 100
- > hg ci -m "addon 3"
- > hg tag -l "addon 3"
- > hg up "addon 1"
- > hg merge "addon 2"
- Solve conflicts
- > hg ci -m "addon 1 and 2"
- Unzip addon 4
- Modify
- > hg addremove -s 100
- > hg ci -m "addon 4"
- > hg tag -l "addon 4"
Code:
* addon 4
|
* addon 1 and 2
|
* | addon 3
| |\
| | * addon 2
\| |
* | addon 1
|/
* base
> hg tags
base
addon 1
addon 2
addon 3
addon 4
If I want to play with an addon, let's say 2, I just issue hg up "addon 2" and the dir will be reset to that state where addon 2 was installed.
If I want to play with all addons concurrently, i'd have to first check how many parallel "heads" there are:
> hg heads
addon 4
addon 3
Then I make a special revision, where i put together 2 heads with hg merge "addon 3" "addon 4". Now I can play around with it, or "save" this merge via hg ci -m "addon 3 and 4".
The nice thing here is, that whenever a conflict occurs - let's say both addon 3 and addon 4 modify the base.cfg file - the system launches a graphical merge tool and let the user decide what to do AFTER automatically solving obvious conflicts. Most of the time, you won't have to do anything...
The next thing to do would be a nice UI - shielding me from the version control chitchat... this would basically automate the above mentioned commands to a point where there are dialogs for
* adding/removing,
* activate/deactivate and
* upload/download addons
And now for the cool part: this can all be scaled up to something like OH, i.e. a common installation, where all addons are stored in installed manner, and where everyone can "pull" revisions from to "install" it in his/her system.
Imagine the above mentioned graph on 3 machines... the Common Orbiter Installation (COI) server, user 1 and user 2:
COI has
Code:
* addon 3
|
| * addon 2
| |
* | addon 1
|/
* base
Code:
* addon 4
|
* addon 1 and 2
|\
| * addon 2
| |
* | addon 1
|/
* base
Code:
* addon 1
|
* base
Code:
Installed:
base
|
+ addon 1
Available:
base
|
+ addon 3
Code:
Installed:
base
|
+ addon 1
New:
base
|
+ addon 1 and 2
|
+ addon 4
The next day, user 2 again checks COI...
Code:
Installed:
base
|
+ addon 1
Available:
base
|
+ addon 3
|
+ addon 1 and 2
|
+ addon 4
Code:
* addon 4
|
* addon 1 and 2
|\
| * addon 2
| |
* | addon 1
|/
* base
With this system you have some pretty neat advantages:
- efficient packing of addons
- efficient transportation via network
- assembling of dependencies is on developer side, not user side
- fast and secure "installation"/"deinstallation" of addons
- versioning implicit (of course)
- crypthographical signing is possible to authenticate "installations"
- due to lightweight server integration, everyone can be a server and interact with other users directly to e.g. exchange intermediate development snapshots
- the need to learn yet-another-addon-installer (although the system can easily provide a ready-to-use snapshot download in ZIP format - see http://bitbucket.org/face/orrl/get/tip.zip for example)
- Developers have to distribute "installed" addons instead of addon packages with installers (well, this can be an advantage, too)
- Licensing problems may surface - see DanSteph's OrbiterSound and OH
I'll try to come up with a first proof-of-concept for the GUI.
Questions or suggestions are welcome!
regards,
Face