After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 750861 - port to package.js
port to package.js
Status: RESOLVED FIXED
Product: gnome-documents
Classification: Core
Component: general
3.16.x
Other All
: Normal normal
: ---
Assigned To: GNOME documents maintainer(s)
GNOME documents maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2015-06-12 14:51 UTC by Alessandro Bono
Modified: 2015-08-10 19:05 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
port to package.js (2.72 KB, patch)
2015-06-12 19:54 UTC, Alessandro Bono
none Details | Review
port to package.js (4.30 KB, patch)
2015-06-12 21:20 UTC, Alessandro Bono
none Details | Review
port to package.js (5.41 KB, patch)
2015-06-12 22:18 UTC, Alessandro Bono
none Details | Review
port to package.js (10.59 KB, patch)
2015-07-31 22:59 UTC, Alessandro Bono
none Details | Review
port to package.js (11.39 KB, patch)
2015-08-03 09:39 UTC, Alessandro Bono
none Details | Review
port to package.js (12.40 KB, patch)
2015-08-09 11:55 UTC, Alessandro Bono
none Details | Review
port to package.js (12.85 KB, patch)
2015-08-09 14:19 UTC, Debarshi Ray
none Details | Review
porting to package.js (26.18 KB, patch)
2015-08-09 23:41 UTC, Alessandro Bono
none Details | Review
Port to package.js (60.46 KB, patch)
2015-08-10 19:02 UTC, Debarshi Ray
committed Details | Review

Description Alessandro Bono 2015-06-12 14:51:31 UTC
The port to package.js is necessary to be able to use Templates.
Comment 1 Alessandro Bono 2015-06-12 19:54:12 UTC
Created attachment 305176 [details] [review]
port to package.js
Comment 2 Alessandro Bono 2015-06-12 21:20:53 UTC
Created attachment 305180 [details] [review]
port to package.js
Comment 3 Alessandro Bono 2015-06-12 22:18:50 UTC
Created attachment 305184 [details] [review]
port to package.js
Comment 4 Alessandro Bono 2015-07-31 22:59:38 UTC
Created attachment 308591 [details] [review]
port to package.js
Comment 5 Alessandro Bono 2015-08-03 09:39:52 UTC
Created attachment 308656 [details] [review]
port to package.js
Comment 6 Debarshi Ray 2015-08-08 09:31:37 UTC
Review of attachment 308656 [details] [review]:

Thanks for doing this, Alessandro. One quick comment:

::: src/mainBooks.js
@@ +26,3 @@
+              'Goa': '1.0',
+              'GObject': '2.0',
+              'Gtk': '3.0' });

Aren't we missing a few things here? Tracker, TrackerControl, EvinceDocument, WebKit2 come to mind. You can take a look at the top of src/application.js, and that bit can now be removed.
Comment 7 Alessandro Bono 2015-08-09 11:55:19 UTC
Created attachment 308973 [details] [review]
port to package.js
Comment 8 Debarshi Ray 2015-08-09 14:18:07 UTC
Review of attachment 308973 [details] [review]:

Thanks, Alessandro. A few more things that I noticed:

::: src/Makefile.am
@@ +95,3 @@
+	$(MKDIR_P) $(DESTDIR)$(bindir)
+	-rm -f $(DESTDIR)$(bindir)/gnome-documents
+	-rm -f $(DESTDIR)$(bindir)/gnome-books

We should also delete the gresource symlinks.

::: src/application.js
@@ -493,3 @@
 
-        let resource = Gio.Resource.load(Path.RESOURCE_DIR + '/gnome-documents.gresource');
-        resource._register();

We should also remove the set_prgname calls because package.js does it for us.

::: src/main.js
@@ +29,3 @@
+              'Goa': '1.0',
+              'Gtk': '3.0',
+              'Goa': '1.0',

'Goa' has been mentioned twice.

::: src/mainBooks.js
@@ +29,3 @@
+              'Goa': '1.0',
+              'Gtk': '3.0',
+              'Goa': '1.0',

Ditto.
Comment 9 Debarshi Ray 2015-08-09 14:19:04 UTC
Created attachment 308977 [details] [review]
port to package.js

