gpt4 book ai didi

python - Appveyor 上的 Kivy PyInstaller

转载 作者:行者123 更新时间:2023-12-01 03:08:32 28 4
gpt4 key购买 nike

我想使用 Appveyor 上的 PyInstaller 为我的 Kivy 应用程序构建可执行文件。我的构建在我自己的计算机上运行,​​但在 Appveyor 构建上我收到以下消息:

OpenGL version detected: 1.1
Version: b'1.1.0'
Vendor: b'Microsoft Corporation'
Renderer: b'GDI Generic'
Try upgrading your graphics drivers and/or your graphics hardware in case of problems.
The application will leave now.

我正在使用默认的 PyInstaller 配置,如 https://kivy.org/docs/guide/packaging-windows.html 中所述。 .

appveyor.yml 如下:

image: Visual Studio 2015

environment:
matrix:
- PYTHON: "C:\\Python34"
PYTHON_VERSION: "3.4.x" # currently 3.4.3
PYTHON_ARCH: "32"

- PYTHON: "C:\\Python34-x64"
PYTHON_VERSION: "3.4.x" # currently 3.4.3
PYTHON_ARCH: "64"

install:
# Install Python (from the official .msi of http://python.org) and pip when
# not already installed.
- ps: if (-not(Test-Path($env:PYTHON))) { & appveyor\install.ps1 }

- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"

# Check that we have the expected version and architecture for Python
- "python --version"
- "python -c \"import struct; print(struct.calcsize('P') * 8)\""

- "pip install --disable-pip-version-check --user --upgrade pip"

# Kivy and pyinstaller included
- "%CMD_IN_ENV% pip install -r requirements.txt"

# Saw somewhere on the internet, doesn't work with it nor without it.
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-desktop.ps1'))



build_script:
- "%CMD_IN_ENV% python -m PyInstaller myapp.spec"


artifacts:
- path: dist\*

据我所知,它可以有两种方式:* 以某种方式阻止 kivy pyinstaller 钩子(Hook)使用 OpenGL* 配置Appveyor使用OpenGL

感谢您的所有建议!

最佳答案

正如 @ilyaf 所说,但有一件事可能对你有帮助 - 尝试安装 kivy.deps.angle 并将其与该 + 一起打包 + 让你的应用程序 use the angle 。我不太确定它是否有帮助,因为没有 GPU,但 angle 将 OpenGL 调用转换为 DirectX,Appveyor 似乎有这个功能。值得一试,尽管我担心即使使用 angle 也行不通。

关于python - Appveyor 上的 Kivy PyInstaller,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43097452/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com