View Single Post
Old 04-27-2014, 11:00 AM   #43
SHunter101
Connoisseur
SHunter101 really knows where his or her towel isSHunter101 really knows where his or her towel isSHunter101 really knows where his or her towel isSHunter101 really knows where his or her towel isSHunter101 really knows where his or her towel isSHunter101 really knows where his or her towel isSHunter101 really knows where his or her towel isSHunter101 really knows where his or her towel isSHunter101 really knows where his or her towel isSHunter101 really knows where his or her towel isSHunter101 really knows where his or her towel is
 
Posts: 56
Karma: 70350
Join Date: May 2013
Device: Kobo AuraH2O, Glo, AuraHD, JBC2
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\
Hello:

Finally got it to semi-work. Windows 8.1 64 bit did not like the "SET the7zipexe="C:\Programme\7-Zip\7z.exe" " line. I modified Tshering's code, only changing "%the7zipexe%" to 7z.exe and the path to the following:

Code:
@ECHO off

SET path="C:\Program Files\7-Zip\"

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
7z.exe a KoboRoot.tar -ttar  * -r  -x!_*
REM --- make tgz
7z.exe 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
This works, but it leaves out the usr directory in the generated Koboroot.tgz file; even though the directory structure shows usr the final file has only the "local\Kobo\both files". Stranger the Koboroot.tgz file is found in the usr directory. I do not know enough about 7z command lines to figure this out....


Shunter

Last edited by SHunter101; 04-27-2014 at 11:08 AM.
SHunter101 is offline   Reply With Quote