Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build both x64 and Win32 WeaselServer and WeaselDeployer, install proper one by system version detection #1121

Merged
merged 14 commits into from
Mar 29, 2024

Conversation

fxliang
Copy link
Contributor

@fxliang fxliang commented Feb 28, 2024

other changes

  • update WinSparkle to 0.8.1
  • update build.bat to build librime of both x64 and Win32
  • update dpi aware setting for projects
  • test project only for debug configuration

close #1147
To Does:
- [x] pass CI

@driver1998
pls have a look, I can build it without ARM build locally but CI not pass. I am not sure if it's problem with ARM build, I have not arm build tools locally

image
image
image
image
image
image

@fxliang fxliang requested a review from lotem February 28, 2024 02:55
@driver1998
Copy link
Contributor

The CI error does not seem to have anything to do with ARM:

Link:
  C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Tools\MSVC\14.38.33130\bin\HostX86\x64\link.exe /ERRORREPORT:QUEUE /OUT:"D:\a\weasel\weasel\\output\WeaselServer.exe" /NOLOGO /LIBPATH:D:\a\weasel\weasel\\lib64 /LIBPATH:D:\a\weasel\weasel\deps\boost_1_84_0\stage\lib /LIBPATH:D:\a\weasel\weasel\\librime\build\lib\Release imm32.lib usp10.lib 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 /MANIFEST /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /manifest:embed /PDB:"D:\a\weasel\weasel\output\WeaselServer.pdb" /SUBSYSTEM:WINDOWS /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"D:\a\weasel\weasel\output\WeaselServer.lib" /MACHINE:X64 x64\Release\WeaselServer.res
  x64\Release\stdafx.obj
  x64\Release\SystemTraySDK.obj
  x64\Release\WeaselServer.obj
  x64\Release\WeaselServerApp.obj
  x64\Release\WeaselService.obj
  x64\Release\WeaselTrayIcon.obj
  D:\a\weasel\weasel\x64\Release\WeaselUI.lib
  D:\a\weasel\weasel\x64\Release\RimeWithWeasel.lib
  D:\a\weasel\weasel\x64\Release\WeaselIPCServer.lib
  D:\a\weasel\weasel\x64\Release\WeaselIPC.lib
  WeaselUI.lib(WeaselUI.obj) : MSIL .netmodule or module compiled with /GL found; restarting link with /LTCG; add /LTCG to the link command line to improve linker performance
     Creating library D:\a\weasel\weasel\output\WeaselServer.lib and object D:\a\weasel\weasel\output\WeaselServer.exp
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeGetProperty [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeSetup [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeSetNotificationHandler [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeInitialize [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeStartMaintenance [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeConfigOpen [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeConfigGetString [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeConfigGetBool [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeConfigGetInt [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeConfigClose [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeFinalize [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeFindSession [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeCreateSession [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeSetOption [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeGetStatus [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeFreeStatus [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeDestroySession [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeProcessKey [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeGetOption [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeCommitComposition [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeClearComposition [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol rime_get_api [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeSetProperty [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeSchemaOpen [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeConfigBeginMap [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeGetCommit [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeFreeCommit [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeGetContext [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeFreeContext [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeConfigBeginList [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeConfigNext [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
RimeWithWeasel.lib(RimeWithWeasel.obj) : error LNK2001: unresolved external symbol RimeConfigEnd [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
D:\a\weasel\weasel\\output\WeaselServer.exe : fatal error LNK1120: 32 unresolved externals [D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj]
Done Building Project "D:\a\weasel\weasel\WeaselServer\WeaselServer.vcxproj" (default targets) -- FAILED.
Project "D:\a\weasel\weasel\weasel.sln" (1) is building "D:\a\weasel\weasel\test\TestWeaselIPC\TestWeaselIPC.vcxproj" (9) on node 1 (default targets).

@fxliang
Copy link
Contributor Author

fxliang commented Feb 28, 2024

with nearly the same commands locally, I can build hant successfully...couldn't figure out what happened

can you build locally?

WeaselDeployer/WeaselDeployer.vcxproj Outdated Show resolved Hide resolved
build.bat Outdated Show resolved Hide resolved
@fxliang
Copy link
Contributor Author

fxliang commented Feb 28, 2024

it's caused by preset ARCH in env template, which will stop the set ARCH=x64 and set ARCH=Win32 in build.bat

@fxliang fxliang changed the title [WIP]build both x64 and Win32 WeaselServer and WeaselDeployer, install proper one by system version detection build both x64 and Win32 WeaselServer and WeaselDeployer, install proper one by system version detection Feb 28, 2024
@fxliang fxliang requested a review from lotem February 28, 2024 10:01
Copy link
Member

@lotem lotem left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

先這樣。有空我看看怎麼簡化 backup/restore 那段。

output/install.nsi Outdated Show resolved Hide resolved
@fxliang
Copy link
Contributor Author

fxliang commented Feb 29, 2024

先這樣。有空我看看怎麼簡化 backup/restore 那段。

你看有没有机会librime的build.bat可以传入环境变量控制产出的路径?

@lotem
Copy link
Member

lotem commented Feb 29, 2024

先這樣。有空我看看怎麼簡化 backup/restore 那段。

你看有没有机会librime的build.bat可以传入环境变量控制产出的路径?

值得做一下

@fxliang
Copy link
Contributor Author

fxliang commented Feb 29, 2024

先這樣。有空我看看怎麼簡化 backup/restore 那段。

你看有没有机会librime的build.bat可以传入环境变量控制产出的路径?

值得做一下

如果可能,看能不能传入变量实现ninja构建,传说中cmake+ninja+msvc,比直接cmake+msbuild+msvc要快?只是不知道是不是可能控制位数。原来ARCH来设定的,但是这个对ninja不适用似乎会报错

@fxliang fxliang changed the title build both x64 and Win32 WeaselServer and WeaselDeployer, install proper one by system version detection build both x64 and Win32 WeaselServer and WeaselDeployer, install proper one by system version detection[TESTING] Feb 29, 2024
@fxliang
Copy link
Contributor Author

fxliang commented Feb 29, 2024

x64 版本自动浅色、深色转换没用了(不稳定 转换不及时,或者直接不变),重新部署后才可以转换过去。

可能其他和会话相关的设置也有可能有问题。(注意到到改了 style 后,不同的会话出现了不同的 style )

在本机 Windows 11, 虚拟机 Windows 10 22H2, LTSC 和 Windows 11 Dev 均能复现。回退到上一个 master 提交可以修复。

如果需要其他信息,我另开 issue 说

有处理漏的东西,修了,谢谢细心测试

@lotem 先不急合并,等充分测试后我rebase/squash一下再说

@fxliang
Copy link
Contributor Author

fxliang commented Mar 1, 2024

当前既然是 64 位,能不能调整注册表还有文件安装位置,当前都统一是 32 位程序的位置,program files x86。是有什么其他的考虑吗

32/64共用的安装包

@driver1998
Copy link
Contributor

driver1998 commented Mar 2, 2024

ARM64 Windows 11和Windows 10均测试正常。
理论上我们可以检测ARM64 Windows 11然后只在11上安装x64 WeaselServer,但不知道这个检测逻辑好不好写... 目前先这样凑合一下吧

@fxliang
Copy link
Contributor Author

fxliang commented Mar 3, 2024

ARM64 Windows 11和Windows 10均测试正常。 理论上我们可以检测ARM64 Windows 11然后只在11上安装x64 WeaselServer,但不知道这个检测逻辑好不好写... 目前先这样凑合一下吧

https://zhuanlan.zhihu.com/p/672274956?utm_id=0
这个如果可能定义在install.nsi内,应该就有机会,虽然未完全明确你描述的逻辑

output/install.nsi Outdated Show resolved Hide resolved
@luminosara
Copy link

x64 版本 Notification Tip 似乎变小了,@fxliang 大大能否看看?

Notification Tip

回退到最新的 Nightly Build 恢复正常,系统版本Windows 10 22H2 19045.4046

另外,Notification Tip 应该是不响应系统缩放?调整系统缩放大小没有影响

如果需要其他信息就另开 issue

关联的 issue 有 #298 #381

@fxliang
Copy link
Contributor Author

fxliang commented Mar 7, 2024

@luminosara 修了,项目设置有漏

@luminosara
Copy link

@luminosara 修了,项目设置有漏

正常了!多谢多谢!

@fxliang fxliang force-pushed the dualbuild branch 2 times, most recently from 689e266 to 612d2e0 Compare March 14, 2024 10:18
@fxliang fxliang changed the title build both x64 and Win32 WeaselServer and WeaselDeployer, install proper one by system version detection[TESTING] build both x64 and Win32 WeaselServer and WeaselDeployer, install proper one by system version detection Mar 14, 2024
…d of RimeSessionId

build: build 32/64 bit WeaselServer and WeaselDeployer, default x64 build in `output`, Win32 build in `output\Win32`
update WeaselServerApp.h: de-warning for 64 bit build.
chore:TestWeaselIPC with a lowercase 'a' instead of 'A', for more meaningful actions
lib: update WinSparkle to 0.8.1
…n WeaselDeploer

- update build.bat: build Win32 and x64 librime concurrently. optimize workflow and code style/comments
- update env templates: disable ARCH in env
- update WeaselDeployer project: remove duplicate rime.lib
build: update github.install.bat: add x64 lib handling job.
…/WeaselDeployer) installing

- x64 : NativeARM64 on WINDOWS11, NativeAMD64
- Win32: others
…SF WeaselIME in all configuration/platform;

build: not to build test projects in Release configuration
- Comctl32 version bump to 6.0.0.0
- string table for Hant
- Dialog font size change to 9
- version info for Hant
- SwitcherSettingsDialog schema table title by locale
- version number of WeaselServer/WeaselDeployer/WeaselSetup control by ENV variable.
- normal build will go product info with commit hash
@lotem lotem merged commit 557b575 into rime:master Mar 29, 2024
1 check passed
@fxliang fxliang deleted the dualbuild branch April 15, 2024 06:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

提供64位的小狼毫构建 大词库无法完成部署
4 participants