mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1080302 (part 1) - Add support for --foo and /foo options where it's not already present. r=glandium.
This commit is contained in:
parent
f5615284a4
commit
b3fe669873
@ -851,7 +851,9 @@ class RunProgram(MachCommandBase):
|
||||
if not background and sys.platform == 'darwin':
|
||||
args.append('-foreground')
|
||||
|
||||
if '-profile' not in params and '-P' not in params and not noprofile:
|
||||
no_profile_option_given = \
|
||||
all(p not in params for p in ['-profile', '--profile', '-P'])
|
||||
if no_profile_option_given and not noprofile:
|
||||
path = os.path.join(self.topobjdir, 'tmp', 'scratch_user')
|
||||
if not os.path.isdir(path):
|
||||
os.makedirs(path)
|
||||
|
@ -334,8 +334,8 @@ NS_IMPL_RELEASE_INHERITED(nsNativeAppSupportWin, nsNativeAppSupportBase)
|
||||
void
|
||||
nsNativeAppSupportWin::CheckConsole() {
|
||||
for ( int i = 1; i < gArgc; i++ ) {
|
||||
if ( strcmp( "-console", gArgv[i] ) == 0
|
||||
||
|
||||
if ( strcmp( "-console", gArgv[i] ) == 0 ||
|
||||
strcmp( "--console", gArgv[i] ) == 0 ||
|
||||
strcmp( "/console", gArgv[i] ) == 0 ) {
|
||||
// Users wants to make sure we have a console.
|
||||
// Try to allocate one.
|
||||
|
@ -327,10 +327,10 @@ int main(int argc, char *argv[])
|
||||
|
||||
bool removeApp = false;
|
||||
for (int i = 1; i < argc; i++) {
|
||||
if (!strcmp(argv[i], "-profile")) {
|
||||
if (!strcmp(argv[i], "-profile") || !strcmp(argv[i], "--profile")) {
|
||||
isProfileOverridden = true;
|
||||
}
|
||||
else if (!strcmp(argv[i], "-remove")) {
|
||||
else if (!strcmp(argv[i], "-remove") || !strcmp(argv[i], "--remove")) {
|
||||
removeApp = true;
|
||||
}
|
||||
}
|
||||
|
@ -446,7 +446,9 @@ main(int argc, char* argv[])
|
||||
|
||||
// Check if the runtime was executed with the "-profile" argument
|
||||
for (int i = 1; i < argc; i++) {
|
||||
if (!strcmp(argv[i], "-profile")) {
|
||||
if (!strcmp(argv[i], "-profile") ||
|
||||
!strcmp(argv[i], "--profile") ||
|
||||
!strcmp(argv[i], "/profile")) {
|
||||
isProfileOverridden = true;
|
||||
break;
|
||||
}
|
||||
|
@ -103,7 +103,10 @@ FrameworkView::LaunchActivated(ComPtr<ILaunchActivatedEventArgs>& aArgs, bool aS
|
||||
int argc;
|
||||
unsigned int length;
|
||||
LPWSTR* argv = CommandLineToArgvW(data.GetRawBuffer(&length), &argc);
|
||||
if (aStartup && argc == 2 && !wcsicmp(argv[0], L"-url")) {
|
||||
if (aStartup && argc == 2 &&
|
||||
(!wcsicmp(argv[0], L"-url") ||
|
||||
!wcsicmp(argv[0], L"--url") ||
|
||||
!wcsicmp(argv[0], L"/url"))) {
|
||||
WindowsCreateString(argv[1], wcslen(argv[1]), &sActivationURI);
|
||||
} else {
|
||||
// Some other command line or this is not a startup.
|
||||
|
Loading…
Reference in New Issue
Block a user