Command Line Flags - Workflow

Versions of mProjector 3.1.1 and later support command line execution. mProjector's command line options are as follows:

-c <project_file_path> - Compile application using the specified project settings.

-r - Suppress the replace existing application dialog window

Example: Compile alert_user application automatically replacing a previously existing version.

Windows

  1. Open a DOS shell by clicking: Start > Programs > Accessories > Command Prompt.
  2. Navigate to the directory containing mProjector.
  3. Run mProjector.exe using the desired parameters.
  4. cd "C:\Program Files\mProjector V3.1.1a"
    mProjector.exe -c "C:\alert_user.mproj" -r

Mac

  1. Open a UNIX shell using Apple's Terminal utility. You will find Terminal in /Applications/Utilities directory on Mac OS X.
  2. Navigate to the directory containing mProjector's UNIX executable file. Note the UNIX executable file is not the same as mProjector.app. The UNIX executable is inside the mProjector.app package -- mProjectorUNIXExecutablePath = mProjectorPath + "/Contents/MacOS/mProjector".
  3. Run mProjector using the desired parameters.
  4. cd "/Applications/mProjector 3.1.1/mProjector.app/Contents/MacOS"
    ./mProjector -c "/Users/brian/test/appBasics.mproj" -r

Workflow

You can automate the process of building multiple applications by creating executable shell script that links together a series of commands.

Windows

Using text editor, like NotePad, create a simple text file with a series of mProjector commands. Save the file and change it's extension to be ".bat". To run the script enter the path in a DOS shell or simply double click it.

 

Sample mProjector DOS shell script


cd "C:\Program Files\mProjector V3.1.1a"
mProjector.exe -c "C:\alert_user.mproj" -r
mProjector.exe -c "C:\red ball.mproj" -r
mProjector.exe -c "C:\downloadFile.mproj" -r
mProjector.exe -c "C:\MediaWindow.mproj" -r
mProjector.exe -c "C:\create_window.mproj" -r

Mac

Using text editor, like BBEdit or TextMate, create a simple text file. The first line needs to be "#! /bin/sh" to indicate it's a UNIX shell script. Save the file and change it's extension to be ".command". To run the script enter the path in Terminal and hit the enter key. You can also make this file a double-clickable file by changing it's file propertied using the UNIX command chmod on it from terminal -- e.g. chmod 755 <path_to_shell_scipt_file>.

 

Sample mProjector UNIX shell script

#! /bin/sh
cd "/Applications/mProjector/mProjector.app/Contents/MacOS"
./mProjector -c "/Users/brian/test/alert_user.mproj" -r
./mProjector -c "/Users/brian/test/red ball.mproj" -r
./mProjector -c "/Users/brian/test/downloadFile.mproj" -r
./mProjector -c "/Users/brian/test/MediaWindow.mproj" -r
./mProjector -c "/Users/brian/test/create_window.mproj" -r