1 Installation Guide for PC's running Windows NT / 95 / 98 / 2000

This chapter contains the installation guide for the Mjølner System on Windows NT and Windows 95 using the Microsoft or GNU SDK.

1.1 Minimum Requirements

Requirements for using the Mjølner System on Windows NT/95/98/2000:

1.2 Installation

Before you install the Mj°lner System, please install your SDK libraries and utilities. This can be either the Microsoft or the GNU SDK.

1.2.1 Installing an SDK

To use the Mjølner System you must also install one of the following:

1.2.1.1 Installing the Microsoft Win32SDK

You will need to install the Microsoft SDK including all library files. Also, make sure that you have the LINK.EXE program in your path. This program may not be installed automatically - if this is the case simply locate it on your CD-ROM and copy it to a directory in your path.

1.2.1.2 Installing the Gnu Win32SDK

You will find the GNU sdk on the CD in utils/windows/GNU or at

ftp://ftp.mjolner.com/mjolner-system/latest/utils/GNU/

Execute the package gcc-2.95.2-qf-runtime-2000-03-27.exe. The recommended place to install it is in c:\gcc-2.95.2 or in a similar directory on a different drive.

1.2.2 Run the Setup program

To install The Mjølner System, run the Setup Program, which can be found on the Mjølner System CD in the folder named

\windows\<SDK>

where <SDK> is one of the following: ms or gnu.

The Setup Program installs The Mjølner System on your system in the directory you specify. Throughout the rest of this document, BETALIB refers to the directory chosen here.

1.2.3 Notes

1.2.4 Set up Environment Variables

The Mj°lner System installation script sets up the necessary environment variables for you. You can skip this section if you are running under Windows95, Windows98 or WindowsME or if you are running under WindowsNT or Windows2000 and always log in as the Administrator. (The environment variables are only set up for the user running the installation program, normally the Administrator.)

When the installation is completed you should make sure that the programs and batch files are in your path. If you installed the Mjølner System in e.g. C:\BETA, the batch files are located in C:\BETA\bin and the programs are in C:\BETA\bin\nti_<SDK>. The programs from your SDK also need to be in your path.

The setup for the Microsoft tools could look something like:

set PATH=C:\MSDEV\BIN;%PATH%
set LIB=C:\MSDEV\LIB;
set PATH=C:\BETA\BIN;C:\BETA\BIN\NTI_MS;%PATH%

The setup for the Gnu tools could look something like:

set PATH=%GNU%\BIN;%PATH%
set PATH=C:\BETA\BIN;C:\BETA\BIN\NTI_GNU;%PATH%

If you are upgrading from a previous version of the GNU SDK for Windows then you may need to remove the following obsolete environment variables from your environment;

GCC_EXEC_PREFIX
C_INCLUDE_PATH
LIBRARY_PATH

You can make Windows NT/2000 set the environment variables automatically each time you log in via the dialog found under My Computer -> Control Panel -> System -> Environment.

You can make Windows 95/98/ME set the environment variables automatically each time you log in by setting them in the file c:\autoexec.bat.

If you install the Mjølner System for more than one SDK, you can use the same location for all installations, as most of the files are shared. Do not install different releases of the Mjølner System in the same location simultaneously.

1.3 Windows Specific Issues

1.3.1 Using Windows Resource Files

You may use Windows resource files in your BETA programs. You do this by specifying a RESOURCE property, e.g.

ORIGIN '~beta/basiclib/betaenv';
RESOURCE nti 'foo.res';
-- PROGRAM:descriptor--
(# do ...
#)

This specifies, that when linking, the foo.res precompiled resource file should be included. You may also specify inclusion of a non-compiled resource file (foo.rc). This will make the compiler generate appropriate calls of the resource compiler for the SDK used. If you are using Microsoft SDK, this requires, that you have the RC.EXE tool installed, and that it can be found in your path.

1.3.2 Calling External Functions

As shown in, e.g. [MIA 94-24], functions and procedures produced by the C compilers can be called from within BETA. Normally you will just prefix your pattern with external to achieve this. On Windows there are, however, two different ways to call C:

  1. If the C function is declared as __stdcall, you must specify callStd in the do-part of the BETA external declaration, e.g. Notice, that many C header files has defined WINAPI as an alias for __stdcall.
  2. Otherwise you can specify callC in the do-part. This is default, so leaving out the do-part is equivalent.

1.3.3 Linking without Console

By default the programs are linked in such a way that they always include a console. To avoid this you can use 'switch 71' on the compiler, e.g., run

beta -s 71 foo.bet

to link foo.exe without a console.

1.4 Additional Information for the Windows Implementation

1.4.1 Limitations for the Windows Implementation

See the BETA FAQ: https://beta.cs.au.dk/doc/faq/beta-language-faq.html#SectionVI


Installation Guide and Platform Specific Issues
© 1999-2002 Mjølner Informatics
[Modified: Wednesday September 3rd 2003 at 12:07]