cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CB-7978) Can't run browser platform on Linux
Date Mon, 24 Nov 2014 21:22:13 GMT

    [ https://issues.apache.org/jira/browse/CB-7978?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14223533#comment-14223533
] 

ASF GitHub Bot commented on CB-7978:
------------------------------------

Github user mmocny commented on a diff in the pull request:

    https://github.com/apache/cordova-browser/pull/4#discussion_r20823145
  
    --- Diff: bin/templates/project/cordova/run ---
    @@ -20,10 +20,33 @@
     */
     
     var shell = require('shelljs'),
    -    spawn = require('child_process').spawn,
    -    project = 'file://' + shell.pwd() + '/platforms/browser/www/index.html';
    +	fs = require('fs');
     
    +var configFile = shell.pwd() + '/config.xml';
    +var configXML = fs.readFileSync(configFile, 'utf8');
    +var sourceFile = /<content[\s\S]*?src\s*=\s*"(.*?)"/i.exec(configXML);	
    +var spawn = require('child_process').spawn,
    +    tmpDir = '/tmp/temp_chrome_user_data_dir_for_cordova_browser/',
    +    project = 'file://' + shell.pwd() + '/platforms/browser/www/' + sourceFile[1];
    +
    +fs.mkdir(tmpDir);
    --- End diff --
    
    I get an error that dir is already created if I run this twice.  Also, this call is async
so is dangerous as is.
    
    Probably you want to use `shelljs` instead: `shelljs.mkdir('-p', tmpDir).



> Can't run browser platform on Linux
> -----------------------------------
>
>                 Key: CB-7978
>                 URL: https://issues.apache.org/jira/browse/CB-7978
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Browser
>    Affects Versions: 4.0.0
>         Environment: Linux
>            Reporter: Victor Adrian Sosa Herrera
>
> Command "cordova run browser" doesn't work on Linux. The run command handles the cases
of when using Windows and Darwin (MacOS) but no Linux.
> Moreover, I have Chrome installed in my machine, but it doesn't respond to the typical
"chrome" command because I get an error in the standard output[1], so I have to use "google-chrome"
command to launch it
> One more thing I noticed is that in the run script of the browser platform, it is directly
pointing to "www/index.html", instead of reading config.xml file looking for <content src="HTMLPage.html">
> [1] Error
> chrome: error while loading shared libraries: libudev.so.0: cannot open shared object
file: No such file or directory



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message