Comments (16)
I see you're using Meson 0.37.1. Can you try with a newer version?
The minimum version specified in the build file is 0.40.0. Although it warns about using a 0.50.0 feature and I never got around to see if I need to fix that.
from foliate.
With meson 0.49 builds, but something wrong at the end:
r@prime:/foliate-master$ meson build --prefix=$PWD/fakeprefix/foliate-master$ ninja -C build
The Meson build system
Version: 0.49.0
Source dir: /home/r/foliate-master
Build dir: /home/r/foliate-master/build
Build type: native build
Project name: com.github.johnfactotum.Foliate
Project version: 1.0.1
Build machine cpu family: x86_64
Build machine cpu: x86_64
Program desktop-file-validate found: YES (/usr/bin/desktop-file-validate)
Program appstream-util found: NO
Program glib-compile-schemas found: YES (/usr/bin/glib-compile-schemas)
Found pkg-config: /usr/bin/pkg-config (0.29)
WARNING: GLib compiled dependencies do not work reliably with
the current version of GLib. See the following upstream issue: https://bugzilla.gnome.org/show_bug.cgi?id=774368
Program gjs found: YES (/usr/bin/gjs)
Configuring com.github.johnfactotum.Foliate using configuration
Program build-aux/meson/postinstall.py found: YES (/home/r/foliate-master/build-aux/meson/postinstall.py)
Build targets in project: 7
Found ninja-1.7.2 at /usr/bin/ninja
r@prime:
ninja: Entering directory build' [3/3] Generating com.github.johnfactotum....ata.xml_data_merge with a custom command. r@prime:~/foliate-master$ ninja -C build install ninja: Entering directory
build'
[0/1] Installing files.
Installing subdir /home/r/foliate-master/src/assets to /home/r/foliate-master/fakeprefix/share/com.github.johnfactotum.Foliate/assets
Installing /home/r/foliate-master/src/assets/cheerio.js to /home/r/foliate-master/fakeprefix/share/com.github.johnfactotum.Foliate/assets
Installing /home/r/foliate-master/src/assets/viewer.html to /home/r/foliate-master/fakeprefix/share/com.github.johnfactotum.Foliate/assets
Installing /home/r/foliate-master/src/assets/epub.js to /home/r/foliate-master/fakeprefix/share/com.github.johnfactotum.Foliate/assets
Installing /home/r/foliate-master/src/assets/jszip.min.js to /home/r/foliate-master/fakeprefix/share/com.github.johnfactotum.Foliate/assets
Installing data/com.github.johnfactotum.Foliate.desktop to /home/r/foliate-master/fakeprefix/share/applications
Installing data/com.github.johnfactotum.Foliate.appdata.xml to /home/r/foliate-master/fakeprefix/share/metainfo
Installing src/com.github.johnfactotum.Foliate.src.gresource to /home/r/foliate-master/fakeprefix/share/com.github.johnfactotum.Foliate
Installing /home/r/foliate-master/data/com.github.johnfactotum.Foliate.gschema.xml to /home/r/foliate-master/fakeprefix/share/glib-2.0/schemas
Installing /home/r/foliate-master/data/com.github.johnfactotum.Foliate.svg to /home/r/foliate-master/fakeprefix/share/icons/hicolor/scalable/apps
Installing /home/r/foliate-master/data/com.github.johnfactotum.Foliate-symbolic.svg to /home/r/foliate-master/fakeprefix/share/icons/hicolor/symbolic/apps
Installing /home/r/foliate-master/build/src/com.github.johnfactotum.Foliate to /home/r/foliate-master/fakeprefix/bin
Running custom install script '/usr/bin/meson --internal gettext install --subdir=po --localedir=share/locale --pkgname=com.github.johnfactotum.Foliate'
Installing /home/r/foliate-master/build/po/nl_NL.gmo to /home/r/foliate-master/fakeprefix/share/locale/nl_NL/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
Installing /home/r/foliate-master/build/po/it.gmo to /home/r/foliate-master/fakeprefix/share/locale/it/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
Installing /home/r/foliate-master/build/po/zh_TW.gmo to /home/r/foliate-master/fakeprefix/share/locale/zh_TW/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
Installing /home/r/foliate-master/build/po/ru_RU.gmo to /home/r/foliate-master/fakeprefix/share/locale/ru_RU/LC_MESSAGES/com.github.johnfactotum.Foliate.mo
Running custom install script '/home/r/foliate-master/build-aux/meson/postinstall.py'
Updating icon cache...
Updating desktop database...
Compiling GSettings schemas...
r@prime:~/foliate-master$ GSETTINGS_SCHEMA_DIR=$PWD/fakeprefix/share/glib-2.0/schemas ./fakeprefix/bin/com.github.johnfactotum.Foliate
(com.github.johnfactotum.Foliate:3488): Gjs-CRITICAL **: JS ERROR: SyntaxError: invalid property id @ resource:///com/github/johnfactotum/Foliate/js/main.js:37
JS_EvaluateScript() failed
r@prime:~/foliate-master$
from foliate.
This looks like a JS error, though. What version of GJS do you have?
from foliate.
That one which is in Debian stretch(stable) 1.46.0-1:
https://packages.debian.org/stretch/gjs
from foliate.
I think you'd need at least 1.50.x, although I haven't really tested, as I've been developing against 1.56.
from foliate.
I see, so there is no way to test it, in next Debian stable will be gjs 1.54.3-1, and I don't want to broke the system by installing unsupported version.
from foliate.
In general, this is developed against the GNOME 3.32 environment. I think stretch is still on 3.22?
Maybe you could try the flatpak version?
from foliate.
flatpak package works with some issues(error when opening epub by default application for it), but I don't want to use flatpak.
from foliate.
Well, in that case, there's really nothing I can do. The code relies heavily on ES6 features available only in later versions of GJS.
from foliate.
Why not to use different language?
from foliate.
I suppose I could have, but I didn't. And I'm not going to rewrite the whole thing now.
from foliate.
Instead of opening a new issue, because the problem is the same:
on ubuntu 18.04 compilation is fine but wont start.
./fakeprefix/bin/com.github.johnfactotum.Foliate
(com.github.johnfactotum.Foliate:6139): Gjs-CRITICAL **: 13:44:05.136: JS ERROR: SyntaxError: invalid property id @ resource:///com/github/johnfactotum/Foliate/js/main.js:1884
Script ./fakeprefix/bin/com.github.johnfactotum.Foliate threw an exception
Gjs version is 1.52.5-0ubuntu18.04.1
from foliate.
Yes, that specific line uses spread in object literals, which is only available in Firefox 55+, which means it's probably only available in GJS 1.53.9+.
The solution would be to either install a newer version of GJS, or possibly transpiling the code with something like Babel. See #45. Of course one could also manually rewrite the code, but I don't think anyone's got time for that.
Why is all this necessary? Well, it's just like newer versions of Meson require newer versions of Python in order to run. It just so happens that GJS isn't as popular as Python, so there's no convenient PPAs one could just use.
I'll add the version info in the readme.
from foliate.
ok I was able to manually compile the main.js with babel targeting to firefox 52. Now I can open books and foliate works fine.
I don't know how to integrate babel with your code, but for what might worth I write the steps I did:
> cd src
> npm install --save-dev @babel/core @babel/cli @babel/preset-env
# create a file .babelrc with inside:
{
"presets": [
["@babel/preset-env", {
"targets": {
"firefox": "52"
}
}]
]
}
# copy the main
> mv main.js main.src.js
# compile
> npx babel main.src.js --out-file main.js
that's all.
from foliate.
Thanks for testing this! This is a good step towards supporting older platforms.
from foliate.
Well, I successfully build your program(deb-package) on Debian 10(Gnome). It installs and works. Foliate 1.5.0
from foliate.
Related Issues (20)
- FR: Use paragraph number for citation HOT 1
- no javascript file in epub 3 HOT 1
- failed to add Calibre-web OPDS
- Freezes on tranation menu HOT 1
- Failed to spawn webkitgtk process HOT 2
- Trying to make Foliate appimage HOT 3
- Foliate won't use piper options? HOT 1
- Add setting for sidebar location HOT 4
- Add an option to switch off pop up text when hover on the main text HOT 1
- How to store/backup library HOT 1
- Foliate Seems To Forget Locations Of Books HOT 1
- I hope that all content can be scrolled with the mouse when using scroll mode HOT 2
- README: explicit --recurse-submodules command HOT 2
- Custom theme installation when installed with snap.
- Downloading books from Internet Archive sets default filename to "cors_get.php" HOT 1
- Strange Metainfo HOT 1
- FYI: After Ubuntu upgrade, foliate locks up HOT 2
- Won't add Annotations to pdf files. HOT 2
- Crashes always HOT 2
- Missing deb package since 3.1.0 from releases? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from foliate.