CDE is an open-source tool that automatically packages up the Code, Data, and Environment required to deploy and run your Linux programs on other machines without any installation or configuration.
Contents:
CDE should work on any modern x86-Linux machine. Download a pre-compiled binary (32-bit or 64-bit), rename it to cde, and make it executable [last released on 2011-08-15].
Or fetch the latest source code from GitHub and compile it yourself:
git clone git://github.com/pgbovine/CDE.git
cd CDE
make
Let’s use CDE to create a self-contained portable package for Xclock. First, download or compile the cde binary, make it executable, and then run:
./cde xclock
You should see the Xclock window pop up:
When you close the window and do an ls, you’ll see that CDE has created a sub-directory called cde-package/. Now take a look inside of there:
find cde-package/ | less
You’ll see that the CDE package (cde-package/ sub-directory) contains all of the dependencies required to execute Xclock, ranging from the xclock executable and fonts files all the way down to the standard C library and dynamic linker.
Now tar and gzip this package directory:
tar -cvf cde-xclock.tar cde-package/
gzip cde-xclock.tar
You can now transfer the cde-xclock.tar.gz file to any other x86-Linux distro created in the past 5 years. When the package arrives on the target machine, you can unzip it and then run Xclock by executing the special xclock.cde wrapper script within the package:
tar -zxvf cde-xclock.tar.gz
cde-package/xclock.cde
You should now see the Xclock window appear. Congrats, you’ve now successfully created a portable self-contained package for a Linux application and run it on another distro without any installation or configuration! (Of course, this is a silly toy example because all Linux distros contain Xclock, so there is no need to create a portable version of it.)
To learn more, read Basic CDE usage.
Please email me, Philip Guo, at philip@pgbovine.net if you have questions, feedback, bug reports, or feature requests.