diff --git a/Joomla/Joomla/Config.class.php b/Joomla/Joomla/Config.class.php new file mode 100644 index 0000000..d44b914 --- /dev/null +++ b/Joomla/Joomla/Config.class.php @@ -0,0 +1,9 @@ + diff --git a/Joomla/Joomla/FileSystem.class.php b/Joomla/Joomla/FileSystem.class.php new file mode 100755 index 0000000..b42df1d --- /dev/null +++ b/Joomla/Joomla/FileSystem.class.php @@ -0,0 +1,191 @@ + + * @url http://ben.lobaugh.net + * @license Free to use and modify as you choose. Please give credits. + */ +class FileSystem { + + + /** + * Moves files inside the $src folder to the $dest folder. If $dest does + * not exist it will be created. + * + * NOTE: Moves the files _inside_ the $src folder, not the $src folder itself + * + * This function removes $src + * + * @param String $src - File path to source folder + * @param type $dest - File path to destination folder + * @return false on failure + */ + function move($src, $dest){ + + // If source is not a directory stop processing + if(!is_dir($src)) { + rename($src, $dest); + return true; + } + + // If the destination directory does not exist create it + if(!is_dir($dest)) { + if(!mkdir($dest)) { + // If the destination directory could not be created stop processing + return false; + } + } + + // Open the source directory to read in files + $i = new DirectoryIterator($src); + foreach($i as $f) { + if($f->isFile()) { + rename($f->getRealPath(), "$dest/" . $f->getFilename()); + } else if(!$f->isDot() && $f->isDir()) { + $this->move($f->getRealPath(), "$dest/$f"); + @unlink($f->getRealPath()); + } + } + @unlink($src); + } + + + /** + * Recursively copy files from one directory to another + * + * @param String $src - Source of files being moved + * @param String $dest - Destination of files being moved + */ + function copy($src, $dest){ + + // If source is not a directory stop processing + if(!is_dir($src)) { + rename($src, $dest); + return true; + } + + // If the destination directory does not exist create it + if(!is_dir($dest)) { + if(!$this->mkdir($dest)) { + // If the destination directory could not be created stop processing + return false; + } + } + + // Open the source directory to read in files + $i = new DirectoryIterator($src); + foreach($i as $f) { + if($f->isFile()) { + copy($f->getRealPath(), "$dest/" . $f->getFilename()); + } else if(!$f->isDot() && $f->isDir()) { + $this->copy($f->getRealPath(), "$dest/$f"); + } + } + } + + /** + * Creates a new directory. If the path to the directory does not + * exist it will also be created + * + * @param String $path + */ + function mkdir($path) { + if(is_dir($path)) return true; + $path = str_replace("\\", "/", $path); + $path = explode("/", $path); + + $rebuild = ''; + foreach($path AS $p) { + + // Check for Windows drive letter + if(strstr($p, ":") != false) { + $rebuild = $p; + continue; + } + $rebuild .= "/$p"; + //echo "Checking: $rebuild\n"; + if(!is_dir($rebuild)) mkdir($rebuild); + } + } + + public function findByExtension($path, $ext){ + $arr = array(); + $files = $this->ls($path); + + foreach ($files as $f) { + $info = pathinfo($path . "/$f"); + if(isset($info['extension']) && $info['extension'] == $ext) + $arr[] = $path . "/$f"; + } + return $arr; + } + + /** + * List the files in a given directory + * + * @param String $path + * @return Array + */ + public function ls($path) { + $arr = array(); + if(is_dir($path)) { + // Open the source directory to read in files + $i = new DirectoryIterator($path); + foreach($i as $f) { + if(!$f->isDot()) + $arr[] = $f->getFilename(); + } + return $arr; + } + return false; + } + + /** + * Determine if a file or folder exists + * + * @param String $path + * @return Boolean + */ + public function exists($path) { + if(is_dir($path)) { + return true; + } else if (file_exists($path)) { + return true; + } + return false; + } + + /** + * Removes a given directory and everything in it + * + * @param String $path + */ + public function rmdir($path) { + // Open the source directory to read in files + $i = new DirectoryIterator($path); + foreach($i as $f) { + if($f->isFile()) { + unlink($f->getRealPath()); + } else if(!$f->isDot() && $f->isDir()) { + $this->rmdir($f->getRealPath()); + //rmdir($f->getRealPath()); + } + } + rmdir($path); + } + + /** + * Remove files or folders + * + * @param String $path + */ + public function rm($path) { + if(is_dir($path)) { + $this->rmdir($path); + } else { + unlink($path); + } + } +} // end class \ No newline at end of file diff --git a/Joomla/Joomla/Params.class.php b/Joomla/Joomla/Params.class.php new file mode 100755 index 0000000..085b06f --- /dev/null +++ b/Joomla/Joomla/Params.class.php @@ -0,0 +1,183 @@ + +* @url http://ben.lobaugh.net +* @license Free to use and modify as you choose. Please give credits. +*/ +class Params { + + /** + * Holds a list of parameters for the command line tools + * + * array (, array(, , , )) + * @var Array + */ + private $mParams; + + /** + * Holds a list of missing required parameters + * + * @var String + */ + private $mError; + + public function __construct(){ + $this->buildmParams(); + } + + /** + * Returns the number of parameters passed + * + * @return Integer + */ + public function count() { + global $argv; + return count($argv); + } + + /** + * Adds a new parameter to the list of parameters that should be available + * + * @param String $name - The flag to be used on the parameter + * @param Boolean $required - Boolean indicating if the parameter is required to be on the command line + * @param String $default_value - Default value for optional parameters + * @param String $message - Helpful message to be displayed to a user describing the parameter + */ + public function add($name, $required, $default_value, $message) { + $this->mParams[$name] = array('required' => $required, 'default_value' => $default_value, 'message' => $message); + } + + /** + * Removes a parameter from the list of available parameters + * + * @param String $name + */ + public function remove($name) { + unset($this->mParams[$name]); + } + + /** + * Checks the passed in parameters against the required list to ensure + * all parameters that are required are present + */ + public function verify() { + $params = $this->getCmdParams(); + + $keys = array_keys($params); + $msg = ""; + if(is_array($this->mParams)) { + foreach($this->mParams AS $k => $v) { + if(isset($params[$k])) $this->set($k, $params[$k]); // Set all values from the cmd line params + if($v['required'] /* required */ && (!in_array($k, $keys) || is_null($params[$k]))) { + $msg .= "\n{$k} - {$v['message']}"; + } + } + if($msg != '') { + $this->mError = $msg; + return false; + } + } + return true; + } + + /** + * Builds up $this->mParams with the parameters that currently exist + */ + private function buildmParams() { + $params = $this->getCmdParams(); + + foreach($params as $k => $v) { + $this->add($k, false, 'unknown', 'Auto-added from command line parameter'); + $this->set($k, $v); + } + } + + /** + * Returns the error message from verify() + * @return String + */ + public function getError() { + return $this->mError; + } + + /** + * Sets the value of a command line parameter + * + * @param String $param + * @param String $value + */ + public function set($param, $value) { + $this->mParams[$param]['value'] = $value; + } + + /** + * Returns the value of a single command line parameter + * + * @param String $param + * @return String + */ + public function get($param) { + if(isset($this->mParams[$param]['value'])) return $this->mParams[$param]['value']; + if(!isset($this->mParams[$param])) return false; + return $this->mParams[$param]['default_value']; + } + + /** + * Returns an associative array of the parameters passed via the command + * line or set through a default + * + * @return Array + */ + public function valueArray() { + $arr = array(); + if(is_array($this->mParams)) { + foreach($this->mParams AS $k => $v) { + $val = ''; + if(isset($v['value'])) $val = $v['value']; + else if(isset($v['default_value'])) $val = $v['default_value']; + + $arr[$k] = $val; + } + } + return $arr; + } + + + /** + * Returns all the parameters passed by the command line as key/value pairs. + * If a flag is used (param with no value) it will be set to true + * + * @global Array $argv + * @return Array + */ + private function getCmdParams() { + global $argv; + + $params = array(); + for($i = 0; $i < count($argv); $i++) { + if(substr($argv[$i], 0, 1) == '-') { + if($i <= count($argv)-2 && substr($argv[($i + 1)], 0, 1) != '-') { + // Next item is flag + $value = $argv[$i + 1]; + } else { + $value = "true"; + } + $key = str_replace("-", "", $argv[$i]); + $params[$key] = $value; + } + } + return $params; + } + + /** + * Convert this object into a string + */ + public function __toString() { + return print_r($this->mParams, true); + } + +} // end class \ No newline at end of file diff --git a/Joomla/Joomla/index.php b/Joomla/Joomla/index.php new file mode 100644 index 0000000..f86ab2b --- /dev/null +++ b/Joomla/Joomla/index.php @@ -0,0 +1,377 @@ +p->get(param_name). + * + * Adding a parameter is done with the following structure: + * $this->p->add('cmd_param_name', required(true|false), default value, help message string); + */ + public function parameters() { + $this->p = new Params(); // Do not remove this line + + + /* + * Example of a command line parameter + * + * $this->p->add('cmd_param_name', required(true|false), default value, help message string); + */ + $this->p->add('diagnosticsConnectionString', false, 'UseDevelopmentStorage=true', 'Connections string to storage for diagnostics'); + $this->p->add('offline', false, '0', 'Joomla Site is offline'); + $this->p->add('offline_message', false, '0', 'This site is down for maintenance.
Please check back again soon.'); + $this->p->add('display_offline_message', false, '1', 'This site is down for maintenance.
Please check back again soon.'); + $this->p->add('sitename', false, '1', 'Joomla on Azure'); + $this->p->add('editor', false, '1', 'tinymce'); + $this->p->add('list_limit', false, '1', '20'); + $this->p->add('access', false, '1', 'Access to the site'); + $this->p->add('debug', false, '0', 'Non Debug mode.'); + $this->p->add('debug_lang', false, '0', 'Debug Language is english (UK) by default'); + $this->p->add('db', true, '', 'Name of database to store Joomla data in'); + $this->p->add('user', true, '', 'User account name with permissions to the Joomla database'); + $this->p->add('password', true, '', 'Password of account with permissions to the Joomla database'); + $this->p->add('host', true, '', 'URL to database host'); + $this->p->add('dbtype', false, 'sqlazure', 'Database driver to use'); + $this->p->add('dbprefix', false, 'jos_', 'Joomla table prefix'); + $this->p->add('live_site', false, '', 'Live Site'); + $this->p->add('secret', false, uniqid(), 'Secret'); + $this->p->add('gzip', false, '0', 'Secure auth key'); + $this->p->add('error_reporting', false, '-1', 'default'); + $this->p->add('helpurl', false, 'http://help.joomla.org/proxy/index.php?option=com_help&keyref=Help{major}{minor}:{keyref}', 'Help URL'); + $this->p->add('ftp_host', false, '127.0.0.1', 'FTP Host'); + $this->p->add('ftp_port', false, '21', 'FTP Port'); + $this->p->add('ftp_user', false, '', 'FTP User'); + $this->p->add('ftp_pass', false,'', 'FTP Password'); + $this->p->add('offset', false, 'UTC', 'Offset'); + $this->p->add('mailer', false, 'mail', 'Joomla Mail'); + $this->p->add('mailfrom', false, 'info@microsoft.com', 'Mail From'); + $this->p->add('fromname', false, 'Joomla on SQLazure', 'From Name'); + $this->p->add('sendmail', false, '', 'No send mail for windows'); + $this->p->add('smtpauth', false, '', 'SMTP Auth'); + $this->p->add('smtpuser', false, '', 'SMTP User'); + $this->p->add('smtppass', false, '', 'SMTP Pass'); + $this->p->add('smtphost', false, 'localhost', 'SMTP Host'); + $this->p->add('smtpsecure', false, 'none', 'SMTP Secure'); + $this->p->add('smtpport', false, '25', 'Path of current site'); + $this->p->add('caching', false, '0', 'Caching'); + $this->p->add('cache_handler', false, 'file', 'cache handler'); + $this->p->add('cachetime', false, '15', 'Cache Time'); + $this->p->add('MetaDesc', false, '', 'Meta Description'); + $this->p->add('MetaKeys', false, '', 'Meta Keys'); + $this->p->add('MetaTitle', false, '', 'Meta Title'); + $this->p->add('MetaAuthor', false, '', 'Meta Author'); + $this->p->add('sef', false, '1', 'SEF'); + $this->p->add('sef_rewrite', false, '0', 'SEF Rewrite'); + $this->p->add('sef_suffix', false, '0', 'SEF Suffix'); + $this->p->add('unicodeslugs', false, '0', 'Unicode Slugs'); + $this->p->add('feed_limit', false, '10', 'Feed Limit'); + $this->p->add('log_path', false, '0', 'E:/approot/logs'); + $this->p->add('tmp_path', false, '0', 'E:/approot/tmp'); + $this->p->add('lifetime', false, '15', 'Lifetime'); + $this->p->add('session_handler', false, 'database', 'SEF Suffix'); + /*$this->p->add('source', false, 'C:/abhibuild/Joomla/beta', 'If there is an existing Joomla code base you can use it via a path');*/ + $this->p->add('source', false, '', 'If there is an existing Joomla code base you can use it via a path'); + $this->p->add('sample_data', true, '', 'If set to 1, sample data is installed'); + $this->p->add('admin_user', true, '', 'Default admin susername'); + $this->p->add('admin_password', true, '', 'Default admin password'); + if(!$this->p->verify()) die($this->p->getError()); + + } + + + /** + * This method allows you to do any additional work beyond unpacking + * the files that is required. This could include work such as downloading + * and unpacking an archive. + * + * The following are some of the methods available to you in this file: + * $this->curlFile($url, $destFolder) + * $this->move($src, $dest) + * $this->unzip($file, $destFolder) + */ + public function doWork() { + $conf = new Config(); + + $fs = new Filesystem(); + // Ensure tmp working dir exists + $tmp = $this->mRootPath . "\\tmp"; + $this->log("Creating temporary build directory: " . $tmp); + $fs->mkdir($tmp); + + if($this->p->get('source') != '' && $fs->exists($this->p->get('source'))) { + // Use Joomla codebase from source parameter + $this->log("Copying Joomla from " . $this->p->get('source')); + $fs->copy($this->p->get('source'), $this->mAppRoot); + } else { + // Download and unpack Joomla + $this->log('Downloading Joomla'); + //Packaged Joomla.zip on storage/svn or git + $file = $this->curlFile($conf->joomla_link, $tmp); + $this->log('Extracting Joomla'); + $fs->mkdir( $tmp.'/joomla/'); + $this->unzip($file, $tmp.'/joomla/'); + + $this->log('Moving Joomla files to ' . $this->mAppRoot); + $fs->move("$tmp\joomla", $this->mAppRoot); + + $this->log("Downloading the CDN"); + $file = $this->curlFile($conf->cdn_link, $tmp); + $this->log('Extracting CDN'); + $fs->mkdir( $tmp.'/CDN'); + $this->unzip($file, $tmp.'/CDN'); + $this->log('Installing CDN...'); + + $fs->copy("$tmp/CDN/azure_dependencies/standalone.php",$this->mAppRoot . "/standalone.php"); + $fs->copy("$tmp/CDN/azure_dependencies/preflight_config.php",$this->mAppRoot . "/preflight_config.php"); + $fs->copy("$tmp/CDN/azure_dependencies/index.php",$this->mAppRoot . "/index.php"); + $fs->move("$tmp/CDN/azure_dependencies/windows_azure", $this->mAppRoot . "/windows_azure"); + $fs->move("$tmp/CDN/azure_dependencies/admin_media", $this->mAppRoot . "/administrator/components/com_media"); + $fs->move("$tmp/CDN/azure_dependencies/site_media/controller.php", $this->mAppRoot . "/components/com_media/controller.php"); + $fs->move("$tmp/CDN/azure_dependencies/admin_cdn", $this->mAppRoot . "/administrator/components/com_cdn"); + $fs->copy("$tmp/CDN/azure_dependencies/factory.php",$this->mAppRoot . "/libraries/joomla/factory.php"); + $fs->move("$tmp/CDN/azure_dependencies/plg_azure",$this->mAppRoot . "/plugins/system/plg_azure"); + $fs->move("$tmp/CDN/libraries/microsoft", $this->mAppRoot . "/libraries/microsoft"); + $fs->copy("$tmp/CDN/language/en-GB/en-GB.com_cdn.ini", $this->mAppRoot . "/administrator/language/en-GB/en-GB.com_cdn.ini"); + $fs->copy("$tmp/CDN/language/en-GB/en-GB.com_cdn.sys.ini", $this->mAppRoot . "/administrator/language/en-GB/en-GB.com_cdn.sys.ini"); + + $fs->copy($this->mAppRoot.'/installation/sql/sqlazure/joomla.sql', $this->mAppRoot.'/windows_azure/sql/joomla.sql' ); + $fs->copy($this->mAppRoot.'/installation/sql/sqlazure/sample_data.sql', $this->mAppRoot.'/windows_azure/sql/sample_data.sql' ); + $fs->move($this->mAppRoot.'/installation', $this->mAppRoot.'/installation_bak'); + + + } + + $this->updateJoomlaConfig(); + $this->updatePreflightConfig(); + + + //echo "\nNOTE: Do not forget to install the FileSystemDurabilityPlugin before packaging your application!"; + echo "\n\nCongratulations! You now have a brand new Windows Azure Joomla project at " . $this->mRootPath . "\n"; + + } + + + + + + + + /** + * Runs a scaffolder and creates a Windows Azure project structure which can be customized before packaging. + * + * @command-name Run + * @command-description Runs the scaffolder. + * + * @command-parameter-for $scaffolderFile Argv --Phar Required. The scaffolder Phar file path. This is injected automatically. + * @command-parameter-for $rootPath Argv|ConfigFile --OutputPath|-out Required. The path to create the Windows Azure project structure. This is injected automatically. + + * + */ + public function runCommand($scaffolderFile, $rootPath) { + /** + * DO NOT REMOVE BETWEEN BELOW COMMENT + */ + $this->mAppRoot = ($rootPath) . "\WebRole"; + $this->mScaffolder = $scaffolderFile; + $this->mRootPath = $rootPath; + $this->parameters(); + + $this->extractPhar(); + $this->updateServiceConfig(); + + $this->doWork(); + /** + * DO NOT REMOVE BETWEEN ABOVE COMMENT + */ + } + + /** + * Will update the ServiceConfiguration.cscfg file with any values + * specified from the command line paramters. Tags in the .cscfg file + * will be found and replaced. Tags are of the form $tagName$ + */ + private function updateServiceConfig() { + $this->log("Updating ServiceConfiguration.cscfg\n"); + $contents = file_get_contents($this->mRootPath . "/ServiceConfiguration.cscfg"); + $values = $this->p->valueArray(); + foreach ($values as $key => $value) { + $contents = str_replace('$' . $key . '$', $value, $contents); + } + + file_put_contents($this->mRootPath . "/ServiceConfiguration.cscfg", $contents); + } + + /** + * Will update the configuration file with any values + * specified from the command line paramters. Tags in the configuration file + * will be found and replaced. Tags are of the form $tagName$ + */ + private function updateJoomlaConfig() { + $this->log("Updating configuration.php\n"); + $contents = file_get_contents($this->mRootPath . "/WebRole/configuration.php"); + $values = $this->p->valueArray(); + foreach ($values as $key => $value) { + $contents = str_replace('$' . $key . '$', $value, $contents); + } + + file_put_contents($this->mRootPath . "/WebRole/configuration.php", $contents); + } + + /** + * Will update the preflight_config.php file with any values + * specified from the command line paramters. Tags in the php file + * will be found and replaced. Tags are of the form $tagName$ + */ + private function updatePreflightConfig() { + $this->log("Updating preflight_config.php\n"); + $contents = file_get_contents($this->mRootPath . "/WebRole/preflight_config.php"); + $values = $this->p->valueArray(); + foreach ($values as $key => $value) { + $contents = str_replace('$' . $key . '$', $value, $contents); + } + + file_put_contents($this->mRootPath . "/WebRole/preflight_config.php", $contents); + } + + /** + * Extracts the scaffold files and sets up the project structure + */ + private function extractPhar() { + // Load Phar + $phar = new Phar($this->mScaffolder); + + // Extract to disk + $this->log("Extracting resources...\n"); + $this->createDirectory($this->mRootPath); + $this->extractResources($phar, $this->mRootPath); + $this->log("Extracted resources.\n"); + + } + + + /** + * Extracts the contents of a zip archive + * + * @param String $file + * @param String $destFolder + */ + private function unzip($file, $destFolder) { + $zip = new ZipArchive(); + if($zip->open($file) === true) { + $zip->extractTo("$destFolder"); + $zip->close(); + } else { + echo "Failed to open archive"; + } + } + + /** + * Downloads a file from the internet + * + * @param String $url + * @param String $destFolder + * @return String + */ + private function curlFile($url, $destFolder) { + $options = array( + CURLOPT_RETURNTRANSFER => true, // return web page + CURLOPT_HEADER => false, // don't return headers + CURLOPT_FOLLOWLOCATION => true, // follow redirects + CURLOPT_ENCODING => "", // handle all encodings + CURLOPT_USERAGENT => "blob curler 1.2", // who am i + CURLOPT_AUTOREFERER => true, // set referer on redirect + CURLOPT_CONNECTTIMEOUT => 120, // timeout on connect + CURLOPT_TIMEOUT => 120, // timeout on response + CURLOPT_MAXREDIRS => 10, // stop after 10 redirects + ); + + $ch = curl_init( $url ); + curl_setopt_array( $ch, $options ); + $content = curl_exec( $ch ); + $err = curl_errno( $ch ); + $errmsg = curl_error( $ch ); + $header = curl_getinfo( $ch ); + curl_close( $ch ); + + $header['errno'] = $err; + $header['errmsg'] = $errmsg; + $header['content'] = $content; + + $file = explode("/", $url); + $file = $file[count($file)-1]; + $this->log("Writing file $destFolder/$file"); + file_put_contents("$destFolder/$file", $header['content']); + return "$destFolder/$file"; + } +} + diff --git a/Joomla/Joomla/resources/ServiceConfiguration.cscfg b/Joomla/Joomla/resources/ServiceConfiguration.cscfg new file mode 100755 index 0000000..716e5b6 --- /dev/null +++ b/Joomla/Joomla/resources/ServiceConfiguration.cscfg @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Joomla/Joomla/resources/ServiceDefinition.csdef b/Joomla/Joomla/resources/ServiceDefinition.csdef new file mode 100755 index 0000000..53fe4dc --- /dev/null +++ b/Joomla/Joomla/resources/ServiceDefinition.csdef @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Joomla/Joomla/resources/WebRole/Web.config b/Joomla/Joomla/resources/WebRole/Web.config new file mode 100755 index 0000000..08beac8 --- /dev/null +++ b/Joomla/Joomla/resources/WebRole/Web.config @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Joomla/Joomla/resources/WebRole/bin/add-environment-variables.cmd b/Joomla/Joomla/resources/WebRole/bin/add-environment-variables.cmd new file mode 100755 index 0000000..0e3c202 --- /dev/null +++ b/Joomla/Joomla/resources/WebRole/bin/add-environment-variables.cmd @@ -0,0 +1,8 @@ +@echo off +cd "%~dp0" +ECHO "Adding extra environment variables..." >> ..\startup-tasks-log.txt + +powershell.exe Set-ExecutionPolicy Unrestricted +powershell.exe .\add-environment-variables.ps1 >> ..\startup-tasks-log.txt 2>>..\startup-tasks-error-log.txt + +ECHO "Added extra environment variables." >> ..\startup-tasks-log.txt \ No newline at end of file diff --git a/Joomla/Joomla/resources/WebRole/bin/add-environment-variables.ps1 b/Joomla/Joomla/resources/WebRole/bin/add-environment-variables.ps1 new file mode 100755 index 0000000..cfd9e62 --- /dev/null +++ b/Joomla/Joomla/resources/WebRole/bin/add-environment-variables.ps1 @@ -0,0 +1,16 @@ +[Reflection.Assembly]::LoadWithPartialName("Microsoft.WindowsAzure.ServiceRuntime") + +$rdRoleId = [Environment]::GetEnvironmentVariable("RdRoleId", "Machine") + +[Environment]::SetEnvironmentVariable("RdRoleId", [Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment]::CurrentRoleInstance.Id, "Machine") +[Environment]::SetEnvironmentVariable("RoleName", [Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment]::CurrentRoleInstance.Role.Name, "Machine") +[Environment]::SetEnvironmentVariable("RoleInstanceID", [Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment]::CurrentRoleInstance.Id, "Machine") +[Environment]::SetEnvironmentVariable("RoleDeploymentID", [Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment]::DeploymentId, "Machine") + +if (![Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment]::CurrentRoleInstance.Id.Contains("deployment")) { + if ($rdRoleId -ne [Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment]::CurrentRoleInstance.Id) { + Restart-Computer + } + [Environment]::SetEnvironmentVariable('Path', $env:RoleRoot + '\base\x86;' + [Environment]::GetEnvironmentVariable('Path', 'Machine'), 'Machine') +} + diff --git a/Joomla/Joomla/resources/WebRole/bin/install-php-impl.cmd b/Joomla/Joomla/resources/WebRole/bin/install-php-impl.cmd new file mode 100755 index 0000000..684d01d --- /dev/null +++ b/Joomla/Joomla/resources/WebRole/bin/install-php-impl.cmd @@ -0,0 +1,16 @@ +@echo off +cd "%~dp0" +ECHO Starting PHP installation... >> ..\startup-tasks-log.txt + +md "%~dp0appdata" +cd "%~dp0appdata" +cd "%~dp0" + +reg add "hku\.default\software\microsoft\windows\currentversion\explorer\user shell folders" /v "Local AppData" /t REG_EXPAND_SZ /d "%~dp0appdata" /f +"..\resources\WebPICmdLine\webpicmdline" /Products:PHP53,SQLDriverPHP53IIS,PHPManager /AcceptEula >> ..\startup-tasks-log.txt 2>>..\startup-tasks-error-log.txt +reg add "hku\.default\software\microsoft\windows\currentversion\explorer\user shell folders" /v "Local AppData" /t REG_EXPAND_SZ /d %%USERPROFILE%%\AppData\Local /f + +ECHO Completed PHP installation. >> ..\startup-tasks-log.txt + +icacls %RoleRoot%\approot /grant "Everyone":F /T +%WINDIR%\system32\inetsrv\appcmd.exe set config -section:system.webServer/fastCgi /+"[fullPath='%ProgramFiles(x86)%\PHP\v5.3\php-cgi.exe'].environmentVariables.[name='PATH',value='%PATH%;%RoleRoot%\base\x86']" /commit:apphost diff --git a/Joomla/Joomla/resources/WebRole/bin/install-php.cmd b/Joomla/Joomla/resources/WebRole/bin/install-php.cmd new file mode 100755 index 0000000..0e46ead --- /dev/null +++ b/Joomla/Joomla/resources/WebRole/bin/install-php.cmd @@ -0,0 +1,12 @@ +@echo off +cd "%~dp0" + +REM This script will only execute on production Windows Azure. +if "%EMULATED%"=="true" goto :EOF + +ECHO Installing PHP runtime... >> ..\startup-tasks-log.txt + +powershell.exe Set-ExecutionPolicy Unrestricted +powershell.exe .\install-php.ps1 + +ECHO Installed PHP runtime. >> ..\startup-tasks-log.txt \ No newline at end of file diff --git a/Joomla/Joomla/resources/WebRole/bin/install-php.ps1 b/Joomla/Joomla/resources/WebRole/bin/install-php.ps1 new file mode 100755 index 0000000..0e51119 --- /dev/null +++ b/Joomla/Joomla/resources/WebRole/bin/install-php.ps1 @@ -0,0 +1,37 @@ +[Reflection.Assembly]::LoadWithPartialName("Microsoft.WindowsAzure.ServiceRuntime") + +.\install-php-impl.cmd + +# Get PHP installation details +Add-PsSnapin PHPManagerSnapin +$phpConfiguration = Get-PHPConfiguration +$phpExecutable = Get-ChildItem $phpConfiguration.ScriptProcessor +$phpExtensionsPath = $phpExecutable.DirectoryName + "\ext" +$phpIniFile = $phpConfiguration.PHPIniFilePath + +# Get PHP installation override details +$myExtensionsPath = "..\php\ext" +$myExtensions = Get-ChildItem $myExtensionsPath | where {$_.Name.ToLower().EndsWith(".dll")} +$myPhpIniFile = "..\php\php.ini" + +# Append PHP.ini directives +if ((Test-Path $myPhpIniFile) -eq 'True') { + $additionalPhpIniDirectives = Get-Content $myPhpIniFile + $additionalPhpIniDirectives = $additionalPhpIniDirectives.Replace("%EXT%", $phpExtensionsPath) + + Add-Content $phpIniFile "`r`n" + Add-Content $phpIniFile $additionalPhpIniDirectives +} + +# Copy and register extensions +if ($myExtensions -ne $null) { + foreach ($myExtension in $myExtensions) { + Copy-Item $myExtension.FullName $phpExtensionsPath + Set-PHPExtension -Name $myExtension.Name -Status enabled + } +} + +# Add PHP executable to PATH +if (![Microsoft.WindowsAzure.ServiceRuntime.RoleEnvironment]::CurrentRoleInstance.Id.Contains("deployment")) { + [Environment]::SetEnvironmentVariable('Path', $phpExecutable.DirectoryName + ';' + [Environment]::GetEnvironmentVariable('Path', 'Machine'), 'Machine') +} \ No newline at end of file diff --git a/Joomla/Joomla/resources/WebRole/configuration.php b/Joomla/Joomla/resources/WebRole/configuration.php new file mode 100755 index 0000000..8eec785 --- /dev/null +++ b/Joomla/Joomla/resources/WebRole/configuration.php @@ -0,0 +1,128 @@ +dbtype = azure_getconfig('dbtype'); + $this->host = azure_getconfig('host'); + $this->user = azure_getconfig('user'); + $this->password = azure_getconfig('password'); + $this->db = azure_getconfig('db'); + $this->dbprefix = azure_getconfig('dbprefix'); + $this->offset = azure_getconfig('offset'); + $this->offset_user = azure_getconfig('offset_user'); + $this->dbtype = azure_getconfig('dbtype'); + $this->host = azure_getconfig('host'); + $this->user = azure_getconfig('user'); + $this->password = azure_getconfig('password'); + $this->db = azure_getconfig('db'); + $this->dbprefix = azure_getconfig('dbprefix'); + $this->offline = azure_getconfig('offline'); + $this->offline_message =azure_getconfig('offline_message'); + $this->sitename = azure_getconfig('sitename'); + $this->editor = azure_getconfig('editor'); + $this->list_limit = azure_getconfig('list_limit'); + $this->access = azure_getconfig('access'); + $this->debug = azure_getconfig('debug'); + $this->debug_lang = azure_getconfig('debug_lang'); + $this->live_site = azure_getconfig('live_site'); + $this->secret = azure_getconfig('secret'); + $this->gzip = azure_getconfig('gzip'); + $this->error_reporting = azure_getconfig('error_reporting'); + $this->helpurl = azure_getconfig('helpurl'); + $this->ftp_host = azure_getconfig('ftp_host'); + $this->ftp_port = azure_getconfig('ftp_port'); + $this->ftp_user = azure_getconfig('ftp_user'); + $this->ftp_pass = azure_getconfig('ftp_pass'); + $this->ftp_root = azure_getconfig('ftp_root'); + $this->ftp_enable = azure_getconfig('ftp_enable'); + $this->storage_type = azure_getconfig('storage_type'); + $this->cloud_acc_name = azure_getconfig('cloud_acc_name'); + $this->cloud_access_key = azure_getconfig('cloud_access_key'); + $this->mailer = azure_getconfig('mailer'); + $this->mailfrom = azure_getconfig('mailfrom'); + $this->fromname = azure_getconfig('fromname'); + $this->sendmail = azure_getconfig('sendmail'); + $this->smtpauth = azure_getconfig('smtpauth'); + $this->smtpuser = azure_getconfig('smtpuser'); + $this->smtppass = azure_getconfig('smtppass'); + $this->smtphost = azure_getconfig('smtphost'); + $this->smtpsecure = azure_getconfig('smtpsecure'); + $this->smtpport = azure_getconfig('smtpport'); + $this->caching = azure_getconfig('caching'); + $this->cache_handler = azure_getconfig('cache_handler'); + $this->cachetime = azure_getconfig('cachetime'); + $this->MetaDesc = azure_getconfig('MetaDesc'); + $this->MetaKeys = azure_getconfig('MetaKeys'); + $this->MetaTitle = azure_getconfig('MetaTitle'); + $this->MetaAuthor = azure_getconfig('MetaAuthor'); + $this->sef = azure_getconfig('sef'); + $this->sef_rewrite = azure_getconfig('sef_rewrite'); + $this->sef_suffix = azure_getconfig('sef_suffix'); + $this->unicodeslugs = azure_getconfig('unicodeslugs'); + $this->feed_limit = azure_getconfig('feed_limit'); + $this->log_path = azure_getconfig('log_path'); + $this->tmp_path = azure_getconfig('tmp_path'); + $this->lifetime = azure_getconfig('lifetime'); + $this->session_handler = azure_getconfig('session_handler'); + $this->offset = azure_getconfig('offset'); + $this->offset_user = azure_getconfig('offset_user'); + + } +} \ No newline at end of file diff --git a/Joomla/Joomla/resources/WebRole/diagnostics.wadcfg b/Joomla/Joomla/resources/WebRole/diagnostics.wadcfg new file mode 100755 index 0000000..86c2198 --- /dev/null +++ b/Joomla/Joomla/resources/WebRole/diagnostics.wadcfg @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Joomla/Joomla/resources/WebRole/php/ext/php_azure.dll b/Joomla/Joomla/resources/WebRole/php/ext/php_azure.dll new file mode 100755 index 0000000..ac3f7f2 Binary files /dev/null and b/Joomla/Joomla/resources/WebRole/php/ext/php_azure.dll differ diff --git a/Joomla/Joomla/resources/WebRole/php/ext/readme.txt b/Joomla/Joomla/resources/WebRole/php/ext/readme.txt new file mode 100755 index 0000000..090e171 --- /dev/null +++ b/Joomla/Joomla/resources/WebRole/php/ext/readme.txt @@ -0,0 +1,2 @@ +Extensons in this folder will be enabled +on the Windows Azure role instance. \ No newline at end of file diff --git a/Joomla/Joomla/resources/WebRole/php/php.ini b/Joomla/Joomla/resources/WebRole/php/php.ini new file mode 100755 index 0000000..e07f85a --- /dev/null +++ b/Joomla/Joomla/resources/WebRole/php/php.ini @@ -0,0 +1,28 @@ +[PhpAzureChanges] +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +; This file will be appended to the PHP.ini file located +; on the Windows Azure role instance. +; +; It can be used to: +; - Enable extensions (note that extensions copied to +; the ext folder are enabled automatically) +; - Override PHP settings +; - ... +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + +; Change memory limit (example) +; memory_limit = 1024M + +; Enable an extension (example) +; extension=php_curl.dll + +; %EXT% will be replaced by the absolute path to PHP's +; extension folder. +; zend_extension=%EXT% + + + +upload_max_filesize = 64M +post_max_size = 64M + +extension=php_azure.dll \ No newline at end of file diff --git a/Joomla/Joomla/resources/WebRole/php/readme.txt b/Joomla/Joomla/resources/WebRole/php/readme.txt new file mode 100755 index 0000000..a5082ed --- /dev/null +++ b/Joomla/Joomla/resources/WebRole/php/readme.txt @@ -0,0 +1,3 @@ +If a file named php.ini is found in this directory, +it will be used instead of the default php.ini file provided +by the php.exe available on the role instance. \ No newline at end of file diff --git a/Joomla/Joomla/resources/WebRole/resources/Web-network-subdomains.config b/Joomla/Joomla/resources/WebRole/resources/Web-network-subdomains.config new file mode 100755 index 0000000..513f7a0 --- /dev/null +++ b/Joomla/Joomla/resources/WebRole/resources/Web-network-subdomains.config @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Joomla/Joomla/resources/WebRole/resources/Web-network-subfolders.config b/Joomla/Joomla/resources/WebRole/resources/Web-network-subfolders.config new file mode 100755 index 0000000..e46d12a --- /dev/null +++ b/Joomla/Joomla/resources/WebRole/resources/Web-network-subfolders.config @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Joomla/Joomla/resources/WebRole/resources/Web-no-network.config b/Joomla/Joomla/resources/WebRole/resources/Web-no-network.config new file mode 100755 index 0000000..e46d12a --- /dev/null +++ b/Joomla/Joomla/resources/WebRole/resources/Web-no-network.config @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Joomla/Joomla/resources/WebRole/resources/Web.config b/Joomla/Joomla/resources/WebRole/resources/Web.config new file mode 100755 index 0000000..08beac8 --- /dev/null +++ b/Joomla/Joomla/resources/WebRole/resources/Web.config @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Joomla/Joomla/resources/WebRole/resources/WebPICmdLine/Microsoft.Web.Deployment.dll b/Joomla/Joomla/resources/WebRole/resources/WebPICmdLine/Microsoft.Web.Deployment.dll new file mode 100755 index 0000000..08d70d2 Binary files /dev/null and b/Joomla/Joomla/resources/WebRole/resources/WebPICmdLine/Microsoft.Web.Deployment.dll differ diff --git a/Joomla/Joomla/resources/WebRole/resources/WebPICmdLine/Microsoft.Web.PlatformInstaller.UI.dll b/Joomla/Joomla/resources/WebRole/resources/WebPICmdLine/Microsoft.Web.PlatformInstaller.UI.dll new file mode 100755 index 0000000..75ed717 Binary files /dev/null and b/Joomla/Joomla/resources/WebRole/resources/WebPICmdLine/Microsoft.Web.PlatformInstaller.UI.dll differ diff --git a/Joomla/Joomla/resources/WebRole/resources/WebPICmdLine/Microsoft.Web.PlatformInstaller.dll b/Joomla/Joomla/resources/WebRole/resources/WebPICmdLine/Microsoft.Web.PlatformInstaller.dll new file mode 100755 index 0000000..a94eef6 Binary files /dev/null and b/Joomla/Joomla/resources/WebRole/resources/WebPICmdLine/Microsoft.Web.PlatformInstaller.dll differ diff --git a/Joomla/Joomla/resources/WebRole/resources/WebPICmdLine/WebpiCmdLine.exe b/Joomla/Joomla/resources/WebRole/resources/WebPICmdLine/WebpiCmdLine.exe new file mode 100755 index 0000000..11d5157 Binary files /dev/null and b/Joomla/Joomla/resources/WebRole/resources/WebPICmdLine/WebpiCmdLine.exe differ diff --git a/Joomla/Joomla/resources/WebRole/resources/WebPICmdLine/license.rtf b/Joomla/Joomla/resources/WebRole/resources/WebPICmdLine/license.rtf new file mode 100755 index 0000000..f388d41 --- /dev/null +++ b/Joomla/Joomla/resources/WebRole/resources/WebPICmdLine/license.rtf @@ -0,0 +1,41 @@ +{\rtf1\ansi\ansicpg1252\deff0\deflang1033\deflangfe1033{\fonttbl{\f0\fswiss\fprq2\fcharset0 Tahoma;}{\f1\froman\fprq2\fcharset0 Times New Roman;}{\f2\froman\fprq2\fcharset2 Symbol;}} +{\colortbl ;\red0\green0\blue0;\red0\green0\blue255;} +{\stylesheet{ Normal;}{\s1 heading 1;}{\s2 heading 2;}} +{\*\generator Msftedit 5.41.21.2509;}\viewkind4\uc1\pard\nowidctlpar\sb120\sa120\b\f0\fs20 MICROSOFT SOFTWARE LICENSE TERMS\par +\pard\brdrb\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 MICROSOFT WEB PLATFORM INSTALLER 3.0\f1\par +\pard\nowidctlpar\sb120\sa120\b0\f0 These license terms are an agreement between Microsoft Corporation (or based on where you live, one of its affiliates) and you. Please read them. They apply to the software named above, which includes the media on which you received it, if any. The terms also apply to any Microsoft\par +\pard\nowidctlpar\fi-360\li360\sb120\sa120\tx360\f2\'b7\tab\f0 updates,\par +\pard\nowidctlpar\fi-360\li360\sb120\sa120\f2\'b7\tab\f0 supplements,\par +\f2\'b7\tab\f0 Internet-based services, and\par +\f2\'b7\tab\f0 support services\par +\pard\nowidctlpar\sb120\sa120 for this software, unless other terms accompany those items. If so, those terms apply.\par +\b By using the software, you accept these terms. If you do not accept them, do not use the software.\par +\pard\brdrt\brdrs\brdrw10\brsp20 \nowidctlpar\sb120\sa120 If you comply with these license terms, you have the rights below.\par +\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\tx360 1.\tab INSTALLATION AND USE RIGHTS. \b0 You may install and use any number of copies of the software on your devices.\f1\par +\pard\s1\fi-357\li357\sb120\sa120\tx360\b\caps\f0 2.\tab\fs19 Third Party Programs\caps0\f1 .\b0\f0\fs20 T\kerning36 his software enables you to obtain software applications from other sources. Those applications are offered and distributed by third parties under their own license terms. Microsoft is not developing, distributing or licensing those applications to you, but instead, as a convenience, enables you to use this software to obtain those applications directly from the application providers. By using the software, you acknowledge and agree that you are obtaining the applications directly from the third party providers and under separate license terms, and that it is your responsibility to locate, understand and comply with those license terms.\fs19 Microsoft grants you no license rights for third-party software or applications that is obtained using this software. \kerning0 \b\f1\par +\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\tx360\f0\fs20 3.\tab INTERNET-BASED SERVICES. \b0 Microsoft provides Internet-based services with the software. It may change or cancel them at any time. \cf1 The software contains product information that is updated by means of a feed online from Microsoft.\cf0\f1\par +\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\b\f0 4.\tab SCOPE OF LICENSE.\b0 The software is licensed, not sold. This agreement only gives you some rights to use the software. Microsoft reserves all other rights. Unless applicable law gives you more rights despite this limitation, you may use the software only as expressly permitted in this agreement. In doing so, you must comply with any technical limitations in the software that only allow you to use it in certain ways. You may not\par +\pard\nowidctlpar\fi-363\li720\sb120\sa120\tx720\f2\'b7\tab\f0 work around any technical limitations in the software;\par +\pard\nowidctlpar\fi-363\li720\sb120\sa120\f2\'b7\tab\f0 reverse engineer, decompile or disassemble the software, except and only to the extent that applicable law expressly permits, despite this limitation;\par +\f2\'b7\tab\f0 make more copies of the software than specified in this agreement or allowed by applicable law, despite this limitation;\par +\f2\'b7\tab\f0 publish the software for others to copy;\par +\f2\'b7\tab\f0 rent, lease or lend the software; or\par +\f2\'b7\tab\f0 transfer the software or this agreement to any third party;\par +\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\tx360\b 5.\tab BACKUP COPY.\b0 You may make one backup copy of the software. You may use it only to reinstall the software.\par +\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\b 6.\tab DOCUMENTATION.\b0 Any person that has valid access to your computer or internal network may copy and use the documentation for your internal, reference purposes.\par +\b 7.\tab TRANSFER TO ANOTHER DEVICE.\b0 You may uninstall the software and install it on another device for your use. You may not do so to share this license between devices.\par +\b 8.\tab EXPORT RESTRICTIONS.\b0 The software is subject to United States export laws and regulations. You must comply with all domestic and international export laws and regulations that apply to the software. These laws include restrictions on destinations, end users and end use. For additional information, see {\field{\*\fldinst{HYPERLINK "www.microsoft.com/exporting"}}{\fldrslt{\ul\cf2 www.microsoft.com/exporting}}}\f1\fs20 .\ul\par +\ulnone\b\f0 9.\tab SUPPORT SERVICES. \b0 Because this software is \ldblquote as is,\rdblquote we may not provide support services for it.\par +\b 10.\tab ENTIRE AGREEMENT.\b0 This agreement, and the terms for supplements, updates, Internet-based services and support services that you use, are the entire agreement for the software and support services.\par +\pard\nowidctlpar\s1\fi-360\li360\sb120\sa120\tx360\b 11.\tab APPLICABLE LAW.\par +\pard\nowidctlpar\s2\fi-363\li720\sb120\sa120\tx720 a.\tab United States.\b0 If you acquired the software in the United States, Washington state law governs the interpretation of this agreement and applies to claims for breach of it, regardless of conflict of laws principles. The laws of the state where you live govern all other claims, including claims under state consumer protection laws, unfair competition laws, and in tort.\par +\pard\nowidctlpar\s2\fi-363\li720\sb120\sa120\b b.\tab Outside the United States.\b0 If you acquired the software in any other country, the laws of that country apply.\par +\pard\nowidctlpar\s1\fi-357\li357\sb120\sa120\tx360\b 12.\tab LEGAL EFFECT.\b0 This agreement describes certain legal rights. You may have other rights under the laws of your country. You may also have rights with respect to the party from whom you acquired the software. This agreement does not change your rights under the laws of your country if the laws of your country do not permit it to do so.\par +\pard\s1\fi-357\li357\sb120\sa120\tx360\b 13.\tab DISCLAIMER OF WARRANTY. The software is licensed \ldblquote as-is.\rdblquote You bear the risk of using it. Microsoft gives no express warranties, guarantees or conditions. You may have additional consumer rights under your local laws which this agreement cannot change. To the extent permitted under your local laws, Microsoft excludes the implied warranties of merchantability, fitness for a particular purpose and non-infringement.\par +\pard\s1\fi-357\li357\sb120\sa120 14.\tab LIMITATION ON AND EXCLUSION OF REMEDIES AND DAMAGES. You can recover from Microsoft and its suppliers only direct damages up to U.S. $5.00. You cannot recover any other damages, including consequential, lost profits, special, indirect or incidental damages.\par +\pard\nowidctlpar\li357\sb120\sa120\b0 This limitation applies to\par +\pard\nowidctlpar\fi-363\li720\sb120\sa120\tx720\f2\'b7\tab\f0 anything related to the software, services, content (including code) on third party Internet sites, or third party programs; and\par +\pard\nowidctlpar\fi-363\li720\sb120\sa120\f2\'b7\tab\f0 claims for breach of contract, breach of warranty, guarantee or condition, strict liability, negligence, or other tort to the extent permitted by applicable law.\par +\pard\sb120\sa120 It also applies even if Microsoft knew or should have known about the possibility of the damages. The above limitation or exclusion may not apply to you because your country may not allow the exclusion or limitation of incidental, consequential or other damages\f1 .\fs19\par +} + \ No newline at end of file diff --git a/Joomla/README.markdown b/Joomla/README.markdown new file mode 100755 index 0000000..2abec8e --- /dev/null +++ b/Joomla/README.markdown @@ -0,0 +1 @@ +See http://azurephp.interoperabilitybridges.com/articles/how-to-deploy-wordpress-using-the-windows-azure-sdk-for-php-wordpress-scaffold for usage instructions diff --git a/Joomla/build.bat b/Joomla/build.bat new file mode 100755 index 0000000..70054d1 --- /dev/null +++ b/Joomla/build.bat @@ -0,0 +1,23 @@ +echo off + +set PWD=%CD% + +REM Folder containing the scaffold +set JVer=1.7.3 + + + +echo Cleaning up previous Joomla scaffolder files + rmdir /S /Q %PWD%\build + mkdir %PWD%\build + +echo Building scaffold .phar file + call scaffolder build -in="%PWD%\Joomla" -out="%PWD%\build\Joomla.phar" + +echo Creating project directories +call scaffolder run -out="%PWD%\build\Joomla" -s="%PWD%\build\Joomla.phar" -DB_NAME database_name -DB_USER "user@lhost" -DB_PASSWORD "*******" -DB_HOST "******.database.windows.net" + +REM -out="%PWD%\build\Joomla" + +echo Packaging project +call package create -in="%PWD%\build\Joomla" -out="%PWD%\build" -dev=false diff --git a/README.markdown b/README.markdown index 600ac23..1d50f6d 100644 --- a/README.markdown +++ b/README.markdown @@ -1,3 +1,5 @@ +The Joomla support is added. It would be greately appreciated if some one can help test this. + Scaffolds created for the Windows Azure SDK for PHP by the Microsoft Interoperability Team http://azurephp.interopbridges.com