The following sections provide instructions for some additional installation options.
To delete the intermediate files created when building the OOMMF software from source code, use pimake to build the target objclean in the root directory of the OOMMF distribution.
tclsh oommf.tcl pimake objcleanRunning the strip utility on the OOMMF executable files should also reduce their size somewhat.
OOMMF software supports local customization of some of its features. All OOMMF programs load the file config/options.tcl, which contains customization commands as well as editing instructions. As it is distributed, config/options.tcl directs those programs that load it to also load the file config/local/options.tcl, if it exists. Because future OOMMF releases may overwrite the file config/options.tcl, permanent customizations should be made by copying config/options.tcl to config/local/options.tcl and editing the copy. It is recommended that you leave in the file config/local/options.tcl only the customization commands necessary to change those options you wish to modify. Remove all other options so that overwrites by subsequent OOMMF releases are allowed to change the default behavior.
Notable available customizations include the choice of which network port the host service directory application uses, and the choice of what program is used for the display of help documentation. By default, OOMMF software uses the application mmHelp, which is included in the OOMMF release, but the help documentation files are standard HTML, so any web browser (for example, Netscape Navigator or Microsoft Internet Explorer) may be used instead. Complete instructions are in the file config/options.tcl.
OOMMF software classifies computing platforms into different types using the scripts in the directory config/names relative to the root directory of the OOMMF distribution. Each type of computing platform is assigned a unique name. These names are used as directory names and in index and configuration files so that a single OOMMF installation may contain platform-dependent sections for many different types of computing platforms.
To learn what name OOMMF software uses to refer to your computing platform, run
tclsh oommf.tcl +platformin the OOMMF root directory.
First, use pimake to build the target distclean to clear away any compiled executables built using the old platform name.
tclsh oommf.tcl pimake distcleanThen, to change the name OOMMF software uses to describe your platform from foo to bar, simply rename the file
config/names/foo.tcl to config/names/bar.tcland
config/cache/foo.tcl to config/cache/bar.tcl.After renaming your platform type, you should recompile your executables using the new platform name.
If oommf.tcl +platform reports the platform name unknown, then none of the scripts in config/names/ recognizes your platform type. As an example, to add the platform name foo to OOMMF's vocabulary of platform names, create the file config/names/foo.tcl. The simplest way to proceed is to copy an existing file in the directory config/names and edit it to recognize your platform.
The files in config/names include Tcl code like this:
Oc_Config New _ \ [string tolower [file rootname [file tail [info script]]]] { # In this block place the body of a Tcl proc which returns 1 # if the machine on which the proc is executed is of the # platform type identified by this file, and which returns 0 # otherwise. # # The usual Tcl language mechanism for discovering details # about the machine on which the proc is running is to # consult the global Tcl variable 'tcl_platform'. See the # existing files for examples, or contact the OOMMF # developers for further assistance. }
After creating the new platform name file config/names/foo.tcl, you also need to create a new platform cache file config/cache/foo.tcl. A reasonable starting point is to copy the file config/cache/unknown.tcl for editing. Contact the OOMMF developers for assistance.
Please consider contributing your new platform recognition and configuration files to the OOMMF developers for inclusion in future releases of OOMMF software.
If the script oommf.tcl +platform reports ``Multiple platform names are compatible with your computer'', then there are multiple files in the directory config/names/ that return 1 when run on your computer. For each compatible platform name reported, edit the corresponding file in config/names/ so that only one of them returns 1. Experimenting using tclsh to probe the Tcl variable tcl_platform should assist you in this task. If that fails, you can explicitly assign a platform type corresponding to your computing platform by matching its hostname. For example, if your machine's host name is foo.bar.net:
Oc_Config New _ \ [string tolower [file rootname [file tail [info script]]]] { if {[string match foo.bar.net [info hostname]]} { return 1 } # Continue with other tests... }
Contact the OOMMF developers if you need further assistance.
This section lists installation options for Microsoft Windows.
Right mouse click on the desktop to bring up the configuration dialog, and select New|Shortcut. Enter the command line necessary to bring up OOMMF, e.g.,
tclsh c:\oommf\oommf.tcl
Click Next> and enter OOMMF for the shortcut name. Select Finish.
At this point the shortcut will appear on your desktop with either the tclsh or wish icons. Right mouse click on the icon and select Properties. Select the ShortCut tab, and bring up Change Icon... Under File Name: enter the OOMMF icon file, e.g.,
C:\oommf\oommf.ico
Click OK. Back on the Shortcut tab, change the Run: selection to Minimized. Click OK to exit the Properties dialog box. Double clicking on the OOMMF icon should now bring up the OOMMF application mmLaunch.
Cygwin is a Linux-like environment for Windows, which includes the GNU C++ compiler gcc. The ability to compile OOMMF is periodically tested against the current release of Cygwin, and sample config/names/cygtel.tcl and config/cache/cygtel.tcl files are included in the OOMMF distribution. You should install a binary distribution of Tcl/Tk (such as ActiveTcl) to use with OOMMF because compiling Tcl/Tk with Cygwin tools is difficult and poorly supported.
Note that OOMMF software determines whether it is running within the Cygwin environment by examining the environment variables OSTYPE and TERM. If either is set to a value beginning with cygwin, the Cygwin environment is assumed. If you are using the Cygwin environment with a different values for both OSTYPE and TERM, you will have to modify config/names/cygtel.tcl accordingly.
After you compile OOMMF within the Cygwin environment, you will also need to run OOMMF from within the Cygwin environment, to be sure that necessary runtime support libraries can be found.
The import libraries distributed with ActiveTcl are not compatible with the Borland C++ linker. However, the command line utility implib can be used to create suitable libraries from the Tcl/Tk DLL's. In the Tcl/Tk library directory (typically "C:/Tcl/lib"), issue a command of the form
implib -a tcl84bc.lib ..\bin\tcl84.dllto create the Borland compatible import library tcl84bc.lib. Repeat with ``tk'' in place of ``tcl'' to create tk84bc.lib. The ``-a'' switch requests implib to add a leading underscore to function names. This is sufficient for the DLL's shipped with ActiveTcl 8.4.5.0, but other releases may require some additional tweaking. You can use the Borland command line tool impdef to create a module definition file from each DLL, add leading underscores manually as needed, and add the module definition file to the implib command line.
At a minimum, you will have to change the program_compiler_c++ value to point to the Borland C++ compiler. The sample wintel.tcl cache file assumes the librarian tlib and the linker ilink32 are in the execution path, and that the Borland compatible import libraries made above are in the Tcl/Tk library directory. If this is not the case then you will have to make the appropriate additional modifications. (Depending on your linker, you may need to add the ``-o'' switch to the linker command, to force ordinal usage of the Borland compatible Tcl/Tk libraries produced in the previous step.)
If you encounter difficulties during OOMMF start up, you may need to set the environment variable TCL_LIBRARY.
%SystemDrive%\Program Files\Tcl\lib\tcl8.4
Click Set and OK to finish.
Edit the file autoexec.bat. Add a line such as the following:
set TCL_LIBRARY=C:\Program Files\Tcl\lib\tcl8.4
C:\> ftype ActiveTclScript ActiveTclScript="C:\Tcl\bin\wish84.exe" "%1" %*Note that the quotes are required as shown to protect spaces in pathnames.