0 Replies Latest reply on Feb 16, 2012 3:35 PM by Paul Driegen

    RapiDeploy - A Rapid Deployment Utility

      Hi all,

       

      We've recently started playing around with RhoElements. So far it's been a great experience. Kudos to the developers!

       

      Once thing that became apparent quickly though was the time lag between development and test cycles when you are constantly copying files over to your device and restarting RhoElements. I wanted something similar to what you experience when developing in a native environment with one-click deployments. This may be available with RhoStudio, but we're still in the quick one-off prototyping phase and I really just wanted a "quick and dirty" solution. Essentially, I wanted a tool that would:

       

      1. Copy all the applicable changed files in my project to the device
      2. Start the process (rhoelements.exe)

       

      There is a utility called cecopy which will do the copying, but you can't specify complex filters, and it certainly won't start RhoElements for you. So I developed a command line utility to aid in this. Essentially it acts as an xcopy with your target device as a destination. You point it to a source folder on your local machine and indicate where on the device you want your files copied to. It only copies files that were changed or added. You can also specify file filters to only include files with relevant extensions (i.e. copy .htm & .css files, but not .psd files).  Lastly, you can have it start a remote process on the device when it's done - the idea being to start the RhoElements runtime automatically after deployment is completed.

      I think it's helped us save quite a bit of time when building quick prototype pages to test, so I thought I would share it with everyone.

       

      Requirements

      1. A PC running MS Windows XP/Vista/7
      2. The MS .NET Framework 2.0 runtime.
      3. On the device side, at the moment it only support windows mobile devices connected to your development PC via WMDC or Activesync.

       

      Usage

      1. Connect your WM device to your PC through ActiveSync or WMDC.
      2. run RapiDeploy with the desired arguments to deploy your app to the device. The simplest thing is to is to create a .bat file and include it as a post-build step in your development IDE (if available) or just execute the file from the command line.

       

      RapiDeploy supports the following arguments:

      • /src: Source Directory [Required]. Specifies the fully qualified path to the source directory on your local PC. (i.e. /src:"C:\Development\MyRhoElementsApp\")
      • /dest: Destination Directory [Required]. Specifies the path to the destination folder on the device. It will be created if it doesn't already exist. (i.e. /dest:"\Program Files\MyApp")
      • /exts: ext1|ext2|ext3... [Optional]. Specifies the list of file extensions that will be included in the deployment. Each element must be separated with a '|' [pipe] character. If you don't include this argument, the default extensions included are : .htm , .html , .js, .css, .jpg, .gif, .png. To replace this list with your own that copies .doc and .xml files, use: /exts:.doc|.xml
      • /proc: Remote process to spawn [Optional]. Specifies the remote process to launch on the target device after deployment is completed. This is a very simple implementation, if the process start fails it won't report back to you. To start RhoElements after deployment, use /proc:"\Program Files\RhoElements\RhoElements.exe"
      • /args: Remote process arguments [Optional]. Specifies arguments into your remote process. i.e. /args:"/S:file://\MyRhoElementsApp\default.htm"

       

      Examples:

      • Copy .htm, .js, .css and .png files from "C:\Development\MyRhoElementsApp" to "\MyApp" on the device:

                rapideploy /src:"C:\Development\MyRhoElementsApp" /dest:"\MyApp" /exts:.htm|.js|.css|.png

      • Same as above, and also start RhoElements.exe on the device:

                rapideploy /src:"C:\Development\MyRhoElementsApp" /dest:"\MyApp" /exts:.htm|.js|.css|.png /proc:"\Program Files\RhoElements\RhoElements.exe"


      Known Issues

      • None that I'm aware of. Please let me know if you find any and I'll do my best to address them. I've only tested this on a couple of machines, both running MS Windows 7, and found no issues.

       

      The source code as well as the binary is attached to this post.


      Cheers,

      Paul (pdriegen at nuwaysoftware dot com)