Code Monkey home page Code Monkey logo

gtk-js-app's People

Contributors

fmuellner avatar gcampax avatar ptomato avatar ueno avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

gtk-js-app's Issues

#!/bin/bash in autogen.sh

autogen.sh does not use bash-specific features, so we can change it to #!/bin/sh. #!/bin/bash causes error on systems which do not have bash installed in /bin.

a bit confused

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

Make file syntax error

I'm on Linux Mint:
$ make
make all-recursive
make[1]: Entering directory /home/bruce/gjs/gtk-js-app' Making all in po make[2]: Entering directory/home/bruce/gjs/gtk-js-app/po'
make[2]: Nothing to be done for all'. make[2]: Leaving directory/home/bruce/gjs/gtk-js-app/po'
Making all in data
make[2]: Entering directory /home/bruce/gjs/gtk-js-app/data' Makefile:822: *** missing separator. Stop. make[2]: Leaving directory/home/bruce/gjs/gtk-js-app/data'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/bruce/gjs/gtk-js-app'
make: *** [all] Error 2

Template for using GJS with TypeScript

I am a complete newcomer to GTK & GJS development. I write TypeScript professionally and I prefer using TypeScript using plain JavaScript. I see that multiple GTK apps are written in TypeScript now.

One popular example is pop-os/shell, however that project does not use type definitions for GJS itself. It also uses quite a weird build setup with sed scripts.

Then I found ts-for-gir which seems to be the most mature library that provides types for GJS. They also have a lot of example projects. Meson is not used as a build tool for these example projects (esbuild is used instead for most).

It would be great to have a standard template for starting out GJS development that includes TypeScript.

Error in configure

After running the ./autogen.sh, in the configure step throws this error:

checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
./configure: line 12460: syntax error near unexpected token 0.9.6' ./configure: line 12460: GOBJECT_INTROSPECTION_REQUIRE(0.9.6)'

NameHasNoOwner DBus error

I can build the code correctly and execute the program with "com.example.Gtk.JSApplication" , but when I launch it from the desktop environments (Gnome) it doesn't start. Looking at .application file, it try to execute
gapplication launch com.example.Gtk.JSApplication
and if I do this command I get this error:
error sending Activate message to application: GDBus.Error:org.freedesktop.DBus.Error.NameHasNoOwner: Could not activate remote peer.

No idea how I can try to fix this

support for debian 7 wheeze

Hi!

Is there any possibility to support this app in debian testing aka wheeze? When running ./autogen.sh I've got:

Requested 'gtk+-3.0 >= 3.7.10' but version of GTK+ is 3.4.2

I don't want to use debian experimental ...yet! Thanks for your work :)

Run without build

Hi
I am trying build a test app just to get to know better GJS and found this repo in Gnome Documentation about GJS.
I was learning how meson and ninja works but I can't figure it out how to run the app inside the project folder without making a ninja install.

If I try to do gjs src/main.js it complains about pkg not being defined, and if I do ninja inside de build directory and run gjs _build/src/com.example.Gtk.JSApplication without making ninja install, it complains about not finding main in the search path.

The only thing I could do is after running sudo ninja install, and then gjs _build/src/com.example.Gtk.JSApplication that's when the app launches, but every time I make a change I would have to start over and make an install.

What am I missing? I see here https://wiki.gnome.org/Projects/Gjs/Package that pkg is available at runtime through the package.js, but I can't understand how to run from src without installing.

Thanks

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.