首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Kivy PyInstaller on Appveyor

Kivy PyInstaller on Appveyor
EN

Stack Overflow用户
提问于 2017-03-29 15:09:46
回答 2查看 331关注 0票数 1

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

代码语言:javascript
复制
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如下:

代码语言:javascript
复制
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

谢谢你的建议!

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2017-03-30 18:16:10

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

票数 2
EN

Stack Overflow用户

发布于 2017-03-30 01:53:19

恐怕这是不可能的,因为构建发生在超V型VM,其中没有物理GPU.

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/43097452

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档