Changing Homer GUI Code
Revision as of 13:37, 18 August 2008 by Dean Whittaker (talk | contribs)
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.
Possible Issues With Compiled Code
Compiled code can throw some errors depending on the compiler and changes made to the code. An error is given in a command window.
Error | Resolution |
---|---|
Invalid MEX file: <folder structure>\libisisexc.dll, the specified module could not be found. Yet libisisexc.dll is in the location described! | One of the .dll library files that libisisexc is linked to is missing in the "dll" folder. This is often a free to redistribute file in the compiler used to compile libisis. Simply locate this .dll file and add it to the "dll" folder.
} |