-
Notifications
You must be signed in to change notification settings - Fork 1
Building MoonDeploy
Unfortunately, Mac OS is not directly supported at the moment, but MoonDeploy can be built from sources! ^__^
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
You might also have to:
-
Install a suitable C compiler
-
install library support for GTK 3 - if you also wish the GUI interface (the default for Windows and Linux, but not Mac)
The last points above are definitely an OS-dependent process, which might require you to consult the documentation of your operating system, compiler and libraries
-
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 directory subtree
-
Open a terminal within the giancosta86 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
Now, to run an application packaged with MoonDeploy you should just run:
moondeploy "any .moondeploy descriptor"Finally, please note that you might want to associate MoonDeploy with .moondeploy files, to run them - for example - when you download them from the web.