Successfully Run Cocos Creator on Linux and released it as docker image

Successfully Run Cocos Creator on Linux and released it as docker image
0
#21

For now, this will not change. The engineering team is really over-worked and the resources producing a Linux version are to much for them to handle. If this changes I will let everyone know.

1 Like
#22

@sercand Hello. Could you share Cocos Creator v1.9.2 if it possible?

#24

Hi! has anyone tried to port cocos 2.x or provide a different tool to enable Linux builds?

#25

If you let us know what is the electron used by CocosCreator 2.0.x and 2.1.x it could be a good starting point for a new port.

#26

@pablomartinez I have released a docker image 2.0.5-web 4 months ago.

#27

Thanks! cool, I was working in porting the 2.1.0 version, notice that it is still running on electron 1.7.5, I was trying to update the atom/common/asar/archive.cc and atom/browser/net/url_request_asar_job.cc files for the asar decryption, will fight a bit with it, if i don’t success will use one of your images, thanks so much!

#28

Hello @sercand I am working in a docker image for jenkins using the cocos-creator build inside your 2.0.5-web image. When building the hello-world project I am getting following error, related with WEBGL.

Error: TypeError: Cannot read property 'getParameter' of null
    at Device._initCaps (/opt/cocos-creator/resources/engine/bin/.cache/dev/cocos2d/core/renderer/render-engine.js:5051:46)
    at new Device (/opt/cocos-creator/resources/engine/bin/.cache/dev/cocos2d/core/renderer/render-engine.js:5009:18)
    at Object.initCanvas (/opt/cocos-creator/resources/engine/bin/.cache/dev/cocos2d/core/renderer/index.js:85:31)
    at Object._initRenderer (/opt/cocos-creator/resources/engine/bin/.cache/dev/cocos2d/core/CCGame.js:362:30)
    at Object._initEngine (/opt/cocos-creator/resources/engine/bin/.cache/dev/cocos2d/core/CCGame.js:108:22)
    at Object._prepareFinished (/opt/cocos-creator/resources/engine/bin/.cache/dev/cocos2d/core/CCGame.js:116:22)
    at Object.prepare (/opt/cocos-creator/resources/engine/bin/.cache/dev/cocos2d/core/CCGame.js:155:26)
    at Object.run (/opt/cocos-creator/resources/engine/bin/.cache/dev/cocos2d/core/CCGame.js:161:22)
    at /opt/cocos-creator/resources/app.asar/editor/page/build/build-worker.js:1:1623
    at fn (/opt/cocos-creator/resources/app.asar/node_modules/async/lib/async.js:746:34)

My docker image extends from jenkinsci/jnlp-slave, and includes the same libraries you are using in 2.0.5-web. It works perfectly with the 1.9.0-web image. Will appreciate any help :slight_smile:

#29

@pablomartinez I guess at this line of build script there is --disable-gpu flag which should not be there.
If you have the same argument please remove it.

#30

Thanks! I also had the --disable-gpu, tried removing it but I am getting the same error plus a GPU Process Crashed! message logged during the project compile process. Seems that there are more people experiencing the same issue with Jenkins on windows https://forum.cocos.com/t/windows-jenkins/65950. I also have tried installing osmesa and firing chromium with the --disable-gpu --use-gl=osmesa params to launch the GPU process without success :frowning:

#31

@sercand I tried your latest docker image today on my Ubuntu machine:

$ docker run -it sercand/cocos-creator:2.0.5-web
===== Initializing Editor =====
arguments: 
  --disable-gpu

[7] Load ~/.CocosCreator/settings.json
[7] checking language setting...
[7] Language: en
[7] Initializing Cocos Creator Dashboard
[7] Loading packages
[7] ui-kit loaded
[7] Watching packages
[7] Run Application
[7] failed to connect login server due to request timeout
{ Error: Command failed: ifconfig || ip link
/bin/sh: 1: ifconfig: not found
/bin/sh: 1: ip: not found

    at ChildProcess.exithandler (child_process.js:217:12)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:194:7)
    at maybeClose (internal/child_process.js:899:16)
    at Socket.<anonymous> (internal/child_process.js:342:11)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:191:7)
    at Pipe._handle.close [as _onclose] (net.js:510:12)
  killed: false,
  code: 127,
  signal: null,
  cmd: 'ifconfig || ip link' }
no valid user ID
[7] Error: Window "main" unresponsive: [object Object]
    at BrowserWindow.nativeWin.on.e (/opt/cocos-creator/resources/app.asar/editor-framework/lib/main/window.js:1:2237)
    at emitOne (events.js:96:13)
    at BrowserWindow.emit (events.js:191:7)
protocol "profile" registered
[7] protocol editor-framework registered
[7] protocol app registered
[7] protocol theme registered
[7] protocol packages registered
[7] protocol unpack registerred
[7] protocol disable-commonjs registerred
Can not read "/opt/cocos-creator/resources/templates/._example-cases/template.json": Error: ENOTDIR: not a directory, open '/opt/cocos-creator/resources/templates/._example-cases/template.json'
Can not read "/opt/cocos-creator/resources/templates/._hello-world/template.json": Error: ENOTDIR: not a directory, open '/opt/cocos-creator/resources/templates/._hello-world/template.json'
Can not read "/opt/cocos-creator/resources/templates/._helloworld-typescript/template.json": Error: ENOTDIR: not a directory, open '/opt/cocos-creator/resources/templates/._helloworld-typescript/template.json'
Can not read "/opt/cocos-creator/resources/templates/._manifest.txt/template.json": Error: ENOTDIR: not a directory, open '/opt/cocos-creator/resources/templates/._manifest.txt/template.json'

and so I want to disable --disable-gpu but the container just sits here forever…any thoughts?

#32

@sercand You mention that you modify a couple .cc files, I was wondering if you had any direction or resource on exactly how you modified them (I wouldn’t complain about seeing a copy of your scripts folder either, I imagine the edits are the same regardless of the Cocos version)
We require certain features available since 2.0.9 and I have been working through the packaging and rebuilding but have hit a handful of snags along the way. Would you be able to better detail the overall steps taken to create this? Appreciate any additional info you could provide :slight_smile: