chore: 将项目名称从 BearVPN 更新为 HiFastVPN
This commit is contained in:
parent
7956349c0a
commit
a7df3a44a2
@ -4,12 +4,12 @@ echo 📋 复制 libcore 文件...
|
|||||||
:: 创建目标目录
|
:: 创建目标目录
|
||||||
mkdir libcore\bin >nul 2>&1
|
mkdir libcore\bin >nul 2>&1
|
||||||
|
|
||||||
:: 查找并复制 HiddifyCli.exe,重命名为 BearVPNCli.exe
|
:: 查找并复制 HiddifyCli.exe,重命名为 HiFastVPNCli.exe
|
||||||
for /r %%f in (HiddifyCli.exe) do (
|
for /r %%f in (HiddifyCli.exe) do (
|
||||||
if exist "%%f" (
|
if exist "%%f" (
|
||||||
echo ✅ 找到 HiddifyCli.exe: %%f
|
echo ✅ 找到 HiddifyCli.exe: %%f
|
||||||
echo 📝 复制并重命名为 BearVPNCli.exe
|
echo 📝 复制并重命名为 HiFastVPNCli.exe
|
||||||
copy "%%f" libcore\bin\BearVPNCli.exe
|
copy "%%f" libcore\bin\HiFastVPNCli.exe
|
||||||
echo ✅ 重命名完成
|
echo ✅ 重命名完成
|
||||||
goto :dll
|
goto :dll
|
||||||
)
|
)
|
||||||
@ -32,7 +32,7 @@ echo.
|
|||||||
echo 📄 验证文件:
|
echo 📄 验证文件:
|
||||||
if exist libcore\bin (
|
if exist libcore\bin (
|
||||||
dir libcore\bin
|
dir libcore\bin
|
||||||
if exist libcore\bin\BearVPNCli.exe (
|
if exist libcore\bin\HiFastVPNCli.exe (
|
||||||
if exist libcore\bin\libcore.dll (
|
if exist libcore\bin\libcore.dll (
|
||||||
echo ✅ 验证成功:所有文件已正确复制
|
echo ✅ 验证成功:所有文件已正确复制
|
||||||
exit /b 0
|
exit /b 0
|
||||||
@ -41,10 +41,10 @@ if exist libcore\bin (
|
|||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
) else (
|
) else (
|
||||||
echo ❌ 验证失败:BearVPNCli.exe 不存在
|
echo ❌ 验证失败:HiFastVPNCli.exe 不存在
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
) else (
|
) else (
|
||||||
echo ⚠️ libcore\bin 目录不存在
|
echo ⚠️ libcore\bin 目录不存在
|
||||||
exit /b 1
|
exit /b 1
|
||||||
)
|
)
|
||||||
|
|||||||
@ -45,7 +45,7 @@ class KRWindowManager with WindowListener, TrayListener {
|
|||||||
// 确保在 Windows 下正确设置窗口属性
|
// 确保在 Windows 下正确设置窗口属性
|
||||||
if (Platform.isWindows) {
|
if (Platform.isWindows) {
|
||||||
await windowManager.setTitleBarStyle(TitleBarStyle.normal);
|
await windowManager.setTitleBarStyle(TitleBarStyle.normal);
|
||||||
await windowManager.setTitle('BearVPN');
|
await windowManager.setTitle('HiFastVPN');
|
||||||
await windowManager.setSize(const Size(800, 668));
|
await windowManager.setSize(const Size(800, 668));
|
||||||
await windowManager.setMinimumSize(const Size(800, 668));
|
await windowManager.setMinimumSize(const Size(800, 668));
|
||||||
await windowManager.center();
|
await windowManager.center();
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
# Project-level configuration.
|
# Project-level configuration.
|
||||||
cmake_minimum_required(VERSION 3.14)
|
cmake_minimum_required(VERSION 3.14)
|
||||||
project(BearVPN LANGUAGES CXX)
|
project(HiFastVPN LANGUAGES CXX)
|
||||||
|
|
||||||
# 设置 CMake 策略以兼容旧版本插件
|
# 设置 CMake 策略以兼容旧版本插件
|
||||||
# CMP0175: add_custom_command() 拒绝无效参数(用于兼容 flutter_inappwebview_windows 插件)
|
# CMP0175: add_custom_command() 拒绝无效参数(用于兼容 flutter_inappwebview_windows 插件)
|
||||||
@ -22,7 +22,7 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /FS")
|
|||||||
|
|
||||||
# The name of the executable created for the application. Change this to change
|
# The name of the executable created for the application. Change this to change
|
||||||
# the on-disk name of your application.
|
# the on-disk name of your application.
|
||||||
set(BINARY_NAME "BearVPN")
|
set(BINARY_NAME "HiFastVPN")
|
||||||
|
|
||||||
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
|
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
|
||||||
# versions of CMake.
|
# versions of CMake.
|
||||||
@ -100,7 +100,7 @@ endif()
|
|||||||
|
|
||||||
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
|
set(INSTALL_BUNDLE_DATA_DIR "${CMAKE_INSTALL_PREFIX}/data")
|
||||||
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")
|
set(INSTALL_BUNDLE_LIB_DIR "${CMAKE_INSTALL_PREFIX}")
|
||||||
# CLI 工具目录(用于存放 BearVPNCli.exe)
|
# CLI 工具目录(用于存放 HiFastVPNCli.exe)
|
||||||
set(INSTALL_BUNDLE_CLI_DIR "${CMAKE_INSTALL_PREFIX}/cli")
|
set(INSTALL_BUNDLE_CLI_DIR "${CMAKE_INSTALL_PREFIX}/cli")
|
||||||
|
|
||||||
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
|
install(TARGETS ${BINARY_NAME} RUNTIME DESTINATION "${CMAKE_INSTALL_PREFIX}"
|
||||||
@ -118,10 +118,10 @@ install(FILES "../libcore/bin/libcore.dll"
|
|||||||
COMPONENT Runtime
|
COMPONENT Runtime
|
||||||
OPTIONAL)
|
OPTIONAL)
|
||||||
|
|
||||||
# 安装 BearVPNCli.exe(从 libcore/bin 复制并重命名)
|
# 安装 HiFastVPNCli.exe(从 libcore/bin 复制并重命名)
|
||||||
# 注意:libcore 编译的是 HiddifyCli.exe,打包脚本会自动重命名为 BearVPNCli.exe
|
# 注意:libcore 编译的是 HiddifyCli.exe,打包脚本会自动重命名为 HiFastVPNCli.exe
|
||||||
# 这里需要安装 BearVPNCli.exe,因为它已经被重命名了
|
# 这里需要安装 HiFastVPNCli.exe,因为它已经被重命名了
|
||||||
install(FILES "../libcore/bin/BearVPNCli.exe"
|
install(FILES "../libcore/bin/HiFastVPNCli.exe"
|
||||||
DESTINATION "${CMAKE_INSTALL_PREFIX}"
|
DESTINATION "${CMAKE_INSTALL_PREFIX}"
|
||||||
COMPONENT Runtime
|
COMPONENT Runtime
|
||||||
OPTIONAL)
|
OPTIONAL)
|
||||||
|
|||||||
@ -87,9 +87,9 @@ begin
|
|||||||
AppendLog('terminate failed: {{EXECUTABLE_NAME}}');
|
AppendLog('terminate failed: {{EXECUTABLE_NAME}}');
|
||||||
end;
|
end;
|
||||||
try
|
try
|
||||||
Exec('taskkill', '/F /IM BearVPNCli.exe', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
|
Exec('taskkill', '/F /IM HiFastVPNCli.exe', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
|
||||||
except
|
except
|
||||||
AppendLog('terminate failed: BearVPNCli.exe');
|
AppendLog('terminate failed: HiFastVPNCli.exe');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -97,10 +97,10 @@ procedure StopServices();
|
|||||||
var ResultCode: Integer;
|
var ResultCode: Integer;
|
||||||
begin
|
begin
|
||||||
try
|
try
|
||||||
Exec('net', 'stop "BearVPNTunnelService"', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
|
Exec('net', 'stop "HiFastVPNTunnelService"', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
|
||||||
Exec('sc.exe', 'delete "BearVPNTunnelService"', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
|
Exec('sc.exe', 'delete "HiFastVPNTunnelService"', '', SW_HIDE, ewWaitUntilTerminated, ResultCode);
|
||||||
except
|
except
|
||||||
AppendLog('service stop/delete failed: BearVPNTunnelService');
|
AppendLog('service stop/delete failed: HiFastVPNTunnelService');
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|||||||
@ -1,11 +1,11 @@
|
|||||||
app_id: 6L903538-42B1-4596-G479-BJ779F21A65E
|
app_id: 6L903538-42B1-4596-G479-BJ779F21A65E
|
||||||
publisher: BearVPN
|
publisher: HiFastVPN
|
||||||
publisher_url: https://github.com/hiddify/hiddify-next
|
publisher_url: https://github.com/hiddify/hiddify-next
|
||||||
display_name: BearVPN
|
display_name: HiFastVPN
|
||||||
executable_name: BearVPN.exe
|
executable_name: HiFastVPN.exe
|
||||||
output_base_file_name: BearVPN.exe
|
output_base_file_name: HiFastVPN.exe
|
||||||
create_desktop_icon: true
|
create_desktop_icon: true
|
||||||
install_dir_name: "{autopf64}\\BearVPN"
|
install_dir_name: "{autopf64}\\HiFastVPN"
|
||||||
setup_icon_file: ..\..\windows\runner\resources\app_icon.ico
|
setup_icon_file: ..\..\windows\runner\resources\app_icon.ico
|
||||||
locales:
|
locales:
|
||||||
- ar
|
- ar
|
||||||
|
|||||||
@ -89,13 +89,13 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
BLOCK "040904e4"
|
BLOCK "040904e4"
|
||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "BearVPN" "\0"
|
VALUE "CompanyName", "HiFastVPN" "\0"
|
||||||
VALUE "FileDescription", "BearVPN" "\0"
|
VALUE "FileDescription", "HiFastVPN" "\0"
|
||||||
VALUE "FileVersion", VERSION_AS_STRING "\0"
|
VALUE "FileVersion", VERSION_AS_STRING "\0"
|
||||||
VALUE "InternalName", "app.baer.com" "\0"
|
VALUE "InternalName", "app.baer.com" "\0"
|
||||||
VALUE "LegalCopyright", "Copyright (C) 2024 BearVPN. All rights reserved." "\0"
|
VALUE "LegalCopyright", "Copyright (C) 2024 HiFastVPN. All rights reserved." "\0"
|
||||||
VALUE "OriginalFilename", "BearVPN.exe" "\0"
|
VALUE "OriginalFilename", "HiFastVPN.exe" "\0"
|
||||||
VALUE "ProductName", "BearVPN" "\0"
|
VALUE "ProductName", "HiFastVPN" "\0"
|
||||||
VALUE "ProductVersion", VERSION_AS_STRING "\0"
|
VALUE "ProductVersion", VERSION_AS_STRING "\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
|
|||||||
@ -9,15 +9,15 @@
|
|||||||
|
|
||||||
int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
||||||
_In_ wchar_t *command_line, _In_ int show_command) {
|
_In_ wchar_t *command_line, _In_ int show_command) {
|
||||||
HANDLE hMutexInstance = CreateMutex(NULL, TRUE, L"BearVPNMutex");
|
HANDLE hMutexInstance = CreateMutex(NULL, TRUE, L"HiFastVPNMutex");
|
||||||
HWND handle = FindWindowA(NULL, "BearVPN");
|
HWND handle = FindWindowA(NULL, "HiFastVPN");
|
||||||
|
|
||||||
if (GetLastError() == ERROR_ALREADY_EXISTS) {
|
if (GetLastError() == ERROR_ALREADY_EXISTS) {
|
||||||
flutter::DartProject project(L"data");
|
flutter::DartProject project(L"data");
|
||||||
std::vector<std::string> command_line_arguments = GetCommandLineArguments();
|
std::vector<std::string> command_line_arguments = GetCommandLineArguments();
|
||||||
project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
|
project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
|
||||||
FlutterWindow window(project);
|
FlutterWindow window(project);
|
||||||
if (window.SendAppLinkToInstance(L"BearVPN")) {
|
if (window.SendAppLinkToInstance(L"HiFastVPN")) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -47,7 +47,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
|||||||
FlutterWindow window(project);
|
FlutterWindow window(project);
|
||||||
Win32Window::Point origin(10, 10);
|
Win32Window::Point origin(10, 10);
|
||||||
Win32Window::Size size(1280, 720);
|
Win32Window::Size size(1280, 720);
|
||||||
if (!window.Create(L"BearVPN", origin, size)) {
|
if (!window.Create(L"HiFastVPN", origin, size)) {
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
window.SetQuitOnClose(true);
|
window.SetQuitOnClose(true);
|
||||||
|
|||||||
@ -11,7 +11,7 @@ AppPublisher={#MyAppPublisher}
|
|||||||
DefaultDirName={autopf}\{#MyAppName}
|
DefaultDirName={autopf}\{#MyAppName}
|
||||||
DefaultGroupName={#MyAppName}
|
DefaultGroupName={#MyAppName}
|
||||||
OutputDir=installer
|
OutputDir=installer
|
||||||
OutputBaseFilename=BearVPN_Setup
|
OutputBaseFilename=HiFastVPN_Setup
|
||||||
Compression=lzma
|
Compression=lzma
|
||||||
SolidCompression=yes
|
SolidCompression=yes
|
||||||
WizardStyle=modern
|
WizardStyle=modern
|
||||||
@ -34,4 +34,4 @@ Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
|
|||||||
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
|
||||||
|
|
||||||
[Run]
|
[Run]
|
||||||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user