我想使用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钩子使用OpenGL *配置Appveyor以使用OpenGL
谢谢你的建议!
发布于 2017-03-30 18:16:10
正如@ilyaf所说,但有一件事可能对你有帮助--试着安装kivy.deps.angle,并将它打包成+让你的应用程序angle。我不太确定它是否会有帮助,因为没有GPU,但是angle将OpenGL调用转换为DirectX,而Appveyor似乎也有这种调用。这是值得一试的,尽管我担心这是不可能的,即使是与angle。
发布于 2017-03-30 01:53:19
恐怕这是不可能的,因为构建发生在超V型VM,其中没有物理GPU.
https://stackoverflow.com/questions/43097452
复制相似问题