wine-staging/patches/wineboot-ProxySettings/0001-wineboot-Initialize-proxy-settings-registry-key.patch
Zebediah Figura 68f87944cf wineboot-DriveSerial: Remove patch.
Fixed upstream by <50903a1504>.
2021-04-21 23:01:12 -05:00

61 lines
1.9 KiB
Diff

From abf369c95bc4fbaa146f2ababb41a01b03af9057 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Mon, 26 Dec 2016 16:37:40 +0100
Subject: [PATCH] wineboot: Initialize proxy settings registry key.
---
programs/wineboot/Makefile.in | 2 +-
programs/wineboot/wineboot.c | 9 +++++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/programs/wineboot/Makefile.in b/programs/wineboot/Makefile.in
index 2552f69990a..769ad7ee511 100644
--- a/programs/wineboot/Makefile.in
+++ b/programs/wineboot/Makefile.in
@@ -1,7 +1,7 @@
MODULE = wineboot.exe
APPMODE = -mconsole
IMPORTS = uuid advapi32 ws2_32
-DELAYIMPORTS = shell32 shlwapi version user32 setupapi newdev
+DELAYIMPORTS = shell32 shlwapi version user32 setupapi newdev wininet
EXTRADLLFLAGS = -mno-cygwin
diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c
index 3dfa39ad7c0..88335a2549e 100644
--- a/programs/wineboot/wineboot.c
+++ b/programs/wineboot/wineboot.c
@@ -77,6 +77,7 @@
#include <shlwapi.h>
#include <shellapi.h>
#include <setupapi.h>
+#include <wininet.h>
#include <newdev.h>
#include "resource.h"
@@ -902,6 +903,13 @@ static void create_volatile_environment_registry_key(void)
RegCloseKey( hkey );
}
+static void create_proxy_settings(void)
+{
+ HINTERNET inet;
+ inet = InternetOpenA( "Wine", INTERNET_OPEN_TYPE_PRECONFIG, NULL, NULL, 0 );
+ if (inet) InternetCloseHandle( inet );
+}
+
/* Performs the rename operations dictated in %SystemRoot%\Wininit.ini.
* Returns FALSE if there was an error, or otherwise if all is ok.
*/
@@ -1711,6 +1719,7 @@ int __cdecl main( int argc, char *argv[] )
if (init || update) update_wineprefix( update );
create_volatile_environment_registry_key();
+ create_proxy_settings();
ProcessRunKeys( HKEY_LOCAL_MACHINE, L"RunOnce", TRUE, TRUE );
--
2.30.2