-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
31 changed files
with
132 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
/* | ||
* Copyright (C) 2020 Richard Yu <[email protected]> | ||
* | ||
* This file is part of ClashW. | ||
* This file is part of ClashXW. | ||
* | ||
* ClashW is free software: you can redistribute it and/or modify | ||
* ClashXW is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* ClashW is distributed in the hope that it will be useful, | ||
* ClashXW is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with ClashW. If not, see <https://www.gnu.org/licenses/>. | ||
* along with ClashXW. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
@@ -145,7 +145,7 @@ class ClashApi | |
{ | ||
if (!m_hSession) | ||
{ | ||
m_hSession.reset(WinHttpOpen(L"ClashW/1.0", WINHTTP_ACCESS_TYPE_NO_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0)); | ||
m_hSession.reset(WinHttpOpen(L"ClashXW/1.0", WINHTTP_ACCESS_TYPE_NO_PROXY, WINHTTP_NO_PROXY_NAME, WINHTTP_NO_PROXY_BYPASS, 0)); | ||
THROW_LAST_ERROR_IF_NULL(m_hSession); | ||
} | ||
if (!m_hConnect) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,24 @@ | ||
/* | ||
* Copyright (C) 2020 Richard Yu <[email protected]> | ||
* | ||
* This file is part of ClashW. | ||
* This file is part of ClashXW. | ||
* | ||
* ClashW is free software: you can redistribute it and/or modify | ||
* ClashXW is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* ClashW is distributed in the hope that it will be useful, | ||
* ClashXW is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with ClashW. If not, see <https://www.gnu.org/licenses/>. | ||
* along with ClashXW. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include "pch.h" | ||
#include "ClashW.h" | ||
#include "ClashXW.h" | ||
|
||
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM); | ||
INT_PTR CALLBACK About(HWND, UINT, WPARAM, LPARAM); | ||
|
@@ -34,14 +34,14 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, | |
|
||
g_hInst = hInstance; | ||
|
||
SetCurrentProcessExplicitAppUserModelID(CLASHW_APP_ID); | ||
SetCurrentProcessExplicitAppUserModelID(CLASHXW_APP_ID); | ||
|
||
if (!CheckOnlyOneInstance(CLASHW_MUTEX_NAME)) | ||
if (!CheckOnlyOneInstance(CLASHXW_MUTEX_NAME)) | ||
return EXIT_FAILURE; | ||
|
||
g_exePath = GetModuleFsPath(hInstance).remove_filename(); | ||
SetCurrentDirectoryW(g_exePath.c_str()); | ||
g_dataPath = GetKnownFolderFsPath(FOLDERID_RoamingAppData) / CLASHW_DIR_NAME; | ||
g_dataPath = GetKnownFolderFsPath(FOLDERID_RoamingAppData) / CLASHXW_DIR_NAME; | ||
|
||
LoadTranslateData(); | ||
InitDarkMode(); | ||
|
@@ -53,15 +53,15 @@ int APIENTRY wWinMain(_In_ HINSTANCE hInstance, | |
.cbSize = sizeof(wcex), | ||
.lpfnWndProc = WndProc, | ||
.hInstance = hInstance, | ||
.hIcon = LoadIconW(hInstance, MAKEINTRESOURCEW(IDI_CLASHW)), | ||
.hIcon = LoadIconW(hInstance, MAKEINTRESOURCEW(IDI_CLASHXW)), | ||
.hCursor = LoadCursorW(nullptr, IDC_ARROW), | ||
.lpszClassName = L"ClashW", | ||
.hIconSm = LoadIconW(hInstance, MAKEINTRESOURCEW(IDI_CLASHW)) | ||
.lpszClassName = L"ClashXW", | ||
.hIconSm = LoadIconW(hInstance, MAKEINTRESOURCEW(IDI_CLASHXW)) | ||
}; | ||
|
||
RegisterClassExW(&wcex); | ||
|
||
auto hWnd = CreateWindowW(L"ClashW", nullptr, WS_POPUP, 0, 0, 0, 0, nullptr, nullptr, hInstance, nullptr); | ||
auto hWnd = CreateWindowW(L"ClashXW", nullptr, WS_POPUP, 0, 0, 0, 0, nullptr, nullptr, hInstance, nullptr); | ||
if (!hWnd) | ||
return EXIT_FAILURE; | ||
|
||
|
@@ -135,8 +135,8 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) | |
SetupMenu(); | ||
|
||
nid.hWnd = hWnd; | ||
nid.hIcon = LoadIconW(g_hInst, MAKEINTRESOURCEW(IDI_CLASHW)); | ||
wcscpy_s(nid.szTip, _(L"ClashW")); | ||
nid.hIcon = LoadIconW(g_hInst, MAKEINTRESOURCEW(IDI_CLASHXW)); | ||
wcscpy_s(nid.szTip, _(L"ClashXW")); | ||
|
||
if (Shell_NotifyIconW(NIM_ADD, &nid)) | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
/* | ||
* Copyright (C) 2020 Richard Yu <[email protected]> | ||
* | ||
* This file is part of ClashW. | ||
* This file is part of ClashXW. | ||
* | ||
* ClashW is free software: you can redistribute it and/or modify | ||
* ClashXW is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* ClashW is distributed in the hope that it will be useful, | ||
* ClashXW is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with ClashW. If not, see <https://www.gnu.org/licenses/>. | ||
* along with ClashXW. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
@@ -35,10 +35,10 @@ constexpr UINT WM_NOTIFYICON = WM_APP + 1; | |
constexpr UINT WM_PROCESSNOTIFY = WM_APP + 2; // wParam=exitCode | ||
constexpr UINT WM_RESUMECORO = WM_APP + 3; // wParam=coroutine_handle.address | ||
|
||
constexpr auto CLASHW_APP_ID = L"com.ysc3839.clashw"; | ||
constexpr auto CLASHW_MUTEX_NAME = L"Local\\com.ysc3839.clashw"; | ||
constexpr auto CLASHW_DIR_NAME = L"ClashW"; | ||
constexpr auto CLASHW_LINK_NAME = L"ClashW.lnk"; | ||
constexpr auto CLASHXW_APP_ID = L"com.ysc3839.clashxw"; | ||
constexpr auto CLASHXW_MUTEX_NAME = L"Local\\com.ysc3839.clashxw"; | ||
constexpr auto CLASHXW_DIR_NAME = L"ClashXW"; | ||
constexpr auto CLASHXW_LINK_NAME = L"ClashXW.lnk"; | ||
constexpr auto CLASH_CONFIG_DIR_NAME = L"Config"; | ||
constexpr auto CLASH_ASSETS_DIR_NAME = L"ClashAssets"; | ||
constexpr auto CLASH_DEF_CONFIG_NAME = L"config.yaml"; | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
/* | ||
* Copyright (C) 2020 Richard Yu <[email protected]> | ||
* | ||
* This file is part of ClashW. | ||
* This file is part of ClashXW. | ||
* | ||
* ClashW is free software: you can redistribute it and/or modify | ||
* ClashXW is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* ClashW is distributed in the hope that it will be useful, | ||
* ClashXW is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with ClashW. If not, see <https://www.gnu.org/licenses/>. | ||
* along with ClashXW. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
/* | ||
* Copyright (C) 2020 Richard Yu <[email protected]> | ||
* | ||
* This file is part of ClashW. | ||
* This file is part of ClashXW. | ||
* | ||
* ClashW is free software: you can redistribute it and/or modify | ||
* ClashXW is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* ClashW is distributed in the hope that it will be useful, | ||
* ClashXW is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with ClashW. If not, see <https://www.gnu.org/licenses/>. | ||
* along with ClashXW. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,20 @@ | ||
/* | ||
* Copyright (C) 2020 Richard Yu <[email protected]> | ||
* | ||
* This file is part of ClashW. | ||
* This file is part of ClashXW. | ||
* | ||
* ClashW is free software: you can redistribute it and/or modify | ||
* ClashXW is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU Affero General Public License as published by | ||
* the Free Software Foundation, either version 3 of the License, or | ||
* (at your option) any later version. | ||
* | ||
* ClashW is distributed in the hope that it will be useful, | ||
* ClashXW is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU Affero General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Affero General Public License | ||
* along with ClashW. If not, see <https://www.gnu.org/licenses/>. | ||
* along with ClashXW. If not, see <https://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#pragma once | ||
|
Oops, something went wrong.