You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against b89c9c60d50cf21650331d1528ff965c319a1217.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From a207d7f2c77296798e047ed03d88d8a060139aff Mon Sep 17 00:00:00 2001
|
||||
From 8dcb8ee100c5f81cef92ec98376288253b021f6a Mon Sep 17 00:00:00 2001
|
||||
From: Jason Edmeades <us@edmeades.me.uk>
|
||||
Date: Tue, 16 Jul 2019 13:49:18 +1000
|
||||
Subject: [PATCH] cmd: Support for launching programs based on file association
|
||||
@@ -11,14 +11,14 @@ fred.msi for msiexec to be launched.
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=18154
|
||||
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36646
|
||||
---
|
||||
programs/cmd/wcmdmain.c | 138 +++++++++++++++++++++++++++++-----------
|
||||
1 file changed, 102 insertions(+), 36 deletions(-)
|
||||
programs/cmd/wcmdmain.c | 139 +++++++++++++++++++++++++++++-----------
|
||||
1 file changed, 102 insertions(+), 37 deletions(-)
|
||||
|
||||
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
|
||||
index cacb7ea7751..19a807c1624 100644
|
||||
index 5f1a94b39b3..487be39c954 100644
|
||||
--- a/programs/cmd/wcmdmain.c
|
||||
+++ b/programs/cmd/wcmdmain.c
|
||||
@@ -1135,8 +1135,10 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
@@ -1385,8 +1385,10 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
|
||||
/* 1. If extension supplied, see if that file exists */
|
||||
if (extensionsupplied) {
|
||||
@@ -30,7 +30,7 @@ index cacb7ea7751..19a807c1624 100644
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1166,6 +1168,7 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
@@ -1416,6 +1418,7 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
}
|
||||
|
||||
if (GetFileAttributesW(thisDir) != INVALID_FILE_ATTRIBUTES) {
|
||||
@@ -38,7 +38,7 @@ index cacb7ea7751..19a807c1624 100644
|
||||
found = TRUE;
|
||||
thisExt = NULL;
|
||||
}
|
||||
@@ -1187,52 +1190,115 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
@@ -1437,52 +1440,114 @@ void WCMD_run_program (WCHAR *command, BOOL called)
|
||||
/* Special case BAT and CMD */
|
||||
if (ext && (!wcsicmp(ext, L".bat") || !wcsicmp(ext, L".cmd"))) {
|
||||
BOOL oldinteractive = interactive;
|
||||
@@ -46,11 +46,9 @@ index cacb7ea7751..19a807c1624 100644
|
||||
interactive = FALSE;
|
||||
WCMD_batch (thisDir, command, called, NULL, INVALID_HANDLE_VALUE);
|
||||
interactive = oldinteractive;
|
||||
+ WINE_TRACE("Back from call to batch program\n");
|
||||
return;
|
||||
- } else {
|
||||
+ }
|
||||
|
||||
- DWORD exit_code;
|
||||
- /* thisDir contains the file to be launched, but with what?
|
||||
- eg. a.exe will require a.exe to be launched, a.html may be iexplore */
|
||||
- hinst = FindExecutableW (thisDir, NULL, temp);
|
||||
@@ -74,6 +72,8 @@ index cacb7ea7751..19a807c1624 100644
|
||||
- WCMD_strip_quotes(command);
|
||||
- opt_s = TRUE;
|
||||
- WCMD_run_program(command, called);
|
||||
+ }
|
||||
+
|
||||
+ /* Calculate what program will be launched, and whether it is a
|
||||
+ console application or not. Note the program may be different
|
||||
+ from the parameter (eg running a .txt file will launch notepad.exe) */
|
||||
@@ -157,8 +157,8 @@ index cacb7ea7751..19a807c1624 100644
|
||||
- or for console applications */
|
||||
- if (!interactive || (console && !HIWORD(console)))
|
||||
- WaitForSingleObject (pe.hProcess, INFINITE);
|
||||
- GetExitCodeProcess (pe.hProcess, &errorlevel);
|
||||
- if (errorlevel == STILL_ACTIVE) errorlevel = 0;
|
||||
- GetExitCodeProcess (pe.hProcess, &exit_code);
|
||||
- errorlevel = (exit_code == STILL_ACTIVE) ? 0 : exit_code;
|
||||
+ if (!status) {
|
||||
+ WINE_TRACE("Failed to launch via CreateProcess, rc %d (%ld)\n",
|
||||
+ status, GetLastError());
|
||||
@@ -190,5 +190,5 @@ index cacb7ea7751..19a807c1624 100644
|
||||
}
|
||||
|
||||
--
|
||||
2.29.2
|
||||
2.43.0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user