Skip to content
Snippets Groups Projects
Commit 9978d8af authored by David Verelst's avatar David Verelst
Browse files

more config-wine fixes: gorm doesn't have c:/users dir, use z:/ instead

parent 24715f2f
No related branches found
No related tags found
No related merge requests found
...@@ -14,33 +14,36 @@ function wine_init_config () { ...@@ -14,33 +14,36 @@ function wine_init_config () {
fi fi
# create a directory on the user home drive in which executables are placed # create a directory on the user home drive in which executables are placed
EXE_DIR_UNIX="/home/$USER/wine_exe/$WINEARCH/"
mkdir -p $EXE_DIR_UNIX mkdir -p $EXE_DIR_UNIX
echo "-------- copying HAWC2 executables from/to:" echo "-------- copying HAWC2 executables from/to:"
echo "$HAWC2EXES/* $EXE_DIR_UNIX" echo "$CP_EXE_FROM/* $EXE_DIR_UNIX/"
cp $HAWC2EXES/* "$EXE_DIR_UNIX" cp $CP_EXE_FROM/* "$EXE_DIR_UNIX/"
# add C:\bin (/home/$USER/$WINEDIRNAME/drive_c/bin/) to Windows PATH variable # add C:\bin (/home/$USER/$WINEDIRNAME/drive_c/bin/) to Windows PATH variable
EXE_DIR_WINE="c:/users/$USER/My Documents/wine_exe/$WINEARCH/" EXE_DIR_WINE="z:""$EXE_DIR_UNIX"
echo "-------- adding $EXE_DIR_UNIX to wine system PATH" echo "-------- adding $EXE_DIR_UNIX to wine system PATH"
echo "-------- this is equivalent to $EXE_DIR_WINE in Windows terms." echo "-------- this is equivalent to $EXE_DIR_WINE in Windows terms."
# create file with registry key name and path as the value # create file with registry key name and path as the value
printf 'REGEDIT4\n[HKEY_CURRENT_USER\\Environment]\n"PATH"="'"$EXE_DIR_WINE"'"' >> ./tmp.reg # note that the text format of this file can make or brake the procedure
# very sensitive to trailing slashes, empty line breaks, etc
printf 'REGEDIT4\n[HKEY_CURRENT_USER\\Environment]\n"PATH"="'"$EXE_DIR_WINE"'"\n' >> ./tmp.reg
WINEARCH=$WINEARCH WINEPREFIX=$WINEDIRNAME wine regedit ./tmp.reg WINEARCH=$WINEARCH WINEPREFIX=$WINEDIRNAME wine regedit ./tmp.reg
# do not show GUI crash dialogs # do not show GUI crash dialogs
rm ./tmp.reg rm ./tmp.reg
printf '[HKEY_CURRENT_USER\\Software\\Wine\\WineDbg]\n"ShowCrashDialog"=dword:00000000' >> ./tmp.reg printf '[HKEY_CURRENT_USER\\Software\\Wine\\WineDbg]\n"ShowCrashDialog"=dword:00000000\n' >> ./tmp.reg
WINEARCH=$WINEARCH WINEPREFIX=$WINEDIRNAME wine regedit ./tmp.reg WINEARCH=$WINEARCH WINEPREFIX=$WINEDIRNAME wine regedit ./tmp.reg
rm ./tmp.reg rm ./tmp.reg
# add an alias to .bashrc, but only for the 32-bit variant # add an alias to .bashrc, but only if different than wine
if [[ $WINEARCH == "win32" ]] ; then if [[ $WINE_ALIAS != "wine" ]] ; then
echo "-------- adding alias $WINE_ALIAS to ~/.bashrc" echo "-------- adding alias $WINE_ALIAS to ~/.bashrc"
echo "alias $WINE_ALIAS='$WINE_ENV_VARS wine'" >> ~/.bashrc echo "alias $WINE_ALIAS='$WINE_ENV_VARS wine'" >> ~/.bashrc
source ~/.bashrc source ~/.bashrc
fi
if [[ $WINEARCH == "win32" ]] ; then
echo "-------- See if HAWC2 runs..." echo "-------- See if HAWC2 runs..."
WINEARCH=$WINEARCH WINEPREFIX=$WINEDIRNAME wine hawc2-latest.exe WINEARCH=$WINEARCH WINEPREFIX=$WINEDIRNAME wine hawc2-latest.exe
fi fi
...@@ -59,7 +62,8 @@ if [[ ${_HOSTNAME_:0:1} == "j" ]] ; then ...@@ -59,7 +62,8 @@ if [[ ${_HOSTNAME_:0:1} == "j" ]] ; then
WINEDIRNAME="/home/$USER/.wine" WINEDIRNAME="/home/$USER/.wine"
WINE_ENV_VARS="WINEPREFIX=$WINEDIRNAME" WINE_ENV_VARS="WINEPREFIX=$WINEDIRNAME"
WINE_ALIAS="wine" WINE_ALIAS="wine"
HAWC2EXES=/home/MET/hawc2exe/$WINEARCH CP_EXE_FROM="/home/MET/hawc2exe/$WINEARCH"
EXE_DIR_UNIX="/home/$USER/DTU/Software/wine_exe/$WINEARCH/"
wine_init_config wine_init_config
fi fi
...@@ -72,6 +76,7 @@ WINEARCH="win32" ...@@ -72,6 +76,7 @@ WINEARCH="win32"
WINEDIRNAME="/home/$USER/.wine32" WINEDIRNAME="/home/$USER/.wine32"
WINE_ENV_VARS="WINEARCH=$WINEARCH WINEPREFIX=$WINEDIRNAME" WINE_ENV_VARS="WINEARCH=$WINEARCH WINEPREFIX=$WINEDIRNAME"
WINE_ALIAS="wine32" WINE_ALIAS="wine32"
HAWC2EXES=/home/MET/hawc2exe/$WINEARCH CP_EXE_FROM="/home/MET/hawc2exe/$WINEARCH"
EXE_DIR_UNIX="/home/$USER/DTU/Software/wine_exe/$WINEARCH/"
wine_init_config wine_init_config
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment