Jump to content











Photo
- - - - -

GRUB4DOS, GFXboot und CPIO


  • Please log in to reply
14 replies to this topic

#1 SBond

SBond
  • Members
  • 8 posts
  •  
    Germany

Posted 30 March 2010 - 12:20 AM

Hi Leute.

Ich versuche vergeblich ein GFX-Menü für GRUB über die Konsole zu erstellen.
Alle Schritte sollen über eine .BAT-Datei laufen.

Soweit bin ich gekommen:
1. ein bestimmtes Bild wird bearbeitet und als "back.jpg" gespeichert
2. das zu bearbeitende GFX-Menü wird mithilfe von CPIO.exe in dem Ordner "GFX"entpackt
3. Die Dateien im "GFX" -Ordner werden durch das neue Bild (back.jpg) und die neuen Konfigurations-Dateien ersetzt
...jetzt muss wieder ein CPIO-Archiv erstellt werden. Und genau das kriege ich nicht hin.

ich weiß nicht, wie ich unter Windows ein cpio-Archiv erstelle. Es muss auf jeden fall per Konsole machbar sein.

weiß jemand rat?

#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 30 March 2010 - 08:08 AM

Check here:
http://www.boot-land...?showtopic=7155
http://www.boot-land...?showtopic=9431

:)
Wonko

#3 SBond

SBond
  • Members
  • 8 posts
  •  
    Germany

Posted 30 March 2010 - 03:24 PM

ich bekomme es einfach nicht hin... :)
Ich kann mit cpio weder die Datei in ein anderes Verzeichniss entpacken, noch eines erstellen.
hat jemand eine Idee wie es sonst noch zu realisieren ist?

folgene Befehle habe ich schon vergeblich versucht:

cpio -id -I menu.gfx
cpio -imVd -I menu.gfx
cpio -id < menu.gfx
find ./testDir | cpio -id < menu.gfx

da kommt immer der Fehler: "invalid parameter -- d"

#4 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 30 March 2010 - 03:30 PM

Linux:
cpio -id
Windows:
cpio -i -d


Some reference:
http://www.911cd.net...showtopic=19643

:)
Wonko

#5 was_JFX

was_JFX

    Frequent Member

  • Advanced user
  • 483 posts
  •  
    Germany

Posted 30 March 2010 - 03:47 PM

Finde leider das tutorial nicht aber hier das Beispiel:

http://www.mediafire.com/?zzz1klxdwwd

repack.cmd packt alle Dateien aus dem Files Ordner in ein neues message file.

:)

#6 SBond

SBond
  • Members
  • 8 posts
  •  
    Germany

Posted 30 March 2010 - 05:25 PM

Es funktioniert :)

@echo off
DIR %~dp0files /A-D /B /ON > %~dp0cpio_contents.txt
CD %~dp0files
%~dp0cpio\cpio.exe -ov < %~dp0cpio_contents.txt > %~dp0message
DEL %~dp0cpio_contents.txt

mir hat einfach nur die .txt-Liste gefehlt. Da wäre ich nie so schnell darauf gekommen.
vielen Dank euch beiden :)

Jetzt kann ich es endlich in einem "Cusom GFX-Menu.script" verwenden.
juhuuuu

schönen Gruß
-Martin-

#7 SBond

SBond
  • Members
  • 8 posts
  •  
    Germany

Posted 08 April 2010 - 10:32 PM

Hi,

Mal eine Frage.....
Ich bräuchte jemanden zum Übersetzen, der gut Englisch kann. Würde mir einer helfen?

Ich bin gerade dabei eine Batchdatei zu schreiben. Die Datei hat momentan 4500Zeilen und ist knapp 350KB groß.
Neben der Datei nutze ich auch noch eine Konfigurations-Datei, die auch die aktuelle Sprache enthält.

Mit der Batchdatei kann man entweder über Parameter oder über Drag&Drop GFXboot-files packen/entpacken und bearbeiten.

