mirror of https://github.com/ventoy/Ventoy.git
Add /F option for VentoyPlugson.exe to use the system default browser.
By default it will firstly try to use Google Chrome if possible.
This commit is contained in:
parent
315cabb945
commit
e24dacadcd
|
@ -12,6 +12,7 @@
|
|||
|
||||
char g_ventoy_dir[MAX_PATH];
|
||||
|
||||
static BOOL g_ChromeFirst = TRUE;
|
||||
static BOOL g_running = FALSE;
|
||||
static HWND g_refresh_button;
|
||||
static HWND g_start_button;
|
||||
|
@ -118,14 +119,17 @@ static void OpenURL(void)
|
|||
|
||||
sprintf_s(url, sizeof(url), "http://%s:%s/index.html", g_sysinfo.ip, g_sysinfo.port);
|
||||
|
||||
for (i = 0; Browsers[i] != NULL; i++)
|
||||
{
|
||||
if (ventoy_is_file_exist("%s", Browsers[i]))
|
||||
{
|
||||
ShellExecuteA(NULL, "open", Browsers[i], url, NULL, SW_SHOW);
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (g_ChromeFirst)
|
||||
{
|
||||
for (i = 0; Browsers[i] != NULL; i++)
|
||||
{
|
||||
if (ventoy_is_file_exist("%s", Browsers[i]))
|
||||
{
|
||||
ShellExecuteA(NULL, "open", Browsers[i], url, NULL, SW_SHOW);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ShellExecuteA(NULL, "open", url, NULL, NULL, SW_SHOW);
|
||||
}
|
||||
|
@ -521,12 +525,22 @@ static void DllProtect(void)
|
|||
|
||||
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, INT nCmdShow)
|
||||
{
|
||||
int i;
|
||||
int rc;
|
||||
HANDLE hMutex;
|
||||
WCHAR CurDir[MAX_PATH];
|
||||
|
||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||
|
||||
for (i = 0; i < __argc; i++)
|
||||
{
|
||||
if (__argv[i] && _stricmp(__argv[i], "/F") == 0)
|
||||
{
|
||||
g_ChromeFirst = FALSE;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
DllProtect();
|
||||
|
||||
if (GetUserDefaultUILanguage() == 0x0804)
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -1 +1 @@
|
|||
ar_ARbn_BNde_DEen_USfr_FRhi_HIhr_HRhu_HUid_IDja_JPka_GEko_KRpl_PLpt_PTru_RUsr_RSta_INtr_TRzh_CNzh_TW
|
||||
ar_ARbn_BNde_DEen_USes_ESfr_FRhi_HIhr_HRhu_HUid_IDja_JPka_GEko_KRpl_PLpt_PTru_RUsr_RSta_INtr_TRzh_CNzh_TW
|
|
@ -777,10 +777,10 @@
|
|||
<script src="/static/js/jQuery-2.1.4.min.js"></script>
|
||||
<!-- jquery validate -->
|
||||
<script src="/static/js/jquery.validate.min.js"></script>
|
||||
<script src="/static/js/jquery.validate.vtoymethods.js?v=109"></script>
|
||||
<script src="/static/js/jquery.validate.vtoymethods.js?v=142"></script>
|
||||
|
||||
<script src="/static/js/jquery.vtoy.alert.js?v=109"></script>
|
||||
<script src="/static/js/vtoy.js?v=109"></script>
|
||||
<script src="/static/js/jquery.vtoy.alert.js?v=142"></script>
|
||||
<script src="/static/js/vtoy.js?v=142"></script>
|
||||
<script src="/static/js/md5.min.js"></script>
|
||||
|
||||
<!-- Bootstrap 3.3.5 -->
|
||||
|
|
|
@ -1 +1 @@
|
|||
ar_ARbn_BNde_DEen_USfr_FRhi_HIhr_HRhu_HUid_IDja_JPka_GEko_KRpl_PLpt_PTru_RUsr_RSta_INtr_TRzh_CNzh_TW
|
||||
ar_ARbn_BNde_DEen_USes_ESfr_FRhi_HIhr_HRhu_HUid_IDja_JPka_GEko_KRpl_PLpt_PTru_RUsr_RSta_INtr_TRzh_CNzh_TW
|
|
@ -175,6 +175,7 @@
|
|||
<td class="td_ctrl_col" id="td_title_setting">选项设置</td>
|
||||
<td>
|
||||
<select id="id_theme_sel_gfxmode" name="name_theme_sel_gfxmode" class="form-control">
|
||||
<option title="max">max</option>
|
||||
<option title="1920x1080">1920x1080</option>
|
||||
<option title="1680x1050">1680x1050</option>
|
||||
<option title="1600x900">1600x900</option>
|
||||
|
|
Loading…
Reference in New Issue