94993b21b4
- app_icon.ico 重新由 assets/app-icon.svg 生成(穿山甲品牌图标,多尺寸),
替换残留的默认 Flutter logo —— 同时修好桌面图标与标题栏小图标。
- 窗口标题去掉 "VPN" 字眼:main.cpp 原生标题 pangolin_vpn → Pangolin;
main.dart 用 windowManager.setTitle('穿山甲') 显示中文品牌名;
Runner.rc 的 FileDescription/InternalName/ProductName → Pangolin。
- 系统托盘空白:Windows 走 Win32 Shell_NotifyIcon 只认 .ico(传 PNG 显示空白),
新增 BMP 编码的 assets/tray_icon.ico,system_tray.dart 按平台选 ico/png。
- 安装包版本 1.0.0 → 1.0.1(pubspec 1.0.1+2)便于区分测试构建。
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
44 lines
1.2 KiB
C++
44 lines
1.2 KiB
C++
#include <flutter/dart_project.h>
|
|
#include <flutter/flutter_view_controller.h>
|
|
#include <windows.h>
|
|
|
|
#include "flutter_window.h"
|
|
#include "utils.h"
|
|
|
|
int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev,
|
|
_In_ wchar_t *command_line, _In_ int show_command) {
|
|
// Attach to console when present (e.g., 'flutter run') or create a
|
|
// new console when running with a debugger.
|
|
if (!::AttachConsole(ATTACH_PARENT_PROCESS) && ::IsDebuggerPresent()) {
|
|
CreateAndAttachConsole();
|
|
}
|
|
|
|
// Initialize COM, so that it is available for use in the library and/or
|
|
// plugins.
|
|
::CoInitializeEx(nullptr, COINIT_APARTMENTTHREADED);
|
|
|
|
flutter::DartProject project(L"data");
|
|
|
|
std::vector<std::string> command_line_arguments =
|
|
GetCommandLineArguments();
|
|
|
|
project.set_dart_entrypoint_arguments(std::move(command_line_arguments));
|
|
|
|
FlutterWindow window(project);
|
|
Win32Window::Point origin(10, 10);
|
|
Win32Window::Size size(1280, 720);
|
|
if (!window.Create(L"Pangolin", origin, size)) {
|
|
return EXIT_FAILURE;
|
|
}
|
|
window.SetQuitOnClose(true);
|
|
|
|
::MSG msg;
|
|
while (::GetMessage(&msg, nullptr, 0, 0)) {
|
|
::TranslateMessage(&msg);
|
|
::DispatchMessage(&msg);
|
|
}
|
|
|
|
::CoUninitialize();
|
|
return EXIT_SUCCESS;
|
|
}
|