-
Notifications
You must be signed in to change notification settings - Fork 1
Building MoonDeploy
This short tutorial is mainly dedicated to Mac OS users - especially if they wish to customize MoonDeploy making it employ the GTK+ user interface (available out-of-the-box for Windows and Linux) in lieu of the terminal interface.
Considering the portable nature of the Go programming language, the required steps are the same for every OS.
- Install the Java Development Kit (required to run Gradle) and:
-
set the JAVA_HOME environment variable to its root directory
-
add its bin subdirectory to the PATH environment variable
-
set the GOROOT environment variable to its root directory
-
add its bin subdirectory to the PATH environment variable
-
Install a suitable C compiler, as well as library support for GTK 3. It is definitely an OS-dependent process, which might require you to consult the documentation of your operating system, compiler and libraries
-
Install the GTK runtime libraries - which, for example, might be provided by GIMP.
-
Create a directory that will be your Go path (for example, GoPath in your home directory)
-
Assign such dir to the GOPATH environment variable
-
Within GOPATH, create the src/github.com/giancosta86/moondeploy directory subtree
-
Open a terminal within the moondeploy directory
-
Run:
git clone "https://github.com/giancosta86/moondeploy.git"On Mac OS, you can replace the Bash user interface with the GTK+ user interface:
-
In the project directory, open the file named moonclient/verbs/startGUI_darwin.go
-
Replace
"github.com/giancosta86/moondeploy/moonclient/gui/bash"with
"github.com/giancosta86/moondeploy/moonclient/gui/gtk"- Replace
return bash.StartGUI(launcher, bootDescriptorPath)with
return gtk.StartGUI(launcher, bootDescriptorPath)- Run:
gradle buildThe most critical part will be to build the C libraries - please check the error messages and consult the documentation of your compiler suite
-
If the process completes successfully, you will find a zip file within the build subdirectory: it is the archive containing the binary files for your operating system!
-
Extract the zip file to a directory of your choice, which you should add to the PATH environment variable
-
Be sure to add the resource files (in particular, .png images) from the PROJECT_DIR/moonclient/resources/ directory
Now, to run an application packaged with MoonDeploy you should just run:
moondeploy "any .moondeploy descriptor"