Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Welcome to Linux builds closed beta
Started by Rob Miracle Sep 18 2018 06:13 AM

12 replies to this topic
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,853 posts
  • Corona Staff

We have been working on Linux builds. You still need to use macOS or Windows to build, but we can now output builds that should run on Linux. This is a closed beta. Please give it a try if you have access to Linux to test builds on and report issues here.
 
To get it rolling, type in command line:
macOS: `defaults write com.coronalabs.Corona_Simulator enableLinuxBuild -bool YES`
Windows: `reg add "HKEY_CURRENT_USER\software\ansca corona\corona simulator\preferences" /v ShowLinuxBuild /t reg_dword /f /d 1`
 
You should use daily build 2018.3350 or later with the latest daily build recommended.
 
This will output both a .tar.gz and .deb package for generic x86-64 Linux platforms.
 
Rob

  • Appletreeman, sieler2, vlads and 1 other like this

[TOPIC: post.html]
#2

richard11

[GLOBAL: userInfoPane.html]
richard11
  • Contributor

  • 190 posts
  • Corona SDK

This is actually genuinely exciting.

 

I'm stuck using Windows at the moment, and have been for a few months now frustratingly (long story), but I've actually used Gentoo GNU/Linux exclusively for about 15 years and absolutely can't wait to get back into my Gentoo environment. As soon as I'm back in there, I'll do some testing for sure.

 

It would be brilliant to one day run the Corona simulator within GNU/Linux too, but just being able to compile for it is in itself a major leap forwards. Thanks for working on this!


  • vlads likes this

[TOPIC: post.html]
#3

marcar

[GLOBAL: userInfoPane.html]
marcar
  • Enthusiast

  • 42 posts
  • Corona SDK

This is really great news. It would be a perfect match for us, if this would also (in the final version) support Linux on ARM, i.e. Raspberry Pi, etc. Are there any plans for that?



[TOPIC: post.html]
#4

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,853 posts
  • Corona Staff

Hi @marcar, we are considering other architectures like ARM. We think Raspberry Pi could be a great platform to provide support for. Creating new platforms are time-consuming and I don't know when we will get to this, but it's something we want to do.

 

Rob 



[TOPIC: post.html]
#5

schizoid2k

[GLOBAL: userInfoPane.html]
schizoid2k
  • Contributor

  • 547 posts
  • Corona SDK

This is pretty cool.. thanks Rob and Corona Team!

 

I am assuming documentation updates will follow soon?  It's a bit trial and error for some things, other things more difficult to know what is needed.  For example:

 

What's returned in system.getInfo("platform"), etc.

Any specific build.settings "things" needed in order to utilize excludeFiles, plugins, etc tables appropriately

 

I think my game(s) will compile successfully if this info is known... right now I'm getting errors when I attempt to build due to this.

 

--john



[TOPIC: post.html]
#6

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,853 posts
  • Corona Staff

Yes, documentation updates will come later.

 

system.getInfo("platform") should return "linux".

 

Currently, there are no specific "linux" build.setting values to set. I'm not 100% sure if we are processing the "window" table (used my macOS, Win32 and HTML5 to control window width, height, full screen, windowed, window name, etc.) yet. In theory, excludeFiles should work, but don't hold me to that.

 

Plugins are not supported yet. Hopefully, there will be some plugin support coming soon. Now I do want to be 100% clear here. Plugins that depend on third-party SDK's like all ad providers, analytics providers, etc. are likely never going to be available because those SDK's just don't exist for Linux and there isn't much in financial incentives to get them to make Linux SDKs. What you're likely going to  see is plugins like bit, zip, etc. those that are pure C++ and Lua based plugins being made available. Likewise, there may be some Linux specific plugins created, sort of like we have HTML5 specific plugins, but I can't initially think what they might ben.

 

In porting one of my games, I've had to do things like I did here for GameAnalytics:


myData.GAgameKey = nil
myData.gameanalytics = nil

if myData.platform ~= "ios" or myData.platform ~= "android" then
	return
end

myData.gameanalytics = require("plugin.gameanalytics_v2")

if "ios" == myData.platform then
	myData.GAgameKey = "iOS key goes here"
	myData.GAgameSecret = "iOS secret goes here"
elseif "android" == myData.platform then
	myData.GAgameKey = "Android key goes here"
	myData.GAgameSecret = "Android secret goes here"
end

And when I need to use GA, I do:

	if myData.gameanalytics then
		myData.gameanalytics.addProgressionEvent {
			progressionStatus = "Fail",
			progression01 = string.format("campaign%02d", myData.settings.currentCampaign),
			progression02 = string.format("stage%02d", myData.currentLevel),
		}
	end

I basically store the handle to the plugin in my fake global table. If it's nil, I don't do anything. If it's been initialized then I can call it.

 

Rob



[TOPIC: post.html]
#7

schizoid2k

[GLOBAL: userInfoPane.html]
schizoid2k
  • Contributor

  • 547 posts
  • Corona SDK

Thanks for the clarification Rob... this does look promising, and I will play around a bit more.

 

For plugins, I do understand what you are saying, and I did expect that those types of plugins would not be available.  I have a few plugins in the Marketplace (Data Cabinet, Language Cabinet) that are Lua Plugins and don't rely on third-parties, and I would hope/expect those will work.

 

--john



[TOPIC: post.html]
#8

jaime9

[GLOBAL: userInfoPane.html]
jaime9
  • Enthusiast

  • 41 posts
  • Corona SDK

Hello,

 

just found this, really good news!

 

I gave it a try with latest daily build (3434). I intended to try in a 64bit Ubuntu system and a 32 bit pure Debian.

 

In Debian 32b, I knew it wouldn't run once I saw the output from the simulator, but the package installs correctly.

In Ubuntu 64b:

 

- installing the .deb pack, using the package manager, never ended, never saw the file in the /usr/bin,

- extracting the .tar.gz and then running the program, started complaining about missing packages.

 

Installed libopenal, then libpng, then libpng16, but at libwebkitgtk-3.0 there were a lot of missing dependencies not found in the repositories, so I had to stop there.

 

Not sure if this is of any help.

 

I'm updating the Ubuntu right now, and can install a 64bit Debian. I volunteer to make any tests.

 

Best regards,

 

jaime



[TOPIC: post.html]
#9

vitaly1

[GLOBAL: userInfoPane.html]
vitaly1
  • Contributor

  • 190 posts
  • Corona Staff

@jaime9 Thank you for the testing.

I guess we need to add an install-dependencies.sh in .tar.gz



[TOPIC: post.html]
#10

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,853 posts
  • Corona Staff

I've been testing it on Ubuntu 18.04.1. I did have to install a few dependencies but once installed, the apps I've tested are working pretty well. 

 

Rob



[TOPIC: post.html]
#11

vitaly1

[GLOBAL: userInfoPane.html]
vitaly1
  • Contributor

  • 190 posts
  • Corona Staff

sudo apt-get install libopenal1 libwebkitgtk-3.0-0
This installs dependencies which enough for fresh Ubuntu 18.04 LTS

 



[TOPIC: post.html]
#12

jaime9

[GLOBAL: userInfoPane.html]
jaime9
  • Enthusiast

  • 41 posts
  • Corona SDK

Hi again - updated my ubuntu to current 18.04.

 

Things improved!

 

.deb package installed correctly, dependencies also.

 

When my app is executed, however, I get a core dumped:


(Dragonfly:8948): Gtk-CRITICAL **: 20:22:05.032: gtk_window_resize: assertion 'width > 0' failed
Checking /usr/bin/resource.car
Checking /usr/bin/main.lua
Checking /usr/share/corona/bin/resource.car
Checking /usr/share/corona/bin/main.lua
Checking /usr/bin/welcomescreen/main.lua
Failed to find app
Rtt_ASSERT [Rtt::CoronaAppContext::CoronaAppContext(const char*)] at ../../platform/linux/Rtt_LinuxContext.cpp:478 (0)
sandbox: 
assets: 

Copyright (C) 2009-2018  C o r o n a   L a b s   I n c .
	Version: 3.0.0
	Build: 2018.3434
WARNING: Cannot create path for resource file 'build.settings (/usr/bin/build.settings)'. File does not exist.

WARNING: Cannot create path for resource file 'resource.car (/usr/bin/resource.car)'. File does not exist.

LUA_PATH = /?.lua;/?.lua;
LUA_CPATH = ./?.so;/?.so;
Platform: Linux / Lua / 1.0 / SVGA3D; build: RELEASE;  LLVM; / 3.0 Mesa 18.0.5 / 2018.3434 / en_US | US | en_US | en
Rtt_ASSERT [Rtt::Archive::Archive(Rtt_Allocator&, const char*)] at ../../librtt/Rtt_Archive.cpp:1029 (result >= 0)
Segmentation fault (core dumped)
jaime@ubindi:~$ uname -a
Linux ubindi 4.15.0-39-generic #42-Ubuntu SMP Tue Oct 23 15:48:01 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
jaime@ubindi:~$ 

Other details from the "problem report" window (can't copy and paste these) say it is a SIGSEGV in __memcmp_avx2_movbe()

Mind you this is a full-fledged app, not a test one. 

 

Let me know how can I help.

 

... and thanks, having Corona for Linux is amazing! :)



[TOPIC: post.html]
#13

Rob Miracle

[GLOBAL: userInfoPane.html]
Rob Miracle
  • Moderator

  • 24,853 posts
  • Corona Staff

Does it work if you use the .tar.gz file instead?

 

Rob




[topic_controls]
[/topic_controls]