GRUB4DOS, GFXboot und CPIO
#1
Posted 30 March 2010 - 12:20 AM
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
Posted 30 March 2010 - 08:08 AM
#3
Posted 30 March 2010 - 03:24 PM
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
Posted 30 March 2010 - 03:30 PM
#5
Posted 30 March 2010 - 03:47 PM
http://www.mediafire.com/?zzz1klxdwwd
repack.cmd packt alle Dateien aus dem Files Ordner in ein neues message file.
#6
Posted 30 March 2010 - 05:25 PM
@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
Posted 08 April 2010 - 10:32 PM
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" )
#8
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 4500
Zeilenlines 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.
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)
__________________________Dasthe 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
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
Posted 09 April 2010 - 10:03 AM
IF "%%i"=="add" IF "%%i"=="adD" ... IF "%%i"=="aDd" ... IF "%%i"=="aDD" ... IF "%%i"=="Add" ... IF "%%i"=="AdD" ... IF "%%i"=="ADd" ... IF "%%i"=="ADD" ...Are usually written as:
IF /I %%i.==add. ...
Unless I have been confused by the complexity of your line , it resolves to:
FOR /F "eol=# tokens=1-2* delims=;" %%i IN (%Parameter_L_1%) DO ( IF /I %%i.==add. ( IF EXIST "%%j" ( COPY "%%j" "%WorkDir%\GFXboot\Copy-files" >NUL& %dot2% ) ELSE ( ECHO %%i;%%j >> "%WorkDir%\GFXboot\List-NotFound.txt"& %dot2% ) IF /I %%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%) ) )
BTW you don't need the /y switch when the COPY command is invoked through a batch.
Wonko
#11
Posted 09 April 2010 - 10:23 AM
...gut zu wissen. Ich bin leider kein Profi.
...aber Not macht erfinderisch.
da kann ich mir fast 2/3 sparen.
vielen dank
#12
Posted 09 April 2010 - 10:58 AM
You live and learn.
Sure AND:
Life is "trying things to see if they work"
Wonko
#13
Posted 25 April 2010 - 09:58 AM
#14
Posted 25 April 2010 - 12:12 PM
[Pseudo_German]
Super , wenn Sie sie veröffentlichen in der englischen Sprache in der grub4dos forum, ich bin sicher, du wirst reichlich bereit Tester finden.
[/Pseudo_German]
Wonko
#15
Posted 30 August 2011 - 07:38 PM
es ist zwar schon eine ganze Weile her .... aber wie weit bist Du gekommen?
Aufgegeben oder fertiggestellt. Das ganze interessiert micht sehr.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users