Skip to content

Commit

Permalink
Rename to ClashXW
Browse files Browse the repository at this point in the history
  • Loading branch information
ysc3839 committed Jun 28, 2020
1 parent de259b7 commit cae4735
Show file tree
Hide file tree
Showing 31 changed files with 132 additions and 132 deletions.
10 changes: 5 additions & 5 deletions ClashApi.hpp
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
Expand Down Expand Up @@ -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)
Expand Down
28 changes: 14 additions & 14 deletions ClashW.cpp → ClashXW.cpp
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);
Expand All @@ -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();
Expand All @@ -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;

Expand Down Expand Up @@ -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))
{
Expand Down
16 changes: 8 additions & 8 deletions ClashW.h → ClashXW.h
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
Expand All @@ -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";
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions ClashW.manifest → ClashXW.manifest
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
<assemblyIdentity
version="1.0.0.0"
processorArchitecture="*"
name="com.ysc3839.clashw"
name="com.ysc3839.clashxw"
type="win32"
/>
<description>ClashW</description>
<description>ClashXW</description>
<dependency>
<dependentAssembly>
<assemblyIdentity
Expand Down
10 changes: 5 additions & 5 deletions ClashW.rc → ClashXW.rc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL

// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_CLASHW ICON "ClashW.ico"
IDI_CLASHXW ICON "ClashXW.ico"


#ifdef APSTUDIO_INVOKED
Expand Down Expand Up @@ -87,12 +87,12 @@ BEGIN
BLOCK "040004b0"
BEGIN
VALUE "CompanyName", "Richard Yu"
VALUE "FileDescription", "ClashW"
VALUE "FileDescription", "ClashXW"
VALUE "FileVersion", "1.0.0.0"
VALUE "InternalName", "ClashW.exe"
VALUE "InternalName", "ClashXW.exe"
VALUE "LegalCopyright", "Copyright (C) 2020 Richard Yu"
VALUE "OriginalFilename", "ClashW.exe"
VALUE "ProductName", "ClashW"
VALUE "OriginalFilename", "ClashXW.exe"
VALUE "ProductName", "ClashXW"
VALUE "ProductVersion", "1.0.0.0"
END
END
Expand Down
2 changes: 1 addition & 1 deletion ClashW.sln → ClashXW.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.29806.167
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ClashW", "ClashW.vcxproj", "{848B91AF-E667-4999-AC38-6DFF6AE7FAAF}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ClashXW", "ClashXW.vcxproj", "{848B91AF-E667-4999-AC38-6DFF6AE7FAAF}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Expand Down
14 changes: 7 additions & 7 deletions ClashW.vcxproj → ClashXW.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<VCProjectVersion>16.0</VCProjectVersion>
<ProjectGuid>{848B91AF-E667-4999-AC38-6DFF6AE7FAAF}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>ClashW</RootNamespace>
<RootNamespace>ClashXW</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<CppWinRTLibs>false</CppWinRTLibs>
<CppWinRTOptimized>true</CppWinRTOptimized>
Expand Down Expand Up @@ -183,7 +183,7 @@
<ClInclude Include="OSLicensesDlg.hpp" />
<ClInclude Include="ProcessManager.hpp" />
<ClInclude Include="ClashApi.hpp" />
<ClInclude Include="ClashW.h" />
<ClInclude Include="ClashXW.h" />
<ClInclude Include="ConfigFileManager.hpp" />
<ClInclude Include="framework.h" />
<ClInclude Include="MenuUtil.hpp" />
Expand All @@ -195,7 +195,7 @@
<ClInclude Include="Util.hpp" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="ClashW.cpp" />
<ClCompile Include="ClashXW.cpp" />
<ClCompile Include="pch.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
Expand All @@ -210,19 +210,19 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="ClashW.rc" />
<ResourceCompile Include="ClashXW.rc" />
<ResourceCompile Include="licenses\generated\LicensesText.rc" />
<ResourceCompile Include="translate\generated\translate.rc" />
<ResourceCompile Include="translate\rc\ClashW-translatable.rc" />
<ResourceCompile Include="translate\rc\ClashXW-translatable.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="ClashW.ico" />
<Image Include="ClashXW.ico" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<Manifest Include="ClashW.manifest" />
<Manifest Include="ClashXW.manifest" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
Expand Down
12 changes: 6 additions & 6 deletions ClashW.vcxproj.filters → ClashXW.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<ClInclude Include="Resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ClashW.h">
<ClInclude Include="ClashXW.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="pch.h">
Expand Down Expand Up @@ -68,7 +68,7 @@
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ClashW.cpp">
<ClCompile Include="ClashXW.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="pch.cpp">
Expand All @@ -79,21 +79,21 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="ClashW.rc">
<ResourceCompile Include="ClashXW.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
<ResourceCompile Include="licenses\generated\LicensesText.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
<ResourceCompile Include="translate\rc\ClashW-translatable.rc">
<ResourceCompile Include="translate\rc\ClashXW-translatable.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
<ResourceCompile Include="translate\generated\translate.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Image Include="ClashW.ico">
<Image Include="ClashXW.ico">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
Expand All @@ -102,7 +102,7 @@
<None Include="$(MSBuildThisFileDirectory)$(EffectivePlatform)\WebView2Loader.dll" />
</ItemGroup>
<ItemGroup>
<Manifest Include="ClashW.manifest">
<Manifest Include="ClashXW.manifest">
<Filter>Resource Files</Filter>
</Manifest>
</ItemGroup>
Expand Down
8 changes: 4 additions & 4 deletions ConfigFileManager.hpp
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
Expand Down
8 changes: 4 additions & 4 deletions Coroutine.hpp
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
Expand Down
8 changes: 4 additions & 4 deletions DarkMode.hpp
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
Expand Down
Loading

0 comments on commit cae4735

Please sign in to comment.