skishore / inkstone

Learn Chinese on the go - no Internet connection required!

Home Page:https://www.skishore.me/inkstone/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Desktop support

sarahzrf opened this issue · comments

Would it be possible to add support for using Inkstone on the desktop? I tried running/building it for the browser, and it 95% worked already - there were mostly interface-rendering issues (and I had to enable "simulate touch events" mode).

Hey, that's a great idea! I guess the basic approach would be to use Electron with a manifest that forces a mobile user agent. The server would also have to be started (or replaced with a static web server, as in the Cordova build). It sounds very doable.

Er, I don't know anything about using Electron, Meteor, Cordova... pretty much everything involved in this - so I thought you meant you might look look into implementing this yourself, sorry. Did I misunderstand?

Got it, I wasn't sure.

I think it would be pretty easy to get the mobile app working, with the mobile UI, as a desktop app, but it would take a bit more time to have a separate UI for desktop that takes advantage of the landscape layout, room for extra control, etc. Do you think getting the first part working would still be useful?

What OS are you using? Here's a macOS build using Electron. I would say it's pretty experimental but it runs on my computer: https://www.dropbox.com/s/gi9tutin9qbe8hg/Inkstone.dmg?dl=0

You'll have to drag it to the Applications folder to install it as is normal with macOS apps.

Edit: scratch that, I haven't figured out how to get the touch events working just yet.
Edit 2: touch events now maybe work.

I run Arch. So I can't test that build on my end - but thanks for working on it so far! :)

Hey - any progress for a GNU/Linux version?

Hi, sorry it took me a while to respond to this! It should be possible to produce a Linux version now, but I can't do it alone, as I only run OSX and Windows at home. Maybe you can try building it? Here are the steps you'd need to follow to do that:

  • Install NPM (the Node Javascript package manager)
  • Install Meteor.js
  • Run "npm install -g electrify"

And then, within the project directory:

  • Run "git checkout electron"
  • Run "electrify package"
  • Copy the contents of the cordova_build_override directory into the packaged app

Unfortunately, I can't give you a command for the last step because the app structure is different for different platforms and I don't know what the Linux version will look like. If you can get to the stage where "electrify package" succeeds and show me the package tree, then I can point out where to copy the data files to.

Let me know if you're up for trying this. If you want, we can set up a time and work through it together - the whole build should take ~10m once we know how to do it. (Debugging any issues we run into may take a while, of course.) Alternatively, maybe I can rent a Linux VM for a bit to try it out.

I'm closing this issue now that we have desktop support for Windows and OSX, the two platforms I have access to at the moment. I'll open a new one for updating the desktop binaries - the desktop builds are slow so I don't get to them as often as Android.