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

How do you modify .cc files ?

Modify atom/common/asar/archive.cc, atom/browser/net/url_request_asar_job.cc and lib/common/asar.js files to decrypt js files and asar header. You can find correct asar.js file from Cocos Creator itself by opening developer tools and find the file ELECTRON_ASAR.js.

Nice! Thank you so much for sharing this :slight_smile:

Wow that’s nice!

If this is possible I wonder why the CC team has not made an official Linux release.

1 Like

@gabdab You need to clone http://github.com/electron/electron and build yourself.
@phero_constructs It is their choice not to release a Linux version. Technically, they built Cocos Creator with electron which is a multi-platform app development tool.

I am on Linux .
Just mounted creator .dmg subpackage 5 - disk image(Apple_HFS:5) with no luck .
I guess you need a Mac to perform the operation you kindly suggested .

You can download the image on docker hub:

docker pull sercand/cocos-creator:1.8.0-web && docker save sercand/cocos-creator:1.8.0-web -o cc.tar

Now you have Cocos Creator in f5bf75745797e61ad02.../layer.tar file, extract it again. By the way, it is missing some files in order to reduce image size, like resources/cocos2d-x folder.

1 Like

Succesfully pulled !
I am compiling a newer version of libvips (which is v. 8.2.2 on Ubuntu 16.04, 8.4.2 needed)

Succesfully launched , created new project , opening new project gives error , need to check it yet:

[27776] Initializing project /tmp/NewProject
Profile profile://local/local.json warning: reset profile field: last-edit
[27776] Loading packages
[27776] Watching packages
[27776] Run Application
[27776] preview server running at http://localhost:7456
init QuickCompiler: 21.889ms
no valid user ID
[27776] Error: Window “main” crashed: [object Object]
at WebContents.Window.nativeWin.webContents.on.e (/media/gabriele/ee238924-2890-41d2-883b-ddcf3c07ce10/Lavoro/Lavoro_1/cocos2dx/cocos-creator/cc/e48b079e2a22be7fc7b8ad825fd9980ecdc2331210cc09a5b2bb47d4f02f32c1/opt/cocos-creator/resources/app.asar/editor-framework/lib/main/window.js:1:2853)
at emitTwo (events.js:106:13)
at WebContents.emit (events.js:194:7)

@gabdab start your project with: cocos-creator --path $YOUR_PROJECT_PATH
At the MacOSX you will see following ugly scene. There are two cocosCreator icon
15

First one is Dashboard and second one is project. Opening second cocos-cretor is the reason of crash.

1 Like

Yes , working now

.
It launchs right away , no taskbar icons showing on Ubuntu.
Great job, many thanks .
P.S: I can set up a docker image if needed, just ask.

1 Like

This is cool. We don’t release a Linux version because supporting another platform adds several layers of complexity for us. We don’t feel we have the resources to do this at this time.

1 Like

hi, thanks for sharing. Can you describe these steps in details?

This is so amazing @sercand, thank you again for sharing!

I think it’s enough that we can have a linux CI build the game, the actual development could be done in win/mac. Doesn’t need to be supported by linux.

@sercand would it be possible to push a 1.8.1 version of your docker container to dockerhub?

Thank you!

@sercand

I pulled creator form docker and try run my project, but I get error:

[17728] Initializing project /home/dmitriy/programming/games/fabulous-slots
[17728] Loading packages
[17728] Watching packages
[17728] Run Application
Uncaught Exception: Error: libvips-cpp.so.42: cannot open shared object file: No such file or directory
at process.module.(anonymous function) (ELECTRON_ASAR.js:191:20)
at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:191:20)
at Object.Module._extensions…node (module.js:598:18)
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:191:20)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/home/dmitriy/programming/tools/ide/cocos-creator/resources/utils/sharp/lib/constructor.js:8:15)
[17728] Error: Error: libvips-cpp.so.42: cannot open shared object file: No such file or directory
at process.module.(anonymous function) (ELECTRON_ASAR.js:191:20)
at process.module.(anonymous function) [as dlopen] (ELECTRON_ASAR.js:191:20)
at Object.Module._extensions…node (module.js:598:18)
at Object.module.(anonymous function) [as .node] (ELECTRON_ASAR.js:191:20)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object. (/home/dmitriy/programming/tools/ide/cocos-creator/resources/utils/sharp/lib/constructor.js:8:15)
at process.on.t (/home/dmitriy/programming/tools/ide/cocos-creator/resources/app.asar/editor/core/editor-init.js:1:1068)
at emitOne (events.js:101:20)
at process.emit (events.js:191:7)
at process._fatalException (bootstrap_node.js:308:26)
no valid client ID

@Ronsku I just pushed version 1.9.0 and 1.8.1 to docker hub.

2 Likes

@limetris I guess libvips library missing in your machine. By the way, you can download cocos-creator version 1.9 at https://goo.gl/p5KSAz .

2 Likes

Yes, I installed this library and it works.

Thank you very much for 1.9 version and link without docker!!! ))

I still hope the developers will take pity on us and will post a version for Linux. An unofficial link here or elsewhere will be more than enough. And it will save your time.

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

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