Difference between revisions of "Changing Homer GUI Code"

From LIBISIS
Jump to navigation Jump to search
m
m
Line 27: Line 27:
 
* Type >> Homer_compile. This will then take up to 5 minutes to compile,
 
* Type >> Homer_compile. This will then take up to 5 minutes to compile,
 
* Two files now exist in the standalone_homer folder (newly created on the same level and the homer_gui folder). The zip file and the MCRinstaller.exe file. Distribute both to users, they must run the MCRinstaller.exe file once to setup matlab components on their computer.
 
* Two files now exist in the standalone_homer folder (newly created on the same level and the homer_gui folder). The zip file and the MCRinstaller.exe file. Distribute both to users, they must run the MCRinstaller.exe file once to setup matlab components on their computer.
 
+
* A further text file complete.txt is created, this file indicates that compilation is successfull and contains a date and time stamp of the last successful build. This is for reference only.
  
  

Revision as of 15:59, 22 August 2008

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
  • The First time you compile:
    • 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
  • navigate to the homer_gui folder in matlab (in <libisis_folder>/applications/matlab/homer_gui) in matlab. This is VERY IMPORTANT, the code will run if you don't do this, but it will not run properly
  • Type >> Homer_compile. This will then take up to 5 minutes to compile,
  • Two files now exist in the standalone_homer folder (newly created on the same level and the homer_gui folder). The zip file and the MCRinstaller.exe file. Distribute both to users, they must run the MCRinstaller.exe file once to setup matlab components on their computer.
  • A further text file complete.txt is created, this file indicates that compilation is successfull and contains a date and time stamp of the last successful build. This is for reference only.


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. Occurs when options are selected in the GUI window. 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.