This is for the new SNG7 Distro ONLY!
If you already have the FreePBX distro installed then you already have the perfect environment to start FreePBX development. The steps below outline what you will need to do to be able to develop in FreePBX using the FreePBX distro:
Note that 'sangoma-devel' is only available on SNG7 based Distros. If you're using an older SHMZ6 Distro, you will need to 'yum -y install git' instead.
There are two ways of synchronizing your machine with the main Git repository, ssh or https. ssh is significantly faster, and is the recommended way, but you do need to grant access to the SSH key of your development machine with the FreePBX Git Repository.
If you are unsure of how, or unable to do so, remove the '--mode=ssh' parameter, and it will work purely over https.
At this point (regardless of ssh or https) you will be asked for your FreePBX.org username and password. This is so the setup script can iterate over the list of projects available, which is not available without a login.
Make sure everything is symlinked correctly.
Once that is complete you are now free to install the developer mode of FreePBX. Keep in mind that we blow away the entire webroot so that the symlinks are created correctly and so that there are duplicate files laying around.
Fixing Broken Modules
If after development mode has been setup you can check if any modules are broken by querying FreePBX like so:
If any Broken Module are found, you can attempt to fix them by running:
Adding your own custom module
If after development mode has been setup you wish to add your own module the steps are simple.
First change directories to the freepbx source directory
Next you'll either need to checkout your module from your favorite VCS (VCS means git,svn or others). Or add it manually. Remember that the raw name of your module should be the folder name so dont try to get creative and have a module name of "mya@wsome!!Module&&"
Lastly you'll want to run the linker. This process links your module folder into the framework modules folder which let's framework know your module exists
Then tell framework to go update the symlinks. You'll also need to tell framework to go update the symlinks every time you add a new file!
Set proper permissions
Finally install your module!
Don't forget to reload!
Updating all modules from GIT
Later down the line if you want to update everything in FreePBX from upstream simply run
Checking out (adding new modules)
If you want to checkout a single module run