Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

a bit confused #15

Closed
sonnyp opened this issue Jul 4, 2019 · 1 comment
Closed

a bit confused #15

sonnyp opened this issue Jul 4, 2019 · 1 comment

Comments

@sonnyp
Copy link

sonnyp commented Jul 4, 2019

you should be able to run './src/my-js-app' and stuff should just work
-- https://github.com/gcampax/gtk-js-app/blob/master/README

% ./src/my-js-app                                                                                                                                                                 
no such file or directory: ./src/my-js-app

Ok let's try gjs.

 % gjs ./src/main.js                                                                                                                                                               
(gjs:1281): Gjs-WARNING **: 15:27:19.845: JS ERROR: ReferenceError: pkg is not defined
@./src/main.js:27:1
Script ./src/main.js threw an exception

Ok let's build this

% meson build
[....]

% ./build/src/com.example.Gtk.JSApplication 
permission denied: ./build/src/com.example.Gtk.JSApplication

% chmod +x ./build/src/com.example.Gtk.JSApplication
                                                                                                                        
% ./build/src/com.example.Gtk.JSApplication
(com.example.Gtk.JSApplication:1424): Gjs-WARNING **: 15:28:32.957: JS ERROR: ImportError: No JS module 'main' found in search path
@./build/src/com.example.Gtk.JSApplication:6:1
Script ./build/src/com.example.Gtk.JSApplication threw an exception

Ok let's install this

% cd build
% DESTDIR=./install ninja install
% ./install/usr/local/bin/com.example.Gtk.JSApplication
(com.example.Gtk.JSApplication:2282): Gjs-WARNING **: 15:35:38.003: JS ERROR: ImportError: No JS module 'main' found in search path
@./install/usr/local/bin/com.example.Gtk.JSApplication:6:1

Script ./install/usr/local/bin/com.example.Gtk.JSApplication threw an exception
@sonnyp
Copy link
Author

sonnyp commented Jul 4, 2019

ok I was able to build/install/run using

cd gtk-js-app
meson --prefix $PWD/install build
ninja -C build install
./install/bin/com.example.Gtk.JSApplication

But I was under the impression there was no need for building to hack this, am I missing something?

@gcampax gcampax closed this as completed in d8dfb73 May 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant