Skip to content
Snippets Groups Projects
configure-wine.md 2.88 KiB
Newer Older
David Verelst's avatar
David Verelst committed
Background Information Regarding Wine
-------------------------------------
David Verelst's avatar
David Verelst committed

> Note that the steps described here are executed automatically by the
David Verelst's avatar
David Verelst committed
configuration script [```config-wine-hawc2.sh```]
(https://gitlab.windenergy.dtu.dk/toolbox/pbsutils/blob/master/config-wine-hawc2.sh)
in ```pbsutils```.

David Verelst's avatar
David Verelst committed

David Verelst's avatar
David Verelst committed
Configure Wine for Gorm
------------------------

David Verelst's avatar
David Verelst committed
You will also need to configure wine and place the HAWC2 executables in a
directory that wine knows about. First, activate the correct wine environment by
typing in a shell in the Gorm's home directory (it can be activated with
ssh (Linux, Mac) or putty (MS Windows)):

```
g-000 $ WINEARCH=win32 WINEPREFIX=~/.wine32 wine test.exe
```

Optionally, you can also make an alias (a short format for a longer, more complex
command). In the ```.bashrc``` file in your home directory
(```/home/$USER/.bash_profile```), add at the bottom of the file:

```
alias wine32='WINEARCH=win32 WINEPREFIX=~/.wine32 wine'
```

David Verelst's avatar
David Verelst committed
Add a folder called ```~/wine_exe/win32``` to your wine system's PATH so we can
copy all the HAWC2 executables in here:
David Verelst's avatar
David Verelst committed

```
David Verelst's avatar
David Verelst committed
$EXE_DIR_WINE="z:/home/$USER/wine_exe/win32/"
printf 'REGEDIT4\n[HKEY_CURRENT_USER\\Environment]\n"PATH"="'"$EXE_DIR_WINE"'"\n' >> ./tmp.reg
WINEARCH=win32 WINEPREFIX=~/.wine32 wine regedit ./tmp.reg
David Verelst's avatar
David Verelst committed
rm ./tmp.reg
```

And now copy all the HAWC2 executables, DLL's (including the license manager)
to your wine directory. You can copy all the required executables, dll's and
the license manager are located at ```/home/MET/hawc2exe```. The following
David Verelst's avatar
David Verelst committed
command will update your local directory with any new executables that have
been placed in ```/home/MET/hawc2exe/win32/```:
David Verelst's avatar
David Verelst committed

```
David Verelst's avatar
David Verelst committed
g-000 $ rsync -a /home/MET/hawc2exe/win32/* /home/$USER/wine_exe/win32/
David Verelst's avatar
David Verelst committed
```

Notice that the HAWC2 executable names are ```hawc2-latest.exe```,
```hawc2-118.exe```, etc. By default the latest version will be used and the user
does not need to specify this. However, when you need to compare different version
you can easily do so by specifying which case should be run with which
executable. The file ```hawc2-latest.exe``` will always be the latest HAWC2
version at ```/home/MET/hawc2exe/```. When a new HAWC2 is released you can
simply copy all the files from there again to update.

tlbl's avatar
tlbl committed

Configure Wine for Jess
------------------------

David Verelst's avatar
David Verelst committed
Same principles apply to Jess, and  [```config-wine-hawc2.sh```]
(https://gitlab.windenergy.dtu.dk/toolbox/pbsutils/blob/master/config-wine-hawc2.sh)
can be used to initialize and configure your wine environment.

Note that due to a bug in the specific version of wine that is installed on
Jess, ```config-wine-hawc2.sh``` will apply the following command to fix this.
It is important to note that this fix will have to be executed on each node at
the beginning of each new session:

tlbl's avatar
tlbl committed
```
David Verelst's avatar
David Verelst committed
j-000 $ WINEARCH=win32 WINEPREFIX=~/.wine32 winefix
tlbl's avatar
tlbl committed
```
David Verelst's avatar
David Verelst committed

```winefix``` is automatically included in the ```pbs_in``` scripts genetrated
by the toolbox.