Aktuelle Parameter:
-----------------------------
/s:[dateiname]______________ - Quelldatei (.gfx)
/t:[dateiname_______________ - Zieldatei (.gfx und je nach Parameter-kombination .jpg)
/u________________________ - updatet eine .gfx-Datei (z.B. mit neuem Hintergrundbild)
/e________________________- entpackt eine .GFX datei
/c________________________- erstellt eine .GFX datei
/d:[datei1:datei2: ... :datei26]___ - löscht die Datei(en) aus der GFX-Datei (max 26 Dateien)
/a:[datei1:datei2: ... :datei26____ - fügt die Datei(en) in die GFX-Datei ein (max 26 Dateien)
/l:[dateiliste.txt] _____________- löscht Datei(en) aus der GFX-Datei oder fügt welche ein (unbegrenzt viel)
__________________________z.B. "ADD;C:\Ordner\datei 1.hlp" oder "DEL;irgendwas.bla"
/r:[xxx:yyy:Bilddatei]__________ -konvertiert ein Bild in das benötigte Format (xxx:yyy=Auflösung)
__________________________ z.B. /r:1024:768:meinBild.bmp (unterstützt werden: .jpg, .bmp, .gif, .png)
__________________________Das Bild wird natürlich gleich integriert und das Orginal-Bild wird nicht geändert.
/p:[xx:yy]___________________-ändert die Position des GFX-Menüs (Auswahlliste) -!!!ist noch in Bearbeitung!!!-
/v________________________ - ist noch nicht belegt (die alte Funktion wurde gelöscht)
/i_________________________-zeigt Infos, history, Version und ähnliches an
/?________________________ - allgemeine Hilfe und Beispiele



Drag&Drop-Möglichkeiten
----------------------------------------


.gfx --------------------------------------------------entpacken----------------------------------------------------------> Ordner
Ordner------------------------------------------ ------packen-------------------------------------------------------------> .gfx
.gfx + Bilddatei---------------------------------------Bild wird konvertiert und eingefügt---------------------------> .gfx
.gfx + Bilddatei +verschiedene Dateien ------Bild wird konvertiert und eingefügt / Dateien werden eingefügt-----> .gfx
.gfx + verschiedene Dateien ---------------------Dateien werden eingefügt-------------------------------------> .gfx
Bilddatei -----------------------Bild wird konvertiert und eingefügt (in ein integriertes Standard-Menü-----> .gfx + back.jpg

Bilddateien: .jpg, .bmp, .gif, .png

--------------------------------------------------------------------------------------------------------------------
eingebaut wird die Datei in ein Winbuilder Script. (z.B als "CustomGFXmenu.script" )

Attached Thumbnails

  • Unbenannt.jpg


#8 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 09 April 2010 - 07:48 AM

Ich bin gerade dabei eine Batchdatei zu schreiben. Die Datei hat momentan 4500Zeilen und ist knapp 350KB groß.
Neben der Datei nutze ich auch noch eine Konfigurations-Datei, die auch die aktuelle Sprache enthält.

Mit der Batchdatei kann man entweder über Parameter oder über Drag&Drop GFXboot-files packen/entpacken und bearbeiten.


I am about to write a batch file. The file currently has 4500Zeilen lines and is just 350KB in size.
In addition to the file, I use also a configuration file that contains the current language.

With the batch file you can either pack or unpack on parameters on drag and drop gfxboot-files / and edit.


Google translate is good enough to understand you. :huh:

350*1,024=358,400
358,400/4,500=~80 characters AVERAGE per line. :)


Verstehen Sie?:
[pseudo_german]
Google Translate ist gut genug, Sie zu verstehen.
350*1,024=358,400
358,400/4,500=~80 Durchschnitt Zeichen pro Zeile

Sie sicher über eine Batch 4.500 Zeilen lang?
[/pseudo_german]

Current Parameters:
-----------------------------
/ S [filename ]______________ - source file (. Gfx)
/ T: [dateiname][filename ]_______________ - target file (. Gfx combination and depending on the parameter jpg.)
/ U________________________ - a. Gfx file (eg updatet with new wallpaper)
/ E________________________-extracteds one. GFX file
/ C________________________-createdes one. GFX file
/ D: [file1: file2: ... : Datei26 ___] - deletes the file (s) from the GFX file (max 26 files)
/ A: [file1: file2: ... : Datei26____ - adds the file (s) in the GFX file (max 26 files)
/ L: [dateiliste.txt] _____________-deletedes file (s) from the GFX file or which adds a (much unlimited)
__________________________z.B. "ADDs C: \ folder \ file 1.hlp" or "DEL; irgendwas.bla"
/ R: [xxx: yyy: Image ]__________-converts an image into the required format (xxx: yyy = resolution)
__________________________ E.g. / R 1024:768:: support meinBild.bmp (:. Jpg,. Bmp,. Gif,. Png)
__________________________Das the Picture is of course equal and integrated the original image is not changed.
/ P: change [xx yy: ]___________________- the position of the GFX menu (select list) -! Is still under construction! -
/ V________________________ - has not yet been established (the old function was deleted)
/ I_________________________-show info, history, version and so on
/?________________________ - General Help and Examples



:)
Wonko

#9 SBond

SBond
  • Members
  • 8 posts
  •  
    Germany

Posted 09 April 2010 - 09:22 AM

350*1,024=358,400
358,400/4,500=~80 characters AVERAGE per line. dubbio.gif


Naja wenn manche Zeilen so aussehen:

for /F "eol=# tokens=1-2* delims=;" %%i in (%Parameter_L_1%) do (IF "%%i"=="add" (IF exist "%%j" (copy /y "%%j" "%WorkDir%\GFXboot\Copy-files" >NUL& %dot2%) ELSE (echo %%i;%%j >> "%WorkDir%\GFXboot\List-NotFound.txt"& %dot2%)) ELSE (IF "%%i"=="adD" (IF exist "%%j" (copy /y "%%j" "%WorkDir%\GFXboot\Copy-files" >NUL& %dot2%) ELSE (echo %%i;%%j >> "%WorkDir%\GFXboot\List-NotFound.txt"& %dot2%)) ELSE (IF "%%i"=="aDd" (IF exist "%%j" (copy /y "%%j" "%WorkDir%\GFXboot\Copy-files" >NUL& %dot2%) ELSE (echo %%i;%%j >> "%WorkDir%\GFXboot\List-NotFound.txt"& %dot2%)) ELSE (IF "%%i"=="aDD" (IF exist "%%j" (copy /y "%%j" "%WorkDir%\GFXboot\Copy-files" >NUL& %dot2%) ELSE (echo %%i;%%j >> "%WorkDir%\GFXboot\List-NotFound.txt"& %dot2%)) ELSE (IF "%%i"=="Add" (IF exist "%%j" (copy /y "%%j" "%WorkDir%\GFXboot\Copy-files" >NUL& %dot2%) ELSE (echo %%i;%%j >> "%WorkDir%\GFXboot\List-NotFound.txt"& %dot2%)) ELSE (IF "%%i"=="AdD" (IF exist "%%j" (copy /y "%%j" "%WorkDir%\GFXboot\Copy-files" >NUL& %dot2%) ELSE (echo %%i;%%j >> "%WorkDir%\GFXboot\List-NotFound.txt"& %dot2%)) ELSE (IF "%%i"=="ADd" (IF exist "%%j" (copy /y "%%j" "%WorkDir%\GFXboot\Copy-files" >NUL& %dot2%) ELSE (echo %%i;%%j >> "%WorkDir%\GFXboot\List-NotFound.txt"& %dot2%)) ELSE (IF "%%i"=="ADD" (IF exist "%%j" (copy /y "%%j" "%WorkDir%\GFXboot\Copy-files" >NUL& %dot2%) ELSE (echo %%i;%%j >> "%WorkDir%\GFXboot\List-NotFound.txt"& %dot2%)) ELSE (IF "%%i"=="del" (IF exist "%WorkDir%\GFXboot\old-GFX\%%j" (del /q /f /s "%WorkDir%\GFXboot\old-GFX\%%j" >NUL& %dot%) ELSE (echo %%i;%%j >> "%WorkDir%\GFXboot\List-NotFound.txt"& %dot2%)) ELSE (IF "%%i"=="deL" (IF exist "%WorkDir%\GFXboot\old-GFX\%%j" (del /q /f /s "%WorkDir%\GFXboot\old-GFX\%%j" >NUL& %dot%) ELSE (echo %%i;%%j >> "%WorkDir%\GFXboot\List-NotFound.txt"& %dot2%)) ELSE (IF "%%i"=="dEl" (IF exist "%WorkDir%\GFXboot\old-GFX\%%j" (del /q /f /s "%WorkDir%\GFXboot\old-GFX\%%j" >NUL& %dot%) ELSE (echo %%i;%%j >> "%WorkDir%\GFXboot\List-NotFound.txt"& %dot2%)) ELSE (IF "%%i"=="dEL" (IF exist "%WorkDir%\GFXboot\old-GFX\%%j" (del /q /f /s "%WorkDir%\GFXboot\old-GFX\%%j" >NUL& %dot%) ELSE (echo %%i;%%j >> "%WorkDir%\GFXboot\List-NotFound.txt"& %dot2%)) ELSE (IF "%%i"=="Del" (IF exist "%WorkDir%\GFXboot\old-GFX\%%j" (del /q /f /s "%WorkDir%\GFXboot\old-GFX\%%j" >NUL& %dot%) ELSE (echo %%i;%%j >> "%WorkDir%\GFXboot\List-NotFound.txt"& %dot2%)) ELSE (IF "%%i"=="DeL" (IF exist "%WorkDir%\GFXboot\old-GFX\%%j" (del /q /f /s "%WorkDir%\GFXboot\old-GFX\%%j" >NUL& %dot%) ELSE (echo %%i;%%j >> "%WorkDir%\GFXboot\List-NotFound.txt"& %dot2%)) ELSE (IF "%%i"=="DEl" (IF exist "%WorkDir%\GFXboot\old-GFX\%%j" (del /q /f /s "%WorkDir%\GFXboot\old-GFX\%%j" >NUL& %dot%) ELSE (echo %%i;%%j >> "%WorkDir%\GFXboot\List-NotFound.txt"& %dot2%)) ELSE (IF "%%i"=="DEL" (IF exist "%WorkDir%\GFXboot\old-GFX\%%j" (del /q /f /s "%WorkDir%\GFXboot\old-GFX\%%j" >NUL& %dot%) ELSE (echo %%i;%%j >> "%WorkDir%\GFXboot\List-NotFound.txt"& %dot2%))))))))))))))))))


...ja, das ist EINE Zeile (2962 chars)

#10 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 09 April 2010 - 10:03 AM

Well, everyone his own "scripting style" :huh:, but:
IF &#34;%%i&#34;==&#34;add&#34;

IF &#34;%%i&#34;==&#34;adD&#34; ...

IF &#34;%%i&#34;==&#34;aDd&#34; ...

IF &#34;%%i&#34;==&#34;aDD&#34; ...

IF &#34;%%i&#34;==&#34;Add&#34; ...

IF &#34;%%i&#34;==&#34;AdD&#34; ...

IF &#34;%%i&#34;==&#34;ADd&#34; ...

IF &#34;%%i&#34;==&#34;ADD&#34; ...
Are usually written as:
IF /I %%i.==add. ...

Unless I have been confused by the complexity of your line :), it resolves to:
FOR /F &#34;eol=# tokens=1-2* delims=;&#34; %%i IN &#40;%Parameter_L_1%&#41; DO &#40;

IF /I %%i.==add. &#40;

IF EXIST &#34;%%j&#34; &#40;

COPY &#34;%%j&#34; &#34;%WorkDir%\GFXboot\Copy-files&#34; >NUL& %dot2%

&#41; ELSE &#40;

ECHO %%i;%%j >> &#34;%WorkDir%\GFXboot\List-NotFound.txt&#34;& %dot2%

&#41;

IF  /I %%i.==del. &#40;

IF EXIST &#34;%WorkDir%\GFXboot\old-GFX\%%j&#34; &#40;

DEL /q /f /s &#34;%WorkDir%\GFXboot\old-GFX\%%j&#34; >NUL& %dot%

&#41; ELSE &#40;

ECHO %%i;%%j >> &#34;%WorkDir%\GFXboot\List-NotFound.txt&#34;& %dot2%&#41;

&#41;

&#41;

BTW you don't need the /y switch when the COPY command is invoked through a batch.

:)
Wonko

#11 SBond

SBond
  • Members
  • 8 posts
  •  
    Germany

Posted 09 April 2010 - 10:23 AM

You live and learn. :)

...gut zu wissen. Ich bin leider kein Profi.
...aber Not macht erfinderisch.

da kann ich mir fast 2/3 sparen. :huh:


vielen dank :)

#12 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 09 April 2010 - 10:58 AM

You live and learn. :huh:


Sure :) AND:

Life is "trying things to see if they work"

:)

:cheers:
Wonko

#13 SBond

SBond
  • Members
  • 8 posts
  •  
    Germany

Posted 25 April 2010 - 09:58 AM

Ich bin mit dem Tool demnächst fertig. Wäre super wenn es einige testen würden.

#14 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 25 April 2010 - 12:12 PM

Good :mellow: , if you post it in English, in the grub4dos Forum, I am sure you will find a lot of willing testers.

[Pseudo_German]
Super :P, wenn Sie sie veröffentlichen in der englischen Sprache in der grub4dos forum, ich bin sicher, du wirst reichlich bereit Tester finden.
[/Pseudo_German]

:P
Wonko

#15 linuxbaby

linuxbaby

    Frequent Member

  • .script developer
  • 139 posts
  •  
    Germany

Posted 30 August 2011 - 07:38 PM

Hallo SBond

es ist zwar schon eine ganze Weile her .... aber wie weit bist Du gekommen?

Aufgegeben oder fertiggestellt. Das ganze interessiert micht sehr.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users