Is it possible to run WtiteFeely on an Android device?


#1

I want to run my WriteFeely instance on my old Android tablet. I install 32bit Linux on it, but writefreely executable is 64bit and not start. Is it possible to release an 32bit linux version or Android version of WriteFreely?


#2

We might release versions for other platforms / architectures in the future (like v1.0), but for now, you can compile a 32-bit version on your main machine with:

GOOS=linux GOARCH=386 go build

And then just transfer the binary to your tablet


#3

I try go for the first time and not sure if I do it right. I install go on my Windows PC, then type go get github.com/writeas/writefreely

After this I type set GOS=linux
then type set GOARCH=386
and finally type go build pathto\github.com\writeas\writefreely\cmd\writefreely
this create writefreely file in my current folder. I transfer it to my tablet but when try to run it from Terminal gets me Segmentation fault error.


#4

You cannot simply run the binary without anything around it. It needs the folders templates, static, keys and pages. Check the Makefile for the ‘release’ job to get what you need. Probably it works to just run:

cd /path/to/go/src/github.com/writeas/writefreely
GOOS=linux GOARCH=386 go build
make ui
make assets
mkdir build
cp -r templates pages static build
mkdir build/keys
cp cmd/writefreely/writefreely build 

(please translate this to Windows command line yourself as I’m lacking the proficiency)

Now you can copy over the build folder and use it on your tablet.

All this is only going to work if your tablet has an actual Intel compatible CPU. It might also be an ARM. You can find out which CPU you exactly have on your tablet by checking out /proc/cpuinfo.

In case it is an ARM you might get thrilling new challenges when cross-compiling. Then I rather suggest you to try compiling it directly on the tablet.