From 9ccd2ed8099bbe8c95fa64d20e34fd6e91a0328d Mon Sep 17 00:00:00 2001 From: Cittadhammo <82962905+cittadhammo@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:24:27 +0000 Subject: [PATCH 1/5] Update README.md --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 3f4f45b..d1a8625 100644 --- a/README.md +++ b/README.md @@ -42,6 +42,8 @@ First you need to download and build the **koxtoolchain** on your development co *TODO : Detailed step to build project* +new branch test + ## How to install You can build the software, put it on a KOBO with XCSoar software, and launch it any way you see fit. From 2cc4d27988bd7710d8779b3d1e9a96994e5fb821 Mon Sep 17 00:00:00 2001 From: Cittadhammo <82962905+cittadhammo@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:41:00 +0000 Subject: [PATCH 2/5] add step by step build instructions --- README.md | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d1a8625..bf170f2 100644 --- a/README.md +++ b/README.md @@ -40,9 +40,20 @@ The software lets you use the keyboard to write and edit text files. It's coded First you need to download and build the **koxtoolchain** on your development computer. This toolchain, once built, will let you build Go programs that can run on the KOBO. -*TODO : Detailed step to build project* +### Step by step built -new branch test +Note: Using WSL (problems with case-sensitivity in memory) or Github Codespace (long built) is a bit tricky. I recommend using a real Ubuntu machine. + +1. Clone or download +2. install its dependancies: `sudo apt-get install build-essential autoconf automake bison flex gawk libtool libtool-bin libncurses-dev curl file git gperf help2man texinfo unzip wget` +3. inside the folder run `./gen-tc.sh kobo` (I wonder if one could use the [prebuild version]([url](https://github.com/koreader/koxtoolchain/releases))) this may take more than 2 hours +4. run the `source /home/UserName/Downloads/kobowriter-main/refs/x-compile.sh kobo env bare` as recommended at the end of your build +5. Make sure you have golang-go installed on your linux distro (via apt or snap, ...) +6. Clode or download +7. inside its main folder, run make. +8. Kobowriter will be in the build folder. + +Note: If you have installed XCSoar with the archive tar.gz below, you can swap your custom build kobowriter with the one in the .adds/kobowriter folder. Like this, you can have custom keyboard layout by modifying the event/key.go and build your own kobowriter. ## How to install From cb27c63a494a55f4b287ee2ac03843809a5d734f Mon Sep 17 00:00:00 2001 From: Cittadhammo <82962905+cittadhammo@users.noreply.github.com> Date: Thu, 18 Jan 2024 21:42:05 +0000 Subject: [PATCH 3/5] fix screen.go see issue https://github.com/olup/kobowriter/issues/18 --- screener/screen.go | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/screener/screen.go b/screener/screen.go index 703f9a4..8e91539 100644 --- a/screener/screen.go +++ b/screener/screen.go @@ -87,11 +87,6 @@ func printDiff(previous matrix.Matrix, next matrix.Matrix, fb *gofbink.FBInk, fo fb.ClearScreen(&gofbink.FBInkConfig{ IsInverted: next[i][j].IsInverted, NoRefresh: true, - }, &gofbink.FBInkRect{ - Top: uint16(i * ttSize), - Left: uint16(j * ttWidth), - Height: uint16(ttSize), - Width: uint16(ttWidth), }) fb.PrintOT(string(next[i][j].Content), &gofbink.FBInkOTConfig{ @@ -122,7 +117,7 @@ func printDiff(previous matrix.Matrix, next matrix.Matrix, fb *gofbink.FBInk, fo } } - fb.Refresh(0, 0, 0, 0, &gofbink.FBInkConfig{}) + fb.Refresh(0, 0, 0, 0, gofbink.DitherFloydSteingberg ,&gofbink.FBInkConfig{}) } func (s *Screen) PrintPng(imgBytes []byte, w int, h int, x int, y int) { @@ -158,12 +153,12 @@ func (s *Screen) PrintAlert(message string, width int) { } func (s *Screen) Clear() { - s.fb.ClearScreen(&gofbink.FBInkConfig{}, &gofbink.FBInkRect{}) + s.fb.ClearScreen(&gofbink.FBInkConfig{}) s.presentMatrix = matrix.FillMatrix(s.presentMatrix, ' ') } func (s *Screen) ClearFlash() { - s.fb.ClearScreen(&gofbink.FBInkConfig{IsFlashing: true}, &gofbink.FBInkRect{}) + s.fb.ClearScreen(&gofbink.FBInkConfig{IsFlashing: true}) s.presentMatrix = matrix.FillMatrix(s.presentMatrix, ' ') } From 84650bedf2522bf1167613d6e29efa8b4bc13a91 Mon Sep 17 00:00:00 2001 From: Cittadhammo <82962905+cittadhammo@users.noreply.github.com> Date: Sat, 20 Jan 2024 16:34:13 +0000 Subject: [PATCH 4/5] Update README.md --- README.md | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index bf170f2..beccaaf 100644 --- a/README.md +++ b/README.md @@ -40,20 +40,42 @@ The software lets you use the keyboard to write and edit text files. It's coded First you need to download and build the **koxtoolchain** on your development computer. This toolchain, once built, will let you build Go programs that can run on the KOBO. -### Step by step built +### Step by step local built Note: Using WSL (problems with case-sensitivity in memory) or Github Codespace (long built) is a bit tricky. I recommend using a real Ubuntu machine. 1. Clone or download 2. install its dependancies: `sudo apt-get install build-essential autoconf automake bison flex gawk libtool libtool-bin libncurses-dev curl file git gperf help2man texinfo unzip wget` -3. inside the folder run `./gen-tc.sh kobo` (I wonder if one could use the [prebuild version]([url](https://github.com/koreader/koxtoolchain/releases))) this may take more than 2 hours +3. inside the folder run `./gen-tc.sh kobo` this may take more than 2 hours. (instead you could use the [prebuild version](https://github.com/koreader/koxtoolchain/releases) and unzip, untar in your home folder) 4. run the `source /home/UserName/Downloads/kobowriter-main/refs/x-compile.sh kobo env bare` as recommended at the end of your build 5. Make sure you have golang-go installed on your linux distro (via apt or snap, ...) -6. Clode or download -7. inside its main folder, run make. +6. Clone or download (you can modify event/key.go for other keyboard layout) +7. inside its main folder, run `make`. 8. Kobowriter will be in the build folder. -Note: If you have installed XCSoar with the archive tar.gz below, you can swap your custom build kobowriter with the one in the .adds/kobowriter folder. Like this, you can have custom keyboard layout by modifying the event/key.go and build your own kobowriter. +### Step by step Codespace built + +[Codespace](https://github.com/features/codespaces) is a Ubunutu environement that you can use for free in any of your repo directly on the github website. + +1. Fork (green button) +2. In your new fork, start a new codespace in the GitHub Web UI +3. Once your codespace is runing type in terinal : `cd "$HOME"` +4. then download the ToolChain prebuild by runnung `wget https://github.com/koreader/koxtoolchain/releases/download/2021.12/kobo.zip` +5. then: `unzip kobo.zip` +6. then: `tar -xvzf kobo.tar.gz` +7. You should have the x-tools listed in the repo now, you can check with `ls` +8. Open new terminal and add a file name `x-compile.sh` in your main repo (left column) +9. Open the file and copy paste the content from (you can also download that single file and uploaded it to your codespace) +10. Run: `source x-compile.sh kobo env bare` +11. Run: `make` (you can modify event/key.go for other keyboard layout before make) + +Notes: + +- Note: if [PR](https://github.com/olup/kobowriter/pull/19/commits/cb27c63a494a55f4b287ee2ac03843809a5d734f) has not been accepted or merge, you have to modify the file screener/screen.go with the folowing [lines](https://github.com/olup/kobowriter/blob/cb27c63a494a55f4b287ee2ac03843809a5d734f/screener/screen.go) + +- If you have installed XCSoar with the archive tar.gz below, you can swap your custom build kobowriter with the one in the .adds/kobowriter folder. Like this, you can have custom keyboard layout by modifying the event/key.go and build your own kobowriter. + +- You can add other app to launch from the XCSoar interface by adding file in the .kobo/XCSoarData/. For example, add a file containing the following line for adding koreader to the tool list in XCSoar ## How to install From b6b3f0c083405ff0f6124940585d05c19cf19b1c Mon Sep 17 00:00:00 2001 From: Cittadhammo <82962905+cittadhammo@users.noreply.github.com> Date: Sat, 20 Jan 2024 16:37:16 +0000 Subject: [PATCH 5/5] Update README.md --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index beccaaf..0829b99 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,9 @@ Note: Using WSL (problems with case-sensitivity in memory) or Github Codespace ( 9. Open the file and copy paste the content from (you can also download that single file and uploaded it to your codespace) 10. Run: `source x-compile.sh kobo env bare` 11. Run: `make` (you can modify event/key.go for other keyboard layout before make) +12. Remove the kobowriter from the .ignore file +13. push your changes in your repo. +14. You new kobowriter will be in the build folder of your repo on the github website! Notes: