10-17-2021, 02:35 PM | #61 |
Zealot
Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
|
Okay. Understood.
Now I'm fighting with cmake. I cannot get the freetype2 directory included Do you, by any chance, know how to set up a cmake file for sh_ivtool? Mine currently looks like this: Code:
cmake_minimum_required(VERSION 3.7) # set the project name project(sh_ivtool) include(/SDK_6.3.0/SDK-B288/share/cmake/arm_conf.cmake) list(APPEND PB_INCLUDE_DIRECTORIES "${FREETYPE_INCLUDE_DIRS}") # add the executable add_executable(sh_ivtool.app main.c) |
10-17-2021, 02:56 PM | #62 |
Zealot
Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
|
Seems I got it.
Code:
cmake_minimum_required(VERSION 3.7) # set the project name project(sh_ivtool) # add the executable add_executable(sh_ivtool.app main.c) include(/SDK_6.3.0/SDK-B288/share/cmake/arm_conf.cmake) link_directories("${PB_LINK_DIRECTORIES}") target_include_directories(sh_ivtool.app PUBLIC "${FREETYPE_INCLUDE_DIRS}") target_link_libraries(sh_ivtool.app inkview) Code:
mkdir build cd build cmake .. cmake --build . |
Advert | |
|
10-17-2021, 05:02 PM | #63 |
Zealot
Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
|
Tested the file selection and it does something, but seems to hang.
|
10-17-2021, 06:18 PM | #64 |
Wizard
Posts: 3,016
Karma: 18765431
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
I'll try building for fwv6 and testing on my PB633 later tonight. I don't think I've actually tried sh_ivtool in quite a few years. It's sunny outside for a change, and I have to work on my shed in the backyard, so I'll let you know how it goes late tonight or maybe tomorrow sometime.
|
10-18-2021, 02:31 AM | #65 |
Zealot
Posts: 142
Karma: 669192
Join Date: Nov 2013
Device: Kindle 4.1.1 no touch
|
Take your time.
BTW: Is there a github repo for it? Otherwise I'd create one, but if so, I'd loke to fork it. |
Advert | |
|
10-18-2021, 01:33 PM | #66 |
Wizard
Posts: 3,016
Karma: 18765431
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
No, I haven't made a public repo. Feel free to fork it if you like, just remember that it is released under the GPL .
I tried it out on my PB633, and it looks like the problem is that the application does not automatically get the focus of the UI. If you run it, and then bring up the Task Manager, you will see the application in the list. Selecting it in the Task Manager will bring the dialog up on the screen. That is not ideal behaviour, so I'll look around to see if that can be fixed. Otherwise, the application seems to run correctly based on my quick tests. |
11-29-2021, 12:25 PM | #67 |
Wizard
Posts: 3,016
Karma: 18765431
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
I modified the source code to explicitly set the application as the Active Task and it now automatically displays on all of my devices. I updated the application's home page with the latest source code and applications for all of the various firmware versions. See the first post for a link to the homepage. People with older firmware versions (4 and earlier) do not need to update because there is no added functionality. The new version is mainly for people with new devices.
|
03-30-2023, 04:01 PM | #68 |
0000000000101010
Posts: 5,741
Karma: 11482159
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
I'm having problems with sh_ivtool and epub_edit on my PB632 (HD3).
pi.app works when launching it directly. I'm able to click/hold on an epub in the library, select "edit_epub.app" which I've confirmed unzips the epub to /tmp I get all the message boxes and text input boxes from sh_ivtool, but I never get a list of files showing on screen, whether I enter an extension or leave blank. I see the message: "Select file(s) to edit, or click Back button to exit selection" But the only button is: CLOSE If I proceed I get the prompt to enter a new name or discard etc. If I choose a new name a new epub is created correctly. I've tried all the sh_ivtool variants (360+, fwv5 and fwv6) and get the same issue with each. |
03-30-2023, 05:39 PM | #69 |
Wizard
Posts: 3,016
Karma: 18765431
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
sh_ivtool uses the OpenContents() InkView API function to display the lists of files. PocketBook recently ripped that function out of the library, so no programs that use it will work properly anymore. They haven't provided a replacement as far as I know, so there isn't anything I can do about it.
|
03-31-2023, 03:11 PM | #70 | |
0000000000101010
Posts: 5,741
Karma: 11482159
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
Quote:
For anyone interested I've written a rather clumsy workaround to the "edit-epub.app" using the pi text editor to list and select the files to be edited. The section of code I've changed is shown below and the full code attached as a text file. Code:
# Edit whatever files are chosen $SH_IVTOOL -s "Add a . character to the end of the file(s) you wish to edit, then save and quit" if [ "$EXT" == "" ]; then EXT=""; elif [ "${EXT:0:1}" != "." ]; then EXT=".${EXT}"; fi for f in `find "./" -iname "*${EXT}" -type f -print`; do echo "${f:1}" >> "edit_epub.txt"; done if [ -e "edit_epub.txt" ]; then $PI "${TMPDIR}/edit_epub.txt"; fi for f in `grep '[.]$' "edit_epub.txt"`; do echo "${f%.}" >> "edit_epub2.txt"; done if [ -e "edit_epub2.txt" ]; then lines=$(cat "edit_epub2.txt"); for line in $lines; do $PI "${TMPDIR}${line}"; done else $SH_IVTOOL -s "No changes made. Deleting temporary files." exit -1 fi if [ -e edit_epub.txt -o -e edit_epub2.txt ]; then rm edit_epub*; fi |
|
04-03-2023, 03:17 PM | #71 |
0000000000101010
Posts: 5,741
Karma: 11482159
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
@rkomar
I'm having a strange issue with pbdownload in a script. I'm trying to use it to download images via openlibrary.org but keep getting errors. example: https://covers.openlibrary.org/b/isb...19901921-L.jpg I get a "couldn't connect to the server url..." error when I run my script BUT if I don't close the error and switch to the gallery the image has actually downloaded. If I return to the error and close it it deletes the downloaded image (I'm assuming as part of a clean-up process related to the error). Ending the process rather than closing the error message preserves the saved image. I've been able to download images from Amazon using the same code without getting the error, so seems to be related to openlibrary.org specifically. Any idea as to what may be causing the issue? Is there by chance a parameter to suppress error messages and file deletion/tidying when running pbdownload? |
04-04-2023, 02:50 AM | #72 |
Wizard
Posts: 3,016
Karma: 18765431
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
Man, it's been over ten years since I even looked at that code. As you suspected, the download is wiped at shutdown if an error was detected. There isn't any parameter to change that behaviour. However, the source code is available on the website, so you can look at it and see what is going on. Unfortunately, I don't even remember writing the code, so I can't make any suggestions on what to change off the top of my head. Perhaps you can try using a longer timeout via the "-t" option to see if that makes a difference.
|
04-10-2023, 11:45 AM | #73 |
0000000000101010
Posts: 5,741
Karma: 11482159
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
Thanks again for the advice, I'll definitely have a go at changing the source and recompiling at some point. Would you say it's easier to do withing a linux environment or is Visual Studio on windows fine?
For the moment I'm forcing pbdownload into the background so I don't see the message boxes then killing the process after a wait. It's sufficient for the interim... lazy I know! |
04-10-2023, 07:54 PM | #74 |
Wizard
Posts: 3,016
Karma: 18765431
Join Date: Oct 2010
Location: Sudbury, ON, Canada
Device: PRS-505, PB 902, PRS-T1, PB 623, PB 840, PB 633
|
The Makefile for building the sources depends on an ancient SDK that is no longer available. I've been hacking the official SDKs ever since to fit within the old make system, since I much prefer it to the newer cmake based system, but I don't expect anyone else to go to such lengths. Long story short, if you want to build the code yourself, you will have to produce cmake files for it to work with the SDK you download from PocketBook. That's probably very easy for someone familiar with cmake, but it is a chore for someone like me who always stuck with make.
I believe that you would need a 64-bit linux environment to use the PocketBook SDK. I don't see any Windows executables in the compiler toolchain that they provide. I'm sure that installing something like 64-bit ubuntu into a VirtualBox image would work fine if you have to work from a Windows machine. |
12-07-2023, 02:46 AM | #75 |
0000000000101010
Posts: 5,741
Karma: 11482159
Join Date: Mar 2023
Location: An island off the coast of Ireland
Device: PB632 [HD3]
|
The latest firmware on my HD3 causes an issue with sh_ivtool for keyboard input capture.
I now get the string "latinime: Loading /ebrmain/share/latinime//EN.dict " before whatever I enter. As a workaround I've just been cropping the first 51 characters from the variable. Code:
f=`$sh_ivtool -t "Enter your string"` f=${f:51} |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Trio of Picture Books - Simple Animals, Simple Shapes, and You're My Baby! | Manley Peterson | Self-Promotions by Authors and Publishers | 5 | 01-06-2012 09:55 PM |
Application update: application not installed error | Merischino | Kindle Fire | 4 | 12-01-2011 11:30 PM |
erm, simple question , hope for simple answer! | al zymers | Amazon Kindle | 5 | 09-25-2010 02:01 PM |
Simple question for a simple mind :) | PKFFW | OpenInkpot | 6 | 08-27-2009 10:00 PM |
Television scripts for your handheld | Bob Russell | Lounge | 2 | 01-07-2006 07:22 PM |