cocos-engine icon indicating copy to clipboard operation
cocos-engine copied to clipboard

Linux Compatible Build For Cocos-Creator

Open MossFrog opened this issue 3 years ago • 18 comments

Use Case

We work on multiple web based games as a company both playable-ads and HTML5 games.

Problem Description

Some members of the company use linux as their primary operating system within the company and would like to request a Linux build for the engine or at least a compatibility layer/wrapper that allows the engine to run within an Arch or Debian based environment.

Proposed Solution

Release a third downloadable option on the Cocos-Creator website for Linux users, compilation and porting of the engine should not be that hard since the Macintosh build is also running on a Unix based backend.

How it works

Simply download a separate version from the website that will work on Linux machines.

Alternatives Considered

An alternative would be a Winetricks/Lutris based wrapper for the Windows Version (This might be unstable)

Additional Information

Thank you!

MossFrog avatar Jun 10 '22 06:06 MossFrog

@VisualSJ @xyz5511 Can you provide a cocos linux docker image for ci build? Our ci system is using docker now.

xiaoxiangmoe avatar Oct 15 '22 12:10 xiaoxiangmoe

Sorry, due to manpower considerations, there is still no relevant schedule

jareguo avatar Jun 09 '23 05:06 jareguo

@xiaoxiangmoe Maybe it's doable to build it in a windows container. Just use Docker Desktop on Windows. https://devblogs.microsoft.com/cppblog/using-msvc-in-a-docker-container-for-your-c-projects/

cupen avatar Sep 12 '23 08:09 cupen

We really need a version that works natively for Linux because developing for Windows is unbearably unpleasant. We don’t want to use Apple systems for religious reasons.

Please make Cocos Creator Linux build

Overloot avatar Oct 29 '23 13:10 Overloot

Can you tell me what projects do you use Creator for? Is it a commercial project?

jareguo avatar Oct 30 '23 05:10 jareguo

I've seen a lot of unity3d refugees choosing Godot over Cocos recently, one of the reasons is that Cocos creator doesn't support Linux, a lot of indie developers use Linux and some companies may need it for CICD in docker (I meant a non-gui headless mode for automation).

joeky888 avatar Oct 30 '23 06:10 joeky888

Can you tell me what projects do you use Creator for? Is it a commercial project?

Most recently we have been working with unity and have released several commercially successful projects for last three years. Recent events are pushing us to change the engine. Since our main course is web games, we chose between Defold and Cocos. We liked cocos more. However, it has now become clear that we cannot continue development on our favorite operating system because cocos does not support it. This is very depressing.

Overloot avatar Oct 30 '23 07:10 Overloot

Thanks. So you guys were using the Linux version of Unity before? Our current CICD does rely on Mac ......

jareguo avatar Oct 31 '23 02:10 jareguo

Yes, I had used native unity3d on Linux about 3 years ago, where we developed a KCP socket turn-based Android game. The Nvidia dGPU and CICD were tricky but we overcame the hurdles eventually. Now we focus on web games so we adopted Cocos at the moment, but we are evaluating other engines.

joeky888 avatar Oct 31 '23 03:10 joeky888

For example, take WeChat mini program and Alipay mini program into account, only mac and windows development is supported by default. They only provide windows and mac IDE.

  • https://developers.weixin.qq.com/miniprogram/en/dev/devtools/download.html
  • https://opendocs.alipay.com/mini/ide/download

But they all support building on linux machines in cli mode.

see

  • https://www.npmjs.com/package/miniprogram-ci
  • https://www.npmjs.com/package/minidev

Most companies' most mature cicd infrastructure is based on Linux. If cocos does not provide Linux-based npm cli construction, it will lead to high costs for cicd, integration testing, etc.

xiaoxiangmoe avatar Oct 31 '23 11:10 xiaoxiangmoe

We really need a version that works natively for Linux because developing for Windows is unbearably unpleasant. We don’t want to use Apple systems for religious reasons.

Please make Cocos Creator Linux build

Religious reasons are hardcoded, indeed impossible to switch.

netplayer avatar Nov 18 '23 15:11 netplayer

这个问题现在怎么样了,我也非常需要一个creator linux版本, 有两个原因:

  1. 开发容器gitpod里需要 (可能未来趋势)
  2. cicd构建发布游戏应用 我想知道官方是否未来3年以内会考虑出Linux版本吗? 据我所知,creator是基于electron的, electron是跨平台的,出Linux版本理论上应该不会很难,也不会耗费很长人力

dzqdzq avatar May 11 '24 05:05 dzqdzq

Since the early days of Cocos Creator 1, we've all faced this one significant challenge: the inability to build proper CD/CI systems with Cocos Creator. This limitation forces the creation of complex and costly Windows server hosting solutions to support effective CD/CI.

It's surprising that, despite the numerous improvements made to Cocos Creator, this issue still persists in 2024.

The demand for Headless Linux builds for Cocos Creator has been strong for years. While it seems technically feasible with Electron, there appears to be an underlying difficulty preventing its implementation?

Could you provide any insights or feedback on this @jareguo? 😊

Ronsku avatar Jun 10 '24 09:06 Ronsku

According to this thread, two (and maybe more) core members have left the engine development, so I guess this won't be prioritised. But I'm quite optimistic, hope they can find new maintainers soon.

joeky888 avatar Jun 10 '24 10:06 joeky888

Here is a workflow to rebuild native linux version by electron-builder, but it can only support the linux distro and Cocos 2.4 about 2 years old. Hope someone will improve it.

CLI build is usable, but still need an X server:

./Cocos-Creator --project 'PROJECT_PATH' --path 'PROJECT_PATH' --build 'platform=web-mobile;buildPath=BUILD_PATH'

CocosCreatorLinux screenshot resized

forza91 avatar Jun 14 '24 10:06 forza91

Since the early days of Cocos Creator 1, we've all faced this one significant challenge: the inability to build proper CD/CI systems with Cocos Creator. This limitation forces the creation of complex and costly Windows server hosting solutions to support effective CD/CI.

As far as i know, Jareguo has leave cocos months ago. We are hosting a linux build in XFCE environment, it's anyway a lower cost solution than Windows. I hope someone can finally make it works in Ubuntu24/Arch, and better, running without X.

forza91 avatar Jun 15 '24 06:06 forza91