Changeset 73193 in vbox
- Timestamp:
- Jul 17, 2018 8:48:41 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp
r73128 r73193 3826 3826 const QByteArray &argBytes = arguments.at(i).toUtf8(); 3827 3827 const char *arg = argBytes.constData(); 3828 enum { OptType_Unknown, OptType_VMRunner, OptType_VMSelector } enmOptType = OptType_Unknown; 3828 3829 /* NOTE: the check here must match the corresponding check for the 3829 3830 * options to start a VM in main.cpp and hardenedmain.cpp exactly, … … 3832 3833 || !::strcmp(arg, "-startvm")) 3833 3834 { 3835 enmOptType = OptType_VMRunner; 3834 3836 if (++i < argc) 3835 3837 { … … 3840 3842 else if (!::strcmp(arg, "-separate") || !::strcmp(arg, "--separate")) 3841 3843 { 3844 enmOptType = OptType_VMRunner; 3842 3845 fSeparateProcess = true; 3843 3846 } … … 3906 3909 ++i; 3907 3910 else if (!::strcmp(arg, "--no-startvm-errormsgbox")) 3911 { 3912 enmOptType = OptType_VMRunner; 3908 3913 m_fShowStartVMErrors = false; 3914 } 3909 3915 else if (!::strcmp(arg, "--aggressive-caching")) 3910 3916 m_fAgressiveCaching = true; … … 3912 3918 m_fAgressiveCaching = false; 3913 3919 else if (!::strcmp(arg, "--restore-current")) 3920 { 3921 enmOptType = OptType_VMRunner; 3914 3922 m_fRestoreCurrentSnapshot = true; 3923 } 3915 3924 /* Ad hoc VM reconfig options: */ 3916 3925 else if (!::strcmp(arg, "--fda")) 3917 3926 { 3927 enmOptType = OptType_VMRunner; 3918 3928 if (++i < argc) 3919 3929 m_strFloppyImage = arguments.at(i); … … 3921 3931 else if (!::strcmp(arg, "--dvd") || !::strcmp(arg, "--cdrom")) 3922 3932 { 3933 enmOptType = OptType_VMRunner; 3923 3934 if (++i < argc) 3924 3935 m_strDvdImage = arguments.at(i); … … 3926 3937 /* VMM Options: */ 3927 3938 else if (!::strcmp(arg, "--disable-patm")) 3939 { 3940 enmOptType = OptType_VMRunner; 3928 3941 m_fDisablePatm = true; 3942 } 3929 3943 else if (!::strcmp(arg, "--disable-csam")) 3944 { 3945 enmOptType = OptType_VMRunner; 3930 3946 m_fDisableCsam = true; 3947 } 3931 3948 else if (!::strcmp(arg, "--recompile-supervisor")) 3949 { 3950 enmOptType = OptType_VMRunner; 3932 3951 m_fRecompileSupervisor = true; 3952 } 3933 3953 else if (!::strcmp(arg, "--recompile-user")) 3954 { 3955 enmOptType = OptType_VMRunner; 3934 3956 m_fRecompileUser = true; 3957 } 3935 3958 else if (!::strcmp(arg, "--recompile-all")) 3959 { 3960 enmOptType = OptType_VMRunner; 3936 3961 m_fDisablePatm = m_fDisableCsam = m_fRecompileSupervisor = m_fRecompileUser = true; 3962 } 3937 3963 else if (!::strcmp(arg, "--execute-all-in-iem")) 3964 { 3965 enmOptType = OptType_VMRunner; 3938 3966 m_fDisablePatm = m_fDisableCsam = m_fExecuteAllInIem = true; 3967 } 3939 3968 else if (!::strcmp(arg, "--warp-pct")) 3940 3969 { 3970 enmOptType = OptType_VMRunner; 3941 3971 if (++i < argc) 3942 3972 m_uWarpPct = RTStrToUInt32(arguments.at(i).toLocal8Bit().constData()); … … 3945 3975 /* Debugger/Debugging options: */ 3946 3976 else if (!::strcmp(arg, "-dbg") || !::strcmp(arg, "--dbg")) 3977 { 3978 enmOptType = OptType_VMRunner; 3947 3979 setDebuggerVar(&m_fDbgEnabled, true); 3980 } 3948 3981 else if (!::strcmp( arg, "-debug") || !::strcmp(arg, "--debug")) 3949 3982 { 3983 enmOptType = OptType_VMRunner; 3950 3984 setDebuggerVar(&m_fDbgEnabled, true); 3951 3985 setDebuggerVar(&m_fDbgAutoShow, true); … … 3955 3989 else if (!::strcmp(arg, "--debug-command-line")) 3956 3990 { 3991 enmOptType = OptType_VMRunner; 3957 3992 setDebuggerVar(&m_fDbgEnabled, true); 3958 3993 setDebuggerVar(&m_fDbgAutoShow, true); … … 3961 3996 else if (!::strcmp(arg, "--debug-statistics")) 3962 3997 { 3998 enmOptType = OptType_VMRunner; 3963 3999 setDebuggerVar(&m_fDbgEnabled, true); 3964 4000 setDebuggerVar(&m_fDbgAutoShow, true); … … 3967 4003 else if (!::strcmp(arg, "-no-debug") || !::strcmp(arg, "--no-debug")) 3968 4004 { 4005 enmOptType = OptType_VMRunner; 3969 4006 setDebuggerVar(&m_fDbgEnabled, false); 3970 4007 setDebuggerVar(&m_fDbgAutoShow, false); … … 3974 4011 /* Not quite debug options, but they're only useful with the debugger bits. */ 3975 4012 else if (!::strcmp(arg, "--start-paused")) 4013 { 4014 enmOptType = OptType_VMRunner; 3976 4015 m_enmLaunchRunning = LaunchRunning_No; 4016 } 3977 4017 else if (!::strcmp(arg, "--start-running")) 4018 { 4019 enmOptType = OptType_VMRunner; 3978 4020 m_enmLaunchRunning = LaunchRunning_Yes; 4021 } 3979 4022 #endif 3980 /** @todo add an else { msgbox(syntax error); exit(1); } here, pretty please... */ 4023 #ifdef RT_OS_WINDOWS /** @todo add more here, please... */ 4024 else 4025 msgCenter().error(0, MessageType_Error, tr("Unknown option <b>%1</b>.").arg(arguments.at(i)), ""); 4026 #endif 4027 #ifdef VBOX_GUI_WITH_SHARED_LIBRARY 4028 if (enmOptType == OptType_VMRunner && m_enmType != UIType_RuntimeUI) 4029 msgCenter().error(0, MessageType_Error, 4030 tr("<b>%1</b> is an option for the VirtualBox VM runner (VirtualBoxVM) application, not the selector") 4031 .arg(arg), ""); 4032 #endif 4033 3981 4034 i++; 3982 4035 }
Note:
See TracChangeset
for help on using the changeset viewer.

