You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
2.2 KiB
52 lines
2.2 KiB
Index: wine/libs/wine/config.c
|
|
===================================================================
|
|
RCS file: /home/wine/wine/libs/wine/config.c,v
|
|
retrieving revision 1.1
|
|
diff -u -r1.1 config.c
|
|
--- wine/libs/wine/config.c 22 Mar 2003 20:40:48 -0000 1.1
|
|
+++ wine/libs/wine/config.c 26 Nov 2002 18:37:03 -0000
|
|
@@ -136,7 +136,20 @@
|
|
if (config_dir[0] != '/')
|
|
fatal_error( "invalid directory %s in WINEPREFIX: not an absolute path\n", prefix );
|
|
if (stat( config_dir, &st ) == -1)
|
|
- fatal_perror( "cannot open %s as specified in WINEPREFIX", config_dir );
|
|
+ {
|
|
+ /* No configuration - put in defaults. */
|
|
+ char command[512];
|
|
+ mkdir(config_dir, 0700);
|
|
+ sprintf(command, "/bin/cp /etc/wine/wine.conf %s/config", config_dir);
|
|
+ system(command);
|
|
+ sprintf(command, "/bin/cp /etc/wine/system.reg %s/system.reg", config_dir);
|
|
+ system(command);
|
|
+ sprintf(command, "/bin/cp /etc/wine/user.reg %s/user.reg", config_dir);
|
|
+ system(command);
|
|
+ sprintf(command, "/bin/cp /etc/wine/userdef.reg %s/userdef.reg", config_dir);
|
|
+ system(command);
|
|
+ stat( config_dir, &st );
|
|
+ }
|
|
}
|
|
else
|
|
{
|
|
@@ -147,7 +160,20 @@
|
|
remove_trailing_slashes( config_dir );
|
|
strcat( config_dir, server_config_dir );
|
|
if (stat( config_dir, &st ) == -1)
|
|
- fatal_perror( "cannot open %s", config_dir );
|
|
+ {
|
|
+ /* No configuration - put in defaults. */
|
|
+ char command[512];
|
|
+ mkdir(config_dir, 0700);
|
|
+ sprintf(command, "/bin/cp /etc/wine/wine.conf %s/config", config_dir);
|
|
+ system(command);
|
|
+ sprintf(command, "/bin/cp /etc/wine/system.reg %s/system.reg", config_dir);
|
|
+ system(command);
|
|
+ sprintf(command, "/bin/cp /etc/wine/user.reg %s/user.reg", config_dir);
|
|
+ system(command);
|
|
+ sprintf(command, "/bin/cp /etc/wine/userdef.reg %s/userdef.reg", config_dir);
|
|
+ system(command);
|
|
+ stat( config_dir, &st );
|
|
+ }
|
|
}
|
|
if (!S_ISDIR(st.st_mode)) fatal_error( "%s is not a directory\n", config_dir );
|
|
|