I took the liberty to fix these up.
Comment 10 Alessandro Bono 2015-08-09 23:41:29 UTC
Created attachment 308986 [details] [review]
porting to package.js
Comment 11 Debarshi Ray 2015-08-10 18:41:11 UTC
Review of attachment 308986 [details] [review]:

Thanks, Alessandro. This looks really good. A few comments:

::: data/Makefile.am
@@ +7,3 @@
+		--sourcedir=$(srcdir)					\
+		--generate-dependencies					\
+		$(srcdir)/org.gnome.Documents.data.gresource.xml	\

We should add app_resource_files and the XML to EXTRA_DIST. Otherwise they will be missing from the release tarballs.

::: po/POTFILES.in
@@ +26,3 @@
+[type: gettext/glade]data/ui/preview-context-menu.ui
+[type: gettext/glade]data/ui/preview-menu.ui
+[type: gettext/glade]data/ui/selection-menu.ui

Better to retain the alphabetical order.

::: src/Makefile-js.am
@@ -34,3 @@
 BUILT_SOURCES += \
     path.js \
     config.js

We can completely remove path.js.in and config.js.in, and along with them this entire file, because package.js already exports all the information provided by these files. As a nice side effect of that we won't have to fix the distcheck failures that I am seeing now due to build-generated JavaScript sources.

::: src/Makefile.am
@@ +50,3 @@
+		--generate-dependencies					\
+		$(srcdir)/org.gnome.Documents.src.gresource.xml		\
+	)

We should put documents_app_resource_files and the XML file in EXTRA_DIST.

@@ +62,3 @@
+		--generate-dependencies					\
+		$(srcdir)/org.gnome.Books.src.gresource.xml		\
+	)

Ditto.

@@ +74,1 @@
+CLEANFILES += org.gnome.Documents.src.gresource org.gnome.Books.src.gresource

We could just use the resource_DATA, as we do elsewhere, instead of repeating the names.
Comment 12 Debarshi Ray 2015-08-10 19:01:29 UTC
Review of attachment 308986 [details] [review]:

Thanks, Alessandro. This looks really good. A few comments:

::: data/Makefile.am
@@ +7,3 @@
+		--sourcedir=$(srcdir)					\
+		--generate-dependencies					\
+		$(srcdir)/org.gnome.Documents.data.gresource.xml	\

We should add app_resource_files and the XML to EXTRA_DIST. Otherwise they will be missing from the release tarballs.

@@ +60,3 @@
+install-exec-hook:
+	-rm -f $(appdir)/org.gnome.Books.data.gresource
+	$(LN_S) $(appdir)/org.gnome.Documents.data.gresource $(appdir)/org.gnome.Books.data.gresource

The destination (ie. the second argument) is missing DESTDIR.

::: po/POTFILES.in
@@ +26,3 @@
+[type: gettext/glade]data/ui/preview-context-menu.ui
+[type: gettext/glade]data/ui/preview-menu.ui
+[type: gettext/glade]data/ui/selection-menu.ui

Better to retain the alphabetical order.

::: src/Makefile-js.am
@@ -34,3 @@
 BUILT_SOURCES += \
     path.js \
     config.js

We can completely remove path.js.in and config.js.in, and along with them this entire file, because package.js already exports all the information provided by these files. As a nice side effect of that we won't have to fix the distcheck failures that I am seeing now due to build-generated JavaScript sources.

::: src/Makefile.am
@@ +50,3 @@
+		--generate-dependencies					\
+		$(srcdir)/org.gnome.Documents.src.gresource.xml		\
+	)

We should put documents_app_resource_files and the XML file in EXTRA_DIST.

@@ +62,3 @@
+		--generate-dependencies					\
+		$(srcdir)/org.gnome.Books.src.gresource.xml		\
+	)

Ditto.

@@ +74,1 @@
+CLEANFILES += org.gnome.Documents.src.gresource org.gnome.Books.src.gresource

We could just use the resource_DATA, as we do elsewhere, instead of repeating the names.
Comment 13 Debarshi Ray 2015-08-10 19:02:32 UTC
Created attachment 309024 [details] [review]
Port to package.js
Comment 14 Debarshi Ray 2015-08-10 19:04:28 UTC
Comment on attachment 309024 [details] [review]
Port to package.js

I fixed the above issues and pushed to master.