Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pbsutils
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
toolbox
pbsutils
Commits
7be11ce0
Commit
7be11ce0
authored
8 years ago
by
David Verelst
Browse files
Options
Downloads
Patches
Plain Diff
more fixes to wine configurator
parent
0e550354
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
config-wine-hawc2.sh
+23
-16
23 additions, 16 deletions
config-wine-hawc2.sh
with
23 additions
and
16 deletions
config-wine-hawc2.sh
+
23
−
16
View file @
7be11ce0
#!/bin/bash
function
wine_init_config
(){
function
wine_init_config
()
{
echo
"-------- initialize winecfg"
# execute winecfg to trigger init configuration, might fail to complete
# on Jess since winefix has not been executed
WINEARCH
=
$WINEARCH
WINEPREFIX
=
$WINEDIRNAME
wine winecfg
# winefix only applies to Jess
if
[[
${
_HOSTNAME_
:0:1
}
==
"j"
]]
;
then
`
$WINE_ENV_VARS
`
winefix
echo
"-------- apply winefix"
WINEARCH
=
$WINEARCH
WINEPREFIX
=
$WINEDIRNAME
winefix
fi
# try to execute a non existant executable to trigger init configuration
`
$WINE_ENV_VARS
`
wine dummy
# 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
...
...
@@ -22,33 +25,36 @@ function wine_init_config(){
EXE_DIR_WINE
=
"c:/users/
$USER
/My Documents/wine_exe/
$WINEARCH
/"
echo
"-------- adding
$EXE_DIR_UNIX
to wine system PATH"
echo
"-------- this is equivalent to
$EXE_DIR_WINE
in Windows terms."
echo
# 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
$WINE_ENV_VARS
wine regedit ./tmp.reg
WINEARCH
=
$WINEARCH
WINEPREFIX
=
$WINEDIRNAME
wine regedit ./tmp.reg
# do not show GUI crash dialogs
rm
./tmp.reg
printf
'[HKEY_CURRENT_USER\\Software\\Wine\\WineDbg]\n"ShowCrashDialog"=dword:00000000'
>>
./tmp.reg
$WINE_ENV_VARS
wine regedit ./tmp.reg
WINEARCH
=
$WINEARCH
WINEPREFIX
=
$WINEDIRNAME
wine regedit ./tmp.reg
rm
./tmp.reg
# add an alias to .bashrc, but only for the 32-bit variant
if
[[
$
{
_HOSTNAME_
:0:1
}
==
"g
"
]]
;
then
if
[[
$
WINEARCH
==
"win32
"
]]
;
then
echo
"-------- adding alias
$WINE_ALIAS
to ~/.bashrc"
echo
"alias
$WINE_ALIAS
='
$WINE_ENV_VARS
wine'"
>>
~/.bashrc
source
~/.bashrc
echo
"-------- See if HAWC2 runs..."
$WINE_ENV_VARS
wine hawc2-latest.exe
echo
"-------- See if HAWC2 runs..."
WINEARCH
=
$WINEARCH
WINEPREFIX
=
$WINEDIRNAME
wine hawc2-latest.exe
fi
}
_HOSTNAME_
=
`
hostname
`
#
default
64-bit mode only relevant on Jess
# 64-bit mode only relevant on Jess
if
[[
${
_HOSTNAME_
:0:1
}
==
"j"
]]
;
then
echo
"-------- SETUP DEFAULT 64-bit wine environment in ~/.wine"
echo
echo
"====================================================================="
echo
"-------- SETUP 64-bit wine environment in ~/.wine"
echo
"====================================================================="
WINEARCH
=
"win64"
WINEDIRNAME
=
"/home/
$USER
/.wine"
WINE_ENV_VARS
=
"WINEPREFIX=
$WINEDIRNAME
"
...
...
@@ -58,12 +64,13 @@ if [[ ${_HOSTNAME_:0:1} == "j" ]] ; then
fi
# 32-bit mode for both Gorm and Jess
echo
echo
"====================================================================="
echo
"-------- SETUP 32-bit wine environment in ~/.wine32"
echo
"====================================================================="
WINEARCH
=
"win32"
WINEDIRNAME
=
"/home/
$USER
/.wine32
-clean
"
WINEDIRNAME
=
"/home/
$USER
/.wine32"
WINE_ENV_VARS
=
"WINEARCH=
$WINEARCH
WINEPREFIX=
$WINEDIRNAME
"
export
WINEARCH
=
$WINEARCH
export
WINEPREFIX
=
$WINEDIRNAME
WINE_ALIAS
=
"wine32"
HAWC2EXES
=
/home/MET/hawc2exe/
$WINEARCH
wine_init_config
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment