View Single Post
Old 05-07-2014, 07:05 AM   #82
Anak
Guru
Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.Anak ought to be getting tired of karma fortunes by now.
 
Posts: 603
Karma: 641742
Join Date: Mar 2012
Location: DE
Device: Kobo Glo
Quote:
Originally Posted by tshering View Post
This is how I create KoboRoot.tgz on Windows, in case it might be helpful to anybody.
Create this batch file (spoiler) on (e.g.) c:\mykobotools\, and name it, for instance, createKBRoot.bat.
Spoiler:

modify the path to the z-zip executable
SET the7zipexe="C:\Programme\7-Zip\7z.exe"

Code:
@ECHO off

SET the7zipexe="C:\Programme\7-Zip\7z.exe"

IF (%~f1) == () GOTO NothingDropped
IF NOT EXIST %~f1\NUL GOTO FileDropped


CD %~f1
REM --- clean up
IF EXIST KoboRoot.tar DEL KoboRoot.tar
IF EXIST KoboRoot.tgz DEL KoboRoot.tgz
 

REM --- make tar
"%the7zipexe%" a KoboRoot.tar -ttar  * -r  -x!_*
REM --- make tgz
"%the7zipexe%" a KoboRoot.tgz -tgzip  KoboRoot.tar

REM --- clean up
IF EXIST KoboRoot.tar DEL KoboRoot.tar

GOTO ByBy

REM ---- here starts error handling
:NothingDropped
ECHO drop folder file on this batch file!
GOTO ByBy

:FileDropped
ECHO drop folder on this batch file!
GOTO ByBy

:ByBy
PAUSE
  • create the needed content in a dedicated folder, e.g.
    c:\myKoboRoot\usr\local\Kobo\libnickel.so.1.0.0
    c:\myKoboRoot\usr\local\Kobo\librmsdk.so.1.0.0
  • open two windows in explorer (file manager)
    navigate the first window to c:\.
    navigate the second window to c:\mykobotools\
  • drag and drop the folder myKoboRoot unto the batch file (createKBRoot.bat)
  • find KoboRoot.tgz in c:\myKoboRoot\
Note: The batch file must be on the same drive as the target directory! Don't use spaces in the target path.
Nice, script but it has some "hardcoded" links to system directories. Use the default Windows settings to find and use the right location automatically.

%APPDATA%
%ProgramFiles%
%ProgramFiles(x86)%

e.g:
SET the7zipexe="%ProgramFiles%\7-Zip\7z.exe"

Note, addition: I've seen the updated script. IMHO, my friendly suggestion applies also the update script.

Last edited by Anak; 05-07-2014 at 07:10 AM.
Anak is offline   Reply With Quote