diff --git a/.github/workflows/commit-ci.yml b/.github/workflows/commit-ci.yml deleted file mode 100644 index a20c380fc..000000000 --- a/.github/workflows/commit-ci.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: Commit CI - -on: - workflow_dispatch: - push: - branches: - - '*' - tags: - - '![0-9]+.*' - paths: - - '**/**' - - '!*.md' - - '!.gitignore' - pull_request: - -jobs: - build: - runs-on: windows-2022 - env: - librime_build: 'submodule' - boost_version: 1.83.0 - BOOST_ROOT: ${{ github.workspace }}\deps\boost_1_83_0 - steps: - - name: Checkout last commit - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Configure build environment - run: | - copy env.vs2022.bat env.bat - $git_ref_name = git describe --always - echo "git_ref_name=$git_ref_name" >> $env:GITHUB_ENV - - - name: Cache Boost - id: cache-boost - uses: actions/cache@v3 - with: - path: | - ${{ env.BOOST_ROOT }} - key: ${{ runner.os }}-boost-${{ env.boost_version }} - - - name: Install Boost - if: steps.cache-boost.outputs.cache-hit != 'true' - run: .\install_boost.bat - - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.1.3 - - - name: Copy Rime files - if: env.librime_build == 'stable' - run: .\github.install.bat - - - name: Build librime - if: env.librime_build == 'submodule' - env: - RIME_PLUGINS: hchunhui/librime-lua lotem/librime-octagram rime/librime-predict - shell: bash - run: | - # load plugins - pushd librime - ./action-install-plugins-windows.bat - popd - ./build.bat librime - - - name: Build Weasel - id: build_weasel - shell: bash - run: | - ./build.bat data - ./build.bat hant - ./build.bat installer - - - name: Compress Debug Symbols - shell: pwsh - run: | - Compress-Archive -Path output\*.pdb -CompressionLevel Optimal -DestinationPath .\output\archives\symbols.zip - - - name: Upload artifacts - uses: actions/upload-artifact@v3 - with: - if-no-files-found: error - path: | - .\output\archives\weasel*.exe - .\output\archives\symbols.zip diff --git a/.github/workflows/release-ci.yml b/.github/workflows/release-ci.yml deleted file mode 100644 index 32ec6f942..000000000 --- a/.github/workflows/release-ci.yml +++ /dev/null @@ -1,103 +0,0 @@ -name: Release CI - -on: - push: - branches: - - master - tags: - - '[0-9]+.*' - workflow_dispatch: - -jobs: - build-and-release: - permissions: - contents: write - runs-on: windows-2022 - env: - librime_build: submodule - boost_version: 1.83.0 - BOOST_ROOT: ${{ github.workspace }}\deps\boost_1_83_0 - steps: - - name: Checkout last commit - uses: actions/checkout@v3 - with: - submodules: true - - - name: Configure build environment - run: | - copy env.vs2022.bat env.bat - $git_ref_name = git describe --always - echo "git_ref_name=$git_ref_name" >> $env:GITHUB_ENV - - - name: Cache Boost - id: cache-boost - uses: actions/cache@v3 - with: - path: | - ${{ env.BOOST_ROOT }} - key: ${{ runner.os }}-boost-${{ env.boost_version }} - - - name: Install Boost - if: steps.cache-boost.outputs.cache-hit != 'true' - run: .\install_boost.bat - - - name: Add msbuild to PATH - uses: microsoft/setup-msbuild@v1.1.3 - - - name: Copy Rime files - if: env.librime_build == 'stable' - run: | - .\github.install.bat - - - name: Build librime - if: env.librime_build == 'submodule' - env: - RIME_PLUGINS: hchunhui/librime-lua lotem/librime-octagram rime/librime-predict - shell: bash - run: | - # load plugins - pushd librime - ./action-install-plugins-windows.bat - popd - ./build.bat librime - - - name: Build Weasel - id: build_weasel - shell: bash - run: | - ./build.bat data - ./build.bat hant - ./build.bat installer - - - name: Compress Debug Symbols - shell: pwsh - run: | - Compress-Archive -Path output\*.pdb -CompressionLevel Optimal -DestinationPath .\output\archives\symbols.zip - - - name: Extract changelog - shell: pwsh - run: | - .\extract_changelog.ps1 - if: startsWith(github.ref, 'refs/tags/') - - - name: Create Nightly release - if: github.ref == 'refs/heads/master' - uses: 'marvinpinto/action-automatic-releases@latest' - with: - repo_token: ${{ secrets.GITHUB_TOKEN }} - automatic_release_tag: latest - prerelease: true - title: "Nightly Build" - files: | - ./output/archives/weasel*.exe - ./output/archives/symbols.zip - - - name: Release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - files: | - ./output/archives/weasel*.exe - ./output/archives/symbols.zip - body_path: ${{ github.workspace }}/RELEASE_CHANGELOG.md - diff --git a/RimeWithWeasel/RimeWithWeasel.cpp b/RimeWithWeasel/RimeWithWeasel.cpp index c33a6fe20..3e159a229 100644 --- a/RimeWithWeasel/RimeWithWeasel.cpp +++ b/RimeWithWeasel/RimeWithWeasel.cpp @@ -58,7 +58,7 @@ void _UpdateUIStyle(RimeConfig* config, UI* ui, bool initialize); bool _UpdateUIStyleColor(RimeConfig* config, UIStyle& style, std::string color = ""); void _LoadAppOptions(RimeConfig* config, AppOptionsByAppName& app_options); -void _RefreshTrayIcon(const UINT session_id, const std::function _UpdateUICallback) +void _RefreshTrayIcon(const RimeSessionId session_id, const std::function _UpdateUICallback) { // Dangerous, don't touch static char app_name[50]; @@ -139,7 +139,7 @@ void RimeWithWeaselHandler::Finalize() RimeFinalize(); } -UINT RimeWithWeaselHandler::FindSession(UINT session_id) +RimeSessionId RimeWithWeaselHandler::FindSession(RimeSessionId session_id) { if (m_disabled) return 0; Bool found = RimeFindSession(session_id); @@ -147,7 +147,7 @@ UINT RimeWithWeaselHandler::FindSession(UINT session_id) return found ? session_id : 0; } -UINT RimeWithWeaselHandler::AddSession(LPWSTR buffer, EatLine eat) +RimeSessionId RimeWithWeaselHandler::AddSession(LPWSTR buffer, EatLine eat) { if (m_disabled) { @@ -155,7 +155,7 @@ UINT RimeWithWeaselHandler::AddSession(LPWSTR buffer, EatLine eat) EndMaintenance(); if (m_disabled) return 0; } - UINT session_id = (UINT)RimeCreateSession(); + RimeSessionId session_id = (RimeSessionId)RimeCreateSession(); DLOG(INFO) << "Add session: created session_id = " << session_id; _ReadClientInfo(session_id, buffer); @@ -187,7 +187,7 @@ UINT RimeWithWeaselHandler::AddSession(LPWSTR buffer, EatLine eat) return session_id; } -UINT RimeWithWeaselHandler::RemoveSession(UINT session_id) +RimeSessionId RimeWithWeaselHandler::RemoveSession(RimeSessionId session_id) { if (m_ui) m_ui->Hide(); if (m_disabled) return 0; @@ -247,7 +247,7 @@ void RimeWithWeaselHandler::UpdateColorTheme(BOOL darkMode) m_ui->style() = m_session_status_map[m_active_session].style; } -BOOL RimeWithWeaselHandler::ProcessKeyEvent(KeyEvent keyEvent, UINT session_id, EatLine eat) +BOOL RimeWithWeaselHandler::ProcessKeyEvent(KeyEvent keyEvent, RimeSessionId session_id, EatLine eat) { DLOG(INFO) << "Process key event: keycode = " << keyEvent.keycode << ", mask = " << keyEvent.mask << ", session_id = " << session_id; @@ -270,7 +270,7 @@ BOOL RimeWithWeaselHandler::ProcessKeyEvent(KeyEvent keyEvent, UINT session_id, return (BOOL)handled; } -void RimeWithWeaselHandler::CommitComposition(UINT session_id) +void RimeWithWeaselHandler::CommitComposition(RimeSessionId session_id) { DLOG(INFO) << "Commit composition: session_id = " << session_id; if (m_disabled) return; @@ -279,7 +279,7 @@ void RimeWithWeaselHandler::CommitComposition(UINT session_id) m_active_session = session_id; } -void RimeWithWeaselHandler::ClearComposition(UINT session_id) +void RimeWithWeaselHandler::ClearComposition(RimeSessionId session_id) { DLOG(INFO) << "Clear composition: session_id = " << session_id; if (m_disabled) return; @@ -288,7 +288,7 @@ void RimeWithWeaselHandler::ClearComposition(UINT session_id) m_active_session = session_id; } -void RimeWithWeaselHandler::SelectCandidateOnCurrentPage(size_t index, UINT session_id) +void RimeWithWeaselHandler::SelectCandidateOnCurrentPage(size_t index, RimeSessionId session_id) { DLOG(INFO) << "select candidate on current page, session_id = " << session_id << ", index = " << index; if (m_disabled) return; @@ -296,7 +296,7 @@ void RimeWithWeaselHandler::SelectCandidateOnCurrentPage(size_t index, UINT sess api->select_candidate_on_current_page(session_id, index); } -void RimeWithWeaselHandler::FocusIn(DWORD client_caps, UINT session_id) +void RimeWithWeaselHandler::FocusIn(DWORD client_caps, RimeSessionId session_id) { DLOG(INFO) << "Focus in: session_id = " << session_id << ", client_caps = " << client_caps; if (m_disabled) return; @@ -304,14 +304,14 @@ void RimeWithWeaselHandler::FocusIn(DWORD client_caps, UINT session_id) m_active_session = session_id; } -void RimeWithWeaselHandler::FocusOut(DWORD param, UINT session_id) +void RimeWithWeaselHandler::FocusOut(DWORD param, RimeSessionId session_id) { DLOG(INFO) << "Focus out: session_id = " << session_id; if (m_ui) m_ui->Hide(); m_active_session = 0; } -void RimeWithWeaselHandler::UpdateInputPosition(RECT const& rc, UINT session_id) +void RimeWithWeaselHandler::UpdateInputPosition(RECT const& rc, RimeSessionId session_id) { DLOG(INFO) << "Update input position: (" << rc.left << ", " << rc.top << "), session_id = " << session_id << ", m_active_session = " << m_active_session; @@ -330,7 +330,7 @@ std::string RimeWithWeaselHandler::m_message_label; std::string RimeWithWeaselHandler::m_option_name; void RimeWithWeaselHandler::OnNotify(void* context_object, - uintptr_t session_id, + RimeSessionId session_id, const char* message_type, const char* message_value) { @@ -353,7 +353,7 @@ void RimeWithWeaselHandler::OnNotify(void* context_object, } } -void RimeWithWeaselHandler::_ReadClientInfo(UINT session_id, LPWSTR buffer) +void RimeWithWeaselHandler::_ReadClientInfo(RimeSessionId session_id, LPWSTR buffer) { std::string app_name; std::string client_type; @@ -453,7 +453,7 @@ void RimeWithWeaselHandler::EndMaintenance() m_session_status_map.clear(); } -void RimeWithWeaselHandler::SetOption(UINT session_id, const std::string & opt, bool val) +void RimeWithWeaselHandler::SetOption(RimeSessionId session_id, const std::string & opt, bool val) { RimeSetOption(session_id, opt.c_str(), val); } @@ -474,7 +474,7 @@ bool RimeWithWeaselHandler::_IsDeployerRunning() return deployer_detected; } -void RimeWithWeaselHandler::_UpdateUI(UINT session_id) +void RimeWithWeaselHandler::_UpdateUI(RimeSessionId session_id) { Status weasel_status; Context weasel_context; @@ -539,7 +539,7 @@ std::wstring _LoadIconSettingFromSchema(RimeConfig& config, return L""; } -void RimeWithWeaselHandler::_LoadSchemaSpecificSettings(UINT session_id, const std::string& schema_id) +void RimeWithWeaselHandler::_LoadSchemaSpecificSettings(RimeSessionId session_id, const std::string& schema_id) { if (!m_ui) return; RimeConfig config; @@ -601,7 +601,7 @@ void RimeWithWeaselHandler::_LoadSchemaSpecificSettings(UINT session_id, const s RimeConfigClose(&config); } -void RimeWithWeaselHandler::_LoadAppInlinePreeditSet(UINT session_id, bool ignore_app_name) +void RimeWithWeaselHandler::_LoadAppInlinePreeditSet(RimeSessionId session_id, bool ignore_app_name) { static char _app_name[50]; RimeGetProperty(session_id, "client_app", _app_name, sizeof(_app_name) - 1); @@ -714,7 +714,7 @@ inline std::string _GetLabelText(const std::vector &labels, int id, const return wstring_to_string(std::wstring(buffer), CP_UTF8); } -bool RimeWithWeaselHandler::_Respond(UINT session_id, EatLine eat) +bool RimeWithWeaselHandler::_Respond(RimeSessionId session_id, EatLine eat) { std::set actions; std::list messages; @@ -1231,7 +1231,7 @@ static void _LoadAppOptions(RimeConfig* config, AppOptionsByAppName& app_options RimeConfigEnd(&app_iter); } -void RimeWithWeaselHandler::_GetStatus(Status & stat, UINT session_id, Context& ctx) +void RimeWithWeaselHandler::_GetStatus(Status & stat, RimeSessionId session_id, Context& ctx) { RIME_STRUCT(RimeStatus, status); if (RimeGetStatus(session_id, &status)) @@ -1268,7 +1268,7 @@ void RimeWithWeaselHandler::_GetStatus(Status & stat, UINT session_id, Context& } } -void RimeWithWeaselHandler::_GetContext(Context & weasel_context, UINT session_id) +void RimeWithWeaselHandler::_GetContext(Context & weasel_context, RimeSessionId session_id) { RIME_STRUCT(RimeContext, ctx); if (RimeGetContext(session_id, &ctx)) @@ -1295,14 +1295,14 @@ void RimeWithWeaselHandler::_GetContext(Context & weasel_context, UINT session_i } } -bool RimeWithWeaselHandler::_IsSessionTSF(UINT session_id) +bool RimeWithWeaselHandler::_IsSessionTSF(RimeSessionId session_id) { static char client_type[20] = { 0 }; RimeGetProperty(session_id, "client_type", client_type, sizeof(client_type) - 1); return std::string(client_type) == "tsf"; } -void RimeWithWeaselHandler::_UpdateInlinePreeditStatus(UINT session_id) +void RimeWithWeaselHandler::_UpdateInlinePreeditStatus(RimeSessionId session_id) { if (!m_ui) return; // set inline_preedit option diff --git a/RimeWithWeasel/RimeWithWeasel.vcxproj b/RimeWithWeasel/RimeWithWeasel.vcxproj index 04ae9169e..c76b16e91 100644 --- a/RimeWithWeasel/RimeWithWeasel.vcxproj +++ b/RimeWithWeasel/RimeWithWeasel.vcxproj @@ -125,7 +125,7 @@ Disabled $(SolutionDir)\include;$(BOOST_ROOT);$(SolutionDir)\librime\include;%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -143,7 +143,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);$(SolutionDir)\librime\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreaded true Use @@ -174,7 +174,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);$(SolutionDir)\librime\include;%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreaded true Use diff --git a/WeaselDeployer/WeaselDeployer.vcxproj b/WeaselDeployer/WeaselDeployer.vcxproj index 2c12c00a0..5f756cad4 100644 --- a/WeaselDeployer/WeaselDeployer.vcxproj +++ b/WeaselDeployer/WeaselDeployer.vcxproj @@ -9,6 +9,14 @@ Release Win32 + + Debug + x64 + + + Release + x64 + {F53F3E9C-CC4D-4D1D-9C2E-719FE60A7E6B} @@ -30,6 +38,19 @@ Unicode $(PLATFORM_TOOLSET) + + Application + true + Unicode + $(PLATFORM_TOOLSET) + + + Application + false + true + Unicode + $(PLATFORM_TOOLSET) + @@ -39,6 +60,12 @@ + + + + + + true @@ -48,6 +75,14 @@ false $(SolutionDir)output\ + + true + $(SolutionDir)output\ + + + false + $(SolutionDir)output\ + Use @@ -91,6 +126,49 @@ PerMonitorHighDPIAware + + + Use + Level3 + Disabled + WIN64;_DEBUG;_WINDOWS;%(PreprocessorDefinitions) + $(SolutionDir)\include;$(BOOST_ROOT);$(SolutionDir)\librime\include;%(AdditionalIncludeDirectories) + MultiThreadedDebug + /Zc:threadSafeInit- %(AdditionalOptions) + + + Windows + true + $(SolutionDir)\lib;$(BOOST_ROOT)\stage\lib;$(SolutionDir)\librime\build\lib\Debug;%(AdditionalLibraryDirectories) + rime.lib;kernel32.lib;user32.lib;gdi32.lib;winspool.lib;comdlg32.lib;advapi32.lib;shell32.lib;ole32.lib;oleaut32.lib;uuid.lib;odbc32.lib;odbccp32.lib;%(AdditionalDependencies) + $(SolutionDir)output\$(ProjectName)$(TargetExt) + + + + + Level3 + Use + Disabled + true + true + WIN64;NDEBUG;_WINDOWS;%(PreprocessorDefinitions) + $(SolutionDir)\include;$(BOOST_ROOT);$(SolutionDir)\librime\include + MultiThreaded + /Zc:threadSafeInit- %(AdditionalOptions) + + + Windows + true + true + true + rime.lib;rime.lib;%(AdditionalDependencies) + $(SolutionDir)\lib;$(BOOST_ROOT)\stage\lib;$(SolutionDir)\librime\build\lib\Release;%(AdditionalLibraryDirectories) + $(SolutionDir)output\$(ProjectName)$(TargetExt) + + + PerMonitorHighDPIAware + + @@ -109,6 +187,8 @@ Create Create + Create + Create diff --git a/WeaselIME/WeaselIME.vcxproj b/WeaselIME/WeaselIME.vcxproj index 8e52cc1e6..4d70b5957 100644 --- a/WeaselIME/WeaselIME.vcxproj +++ b/WeaselIME/WeaselIME.vcxproj @@ -285,7 +285,7 @@ Disabled $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;WEASELIME_EXPORTS;%(PreprocessorDefinitions) + WIN64;_DEBUG;_WINDOWS;_USRDLL;WEASELIME_EXPORTS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -315,7 +315,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;WEASELIME_EXPORTS;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;WEASELIME_EXPORTS;%(PreprocessorDefinitions) MultiThreaded true Use @@ -350,7 +350,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;WEASELIME_EXPORTS;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;WEASELIME_EXPORTS;%(PreprocessorDefinitions) MultiThreaded true Use @@ -386,7 +386,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;WEASELIME_EXPORTS;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;WEASELIME_EXPORTS;%(PreprocessorDefinitions) MultiThreaded true Use diff --git a/WeaselIPC/WeaselClientImpl.cpp b/WeaselIPC/WeaselClientImpl.cpp index 34a5d7392..8dc3dd64e 100644 --- a/WeaselIPC/WeaselClientImpl.cpp +++ b/WeaselIPC/WeaselClientImpl.cpp @@ -149,7 +149,7 @@ void ClientImpl::StartSession() return; _WriteClientInfo(); - UINT ret = _SendMessage(WEASEL_IPC_START_SESSION, 0, 0); + RimeSessionId ret = _SendMessage(WEASEL_IPC_START_SESSION, 0, 0); session_id = ret; } @@ -176,7 +176,7 @@ bool ClientImpl::Echo() if (!_Active()) return false; - UINT serverEcho = _SendMessage(WEASEL_IPC_ECHO, 0, session_id); + RimeSessionId serverEcho = _SendMessage(WEASEL_IPC_ECHO, 0, session_id); return (serverEcho == session_id); } @@ -200,10 +200,10 @@ bool ClientImpl::_WriteClientInfo() } -LRESULT ClientImpl::_SendMessage(WEASEL_IPC_COMMAND Msg, DWORD wParam, DWORD lParam) +RimeSessionId ClientImpl::_SendMessage(WEASEL_IPC_COMMAND Msg, PARAM wParam, PARAM lParam) { try { - PipeMessage req{ Msg, wParam, lParam }; + PipeMessage req{ Msg, static_cast(wParam), static_cast(lParam) }; return channel.Transact(req); } catch (DWORD /* ex */) { diff --git a/WeaselIPC/WeaselClientImpl.h b/WeaselIPC/WeaselClientImpl.h index 27c5399c7..ea9b886bd 100644 --- a/WeaselIPC/WeaselClientImpl.h +++ b/WeaselIPC/WeaselClientImpl.h @@ -4,7 +4,7 @@ namespace weasel { - + using PARAM = UINT64; class ClientImpl { public: @@ -33,13 +33,13 @@ namespace weasel void _InitializeClientInfo(); bool _WriteClientInfo(); - LRESULT _SendMessage(WEASEL_IPC_COMMAND Msg, DWORD wParam, DWORD lParam); + RimeSessionId _SendMessage(WEASEL_IPC_COMMAND Msg, PARAM wParam, PARAM lParam); bool _Connected() const { return channel.Connected(); } bool _Active() const { return channel.Connected() && session_id != 0; } private: - UINT session_id; + RimeSessionId session_id; std::wstring app_name; bool is_ime; diff --git a/WeaselIPC/WeaselIPC.vcxproj b/WeaselIPC/WeaselIPC.vcxproj index d41c3f8b0..8cba054be 100644 --- a/WeaselIPC/WeaselIPC.vcxproj +++ b/WeaselIPC/WeaselIPC.vcxproj @@ -178,7 +178,7 @@ Disabled $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -196,7 +196,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreaded true Use @@ -213,7 +213,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreaded true Use @@ -230,7 +230,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreaded true Use diff --git a/WeaselIPCServer/WeaselIPCServer.vcxproj b/WeaselIPCServer/WeaselIPCServer.vcxproj index bb93a706a..2f0b46063 100644 --- a/WeaselIPCServer/WeaselIPCServer.vcxproj +++ b/WeaselIPCServer/WeaselIPCServer.vcxproj @@ -178,7 +178,7 @@ Disabled $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -196,7 +196,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreaded true Use @@ -213,7 +213,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreaded true Use @@ -230,7 +230,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreaded true Use diff --git a/WeaselIPCServer/WeaselServerImpl.cpp b/WeaselIPCServer/WeaselServerImpl.cpp index 90c6255df..8314cd2dd 100644 --- a/WeaselIPCServer/WeaselServerImpl.cpp +++ b/WeaselIPCServer/WeaselServerImpl.cpp @@ -5,7 +5,7 @@ #include namespace weasel { - class PipeServer : public PipeChannel + class PipeServer : public PipeChannel { public: using ServerRunner = std::function; @@ -124,14 +124,14 @@ LRESULT ServerImpl::OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHa return 0; } -DWORD ServerImpl::OnCommand(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam) +PARAM ServerImpl::OnCommand(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam) { BOOL handled = TRUE; OnCommand(uMsg, wParam, lParam, handled); return handled; } -int ServerImpl::Start() +HWND ServerImpl::Start() { std::wstring instanceName = L"(WEASEL)Furandōru-Sukāretto-"; instanceName += getUsername(); @@ -145,7 +145,7 @@ int ServerImpl::Start() HWND hwnd = Create(NULL); - return (int)hwnd; + return hwnd; } int ServerImpl::Stop() @@ -184,14 +184,14 @@ int ServerImpl::Run() -DWORD ServerImpl::OnEcho(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam) +PARAM ServerImpl::OnEcho(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam) { if (!m_pRequestHandler) return 0; return m_pRequestHandler->FindSession(lParam); } -DWORD ServerImpl::OnStartSession(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam) +PARAM ServerImpl::OnStartSession(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam) { if (!m_pRequestHandler) return 0; @@ -204,14 +204,14 @@ DWORD ServerImpl::OnStartSession(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lP ); } -DWORD ServerImpl::OnEndSession(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam) +PARAM ServerImpl::OnEndSession(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam) { if (!m_pRequestHandler) return 0; return m_pRequestHandler->RemoveSession(lParam); } -DWORD ServerImpl::OnKeyEvent(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam) +PARAM ServerImpl::OnKeyEvent(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam) { if (!m_pRequestHandler/* || !m_pSharedMemory*/) return 0; @@ -223,13 +223,13 @@ DWORD ServerImpl::OnKeyEvent(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam return m_pRequestHandler->ProcessKeyEvent(KeyEvent(wParam), lParam, eat); } -DWORD ServerImpl::OnShutdownServer(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam) +PARAM ServerImpl::OnShutdownServer(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam) { Stop(); return 0; } -DWORD ServerImpl::OnFocusIn(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam) +PARAM ServerImpl::OnFocusIn(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam) { if (!m_pRequestHandler) return 0; @@ -237,7 +237,7 @@ DWORD ServerImpl::OnFocusIn(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam) return 0; } -DWORD ServerImpl::OnFocusOut(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam) +PARAM ServerImpl::OnFocusOut(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam) { if (!m_pRequestHandler) return 0; @@ -245,7 +245,7 @@ DWORD ServerImpl::OnFocusOut(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam return 0; } -DWORD ServerImpl::OnUpdateInputPosition(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam) +PARAM ServerImpl::OnUpdateInputPosition(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam) { if (!m_pRequestHandler) return 0; @@ -284,35 +284,35 @@ DWORD ServerImpl::OnUpdateInputPosition(WEASEL_IPC_COMMAND uMsg, DWORD wParam, D return 0; } -DWORD ServerImpl::OnStartMaintenance(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam) +PARAM ServerImpl::OnStartMaintenance(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam) { if (m_pRequestHandler) m_pRequestHandler->StartMaintenance(); return 0; } -DWORD ServerImpl::OnEndMaintenance(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam) +PARAM ServerImpl::OnEndMaintenance(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam) { if (m_pRequestHandler) m_pRequestHandler->EndMaintenance(); return 0; } -DWORD ServerImpl::OnCommitComposition(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam) +PARAM ServerImpl::OnCommitComposition(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam) { if (m_pRequestHandler) m_pRequestHandler->CommitComposition(lParam); return 0; } -DWORD ServerImpl::OnClearComposition(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam) +PARAM ServerImpl::OnClearComposition(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam) { if (m_pRequestHandler) m_pRequestHandler->ClearComposition(lParam); return 0; } -DWORD ServerImpl::OnSelectCandidateOnCurrentPage(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam) +PARAM ServerImpl::OnSelectCandidateOnCurrentPage(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam) { if(m_pRequestHandler) m_pRequestHandler->SelectCandidateOnCurrentPage(wParam, lParam); @@ -320,8 +320,8 @@ DWORD ServerImpl::OnSelectCandidateOnCurrentPage(WEASEL_IPC_COMMAND uMsg, DWORD } #define MAP_PIPE_MSG_HANDLE(__msg, __wParam, __lParam) {\ -auto lParam = __lParam;\ -auto wParam = __wParam;\ +PARAM lParam = __lParam;\ +PARAM wParam = __wParam;\ LRESULT _result = 0;\ switch (__msg) {\ @@ -335,7 +335,7 @@ case __msg:\ template void ServerImpl::HandlePipeMessage(PipeMessage pipe_msg, _Resp resp) { - DWORD result; + PARAM result; MAP_PIPE_MSG_HANDLE(pipe_msg.Msg, pipe_msg.wParam, pipe_msg.lParam) PIPE_MSG_HANDLE(WEASEL_IPC_ECHO, OnEcho) @@ -372,7 +372,7 @@ void PipeServer::Listen(ServerHandler const &handler) _ProcessPipeThread(pipe, handler); }); } - catch (DWORD ex) { + catch (PARAM ex) { _FinalizePipe(pipe); } boost::this_thread::interruption_point(); @@ -416,7 +416,7 @@ Server::~Server() delete m_pImpl; } -int Server::Start() +HWND Server::Start() { return m_pImpl->Start(); } diff --git a/WeaselIPCServer/WeaselServerImpl.h b/WeaselIPCServer/WeaselServerImpl.h index b07bccd0f..d02d46d7a 100644 --- a/WeaselIPCServer/WeaselServerImpl.h +++ b/WeaselIPCServer/WeaselServerImpl.h @@ -39,26 +39,26 @@ namespace weasel LRESULT OnQueryEndSystemSession(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnEndSystemSession(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); LRESULT OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); - DWORD OnCommand(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam); - DWORD OnEcho(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam); - DWORD OnStartSession(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam); - DWORD OnEndSession(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam); - DWORD OnKeyEvent(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam); - DWORD OnShutdownServer(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam); - DWORD OnFocusIn(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam); - DWORD OnFocusOut(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam); - DWORD OnUpdateInputPosition(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam); - DWORD OnStartMaintenance(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam); - DWORD OnEndMaintenance(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam); - DWORD OnCommitComposition(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam); - DWORD OnClearComposition(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam); - DWORD OnSelectCandidateOnCurrentPage(WEASEL_IPC_COMMAND uMsg, DWORD wParam, DWORD lParam); + PARAM OnCommand(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam); + PARAM OnEcho(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam); + PARAM OnStartSession(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam); + PARAM OnEndSession(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam); + PARAM OnKeyEvent(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam); + PARAM OnShutdownServer(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam); + PARAM OnFocusIn(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam); + PARAM OnFocusOut(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam); + PARAM OnUpdateInputPosition(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam); + PARAM OnStartMaintenance(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam); + PARAM OnEndMaintenance(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam); + PARAM OnCommitComposition(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam); + PARAM OnClearComposition(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam); + PARAM OnSelectCandidateOnCurrentPage(WEASEL_IPC_COMMAND uMsg, PARAM wParam, PARAM lParam); public: ServerImpl(); ~ServerImpl(); - int Start(); + HWND Start(); int Stop(); int Run(); diff --git a/WeaselServer/WeaselServer.vcxproj b/WeaselServer/WeaselServer.vcxproj index 3122ec857..a03b5c010 100644 --- a/WeaselServer/WeaselServer.vcxproj +++ b/WeaselServer/WeaselServer.vcxproj @@ -194,7 +194,7 @@ Disabled $(SolutionDir)\include;$(BOOST_ROOT);$(SolutionDir)\librime\include;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;STRICT;_DEBUG;%(PreprocessorDefinitions) + WIN64;_WINDOWS;STRICT;_DEBUG;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -280,7 +280,7 @@ $(SolutionDir)\include;$(BOOST_ROOT);$(SolutionDir)\librime\include;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;STRICT;NDEBUG;%(PreprocessorDefinitions) + WIN64;_WINDOWS;STRICT;NDEBUG;%(PreprocessorDefinitions) MultiThreaded Use Level3 @@ -357,7 +357,7 @@ $(SolutionDir)\include;$(BOOST_ROOT);$(SolutionDir)\librime\include;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;STRICT;NDEBUG;%(PreprocessorDefinitions) + WIN64;_WINDOWS;STRICT;NDEBUG;%(PreprocessorDefinitions) MultiThreaded Use Level3 @@ -431,7 +431,7 @@ $(SolutionDir)\include;$(BOOST_ROOT);$(SolutionDir)\librime\include;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;STRICT;NDEBUG;%(PreprocessorDefinitions) + WIN64;_WINDOWS;STRICT;NDEBUG;%(PreprocessorDefinitions) MultiThreaded Use Level3 diff --git a/WeaselSetup/WeaselSetup.vcxproj b/WeaselSetup/WeaselSetup.vcxproj index cb9656273..f7731d36c 100644 --- a/WeaselSetup/WeaselSetup.vcxproj +++ b/WeaselSetup/WeaselSetup.vcxproj @@ -9,6 +9,14 @@ Release Win32 + + Debug + x64 + + + Release + x64 + 17.0 @@ -31,6 +39,19 @@ $(PLATFORM_TOOLSET) Unicode + + Application + true + $(PLATFORM_TOOLSET) + Unicode + + + Application + false + true + $(PLATFORM_TOOLSET) + Unicode + @@ -42,6 +63,12 @@ + + + + + + false @@ -51,6 +78,14 @@ true $(SolutionDir)output\ + + false + $(SolutionDir)output\ + + + true + $(SolutionDir)output\ + Use @@ -133,12 +168,96 @@ PerMonitorHighDPIAware + + + Use + Level3 + MultiThreaded + + + WIN64;_WINDOWS;STRICT;NDEBUG;%(PreprocessorDefinitions) + Default + $(SolutionDir)include;$(BOOST_ROOT) + true + + + Windows + Imm32.lib;Kernel32.lib;%(AdditionalDependencies) + $(SolutionDir)output\$(ProjectName)$(TargetExt) + RequireAdministrator + UseLinkTimeCodeGeneration + + + 0x7804 + $(IntDir);$(SolutionDir)\include\wtl + NDEBUG;%(PreprocessorDefinitions) + + + false + x64 + NDEBUG;%(PreprocessorDefinitions) + WeaselSetup.h + WeaselSetup_i.c + WeaselSetup_p.c + true + $(IntDir)/WeaselSetup.tlb + + + + PerMonitorHighDPIAware + + + + + Use + Level3 + MultiThreadedDebug + EditAndContinue + EnableFastChecks + Disabled + WIN64;_WINDOWS;STRICT;_DEBUG;%(PreprocessorDefinitions) + Default + $(SolutionDir)include;$(BOOST_ROOT) + + + + + Windows + true + Imm32.lib;Kernel32.lib;%(AdditionalDependencies) + $(SolutionDir)output\$(ProjectName)$(TargetExt) + RequireAdministrator + + + + + 0x7804 + $(IntDir);$(SolutionDir)\include\wtl + _DEBUG;%(PreprocessorDefinitions) + + + false + x64 + _DEBUG;%(PreprocessorDefinitions) + WeaselSetup.h + WeaselSetup_i.c + WeaselSetup_p.c + true + $(IntDir)/WeaselSetup.tlb + + + + PerMonitorHighDPIAware + + Create Create + Create + Create diff --git a/WeaselSetup/imesetup.cpp b/WeaselSetup/imesetup.cpp index 8eae47064..8dc5ced0b 100644 --- a/WeaselSetup/imesetup.cpp +++ b/WeaselSetup/imesetup.cpp @@ -80,6 +80,32 @@ int install_ime_file(std::wstring& srcPath, const std::wstring& ext, bool hant, _wsplitpath_s(path, drive, _countof(drive), dir, _countof(dir), NULL, 0, NULL, 0); srcPath = std::wstring(drive) + dir + srcFileName; +#ifdef WIN64 + GetSystemWow64Directory(path, _countof(path)); + std::wstring destPath = std::wstring(path) + L"\\weasel" + ext; + + int retval = 0; + // 复制 .dll/.ime 到SystemWow64目录 + if (!copy_file(srcPath, destPath)) + { + MSG_NOT_SILENT_ID_CAP(silent, destPath.c_str(), IDS_STR_INSTALL_FAILED, MB_ICONERROR | MB_OK); + return 1; + } + retval += func(destPath, true, true, hant, silent); + + GetSystemDirectoryW(path, _countof(path)); + destPath = std::wstring(path) + L"\\weasel" + ext; + ireplace_last(srcPath, ext, L"x64" + ext); + + // 复制 .dll/.ime 到System32目录 + if (!copy_file(srcPath, destPath)) + { + MSG_NOT_SILENT_ID_CAP(silent, destPath.c_str(), IDS_STR_INSTALL_FAILED, MB_ICONERROR | MB_OK); + return 1; + } + retval += func(destPath, true, false, hant, silent); +#else + GetSystemDirectoryW(path, _countof(path)); std::wstring destPath = std::wstring(path) + L"\\weasel" + ext; @@ -114,6 +140,8 @@ int install_ime_file(std::wstring& srcPath, const std::wstring& ext, bool hant, return 1; } } + +#endif return retval; } diff --git a/WeaselTSF/LanguageBar.cpp b/WeaselTSF/LanguageBar.cpp index 0e02babc2..9c0224e03 100644 --- a/WeaselTSF/LanguageBar.cpp +++ b/WeaselTSF/LanguageBar.cpp @@ -302,11 +302,15 @@ void WeaselTSF::_HandleLangBarMenuSelect(UINT wID) else { std::wstring WEASEL_REG_NAME_; + +#ifdef WIN64 + WEASEL_REG_NAME_ = L"Software\\Rime\\Weasel"; +#else if(is_wow64()) WEASEL_REG_NAME_ = L"Software\\WOW6432Node\\Rime\\Weasel"; else WEASEL_REG_NAME_ = L"Software\\Rime\\Weasel"; - +#endif TCHAR szValue[MAX_PATH]; DWORD dwBufLen = MAX_PATH; diff --git a/WeaselTSF/WeaselTSF.vcxproj b/WeaselTSF/WeaselTSF.vcxproj index dadcd2405..89d12f08c 100644 --- a/WeaselTSF/WeaselTSF.vcxproj +++ b/WeaselTSF/WeaselTSF.vcxproj @@ -272,7 +272,7 @@ Disabled $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_WINDOWS;_USRDLL;WEASELTSF_EXPORTS;%(PreprocessorDefinitions) + WIN64;_DEBUG;_WINDOWS;_USRDLL;WEASELTSF_EXPORTS;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -303,7 +303,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;WEASELTSF_EXPORTS;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;WEASELTSF_EXPORTS;%(PreprocessorDefinitions) MultiThreaded true Use @@ -334,7 +334,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;WEASELTSF_EXPORTS;WEASEL_HANT;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;WEASELTSF_EXPORTS;WEASEL_HANT;%(PreprocessorDefinitions) MultiThreaded true Use @@ -366,7 +366,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_WINDOWS;_USRDLL;WEASELTSF_EXPORTS;%(PreprocessorDefinitions) + WIN64;NDEBUG;_WINDOWS;_USRDLL;WEASELTSF_EXPORTS;%(PreprocessorDefinitions) MultiThreaded true Use diff --git a/WeaselTSF/stdafx.h b/WeaselTSF/stdafx.h index 015a7277e..e4e1fc011 100644 --- a/WeaselTSF/stdafx.h +++ b/WeaselTSF/stdafx.h @@ -23,3 +23,14 @@ template using com_ptr = CComPtr; + +// +//#if defined _M_IX86 +//#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='x86' publicKeyToken='6595b64144ccf1df' language='*'\"") +//#elif defined _M_IA64 +//#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='ia64' publicKeyToken='6595b64144ccf1df' language='*'\"") +//#elif defined _M_X64 +//#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='amd64' publicKeyToken='6595b64144ccf1df' language='*'\"") +//#else +//#pragma comment(linker, "/manifestdependency:\"type='win32' name='Microsoft.Windows.Common-Controls' version='6.0.0.0' processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") +//#endif \ No newline at end of file diff --git a/WeaselUI/WeaselUI.vcxproj b/WeaselUI/WeaselUI.vcxproj index 351508662..d880fb61b 100644 --- a/WeaselUI/WeaselUI.vcxproj +++ b/WeaselUI/WeaselUI.vcxproj @@ -179,7 +179,7 @@ Disabled $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + WIN64;_DEBUG;_LIB;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -198,7 +198,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreaded true Use @@ -215,7 +215,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreaded true Use @@ -232,7 +232,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + WIN64;NDEBUG;_LIB;%(PreprocessorDefinitions) MultiThreaded true Use diff --git a/build.bat b/build.bat index e373e6440..57f7d5762 100644 --- a/build.bat +++ b/build.bat @@ -118,7 +118,8 @@ if %build_rime% == 1 ( if errorlevel 1 goto error cd %WEASEL_ROOT% - copy /Y librime\dist\include\rime_*.h include\ +@REM copy /Y librime\dist\include\rime_*.h include\ + copy /Y librime\dist\include\rime_levers_api.h include\ if errorlevel 1 goto error copy /Y librime\dist\lib\rime.lib lib\ if errorlevel 1 goto error diff --git a/env.bat.template b/env.bat.template index 8cc16f1a3..ffb8a1efd 100644 --- a/env.bat.template +++ b/env.bat.template @@ -2,6 +2,7 @@ rem Customize your build environment and save the modified copy to env.bat rem REQUIRED: path to Boost source directory set BOOST_ROOT=C:\Libraries\boost_1_78_0 +set ARCH=x64 rem OPTIONAL: Visual Studio version and platform toolset rem set BJAM_TOOLSET=msvc-14.2 diff --git a/env.vs2019.bat b/env.vs2019.bat index e01e3dc94..c0a45f2ee 100644 --- a/env.vs2019.bat +++ b/env.vs2019.bat @@ -6,7 +6,7 @@ rem REQUIRED: path to Boost source directory if not defined BOOST_ROOT set BOOST_ROOT=%WEASEL_ROOT%\deps\boost_1_78_0 rem OPTIONAL: architecture, Visual Studio version and platform toolset -set ARCH=Win32 +set ARCH=x64 set BJAM_TOOLSET=msvc-14.2 set CMAKE_GENERATOR="Visual Studio 16 2019" set PLATFORM_TOOLSET=v142 diff --git a/env.vs2022.bat b/env.vs2022.bat index f289aa026..7f23f2239 100644 --- a/env.vs2022.bat +++ b/env.vs2022.bat @@ -6,7 +6,7 @@ rem REQUIRED: path to Boost source directory if not defined BOOST_ROOT set BOOST_ROOT=%WEASEL_ROOT%\deps\boost_1_78_0 rem OPTIONAL: architecture, Visual Studio version and platform toolset -set ARCH=Win32 +set ARCH=x64 set BJAM_TOOLSET=msvc-14.3 set CMAKE_GENERATOR="Visual Studio 17 2022" set PLATFORM_TOOLSET=v143 diff --git a/include/PipeChannel.h b/include/PipeChannel.h index 28d394339..7503e4c88 100644 --- a/include/PipeChannel.h +++ b/include/PipeChannel.h @@ -5,6 +5,8 @@ #include #include +using RimeSessionId = UINT64; + namespace weasel { class PipeChannelBase { @@ -50,7 +52,7 @@ namespace weasel { /* Pipe based IPC channel */ template< typename _TyMsg, - typename _TyRes = DWORD, + typename _TyRes = UINT64, size_t _MsgSize = sizeof(_TyMsg), size_t _ResSize = sizeof(_TyRes)> class PipeChannel : public PipeChannelBase diff --git a/include/RimeWithWeasel.h b/include/RimeWithWeasel.h index 5f1d543f9..5f03f2243 100644 --- a/include/RimeWithWeasel.h +++ b/include/RimeWithWeasel.h @@ -26,7 +26,7 @@ struct SessionStatus RimeStatus status; bool __synced; }; -typedef std::map SessionStatusMap; +typedef std::map SessionStatusMap; class RimeWithWeaselHandler : public weasel::RequestHandler { @@ -35,19 +35,19 @@ class RimeWithWeaselHandler : virtual ~RimeWithWeaselHandler(); virtual void Initialize(); virtual void Finalize(); - virtual UINT FindSession(UINT session_id); - virtual UINT AddSession(LPWSTR buffer, EatLine eat = 0); - virtual UINT RemoveSession(UINT session_id); - virtual BOOL ProcessKeyEvent(weasel::KeyEvent keyEvent, UINT session_id, EatLine eat); - virtual void CommitComposition(UINT session_id); - virtual void ClearComposition(UINT session_id); - virtual void SelectCandidateOnCurrentPage(size_t index, UINT session_id); - virtual void FocusIn(DWORD param, UINT session_id); - virtual void FocusOut(DWORD param, UINT session_id); - virtual void UpdateInputPosition(RECT const& rc, UINT session_id); + virtual RimeSessionId FindSession(RimeSessionId session_id); + virtual RimeSessionId AddSession(LPWSTR buffer, EatLine eat = 0); + virtual RimeSessionId RemoveSession(RimeSessionId session_id); + virtual BOOL ProcessKeyEvent(weasel::KeyEvent keyEvent, RimeSessionId session_id, EatLine eat); + virtual void CommitComposition(RimeSessionId session_id); + virtual void ClearComposition(RimeSessionId session_id); + virtual void SelectCandidateOnCurrentPage(size_t index, RimeSessionId session_id); + virtual void FocusIn(DWORD param, RimeSessionId session_id); + virtual void FocusOut(DWORD param, RimeSessionId session_id); + virtual void UpdateInputPosition(RECT const& rc, RimeSessionId session_id); virtual void StartMaintenance(); virtual void EndMaintenance(); - virtual void SetOption(UINT session_id, const std::string &opt, bool val); + virtual void SetOption(RimeSessionId session_id, const std::string &opt, bool val); virtual void UpdateColorTheme(BOOL darkMode); void OnUpdateUI(std::function const &cb); @@ -55,23 +55,23 @@ class RimeWithWeaselHandler : private: void _Setup(); bool _IsDeployerRunning(); - void _UpdateUI(UINT session_id); - void _LoadSchemaSpecificSettings(UINT session_id, const std::string& schema_id); - void _LoadAppInlinePreeditSet(UINT session_id, bool ignore_app_name = false); + void _UpdateUI(RimeSessionId session_id); + void _LoadSchemaSpecificSettings(RimeSessionId session_id, const std::string& schema_id); + void _LoadAppInlinePreeditSet(RimeSessionId session_id, bool ignore_app_name = false); bool _ShowMessage(weasel::Context& ctx, weasel::Status& status); - bool _Respond(UINT session_id, EatLine eat); - void _ReadClientInfo(UINT session_id, LPWSTR buffer); + bool _Respond(RimeSessionId session_id, EatLine eat); + void _ReadClientInfo(RimeSessionId session_id, LPWSTR buffer); void _GetCandidateInfo(weasel::CandidateInfo &cinfo, RimeContext &ctx); - void _GetStatus(weasel::Status &stat, UINT session_id, weasel::Context& ctx); - void _GetContext(weasel::Context &ctx, UINT session_id); + void _GetStatus(weasel::Status &stat, RimeSessionId session_id, weasel::Context& ctx); + void _GetContext(weasel::Context &ctx, RimeSessionId session_id); void _UpdateShowNotifications(RimeConfig* config, bool initialize = false); - bool _IsSessionTSF(UINT session_id); - void _UpdateInlinePreeditStatus(UINT session_id); + bool _IsSessionTSF(RimeSessionId session_id); + void _UpdateInlinePreeditStatus(RimeSessionId session_id); AppOptionsByAppName m_app_options; weasel::UI* m_ui; // reference - UINT m_active_session; + RimeSessionId m_active_session; bool m_disabled; std::string m_last_schema_id; std::string m_last_app_name; @@ -81,7 +81,7 @@ class RimeWithWeaselHandler : std::function _UpdateUICallback; static void OnNotify(void* context_object, - uintptr_t session_id, + RimeSessionId session_id, const char* message_type, const char* message_value); static std::string m_message_type; diff --git a/include/WeaselIPC.h b/include/WeaselIPC.h index 91b869009..edbb05b82 100644 --- a/include/WeaselIPC.h +++ b/include/WeaselIPC.h @@ -4,6 +4,11 @@ #include #include #include +#include +#include + +using RimeSessionId = UINT64; +using PARAM = UINT64; #define WEASEL_IPC_WINDOW L"WeaselIPCWindow_1.0" #define WEASEL_IPC_PIPE_NAME L"WeaselNamedPipe" @@ -36,14 +41,14 @@ namespace weasel { struct PipeMessage { WEASEL_IPC_COMMAND Msg; - UINT wParam; - UINT lParam; + PARAM wParam; + PARAM lParam; }; struct IPCMetadata { enum { WINDOW_CLASS_LENGTH = 64 }; - UINT32 server_hwnd; + UINT64 server_hwnd; WCHAR server_window_class[WINDOW_CLASS_LENGTH]; }; @@ -57,9 +62,9 @@ namespace weasel { *reinterpret_cast(this) = x; } - operator UINT32 const() const + operator UINT const() const { - return *reinterpret_cast(this); + return *reinterpret_cast(this); } }; @@ -71,19 +76,19 @@ namespace weasel virtual ~RequestHandler() {} virtual void Initialize() {} virtual void Finalize() {} - virtual UINT FindSession(UINT session_id) { return 0; } - virtual UINT AddSession(LPWSTR buffer, EatLine eat = 0) { return 0; } - virtual UINT RemoveSession(UINT session_id) { return 0; } - virtual BOOL ProcessKeyEvent(KeyEvent keyEvent, UINT session_id, EatLine eat) { return FALSE; } - virtual void CommitComposition(UINT session_id) {} - virtual void ClearComposition(UINT session_id) {} - virtual void SelectCandidateOnCurrentPage(size_t index, UINT session_id) {} - virtual void FocusIn(DWORD param, UINT session_id) {} - virtual void FocusOut(DWORD param, UINT session_id) {} - virtual void UpdateInputPosition(RECT const& rc, UINT session_id) {} + virtual RimeSessionId FindSession(RimeSessionId session_id) { return 0; } + virtual RimeSessionId AddSession(LPWSTR buffer, EatLine eat = 0) { return 0; } + virtual RimeSessionId RemoveSession(RimeSessionId session_id) { return 0; } + virtual BOOL ProcessKeyEvent(KeyEvent keyEvent, RimeSessionId session_id, EatLine eat) { return FALSE; } + virtual void CommitComposition(RimeSessionId session_id) {} + virtual void ClearComposition(RimeSessionId session_id) {} + virtual void SelectCandidateOnCurrentPage(size_t index, RimeSessionId session_id) {} + virtual void FocusIn(DWORD param, RimeSessionId session_id) {} + virtual void FocusOut(DWORD param, RimeSessionId session_id) {} + virtual void UpdateInputPosition(RECT const& rc, RimeSessionId session_id) {} virtual void StartMaintenance() {} virtual void EndMaintenance() {} - virtual void SetOption(UINT session_id, const std::string &opt, bool val) {} + virtual void SetOption(RimeSessionId session_id, const std::string &opt, bool val) {} virtual void UpdateColorTheme(BOOL darkMode) {} }; @@ -157,7 +162,7 @@ namespace weasel virtual ~Server(); // 初始化服务 - int Start(); + HWND Start(); // 结束服务 int Stop(); // 消息循环 diff --git a/include/rime_api.h b/include/rime_api.h new file mode 100644 index 000000000..1396998f2 --- /dev/null +++ b/include/rime_api.h @@ -0,0 +1,762 @@ +/* + * Copyright RIME Developers + * Distributed under the BSD License + * + * 2011-08-08 GONG Chen v0.9 + * 2013-05-02 GONG Chen v1.0 + */ +#ifndef RIME_API_H_ +#define RIME_API_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include + +#if defined(_WIN32) +#if defined(RIME_EXPORTS) +/* DLL export */ +#define RIME_API __declspec(dllexport) +#elif defined(RIME_IMPORTS) +/* DLL import */ +#define RIME_API __declspec(dllimport) +#else +/* static library */ +#define RIME_API +#endif +#else /* _WIN32 */ +#define RIME_API +#endif /* _WIN32 */ + +using RimeSessionId = uint64_t; + +typedef int Bool; + +#ifndef False +#define False 0 +#endif +#ifndef True +#define True 1 +#endif + +//! Define the max number of candidates +/*! + * \deprecated There is no limit to the number of candidates in RimeMenu + */ +#define RIME_MAX_NUM_CANDIDATES 10 + +// Version control +#define RIME_STRUCT_INIT(Type, var) \ + ((var).data_size = sizeof(Type) - sizeof((var).data_size)) +#define RIME_STRUCT_HAS_MEMBER(var, member) \ + ((int)(sizeof((var).data_size) + (var).data_size) > \ + (char*)&member - (char*)&var) +#define RIME_STRUCT_CLEAR(var) \ + memset((char*)&(var) + sizeof((var).data_size), 0, (var).data_size) + +//! Define a variable of Type +#define RIME_STRUCT(Type, var) \ + Type var = {0}; \ + RIME_STRUCT_INIT(Type, var); + +//! For passing pointer to capnproto builder as opaque pointer through C API. +#define RIME_PROTO_BUILDER void + +//! Rime traits structure +/*! + * Should be initialized by calling RIME_STRUCT_INIT(Type, var) + */ +typedef struct rime_traits_t { + int data_size; + // v0.9 + const char* shared_data_dir; + const char* user_data_dir; + const char* distribution_name; + const char* distribution_code_name; + const char* distribution_version; + // v1.0 + /*! + * Pass a C-string constant in the format "rime.x" + * where 'x' is the name of your application. + * Add prefix "rime." to ensure old log files are automatically cleaned. + */ + const char* app_name; + + //! A list of modules to load before initializing + const char** modules; + // v1.6 + /*! Minimal level of logged messages. + * Value is passed to Glog library using FLAGS_minloglevel variable. + * 0 = INFO (default), 1 = WARNING, 2 = ERROR, 3 = FATAL + */ + int min_log_level; + /*! Directory of log files. + * Value is passed to Glog library using FLAGS_log_dir variable. + * NULL means temporary directory, and "" means only writing to stderr. + */ + const char* log_dir; + //! prebuilt data directory. defaults to ${shared_data_dir}/build + const char* prebuilt_data_dir; + //! staging directory. defaults to ${user_data_dir}/build + const char* staging_dir; +} RimeTraits; + +typedef struct { + int length; + int cursor_pos; + int sel_start; + int sel_end; + char* preedit; +} RimeComposition; + +typedef struct rime_candidate_t { + char* text; + char* comment; + void* reserved; +} RimeCandidate; + +typedef struct { + int page_size; + int page_no; + Bool is_last_page; + int highlighted_candidate_index; + int num_candidates; + RimeCandidate* candidates; + char* select_keys; +} RimeMenu; + +/*! + * Should be initialized by calling RIME_STRUCT_INIT(Type, var); + */ +typedef struct rime_commit_t { + int data_size; + // v0.9 + char* text; +} RimeCommit; + +/*! + * Should be initialized by calling RIME_STRUCT_INIT(Type, var); + */ +typedef struct rime_context_t { + int data_size; + // v0.9 + RimeComposition composition; + RimeMenu menu; + // v0.9.2 + char* commit_text_preview; + char** select_labels; +} RimeContext; + +/*! + * Should be initialized by calling RIME_STRUCT_INIT(Type, var); + */ +typedef struct rime_status_t { + int data_size; + // v0.9 + char* schema_id; + char* schema_name; + Bool is_disabled; + Bool is_composing; + Bool is_ascii_mode; + Bool is_full_shape; + Bool is_simplified; + Bool is_traditional; + Bool is_ascii_punct; + Bool is_s2t; + Bool is_prediction; +} RimeStatus; + +typedef struct rime_candidate_list_iterator_t { + void* ptr; + int index; + RimeCandidate candidate; +} RimeCandidateListIterator; + +typedef struct rime_config_t { + void* ptr; +} RimeConfig; + +typedef struct rime_config_iterator_t { + void* list; + void* map; + int index; + const char* key; + const char* path; +} RimeConfigIterator; + +typedef struct rime_schema_list_item_t { + char* schema_id; + char* name; + void* reserved; +} RimeSchemaListItem; + +typedef struct rime_schema_list_t { + size_t size; + RimeSchemaListItem* list; +} RimeSchemaList; + +typedef void (*RimeNotificationHandler)(void* context_object, + RimeSessionId session_id, + const char* message_type, + const char* message_value); + +typedef struct rime_string_slice_t { + const char* str; + size_t length; +} RimeStringSlice; + +// Setup + +/*! + * Call this function before accessing any other API. + */ +RIME_API void RimeSetup(RimeTraits* traits); + +/*! + * Pass a C-string constant in the format "rime.x" + * where 'x' is the name of your application. + * Add prefix "rime." to ensure old log files are automatically cleaned. + * \deprecated Use RimeSetup() instead. + */ +RIME_API void RimeSetupLogging(const char* app_name); + +//! Receive notifications +/*! + * - on loading schema: + * + message_type="schema", message_value="luna_pinyin/Luna Pinyin" + * - on changing mode: + * + message_type="option", message_value="ascii_mode" + * + message_type="option", message_value="!ascii_mode" + * - on deployment: + * + session_id = 0, message_type="deploy", message_value="start" + * + session_id = 0, message_type="deploy", message_value="success" + * + session_id = 0, message_type="deploy", message_value="failure" + * + * handler will be called with context_object as the first parameter + * every time an event occurs in librime, until RimeFinalize() is called. + * when handler is NULL, notification is disabled. + */ +RIME_API void RimeSetNotificationHandler(RimeNotificationHandler handler, + void* context_object); + +// Entry and exit + +RIME_API void RimeInitialize(RimeTraits* traits); +RIME_API void RimeFinalize(void); + +RIME_API Bool RimeStartMaintenance(Bool full_check); + +//! \deprecated Use RimeStartMaintenance(full_check = False) instead. +RIME_API Bool RimeStartMaintenanceOnWorkspaceChange(void); +RIME_API Bool RimeIsMaintenancing(void); +RIME_API void RimeJoinMaintenanceThread(void); + +// Deployment + +RIME_API void RimeDeployerInitialize(RimeTraits* traits); +RIME_API Bool RimePrebuildAllSchemas(void); +RIME_API Bool RimeDeployWorkspace(void); +RIME_API Bool RimeDeploySchema(const char* schema_file); +RIME_API Bool RimeDeployConfigFile(const char* file_name, + const char* version_key); + +RIME_API Bool RimeSyncUserData(void); + +// Session management + +RIME_API RimeSessionId RimeCreateSession(void); +RIME_API Bool RimeFindSession(RimeSessionId session_id); +RIME_API Bool RimeDestroySession(RimeSessionId session_id); +RIME_API void RimeCleanupStaleSessions(void); +RIME_API void RimeCleanupAllSessions(void); + +// Input + +RIME_API Bool RimeProcessKey(RimeSessionId session_id, int keycode, int mask); +/*! + * return True if there is unread commit text + */ +RIME_API Bool RimeCommitComposition(RimeSessionId session_id); +RIME_API void RimeClearComposition(RimeSessionId session_id); + +// Output + +RIME_API Bool RimeGetCommit(RimeSessionId session_id, RimeCommit* commit); +RIME_API Bool RimeFreeCommit(RimeCommit* commit); +RIME_API Bool RimeGetContext(RimeSessionId session_id, RimeContext* context); +RIME_API Bool RimeFreeContext(RimeContext* context); +RIME_API Bool RimeGetStatus(RimeSessionId session_id, RimeStatus* status); +RIME_API Bool RimeFreeStatus(RimeStatus* status); + +// Accessing candidate list +RIME_API Bool RimeCandidateListBegin(RimeSessionId session_id, + RimeCandidateListIterator* iterator); +RIME_API Bool RimeCandidateListNext(RimeCandidateListIterator* iterator); +RIME_API void RimeCandidateListEnd(RimeCandidateListIterator* iterator); +RIME_API Bool RimeCandidateListFromIndex(RimeSessionId session_id, + RimeCandidateListIterator* iterator, + int index); +RIME_API Bool RimeSelectCandidate(RimeSessionId session_id, size_t index); +RIME_API Bool RimeSelectCandidateOnCurrentPage(RimeSessionId session_id, + size_t index); +RIME_API Bool RimeDeleteCandidate(RimeSessionId session_id, size_t index); +RIME_API Bool RimeDeleteCandidateOnCurrentPage(RimeSessionId session_id, + size_t index); + +// Runtime options + +RIME_API void RimeSetOption(RimeSessionId session_id, + const char* option, + Bool value); +RIME_API Bool RimeGetOption(RimeSessionId session_id, const char* option); + +RIME_API void RimeSetProperty(RimeSessionId session_id, + const char* prop, + const char* value); +RIME_API Bool RimeGetProperty(RimeSessionId session_id, + const char* prop, + char* value, + size_t buffer_size); + +RIME_API Bool RimeGetSchemaList(RimeSchemaList* schema_list); +RIME_API void RimeFreeSchemaList(RimeSchemaList* schema_list); +RIME_API Bool RimeGetCurrentSchema(RimeSessionId session_id, + char* schema_id, + size_t buffer_size); +RIME_API Bool RimeSelectSchema(RimeSessionId session_id, const char* schema_id); + +// Configuration + +// .schema.yaml +RIME_API Bool RimeSchemaOpen(const char* schema_id, RimeConfig* config); +// .yaml +RIME_API Bool RimeConfigOpen(const char* config_id, RimeConfig* config); +// access config files in user data directory, eg. user.yaml and +// installation.yaml +RIME_API Bool RimeUserConfigOpen(const char* config_id, RimeConfig* config); +RIME_API Bool RimeConfigClose(RimeConfig* config); +RIME_API Bool RimeConfigInit(RimeConfig* config); +RIME_API Bool RimeConfigLoadString(RimeConfig* config, const char* yaml); +// Access config values +RIME_API Bool RimeConfigGetBool(RimeConfig* config, + const char* key, + Bool* value); +RIME_API Bool RimeConfigGetInt(RimeConfig* config, const char* key, int* value); +RIME_API Bool RimeConfigGetDouble(RimeConfig* config, + const char* key, + double* value); +RIME_API Bool RimeConfigGetString(RimeConfig* config, + const char* key, + char* value, + size_t buffer_size); +RIME_API const char* RimeConfigGetCString(RimeConfig* config, const char* key); +RIME_API Bool RimeConfigSetBool(RimeConfig* config, + const char* key, + Bool value); +RIME_API Bool RimeConfigSetInt(RimeConfig* config, const char* key, int value); +RIME_API Bool RimeConfigSetDouble(RimeConfig* config, + const char* key, + double value); +RIME_API Bool RimeConfigSetString(RimeConfig* config, + const char* key, + const char* value); +// Manipulate complex structures +RIME_API Bool RimeConfigGetItem(RimeConfig* config, + const char* key, + RimeConfig* value); +RIME_API Bool RimeConfigSetItem(RimeConfig* config, + const char* key, + RimeConfig* value); +RIME_API Bool RimeConfigClear(RimeConfig* config, const char* key); +RIME_API Bool RimeConfigCreateList(RimeConfig* config, const char* key); +RIME_API Bool RimeConfigCreateMap(RimeConfig* config, const char* key); +RIME_API size_t RimeConfigListSize(RimeConfig* config, const char* key); +RIME_API Bool RimeConfigBeginList(RimeConfigIterator* iterator, + RimeConfig* config, + const char* key); +RIME_API Bool RimeConfigBeginMap(RimeConfigIterator* iterator, + RimeConfig* config, + const char* key); +RIME_API Bool RimeConfigNext(RimeConfigIterator* iterator); +RIME_API void RimeConfigEnd(RimeConfigIterator* iterator); +// Utilities +RIME_API Bool RimeConfigUpdateSignature(RimeConfig* config, const char* signer); + +// Testing + +RIME_API Bool RimeSimulateKeySequence(RimeSessionId session_id, + const char* key_sequence); + +RIME_API Bool RimeSetInput(RimeSessionId session_id, const char* input); +// Module + +/*! + * Extend the structure to publish custom data/functions in your specific + * module + */ +typedef struct rime_custom_api_t { + int data_size; +} RimeCustomApi; + +typedef struct rime_module_t { + int data_size; + + const char* module_name; + void (*initialize)(void); + void (*finalize)(void); + RimeCustomApi* (*get_api)(void); +} RimeModule; + +RIME_API Bool RimeRegisterModule(RimeModule* module); +RIME_API RimeModule* RimeFindModule(const char* module_name); + +//! Run a registered task +RIME_API Bool RimeRunTask(const char* task_name); + +//! \deprecated use RimeApi::get_shared_data_dir_s instead. +RIME_API const char* RimeGetSharedDataDir(void); +//! \deprecated use RimeApi::get_user_data_dir_s instead. +RIME_API const char* RimeGetUserDataDir(void); +//! \deprecated use RimeApi::get_sync_dir_s instead. +RIME_API const char* RimeGetSyncDir(void); + +RIME_API const char* RimeGetUserId(void); + +/*! The API structure + * RimeApi is for rime v1.0+ + */ +typedef struct rime_api_t { + int data_size; + + /*! setup + * Call this function before accessing any other API functions. + */ + void (*setup)(RimeTraits* traits); + + /*! Set up the notification callbacks + * Receive notifications + * - on loading schema: + * + message_type="schema", message_value="luna_pinyin/Luna Pinyin" + * - on changing mode: + * + message_type="option", message_value="ascii_mode" + * + message_type="option", message_value="!ascii_mode" + * - on deployment: + * + session_id = 0, message_type="deploy", message_value="start" + * + session_id = 0, message_type="deploy", message_value="success" + * + session_id = 0, message_type="deploy", message_value="failure" + * + * handler will be called with context_object as the first parameter + * every time an event occurs in librime, until RimeFinalize() is called. + * when handler is NULL, notification is disabled. + */ + void (*set_notification_handler)(RimeNotificationHandler handler, + void* context_object); + + // entry and exit + + void (*initialize)(RimeTraits* traits); + void (*finalize)(void); + + Bool (*start_maintenance)(Bool full_check); + Bool (*is_maintenance_mode)(void); + void (*join_maintenance_thread)(void); + + // deployment + + void (*deployer_initialize)(RimeTraits* traits); + Bool (*prebuild)(void); + Bool (*deploy)(void); + Bool (*deploy_schema)(const char* schema_file); + Bool (*deploy_config_file)(const char* file_name, const char* version_key); + + Bool (*sync_user_data)(void); + + // session management + + RimeSessionId (*create_session)(void); + Bool (*find_session)(RimeSessionId session_id); + Bool (*destroy_session)(RimeSessionId session_id); + void (*cleanup_stale_sessions)(void); + void (*cleanup_all_sessions)(void); + + // input + + Bool (*process_key)(RimeSessionId session_id, int keycode, int mask); + // return True if there is unread commit text + Bool (*commit_composition)(RimeSessionId session_id); + void (*clear_composition)(RimeSessionId session_id); + + // output + + Bool (*get_commit)(RimeSessionId session_id, RimeCommit* commit); + Bool (*free_commit)(RimeCommit* commit); + Bool (*get_context)(RimeSessionId session_id, RimeContext* context); + Bool (*free_context)(RimeContext* ctx); + Bool (*get_status)(RimeSessionId session_id, RimeStatus* status); + Bool (*free_status)(RimeStatus* status); + + // runtime options + + void (*set_option)(RimeSessionId session_id, const char* option, Bool value); + Bool (*get_option)(RimeSessionId session_id, const char* option); + + void (*set_property)(RimeSessionId session_id, + const char* prop, + const char* value); + Bool (*get_property)(RimeSessionId session_id, + const char* prop, + char* value, + size_t buffer_size); + + Bool (*get_schema_list)(RimeSchemaList* schema_list); + void (*free_schema_list)(RimeSchemaList* schema_list); + + Bool (*get_current_schema)(RimeSessionId session_id, + char* schema_id, + size_t buffer_size); + Bool (*select_schema)(RimeSessionId session_id, const char* schema_id); + + // configuration + + Bool (*schema_open)(const char* schema_id, RimeConfig* config); + Bool (*config_open)(const char* config_id, RimeConfig* config); + Bool (*config_close)(RimeConfig* config); + Bool (*config_get_bool)(RimeConfig* config, const char* key, Bool* value); + Bool (*config_get_int)(RimeConfig* config, const char* key, int* value); + Bool (*config_get_double)(RimeConfig* config, const char* key, double* value); + Bool (*config_get_string)(RimeConfig* config, + const char* key, + char* value, + size_t buffer_size); + const char* (*config_get_cstring)(RimeConfig* config, const char* key); + Bool (*config_update_signature)(RimeConfig* config, const char* signer); + Bool (*config_begin_map)(RimeConfigIterator* iterator, + RimeConfig* config, + const char* key); + Bool (*config_next)(RimeConfigIterator* iterator); + void (*config_end)(RimeConfigIterator* iterator); + + // testing + + Bool (*simulate_key_sequence)(RimeSessionId session_id, + const char* key_sequence); + + // module + + Bool (*register_module)(RimeModule* module); + RimeModule* (*find_module)(const char* module_name); + + Bool (*run_task)(const char* task_name); + + //! \deprecated use get_shared_data_dir_s instead. + const char* (*get_shared_data_dir)(void); + //! \deprecated use get_user_data_dir_s instead. + const char* (*get_user_data_dir)(void); + //! \deprecated use get_sync_dir_s instead. + const char* (*get_sync_dir)(void); + + const char* (*get_user_id)(void); + void (*get_user_data_sync_dir)(char* dir, size_t buffer_size); + + //! initialize an empty config object + /*! + * should call config_close() to free the object + */ + Bool (*config_init)(RimeConfig* config); + //! deserialize config from a yaml string + Bool (*config_load_string)(RimeConfig* config, const char* yaml); + + // configuration: setters + Bool (*config_set_bool)(RimeConfig* config, const char* key, Bool value); + Bool (*config_set_int)(RimeConfig* config, const char* key, int value); + Bool (*config_set_double)(RimeConfig* config, const char* key, double value); + Bool (*config_set_string)(RimeConfig* config, + const char* key, + const char* value); + + // configuration: manipulating complex structures + Bool (*config_get_item)(RimeConfig* config, + const char* key, + RimeConfig* value); + Bool (*config_set_item)(RimeConfig* config, + const char* key, + RimeConfig* value); + Bool (*config_clear)(RimeConfig* config, const char* key); + Bool (*config_create_list)(RimeConfig* config, const char* key); + Bool (*config_create_map)(RimeConfig* config, const char* key); + size_t (*config_list_size)(RimeConfig* config, const char* key); + Bool (*config_begin_list)(RimeConfigIterator* iterator, + RimeConfig* config, + const char* key); + + //! get raw input + /*! + * NULL is returned if session does not exist. + * the returned pointer to input string will become invalid upon editing. + */ + const char* (*get_input)(RimeSessionId session_id); + + //! caret position in terms of raw input + size_t (*get_caret_pos)(RimeSessionId session_id); + + //! select a candidate at the given index in candidate list. + Bool (*select_candidate)(RimeSessionId session_id, size_t index); + + //! get the version of librime + const char* (*get_version)(void); + + //! set caret position in terms of raw input + void (*set_caret_pos)(RimeSessionId session_id, size_t caret_pos); + + //! select a candidate from current page. + Bool (*select_candidate_on_current_page)(RimeSessionId session_id, + size_t index); + + //! access candidate list. + Bool (*candidate_list_begin)(RimeSessionId session_id, + RimeCandidateListIterator* iterator); + Bool (*candidate_list_next)(RimeCandidateListIterator* iterator); + void (*candidate_list_end)(RimeCandidateListIterator* iterator); + + //! access config files in user data directory, eg. user.yaml and + //! installation.yaml + Bool (*user_config_open)(const char* config_id, RimeConfig* config); + + Bool (*candidate_list_from_index)(RimeSessionId session_id, + RimeCandidateListIterator* iterator, + int index); + + //! prebuilt data directory. + //! \deprecated use get_prebuilt_data_dir_s instead. + const char* (*get_prebuilt_data_dir)(void); + //! staging directory, stores data files deployed to a Rime client. + //! \deprecated use get_staging_dir_s instead. + const char* (*get_staging_dir)(void); + + //! \deprecated for capnproto API, use "proto" module from librime-proto + //! plugin. + void (*commit_proto)(RimeSessionId session_id, + RIME_PROTO_BUILDER* commit_builder); + void (*context_proto)(RimeSessionId session_id, + RIME_PROTO_BUILDER* context_builder); + void (*status_proto)(RimeSessionId session_id, + RIME_PROTO_BUILDER* status_builder); + + const char* (*get_state_label)(RimeSessionId session_id, + const char* option_name, + Bool state); + + //! delete a candidate at the given index in candidate list. + Bool (*delete_candidate)(RimeSessionId session_id, size_t index); + //! delete a candidate from current page. + Bool (*delete_candidate_on_current_page)(RimeSessionId session_id, + size_t index); + + RimeStringSlice (*get_state_label_abbreviated)(RimeSessionId session_id, + const char* option_name, + Bool state, + Bool abbreviated); + + Bool (*set_input)(RimeSessionId session_id, const char* input); + + void (*get_shared_data_dir_s)(char* dir, size_t buffer_size); + void (*get_user_data_dir_s)(char* dir, size_t buffer_size); + void (*get_prebuilt_data_dir_s)(char* dir, size_t buffer_size); + void (*get_staging_dir_s)(char* dir, size_t buffer_size); + void (*get_sync_dir_s)(char* dir, size_t buffer_size); + + //! highlight a selection without committing + Bool (*highlight_candidate)(RimeSessionId session_id, size_t index); + //! highlight a selection without committing + Bool (*highlight_candidate_on_current_page)(RimeSessionId session_id, size_t index); + + Bool (*change_page)(RimeSessionId session_id, Bool backward); +} RimeApi; + +//! API entry +/*! + * Acquire the version controlled RimeApi structure. + */ +RIME_API RimeApi* rime_get_api(void); + +//! Clients should test if an api function is available in the current version +//! before calling it. +#define RIME_API_AVAILABLE(api, func) \ + (RIME_STRUCT_HAS_MEMBER(*(api), (api)->func) && (api)->func) + +// Initializer for MSVC and GCC. +// 2010 Joe Lowe. Released into the public domain. +#if defined(__GNUC__) +#define RIME_MODULE_INITIALIZER(f) \ + static void f(void) __attribute__((constructor)); \ + static void f(void) +#elif defined(_MSC_VER) +#pragma section(".CRT$XCU", read) +#define RIME_MODULE_INITIALIZER(f) \ + static void __cdecl f(void); \ + __declspec(allocate(".CRT$XCU")) void(__cdecl * f##_)(void) = f; \ + static void __cdecl f(void) +#endif + +/*! + * Automatically register a rime module when the library is loaded. + * Clients should define functions called rime__initialize(), + * and rime__finalize(). + * \sa core_module.cc for an example. + */ +#define RIME_REGISTER_MODULE(name) \ + void rime_require_module_##name() {} \ + RIME_MODULE_INITIALIZER(rime_register_module_##name) { \ + static RimeModule module = {0}; \ + if (!module.data_size) { \ + RIME_STRUCT_INIT(RimeModule, module); \ + module.module_name = #name; \ + module.initialize = rime_##name##_initialize; \ + module.finalize = rime_##name##_finalize; \ + } \ + RimeRegisterModule(&module); \ + } + +/*! + * Customize the module by assigning additional functions, eg. module->get_api. + */ +#define RIME_REGISTER_CUSTOM_MODULE(name) \ + void rime_require_module_##name() {} \ + static void rime_customize_module_##name(RimeModule* module); \ + RIME_MODULE_INITIALIZER(rime_register_module_##name) { \ + static RimeModule module = {0}; \ + if (!module.data_size) { \ + RIME_STRUCT_INIT(RimeModule, module); \ + module.module_name = #name; \ + module.initialize = rime_##name##_initialize; \ + module.finalize = rime_##name##_finalize; \ + rime_customize_module_##name(&module); \ + } \ + RimeRegisterModule(&module); \ + } \ + static void rime_customize_module_##name(RimeModule* module) + +/*! + * Defines a constant for a list of module names. + */ +#define RIME_MODULE_LIST(var, ...) const char* var[] = {__VA_ARGS__, NULL} + +/*! + * Register a phony module which, when loaded, will load a list of modules. + * \sa setup.cc for an example. + */ +#define RIME_REGISTER_MODULE_GROUP(name, ...) \ + static RIME_MODULE_LIST(rime_##name##_module_group, __VA_ARGS__); \ + static void rime_##name##_initialize() { \ + rime::LoadModules(rime_##name##_module_group); \ + } \ + static void rime_##name##_finalize() {} \ + RIME_REGISTER_MODULE(name) + +#ifdef __cplusplus +} +#endif + +#endif // RIME_API_H_ diff --git a/lib/WinSparkle.lib b/lib/WinSparkle.lib index c56f3146c..5e94ee2d6 100644 Binary files a/lib/WinSparkle.lib and b/lib/WinSparkle.lib differ diff --git a/librime b/librime index 6546689a2..295cb2ab6 160000 --- a/librime +++ b/librime @@ -1 +1 @@ -Subproject commit 6546689a2c9061860a0af5fa1209f9e8ea7d2132 +Subproject commit 295cb2ab68f89ee9d3237c7d4b8033bda3f3b635 diff --git a/output/WinSparkle.dll b/output/WinSparkle.dll index c1faae497..94aced111 100644 Binary files a/output/WinSparkle.dll and b/output/WinSparkle.dll differ diff --git a/output/install.nsi b/output/install.nsi index 3ff59f57f..b8cf40ba7 100644 --- a/output/install.nsi +++ b/output/install.nsi @@ -3,6 +3,7 @@ !include LogicLib.nsh !include MUI2.nsh !include x64.nsh +!define LIBRARY_X64 Unicode true @@ -38,7 +39,7 @@ VIAddVersionKey /LANG=2052 "FileVersion" "${WEASEL_VERSION}" SetCompressor /SOLID lzma ; The default installation directory -InstallDir $PROGRAMFILES\Rime +InstallDir $PROGRAMFILES64\Rime ; Registry key to check for directory (so if you install again, it will ; overwrite the old one automatically) @@ -142,6 +143,8 @@ Section "Weasel" SectionIn RO + SetRegView 64 + ; Write the new installation path into the registry WriteRegStr HKLM SOFTWARE\Rime\Weasel "InstallDir" "$INSTDIR" @@ -282,6 +285,7 @@ Section "Uninstall" ExecWait '"$INSTDIR\WeaselSetup.exe" /u' ; Remove registry keys + SetRegView 64 DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Weasel" DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" "WeaselServer" DeleteRegKey HKLM SOFTWARE\Rime diff --git a/test/TestResponseParser/TestResponseParser.vcxproj b/test/TestResponseParser/TestResponseParser.vcxproj index 932632743..601edb04c 100644 --- a/test/TestResponseParser/TestResponseParser.vcxproj +++ b/test/TestResponseParser/TestResponseParser.vcxproj @@ -234,7 +234,7 @@ Disabled $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -258,7 +258,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) MultiThreaded true @@ -273,6 +273,7 @@ true true MachineX64 + $(SolutionDir)\lib;$(BOOST_ROOT)\stage\lib;$(SolutionDir)\librime\build\lib\Release;%(AdditionalLibraryDirectories) @@ -283,7 +284,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) MultiThreaded true @@ -308,7 +309,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) MultiThreaded true diff --git a/test/TestWeaselIPC/TestWeaselIPC.vcxproj b/test/TestWeaselIPC/TestWeaselIPC.vcxproj index 951847288..e62d7c7a6 100644 --- a/test/TestWeaselIPC/TestWeaselIPC.vcxproj +++ b/test/TestWeaselIPC/TestWeaselIPC.vcxproj @@ -233,7 +233,7 @@ Disabled $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN64;_DEBUG;_CONSOLE;%(PreprocessorDefinitions) true EnableFastChecks MultiThreadedDebug @@ -257,7 +257,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) MultiThreaded true Use @@ -271,6 +271,7 @@ true true MachineX64 + $(SolutionDir)\lib;$(BOOST_ROOT)\stage\lib;$(SolutionDir)\librime\build\lib\Release;%(AdditionalLibraryDirectories) @@ -281,7 +282,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) MultiThreaded true Use @@ -305,7 +306,7 @@ MaxSpeed true $(SolutionDir)\include;$(BOOST_ROOT);%(AdditionalIncludeDirectories) - WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) + WIN64;NDEBUG;_CONSOLE;%(PreprocessorDefinitions) MultiThreaded true Use diff --git a/weasel.sln b/weasel.sln index 7c90e714c..81ddd8de4 100644 --- a/weasel.sln +++ b/weasel.sln @@ -101,63 +101,67 @@ Global {A958FE3D-9F6E-44CB-981E-F2AE181657B3}.ReleaseHant|Win32.Build.0 = ReleaseHant|Win32 {A958FE3D-9F6E-44CB-981E-F2AE181657B3}.ReleaseHant|x64.ActiveCfg = ReleaseHant|x64 {A958FE3D-9F6E-44CB-981E-F2AE181657B3}.ReleaseHant|x64.Build.0 = ReleaseHant|x64 - {A68C2A5C-D74D-4CB2-9E22-A4D2FC256A2D}.Debug|Win32.ActiveCfg = Debug|Win32 - {A68C2A5C-D74D-4CB2-9E22-A4D2FC256A2D}.Debug|Win32.Build.0 = Debug|Win32 {A68C2A5C-D74D-4CB2-9E22-A4D2FC256A2D}.Debug|x64.ActiveCfg = Debug|x64 - {A68C2A5C-D74D-4CB2-9E22-A4D2FC256A2D}.Release|Win32.ActiveCfg = Release|Win32 - {A68C2A5C-D74D-4CB2-9E22-A4D2FC256A2D}.Release|Win32.Build.0 = Release|Win32 + {A68C2A5C-D74D-4CB2-9E22-A4D2FC256A2D}.Debug|x64.Build.0 = Debug|x64 + {A68C2A5C-D74D-4CB2-9E22-A4D2FC256A2D}.Debug|Win32.ActiveCfg = Debug|Win32 {A68C2A5C-D74D-4CB2-9E22-A4D2FC256A2D}.Release|x64.ActiveCfg = Release|x64 + {A68C2A5C-D74D-4CB2-9E22-A4D2FC256A2D}.Release|x64.Build.0 = Release|x64 + {A68C2A5C-D74D-4CB2-9E22-A4D2FC256A2D}.Release|Win32.ActiveCfg = Release|Win32 {A68C2A5C-D74D-4CB2-9E22-A4D2FC256A2D}.ReleaseHant|Win32.ActiveCfg = ReleaseHant|Win32 {A68C2A5C-D74D-4CB2-9E22-A4D2FC256A2D}.ReleaseHant|x64.ActiveCfg = ReleaseHant|x64 - {9C1CC4BA-18FF-4890-908E-E545881C5586}.Debug|Win32.ActiveCfg = Debug|Win32 - {9C1CC4BA-18FF-4890-908E-E545881C5586}.Debug|Win32.Build.0 = Debug|Win32 {9C1CC4BA-18FF-4890-908E-E545881C5586}.Debug|x64.ActiveCfg = Debug|x64 - {9C1CC4BA-18FF-4890-908E-E545881C5586}.Release|Win32.ActiveCfg = Release|Win32 - {9C1CC4BA-18FF-4890-908E-E545881C5586}.Release|Win32.Build.0 = Release|Win32 + {9C1CC4BA-18FF-4890-908E-E545881C5586}.Debug|x64.Build.0 = Debug|x64 + {9C1CC4BA-18FF-4890-908E-E545881C5586}.Debug|Win32.ActiveCfg = Debug|Win32 {9C1CC4BA-18FF-4890-908E-E545881C5586}.Release|x64.ActiveCfg = Release|x64 + {9C1CC4BA-18FF-4890-908E-E545881C5586}.Release|x64.Build.0 = Release|x64 + {9C1CC4BA-18FF-4890-908E-E545881C5586}.Release|Win32.ActiveCfg = Release|Win32 {9C1CC4BA-18FF-4890-908E-E545881C5586}.ReleaseHant|Win32.ActiveCfg = ReleaseHant|Win32 {9C1CC4BA-18FF-4890-908E-E545881C5586}.ReleaseHant|x64.ActiveCfg = ReleaseHant|x64 {26930622-CFA2-43DF-A9F3-4AA4A313B2A4}.Debug|Win32.ActiveCfg = Debug|Win32 {26930622-CFA2-43DF-A9F3-4AA4A313B2A4}.Debug|Win32.Build.0 = Debug|Win32 {26930622-CFA2-43DF-A9F3-4AA4A313B2A4}.Debug|x64.ActiveCfg = Debug|x64 + {26930622-CFA2-43DF-A9F3-4AA4A313B2A4}.Debug|x64.Build.0 = Debug|x64 {26930622-CFA2-43DF-A9F3-4AA4A313B2A4}.Release|Win32.ActiveCfg = Release|Win32 {26930622-CFA2-43DF-A9F3-4AA4A313B2A4}.Release|Win32.Build.0 = Release|Win32 {26930622-CFA2-43DF-A9F3-4AA4A313B2A4}.Release|x64.ActiveCfg = Release|x64 + {26930622-CFA2-43DF-A9F3-4AA4A313B2A4}.Release|x64.Build.0 = Release|x64 {26930622-CFA2-43DF-A9F3-4AA4A313B2A4}.ReleaseHant|Win32.ActiveCfg = ReleaseHant|Win32 {26930622-CFA2-43DF-A9F3-4AA4A313B2A4}.ReleaseHant|x64.ActiveCfg = ReleaseHant|x64 - {CC642427-64D7-44D9-8543-8CBBF981FAE7}.Debug|Win32.ActiveCfg = Debug|Win32 - {CC642427-64D7-44D9-8543-8CBBF981FAE7}.Debug|Win32.Build.0 = Debug|Win32 {CC642427-64D7-44D9-8543-8CBBF981FAE7}.Debug|x64.ActiveCfg = Debug|x64 - {CC642427-64D7-44D9-8543-8CBBF981FAE7}.Release|Win32.ActiveCfg = Release|Win32 - {CC642427-64D7-44D9-8543-8CBBF981FAE7}.Release|Win32.Build.0 = Release|Win32 + {CC642427-64D7-44D9-8543-8CBBF981FAE7}.Debug|x64.Build.0 = Debug|x64 + {CC642427-64D7-44D9-8543-8CBBF981FAE7}.Debug|Win32.ActiveCfg = Debug|Win32 {CC642427-64D7-44D9-8543-8CBBF981FAE7}.Release|x64.ActiveCfg = Release|x64 + {CC642427-64D7-44D9-8543-8CBBF981FAE7}.Release|x64.Build.0 = Release|x64 + {CC642427-64D7-44D9-8543-8CBBF981FAE7}.Release|Win32.ActiveCfg = Release|Win32 {CC642427-64D7-44D9-8543-8CBBF981FAE7}.ReleaseHant|Win32.ActiveCfg = ReleaseHant|Win32 {CC642427-64D7-44D9-8543-8CBBF981FAE7}.ReleaseHant|x64.ActiveCfg = ReleaseHant|x64 {1C497821-BD63-4F02-9094-32B185B62F23}.Debug|Win32.ActiveCfg = Debug|Win32 {1C497821-BD63-4F02-9094-32B185B62F23}.Debug|Win32.Build.0 = Debug|Win32 {1C497821-BD63-4F02-9094-32B185B62F23}.Debug|x64.ActiveCfg = Debug|x64 + {1C497821-BD63-4F02-9094-32B185B62F23}.Debug|x64.Build.0 = Debug|x64 {1C497821-BD63-4F02-9094-32B185B62F23}.Release|Win32.ActiveCfg = Release|Win32 {1C497821-BD63-4F02-9094-32B185B62F23}.Release|Win32.Build.0 = Release|Win32 {1C497821-BD63-4F02-9094-32B185B62F23}.Release|x64.ActiveCfg = Release|x64 + {1C497821-BD63-4F02-9094-32B185B62F23}.Release|x64.Build.0 = Release|x64 {1C497821-BD63-4F02-9094-32B185B62F23}.ReleaseHant|Win32.ActiveCfg = ReleaseHant|Win32 {1C497821-BD63-4F02-9094-32B185B62F23}.ReleaseHant|x64.ActiveCfg = ReleaseHant|x64 + {F53F3E9C-CC4D-4D1D-9C2E-719FE60A7E6B}.Debug|x64.ActiveCfg = Debug|x64 + {F53F3E9C-CC4D-4D1D-9C2E-719FE60A7E6B}.Debug|x64.Build.0 = Debug|x64 {F53F3E9C-CC4D-4D1D-9C2E-719FE60A7E6B}.Debug|Win32.ActiveCfg = Debug|Win32 - {F53F3E9C-CC4D-4D1D-9C2E-719FE60A7E6B}.Debug|Win32.Build.0 = Debug|Win32 - {F53F3E9C-CC4D-4D1D-9C2E-719FE60A7E6B}.Debug|x64.ActiveCfg = Debug|Win32 + {F53F3E9C-CC4D-4D1D-9C2E-719FE60A7E6B}.Release|x64.ActiveCfg = Release|x64 + {F53F3E9C-CC4D-4D1D-9C2E-719FE60A7E6B}.Release|x64.Build.0 = Release|x64 {F53F3E9C-CC4D-4D1D-9C2E-719FE60A7E6B}.Release|Win32.ActiveCfg = Release|Win32 - {F53F3E9C-CC4D-4D1D-9C2E-719FE60A7E6B}.Release|Win32.Build.0 = Release|Win32 - {F53F3E9C-CC4D-4D1D-9C2E-719FE60A7E6B}.Release|x64.ActiveCfg = Release|Win32 {F53F3E9C-CC4D-4D1D-9C2E-719FE60A7E6B}.ReleaseHant|Win32.ActiveCfg = Release|Win32 - {F53F3E9C-CC4D-4D1D-9C2E-719FE60A7E6B}.ReleaseHant|x64.ActiveCfg = Release|Win32 + {F53F3E9C-CC4D-4D1D-9C2E-719FE60A7E6B}.ReleaseHant|x64.ActiveCfg = Release|x64 + {39F6E3F5-8F0B-4023-BC40-A66AE6C37095}.Debug|x64.ActiveCfg = Debug|x64 + {39F6E3F5-8F0B-4023-BC40-A66AE6C37095}.Debug|x64.Build.0 = Debug|x64 {39F6E3F5-8F0B-4023-BC40-A66AE6C37095}.Debug|Win32.ActiveCfg = Debug|Win32 - {39F6E3F5-8F0B-4023-BC40-A66AE6C37095}.Debug|Win32.Build.0 = Debug|Win32 - {39F6E3F5-8F0B-4023-BC40-A66AE6C37095}.Debug|x64.ActiveCfg = Debug|Win32 + {39F6E3F5-8F0B-4023-BC40-A66AE6C37095}.Release|x64.ActiveCfg = Release|x64 + {39F6E3F5-8F0B-4023-BC40-A66AE6C37095}.Release|x64.Build.0 = Release|x64 {39F6E3F5-8F0B-4023-BC40-A66AE6C37095}.Release|Win32.ActiveCfg = Release|Win32 - {39F6E3F5-8F0B-4023-BC40-A66AE6C37095}.Release|Win32.Build.0 = Release|Win32 - {39F6E3F5-8F0B-4023-BC40-A66AE6C37095}.Release|x64.ActiveCfg = Release|Win32 + {39F6E3F5-8F0B-4023-BC40-A66AE6C37095}.ReleaseHant|x64.ActiveCfg = Release|x64 + {39F6E3F5-8F0B-4023-BC40-A66AE6C37095}.ReleaseHant|x64.Build.0 = Release|x64 {39F6E3F5-8F0B-4023-BC40-A66AE6C37095}.ReleaseHant|Win32.ActiveCfg = Release|Win32 - {39F6E3F5-8F0B-4023-BC40-A66AE6C37095}.ReleaseHant|Win32.Build.0 = Release|Win32 - {39F6E3F5-8F0B-4023-BC40-A66AE6C37095}.ReleaseHant|x64.ActiveCfg = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE