Difference between revisions of "Changing Homer GUI Code"

From LIBISIS
Jump to navigation Jump to search
m
m
Line 32: Line 32:
 
* Create a Zip File named Homer containing homer_pkg.exe, the "DLL" folder and the "instrument_setup" folder. No other files are required.  
 
* Create a Zip File named Homer containing homer_pkg.exe, the "DLL" folder and the "instrument_setup" folder. No other files are required.  
 
* This is the file to distribute to users.
 
* This is the file to distribute to users.
 +
 +
 +
<gallery caption="Compiling In Pictures" widths="100px" heights="100px" perrow="6">
 +
image:mbuild.jpg|set options in mbuild
 +
image:deploytool_start.jpg|Open homer project file in deploytool
 +
image:deploytool_logos.jpg|Deploytool logos
 +
image:compile_start.jpg|Start compiling
 +
image:compile_complete.jpg|Compiling has completed
 +
image:package.jpg|Package the program
 +
image:folder_copy1.jpg|Copy the DLL and instrument_setup folders into the distribution directory.
 +
image:folder_copy2.jpg
 +
image:remove_folder.jpg|Remove the .svn subfolder in the newly created DLL and instrument_setup directories.
 +
image:compress.jpg|Zip the two folders and homer_pkg file together and distribute to users.
 +
</gallery>
 +
 +
  
 
== Possible Issues With Compiled Code ==
 
== Possible Issues With Compiled Code ==

Revision as of 13:33, 19 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
    • navigate to the homer_gui folder (in <libisis_folder>/applications/matlab/homer_gui) in matlab
    • 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 >> open homer.prj and the deployment tool window will open
    • 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 directory 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.
  • Go into each of the folders that have just been copied and delete the .svn subdirectory. DO NOT delete this directory from the original folders.
  • Create a Zip File named Homer containing homer_pkg.exe, the "DLL" folder and the "instrument_setup" folder. No other files are required.
  • This is the file to distribute 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. 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.