Open codeXiaoMing opened 11 months ago
Hi @codeXiaoMing, this looks like the same issue as in https://github.com/wingtk/gvsbuild/issues/877. Is your language set to Chinese as well?
Yes, my language is set to Chinese
Would it be possible to set your language to English to help isolate this to some type of unicode error?
I have tried using VMware to create an English version of Windows and successfully configured the development environment. But I don't think this is a good choice, I will try this method https://www.cnblogs.com/Steven-HU/p/14547749.html
Was that method to change the system locale?
yes, It also mentions that there are several other ways to solve this problem:
Hey @codeXiaoMing, I don't think this is specific to Gvsbuild, GLib (which was the code that PyGObject was building against when the error occurred) has some guidance which is to set the non-unicode language to English: https://gitlab.gnome.org/GNOME/glib/-/blob/main/docs/win32-build.md#c4819-build-errors
It does give a 2nd option to use the /UTF-8 flag with MSVC, but it doesn't sound like that is always effective.
@danyeaw you are right. The method you mentioned is what I mentioned earlier. I have successfully installed pygobject using this method
I have already configured the environment according to the official installation process and successfully ran gaphors using “poetry run gaphor”, but an error occurred during the second run
PS D:\project\MBSE-tool-develop\gaphor-main> poetry run gaphor
No translations were found for language zh_CN: [Errno 2] No translation file found for domain: 'gaphor'
Traceback (most recent call last):
File "
It looks like it can't find PyGObject to import any longer. Do you still have your environmental variables set?
$env:Path = "C:\gtk-build\gtk\x64\release\bin;" + $env:Path
$env:LIB = "C:\gtk-build\gtk\x64\release\lib;" + $env:LIB
$env:INCLUDE = "C:\gtk-build\gtk\x64\release\include;C:\gtk-build\gtk\x64\release\include\cairo;C:\gtk-build\gtk\x64\release\include\glib-2.0;C:\gtk-build\gtk\x64\release\include\gobject-introspection-1.0;C:\gtk-build\gtk\x64\release\lib\glib-2.0\include;" + $env:INCLUDE
For the C4819 errors, do you think we should add that to the Gvsbuild README? Are you interested in making a pull request?
After resetting these environment variables, there was no problem. thank you. I think it is necessary to add the C4819 errors to Gvsbuild README. My recent plan is to develop some customized content based on gaphor, and then I can organize the process for solving the C4819 error and make a pull request
I encountered an error while attempting to package when running this command:poetry run poe win-installer
D:\project\MBSE-tool-develop\gaphor-2.20.0>poetry run poe win-installer
Poe => win-installer
Cleaning files
Building Installer
Traceback (most recent call last):
File "
@codeXiaoMing Ok, I'll leave this open until we update the docs.
Let's move Gaphor support to that project :+1:
When running "gvsbuild build --enable-gi --py-wheel gobject-introspection gtk4 libadwaita gtksourceview5 pygobject pycairo adwaita-icon-theme hicolor-icon-theme" the following error occurs:
https://pastebin.com/9GJ3Y57T
My development environment: windows10 choco 2.2.2 git 2.42.0 graphviz 9.0.0 msys2 20230718.0.0 visualstudio2022buildtools 117.7.4 visualstudio2022-workload-vctools 1.0.0 visualstudio-installer 2.0.03 python 3.11.5 pipx 1.2.0 gvsbuild 2023.9.0 poetry 1.6.1