Changing Homer GUI Code

From LIBISIS
Revision as of 13:28, 18 August 2008 by Dean Whittaker (talk | contribs)
Jump to navigation Jump to search

The homer GUI is designed to be compiled into a standalone application. Therefore, some matlab functions etc. can not be used


dos and don'ts

There are a few rules when altering code that 'MUST' be obeyed, these are:

 * NO feval or eval statements - these do not compile
 * Folder names MUST be stored without a slash at the end, i.e. '..\libisis\matlab' is ok, but '..\libisis\matlab\' is not. 
 * Use the command filesep to get the folder separator for the current platform instead of using '\' 
 * Do not use script mfiles
 * Use text files for any optional settings etc. so that a user may change them once the suite has been compiled
 * Always include the mcrinstaller with any distribution


How To Compile

  • open matlab
    • navigate to the homer_gui folder
    • type >> mbuild -setup
    • Matlab will ask "do you want mbuild to locate installed compilers, type "y" and press return
    • Next, select the same compiler from the same group used to build libisis (usually C++ .NET 2003).
    • Comfirm by pressing return
    • Type >> deploytool
    • In the deployment tool toolbar click "open project" icon
    • Open homer.prj located in the homer_gui folder.
    • In the deployment tool toolbar click "Open Project Settings Window" icon
    • Select the folders you wish the output files to reside (by default c:\homer_gui\distrib. The project name will be the name of the .exe file that the user runs. Click ok and ignore any other options
    • In the deployment tool toolbar click the "build project" icon and wait until the compilation is completed (as indicated at the bottom of the matlab window). This may take several minutes
    • In the deployment tool toolbar, click the "package project" icon and wait until complete (as indicated by the progress bar).
  • Copy the "DLL" directory from the homer_gui director and into the directory that the distribution of Homer is located (e.g. c:\homer\distrib)
  • Copy the "Instrument_setup" directory from the homer_gui directory and into the directory that the distribution of homer is located
  • Create a Zip File named Homer containing homer_pkg.exe, the "DLL" folder and the "instrument_setup" folder. No other files are required.
  • Give this zip file to users.