ubuntu - 从 Ubuntu 构建 Unity3D

标签 ubuntu unity-game-engine sandbox gitlab-ci unity3d-editor

我一直在尝试使用 Gitlab CI 容器从 Ubuntu 镜像构建 Unity3D 的几种方法,但似乎总是失败(Ubuntu 16.04.3 LTS)。

我收到以下错误,但我没有在那里找到有用的信息:

$ /opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile ./unity.log -projectPath ./ -buildLinuxUniversalPlayer "./Build/linux/project" -quit
[0101/202644:ERROR:browser_main_loop.cc(161)] Running without the SUID sandbox! See https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.

那个沙箱开发被标记为已弃用,我在这里缺少什么?

除此之外,当我尝试获得 chrome-sandbox 的帮助时,我得到以下信息:

$ /opt/Unity/Editor/chrome-sandbox --help
The setuid sandbox provides API version 1, but you need 0
Please read https://code.google.com/p/chromium/wiki/LinuxSUIDSandboxDevelopment.
close: Bad file descriptor

正如我在 Unity Cloud Build 平台中看到的那样,他们正在使用 MacOS 系统进行构建,我们在 GitLab CI(云服务)中是否有这种替代方案?来自 Unity Cloud Build 的日志行:

42:  + Building with Unity installed at /UNITY_PATH/Unity/Unity-2017_2_1f1/Unity.app/Contents/MacOS/Unity

更新:

我已经添加了我的 gitlab-ci.yml:

image: ubuntu
before_script:
   - apt-get update
   - apt-get install wget < wget.txt
   - wget -q -O unity.deb http://beta.unity3d.com/download/fd37f3680b5f/unity-editor_amd64-2017.2.0b11.deb
   - ls -la
   - apt-get install gdebi < gdebi.txt
   - gdebi --n unity.deb
stages:
   - build
   - log
windows:
   stage: build
   script:
      - echo "Attempting to build for Windows"
      - /opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile $(pwd)/unity.log -projectPath $(pwd) -buildWindowsPlayer "$(pwd)/Build/windows/GameTest.exe" -quit
macos:
   stage: build
   script:
      - echo "Attempting to build for OS X"
      - /opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile $(pwd)/unity.log -projectPath $(pwd)-buildOSXUniversalPlayer "$(pwd)/Build/osx/GameTest.app" -quit
linux:
   stage: build
   script:
      - echo "Attempting to build for Linux"
      - /opt/Unity/Editor/Unity -batchmode -nographics -silent-crashes -logFile $(pwd)/unity.log -projectPath $(pwd) -buildLinuxUniversalPlayer "$(pwd)/Build/linux/GameTest" -quit
log:
   stage: log
   script:
      - echo 'Logs from build'
      - cat ./unity.log

最佳答案

正如 Unity3D 在此处指出的那样 Unity3d Linux Releases这个错误是良性的,可以忽略,在我的例子中,错误是我试图使用一个免费帐户使用 GitLab CI 的持续集成构建。这个没有 GUI 的 CI 构建需要帐户激活,并且此功能目前不包含在 Unity3D 的免费版本中。

关于ubuntu - 从 Ubuntu 构建 Unity3D,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48068126/

相关文章:

c# - UI 按钮上的 onClick 监听器委托(delegate)

android - Google 分析 - 自定义维度不适用于 Android

javascript - 沙盒中的 Node.js

cocoa - 如何对命令行工具进行沙箱处理?

C stat 结构没有 st_ctime 字段,只有 st_ctim

php - 同步 PHP Git 项目的 MySQL 结构

regex - unix 中正则表达式的语法错误

ubuntu - 注销然后登录时自动运行脚本不起作用

android - NGUI:如何在实时添加新项目时重置/更新 UIgrid 和 UIScrollBar

linux - 如何为沙盒禁用 Linux 进程的套接字创建?