Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d16a64e3
Commit
d16a64e3
authored
Nov 22, 2002
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed support for converting old format config, everybody should
have converted by now. Removed log info from wineinstall, this info is already in ChangeLog.
parent
a8a422f7
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
231 deletions
+5
-231
profile.c
files/profile.c
+0
-103
wineinstall
tools/wineinstall
+5
-128
No files found.
files/profile.c
View file @
d16a64e3
...
...
@@ -88,9 +88,6 @@ static HKEY wine_profile_key;
#define PROFILE_MAX_LINE_LEN 1024
/* Wine profile name in $HOME directory; must begin with slash */
static
const
char
PROFILE_WineIniName
[]
=
"/.winerc"
;
/* Wine profile: the profile file being used */
static
char
PROFILE_WineIniUsed
[
MAX_PATHNAME_LEN
]
=
""
;
...
...
@@ -311,84 +308,6 @@ static PROFILESECTION *PROFILE_Load( FILE *file )
return
first_section
;
}
/* convert the .winerc file to the new format */
static
void
convert_config
(
FILE
*
in
,
const
char
*
output_name
)
{
char
buffer
[
PROFILE_MAX_LINE_LEN
];
char
*
p
,
*
p2
;
FILE
*
out
;
/* create the output file, only if it doesn't exist already */
int
fd
=
open
(
output_name
,
O_WRONLY
|
O_CREAT
|
O_EXCL
,
0666
);
if
(
fd
==
-
1
)
{
MESSAGE
(
"Could not create new config file '%s': %s
\n
"
,
output_name
,
strerror
(
errno
)
);
ExitProcess
(
1
);
}
out
=
fdopen
(
fd
,
"w"
);
fprintf
(
out
,
"WINE REGISTRY Version 2
\n
"
);
fprintf
(
out
,
";; All keys relative to
\\\\
Machine
\\\\
Software
\\\\
Wine
\\\\
Wine
\\\\
Config
\n\n
"
);
while
(
fgets
(
buffer
,
PROFILE_MAX_LINE_LEN
,
in
))
{
if
(
buffer
[
strlen
(
buffer
)
-
1
]
==
'\n'
)
buffer
[
strlen
(
buffer
)
-
1
]
=
0
;
p
=
buffer
;
while
(
*
p
&&
PROFILE_isspace
(
*
p
))
p
++
;
if
(
*
p
==
'['
)
/* section start */
{
if
((
p2
=
strrchr
(
p
,
']'
)))
{
*
p2
=
'\0'
;
p
++
;
fprintf
(
out
,
"[%s]
\n
"
,
p
);
}
continue
;
}
if
(
*
p
==
';'
||
*
p
==
'#'
)
{
fprintf
(
out
,
"%s
\n
"
,
p
);
continue
;
}
p2
=
p
+
strlen
(
p
)
-
1
;
while
((
p2
>
p
)
&&
((
*
p2
==
'\n'
)
||
PROFILE_isspace
(
*
p2
)))
*
p2
--=
'\0'
;
if
((
p2
=
strchr
(
p
,
'='
))
!=
NULL
)
{
char
*
p3
=
p2
-
1
;
while
((
p3
>
p
)
&&
PROFILE_isspace
(
*
p3
))
*
p3
--
=
'\0'
;
*
p2
++
=
'\0'
;
while
(
*
p2
&&
PROFILE_isspace
(
*
p2
))
p2
++
;
}
if
(
!*
p
)
{
fprintf
(
out
,
"
\n
"
);
continue
;
}
fputc
(
'"'
,
out
);
while
(
*
p
)
{
if
(
*
p
==
'\\'
)
fputc
(
'\\'
,
out
);
fputc
(
*
p
,
out
);
p
++
;
}
fprintf
(
out
,
"
\"
=
\"
"
);
if
(
p2
)
{
while
(
*
p2
)
{
if
(
*
p2
==
'\\'
)
fputc
(
'\\'
,
out
);
fputc
(
*
p2
,
out
);
p2
++
;
}
}
fprintf
(
out
,
"
\"\n
"
);
}
fclose
(
out
);
}
/***********************************************************************
* PROFILE_DeleteSection
...
...
@@ -1112,28 +1031,6 @@ int PROFILE_LoadWineIni(void)
if
(
disp
==
REG_OPENED_EXISTING_KEY
)
return
1
;
/* loaded by the server */
if
((
p
=
getenv
(
"HOME"
))
!=
NULL
)
{
lstrcpynA
(
buffer
,
p
,
MAX_PATHNAME_LEN
-
sizeof
(
PROFILE_WineIniName
));
strcat
(
buffer
,
PROFILE_WineIniName
);
if
((
f
=
fopen
(
buffer
,
"r"
))
!=
NULL
)
{
lstrcpynA
(
PROFILE_WineIniUsed
,
buffer
,
MAX_PATHNAME_LEN
);
/* convert to the new format */
sprintf
(
buffer
,
"%s/config"
,
wine_get_config_dir
()
);
convert_config
(
f
,
buffer
);
fclose
(
f
);
MESSAGE
(
"The '%s' configuration file has been converted
\n
"
"to the new format and saved as '%s'.
\n
"
,
PROFILE_WineIniUsed
,
buffer
);
MESSAGE
(
"You should verify that the contents of the new file are correct,
\n
"
"and then remove the old one and restart Wine.
\n
"
);
ExitProcess
(
0
);
}
}
else
WARN
(
"could not get $HOME value for config file.
\n
"
);
MESSAGE
(
"Can't open configuration file %s/config
\n
"
,
wine_get_config_dir
()
);
return
0
;
}
...
...
tools/wineinstall
View file @
d16a64e3
...
...
@@ -18,75 +18,6 @@
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
# History:
# Mar 31 1999 - Ove Kåven
# First version
# Dec 9 1999 - Ove Kåven
# require Xpm
# Feb 25 2000 - Ove Kåven
# auto-add /usr/local/lib to /etc/ld.so.conf
# Mar 2 2000 - Ove Kåven
# source rather than grep config.cache
# use sourced config.cache to start ldconfig
# reconfigure if config.cache doesn't exist
# Mar 30 2000 - Ove Kåven
# autoconfigure no-windows installs
# do not install registry on real-windows installs
# some support for binary package installs
# set and tell user about LD_LIBRARY_PATH if necessary
# set EXTRA_LD_LIBRARY_PATH in wine.conf
# Apr 9 2000 - Ove Kåven
# make root's registry global (system-default)
# May 9 2000 - Ove Kåven
# use ttydrv when running regapi, so we don't have to run from X
# change debugger path in registry
# Oct 29 2000 - Ove Kåven
# added --enable-opengl to default confargs
# added conf_question, conf_yesno_answer, and conf_string_answer functions
# added DEFCAT variable
# (later that day...)
# added conf_reset_question function
# added file existence checks to the registry copying
# fixed problem with no-windows directory creation
# some text reformatting from Eric Maryniak
# Jan 5 2000 - Chris Morgan
# use default config file in /documentation/samples/config
# replace .winerc with ~/.wine/config in printed text
# added user question to convert .winerc file(if exists) or use the default
# config file
# add conf_question to allow root to install a local config file and
# registry
# Jan 12 2000 - Chris Morgan
# distinguish between creating local and global config files
# display a message about the status of global config files
# misc cleanups and reordering of questions
# added check to see if wine is installed when we are running as a normal
# user and print a message if wine cannot be found
# Feb 16 2002 - Adam D. Moss
# Use config.status instead of config.cache to check whether we're
# configured/compiled and to recreate the configuration
# Feb 20 2002 - Adam D. Moss
# Partially revert previous changes, force configure to write an
# old-style config.cache
# Mar 27 2002 - Chris Morgan
# prevent the user from running wineinstall as root
# add script commands so we su root for 'make install' and other commands
# that require root access
# add text to tell the user we need to run stuff as root so they don't
# think we are trying to pull something funny
# Apr 14 2002 - Dustin Navea
# Fix sed command when finding real-windows registry so it actually
# accesses a file (~/.wine/config) instead of null ($CONF?!)
# Added search for clean-install (not upgrade) Win2k registry
# (next day, after some sleep)
# Fix sed string when finding real-windows registry to actually find
# windows partition name in [Drive C] section
# it should now almost always find the windows partition and real-windows
# registry (if not, let me know)
# Aug 29 2002 - Rok Mandeljc <rok.mandeljc@gimb.org>
# -added two symlinks; windows/winhelp.exe and windows/winhlp32.exe because it seems
# that some apps look for winhlp32.exe/winhelp to display help
#
#--- defaults (change these if you are a packager)
CONFARGS
=
""
# configure args, e.g. --prefix=/usr --sysconfdir=/etc
...
...
@@ -105,7 +36,6 @@ DOWINE=auto # whether to autoconfigure no-windows installation
DOREG
=
auto
# whether to install default registry
DOAPP
=
auto
# whether to install applications, distributed with Wine
SYSREG
=
yes
# whether to make root's registry global (system-default)
CONVCONF
=
no
# whether we are converting an existing .winerc or not
# "make install" still installs the dlls into $libdir, but this may change in the future
# (DLLPATH should point to them if/when they are not in standard ld.so paths)
...
...
@@ -574,22 +504,6 @@ then {
else
DCROOT
=
/c
fi
if
[
-f
~/.winerc
]
then
{
conf_question medium convert_config
\
"I found the old version Wine config file, .winerc, in your "
\
"home directory. I can convert this to the new format or use the"
\
"new default Wine config file. Convert?"
conf_yesno_answer
"(yes/no) "
if
[
"
$ANSWER
"
=
'yes'
]
then
{
WINEINI
=
~/.winerc
CONVCONF
=
yes
}
fi
}
else
{
conf_question low drivec_path
\
"Configuring Wine without Windows."
\
"Some fake Windows directories must be created, to hold any .ini files, DLLs,"
\
...
...
@@ -616,11 +530,9 @@ then {
create_windows_directories
configure_wine_applications
}
fi
# create $LCONF using the default config file $WINEINI
if
[
"
$DOLOCALCONF
"
=
'yes'
]
&&
[
"
$CONVCONF
"
=
'no'
]
if
[
"
$DOLOCALCONF
"
=
'yes'
]
then
{
sed
"s|
\"
Path
\"
=
\"
/c
\"\$
|
\"
Path
\"
=
\"
${
CROOT
}
\"
|"
$WINEINI
>
$TMPCONF
conf_reset_question default_config
...
...
@@ -645,11 +557,7 @@ then
then
mkdir
~/.wine
fi
if
[
"
$CONVCONF
"
=
'no'
]
then
cp
$TMPCONF
$LCONF
>
/dev/null
fi
else
DOREG
=
no
fi
...
...
@@ -700,59 +608,28 @@ then {
echo
"Preparing to install default Wine registry entries..."
# edit config files so we don't have to run regedit under X
if
[
"
$CONVCONF
"
=
'yes'
]
then
mv
$WINEINI
$WINEINI
.new
sed
"s/GraphicsDriver=.*/GraphicsDriver=ttydrv/"
$WINEINI
.new
>
$WINEINI
else
mv
$LCONF
$LCONF
.new
sed
"s/
\"
GraphicsDriver
\"
= .*/
\"
GraphicsDriver
\"
=
\"
ttydrv
\"
/"
$LCONF
.new
>
$LCONF
fi
mv
$LCONF
$LCONF
.orig
sed
"s/
\"
GraphicsDriver
\"
= .*/
\"
GraphicsDriver
\"
=
\"
ttydrv
\"
/"
$LCONF
.orig
>
$LCONF
echo
"Installing default Wine registry entries..."
echo
if
!
$REGEDIT
$DEFREG
>
/dev/null
then
{
echo
"Registry install failed."
mv
$LCONF
.orig
$LCONF
conf_reset_question regedit_error
conf_question high regedit_error
exit
1
}
else
{
# if we are converting from a .winerc file, running regedit once
# will ONLY convert .winerc -> ~/.wine/config, it will not import the
# registry data. so if we are converting we need to run regedit twice
if
[
"
$CONVCONF
"
=
'yes'
]
then
if
!
$REGEDIT
$DEFREG
>
/dev/null
then
echo
"Registry install failed."
conf_reset_question regedit_error
conf_question high regedit_error
exit
1
else
echo
echo
"Registry entries successfully installed."
fi
else
echo
echo
"Registry entries successfully installed."
fi
mv
$LCONF
.orig
$LCONF
}
fi
if
[
"
$SYSREG
"
=
'auto'
]
then
SYSREG
=
yes
fi
# if we converted we need to change the graphics driver back and
# restore the original .winerc file
if
[
"
$CONVCONF
"
=
'yes'
]
then
mv
$WINEINI
.new
$WINEINI
fi
sed
"s/
\"
GraphicsDriver
\"
= .*/
\"
GraphicsDriver
\"
=
\"
x11drv
\"
/"
$LCONF
>
$LCONF
.new
mv
$LCONF
.new
$LCONF
}
fi
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment