jean-emmanuel / open-stage-control

Libre and modular OSC / MIDI controller
https://openstagecontrol.ammd.net
GNU General Public License v3.0
717 stars 90 forks source link

Android #404

Closed mrsstaceyseigle closed 6 years ago

mrsstaceyseigle commented 6 years ago

Can Open stage control build, compile for android os.

I like to install on android as android will be the server.

jean-emmanuel commented 6 years ago

No, open-stage-control is not designed this way. There seem to be solutions to run node on android though, so maybe running in headless mode with node is possible, but I wouldn't bet on it.

jean-emmanuel commented 6 years ago

-> https://github.com/electron/electron/issues/9162#issuecomment-362978842 I can't try that, but if you manage to get it working, I'd be happy to add instructions in the docs

mrsstaceyseigle commented 6 years ago

I will give it a try and will report back here.

In order to run headless do we have to compile the source code or do we just download the source code as is and just run the correct commands in node.

Also would you be able to provide headless commands

jean-emmanuel commented 6 years ago

You need to follow the "run from sources" instructions except that you run the app with "node /path/to/app/ --no-gui" instead of "npm start". Commands are documented here. You'll probably have to remove some dependencies by hand from package.json, such as https://github.com/jean-emmanuel/open-stage-control/blob/master/package.json#L30

mrsstaceyseigle commented 6 years ago

I am trying to run headless. I have not tried on android yet but I did try on windows. Here are the errors I got.

$ node /C:\Users\mrsst\Downloads\open-stage-control-0.38.4-win32-x64/app/ -n internal/modules/cjs/loader.js:582 throw err; ^ Error: Cannot find module 'C:\Users\mrsst\UsersmrsstDownloadsopen-stage-control-0.38.4-win32-x64\app' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15) at Function.Module._load (internal/modules/cjs/loader.js:506:25) at Function.Module.runMain (internal/modules/cjs/loader.js:741:12) at startup (internal/bootstrap/node.js:285:19) at bootstrapNodeJSCore (internal/bootstrap/node.js:739:3)

On Wed, Oct 24, 2018 at 4:44 AM jean-emmanuel notifications@github.com wrote:

You need to follow the "run from sources http://osc.ammd.net/getting-started/#run-from-sources" instructions except that you run the app with "node /path/to/app/ --no-gui" instead of "npm start". Commands are documented here http://osc.ammd.net/getting-started/#options. You'll probably have to remove some dependencies by hand from package.json, such as https://github.com/jean-emmanuel/open-stage-control/blob/master/package.json#L30

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jean-emmanuel/open-stage-control/issues/404#issuecomment-432567991, or mute the thread https://github.com/notifications/unsubscribe-auth/Apb8-k6_TRkwzN01DjuO_8q1w9o6NgHcks5uoCiAgaJpZM4X3Q44 .

jean-emmanuel commented 6 years ago

C:\Users\mrsst\UsersmrsstDownloadsopen-stage-control-0.38.4-win32-x64\app doesn't exist, try C:\Users\mrsst\UsersmrsstDownloadsopen-stage-control-0.38.4-win32-x64\resources\app

jean-emmanuel commented 6 years ago

(http://osc.ammd.net/getting-started/#running-without-electron)

mrsstaceyseigle commented 6 years ago

So in order to get it to work I need to first install xvfb https://en.wikipedia.org/wiki/Xvfb. Is that correct

On Wed, Oct 24, 2018 at 5:38 AM jean-emmanuel notifications@github.com wrote:

(http://osc.ammd.net/getting-started/#running-without-electron)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jean-emmanuel/open-stage-control/issues/404#issuecomment-432586986, or mute the thread https://github.com/notifications/unsubscribe-auth/Apb8-tBFdoMxqDu3lHWsD2sHLSTHCBoZks5uoDT4gaJpZM4X3Q44 .

jean-emmanuel commented 6 years ago

No, this is only needed in a true headless environment (without a display/window manager) and not required when running with node. I was just pointing out the next paragraph (Running without Electron).

mrsstaceyseigle commented 6 years ago

1 2 3 4

jean-emmanuel commented 6 years ago

The program failed to recognize node under windows, it should be fixed with latest commit. I also made it enable --no-gui automatically when running with node.

mrsstaceyseigle commented 6 years ago

So should I redownload the package

jean-emmanuel commented 6 years ago

There has been no new release so you gotta run git pull and package it yourself (note that you can also just run from sources without packaging, as explained in the docs).

mrsstaceyseigle commented 6 years ago

really sorry to bother you with this. Just trying to get this to run headless on windows so that I can later try on android. So I tried to run it directly from the source after git pull. here is the last error receive

$ node /c:/open-stage-control/open-stage-control/app/ -n internal/modules/cjs/loader.js:582 throw err; ^ Error: Cannot find module 'yargs' at Function.Module._resolveFilename (internal/modules/cjs/loader.js:580:15) at Function.Module._load (internal/modules/cjs/loader.js:506:25) at Module.require (internal/modules/cjs/loader.js:636:17) at require (internal/modules/cjs/helpers.js:20:18) at Object. (c:\open-stage-control\open-stage-control\app\main\settings.js:94:12) at Module._compile (internal/modules/cjs/loader.js:688:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10) at Module.load (internal/modules/cjs/loader.js:598:32) at tryModuleLoad (internal/modules/cjs/loader.js:537:12) at Function.Module._load (internal/modules/cjs/loader.js:529:3)

On Wed, Oct 24, 2018 at 1:44 PM jean-emmanuel notifications@github.com wrote:

The're has been no new release so you gotta run git pull and package it yourself (note that you can also just run from sources without packaging, as explained in the docs).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jean-emmanuel/open-stage-control/issues/404#issuecomment-432759676, or mute the thread https://github.com/notifications/unsubscribe-auth/Apb8-v46ms4ThKgQVkUJUKGkr-xQPGVhks5uoKcWgaJpZM4X3Q44 .

jean-emmanuel commented 6 years ago

Looks like npm install wasn't run or errored ?

mrsstaceyseigle commented 6 years ago

Seem to be a hard one.

Tried the followings npm install bash node /c:/open-stage-control/open-stage-control/app/ -n

Errors: $ node /c:/open-stage-control/open-stage-control/app/ -n c:\open-stage-control\open-stage-control\app\main\main.js:18 require('electron').dialog.showErrorBox = (title, err)=>{ ^ TypeError: Cannot set property 'showErrorBox' of undefined at Object. (c:\open-stage-control\open-stage-control\app\main\main.js:18:45) at Module._compile (internal/modules/cjs/loader.js:688:30) at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10) at Module.load (internal/modules/cjs/loader.js:598:32) at tryModuleLoad (internal/modules/cjs/loader.js:537:12) at Function.Module._load (internal/modules/cjs/loader.js:529:3) at Module.require (internal/modules/cjs/loader.js:636:17) at require (internal/modules/cjs/helpers.js:20:18) at Object. (c:\open-stage-control\open-stage-control\app\index.js:1:63) at Module._compile (internal/modules/cjs/loader.js:688:30)

On Wed, Oct 24, 2018 at 2:22 PM jean-emmanuel notifications@github.com wrote:

Looks like npm install wasn't run or errored ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jean-emmanuel/open-stage-control/issues/404#issuecomment-432773242, or mute the thread https://github.com/notifications/unsubscribe-auth/Apb8-idjEYM6Yl_-OXTzc047IkjEet8hks5uoK_4gaJpZM4X3Q44 .

jean-emmanuel commented 6 years ago

Ok that's better, we're back to the error caused by the misdetection of node under windows, could you check that app\main\main.js contains this line: https://github.com/jean-emmanuel/open-stage-control/blob/master/app/main/main.js#L6 ?

mrsstaceyseigle commented 6 years ago

main.js does not contain that line. I have attached the file here. Just change the file extension from .txt to .js main.txt

jean-emmanuel commented 6 years ago

This means your local git repository is not up to date, maybe git pull origin master again ?

mrsstaceyseigle commented 6 years ago

$ git pull origin master From https://github.com/jean-emmanuel/open-stage-control

On Wed, Oct 24, 2018 at 4:19 PM jean-emmanuel notifications@github.com wrote:

This means your local git repository is not up to date, maybe git pull origin master again ?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jean-emmanuel/open-stage-control/issues/404#issuecomment-432813016, or mute the thread https://github.com/notifications/unsubscribe-auth/Apb8-kjV79kGCcgArtnylUjJnb2PuZulks5uoMs4gaJpZM4X3Q44 .

mrsstaceyseigle commented 6 years ago

$ git pull origin master From https://github.com/jean-emmanuel/open-stage-control

jean-emmanuel commented 6 years ago

I didn't took the time to open your file yesterday, but it appears it does contain that line... I pushed a new commit to try to fix the problem, can you pull and try again ?

jean-emmanuel commented 6 years ago

Seems to be possible after all ! Check out #405

cyberic99 commented 6 years ago

@mrsstaceyseigle if something is not clean enough, don't hesitate to ask it in #405.

After all, it o-s-c seems easier to build on android than on windows ;-)

mrsstaceyseigle commented 6 years ago

Everything is working great now with the updated commit.

jean-emmanuel commented 6 years ago

Great ! I'm closing this since #405 seems more advanced on the initial topic

mrsstaceyseigle commented 6 years ago

Before closing please allow me to ask this question. Can you please make an Android Version of this software. PLEASE

jean-emmanuel commented 6 years ago

Haha, don't worry you can still ask questions even if it's closed ! There won't be an official android version nor an iOS version anytime soon as 1. the main goal of the project is to provide a desktop app 2. I don't have the hardware and the free time required to work on that.

jean-emmanuel commented 6 years ago

But again, #405 seem to provide that in a way :)