📄 lrk
字号:
#!/bin/bash## Linux ROM Kitchen# # Copyright (C) 2007-2008 Pau Oliva Fora - <pof@eslack.org>## This program is free software; you can redistribute it and/or modify it# under the terms of the GNU General Public License as published by the# Free Software Foundation; either version 3 of the License, or (at your# opinion) any later version. See <http://www.gnu.org/licenses/gpl.html># if ! [ -e /usr/share/LinuxRomKitchen/lrk-preload ]; then echo "ERROR: Linux Rom Kitchen is not properly installed" exit 1fisource /usr/share/LinuxRomKitchen/lrk-preloadexport ABOUT_DIALOG='<window title="LRK: about" window_position="2" icon_name="gtk-about" resizable="false"> <vbox> <notebook labels="About|License|Credits"> <vbox> <pixmap> <input file>/usr/share/LinuxRomKitchen/lrk.svg</input> </pixmap> <text use_markup="true"> <label>"<b>Linux ROM Kitchen '$VERSION'</b>"</label> </text> <text> <label>" Linux ROM kitchen for HTC Windows Mobile ROMs "</label> </text> <text> <label>Copyright 漏 2008 Pau Oliva Fora</label> </text> <text> <label>(pof @ XDA-Developers)</label> </text> <text><label>""</label></text> </vbox> <vbox> <edit editable="false" cursor-visible="false"> <default>" This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your opinion) any later version. See http://www.gnu.org/licenses/gpl.html"</default> </edit> </vbox> <vbox> <edit editable="false" cursor-visible="false"> <default>" Thanks to: arc, Asukal, bepe, cmonex, cr2, ervius, esteve, itsme, jcespi2005, jockyw2001, mamaich, Olipro, pancake, tadizio, vacula, and all other XDA-Developers who I forget."</default> </edit> </vbox> </notebook> <hbox> <button> <input file stock="gtk-close"></input> <label>Close</label> <action type="closewindow">ABOUT_DIALOG</action> </button> </hbox> </vbox></window>'export OPTIONS_DIALOG='<window title="Options" icon_name="gtk-preferences"> <vbox> <text><label>nbsplit options:</label></text> <entry> <variable>NBSPLITOPTS</variable> <input>cat $HOME/.lrk/NBSPLITOPTS</input> <action>echo $NBSPLITOPTS |tee $HOME/.lrk/NBSPLITOPTS</action> <action>refresh:NBSPLITOPTS</action> </entry> <vbox> <edit editable="false" cursor-visible="false"> <width>350</width> <height>100</height> <default>"Possible values are: -kaiser : Most new NAND devices use this (Eg: Kaiser, Shift, Diamond, etc...) -hermes : Most old NAND devices use this (Eg: Hermes, Trinity, Cheetah, etc...) -athena : Non-NAND devices use this (Eg: Athena, Wizard, etc...)"</default> </edit> </vbox> <hbox> <button> <input file stock="gtk-close"></input> <label>Close</label> <action type="closewindow">OPTIONS_DIALOG</action> </button> </hbox> </vbox></window>'export LOADPRJ_DIALOG='<window title="LRK: Load Existing Project" icon_name="applications-system"> <vbox> <chooser> <height>500</height><width>600</width> <variable>PRJ_FILE</variable> </chooser> <hbox> <button> <input file stock="gtk-cancel"></input> <label>Cancel</label> <action type="closewindow">LOADPRJ_DIALOG</action> </button> <button> <input file stock="gtk-ok"></input> <label>Load</label> <action>/usr/share/LinuxRomKitchen/lrk-scripts -loadproject $PRJ_FILE |zenity --progress --auto-close --pulsate</action> <action type="clear">FRAME_LOG</action> <action type="refresh">FRAME_LOG</action> <action type="clear">FRAME_SYSPACKAGES</action> <action type="refresh">FRAME_SYSPACKAGES</action> <action type="clear">FRAME_OEMPACKAGES</action> <action type="refresh">FRAME_OEMPACKAGES</action> <action type="clear">FRAME_ROMINFO</action> <action type="refresh">FRAME_ROMINFO</action> <action type="clear">FRAME_NB</action> <action type="refresh">FRAME_NB</action> <action type="clear">FRAME_NBH</action> <action type="refresh">FRAME_NBH</action> <action type="clear">FRAME_CUSTOMPACKAGES</action> <action type="refresh">FRAME_CUSTOMPACKAGES</action> <action type="clear">FRAME_INSTALLPACKAGES</action> <action type="refresh">FRAME_INSTALLPACKAGES</action> <action type="closewindow">LOADPRJ_DIALOG</action> </button> </hbox> </vbox></window>'export OS2PKG_DIALOG='<window title="LRK: Extract ROM Packages from OS.nb" icon_name="applications-system"> <vbox> <chooser> <height>500</height><width>600</width> <variable>OSNB_FILE</variable> </chooser> <hbox> <button> <input file stock="gtk-cancel"></input> <label>Cancel</label> <action type="closewindow">OS2PKG_DIALOG</action> </button> <button> <input file stock="gtk-ok"></input> <label>Extract</label> <action>/usr/share/LinuxRomKitchen/lrk-scripts -osnbextract $OSNB_FILE |zenity --progress --auto-close --pulsate</action> <action type="clear">FRAME_LOG</action> <action type="refresh">FRAME_LOG</action> <action type="clear">FRAME_SYSPACKAGES</action> <action type="refresh">FRAME_SYSPACKAGES</action> <action type="clear">FRAME_OEMPACKAGES</action> <action type="refresh">FRAME_OEMPACKAGES</action> <action type="clear">FRAME_ROMINFO</action> <action type="refresh">FRAME_ROMINFO</action> <action type="closewindow">OS2PKG_DIALOG</action> </button> </hbox> </vbox></window>'export RAWOS2PKG_DIALOG='<window title="LRK: Extract ROM Packages from OS.nb" icon_name="applications-system"> <vbox> <hbox> <text><label>Container OS.nb file:</label></text> <entry accept="filename"> <variable>OSNB_FILE</variable> </entry> <button> <input file stock="gtk-file"></input> <action type="fileselect">OSNB_FILE</action> </button> </hbox> <hbox> <text><label>Dumped XIP (Part01.raw):</label></text> <entry accept="filename"> <variable>PART1_FILE</variable> </entry> <button> <input file stock="gtk-file"></input> <action type="fileselect">PART1_FILE</action> </button> </hbox> <hbox> <text><label>Dumped OS (Part02.raw):</label></text> <entry accept="filename"> <variable>PART2_FILE</variable> </entry> <button> <input file stock="gtk-file"></input> <action type="fileselect">PART2_FILE</action> </button> </hbox> <hbox> <button> <input file stock="gtk-cancel"></input> <label>Cancel</label> <action type="closewindow">OS2PKG_DIALOG</action> </button> <button> <input file stock="gtk-ok"></input> <label>Extract</label> <action>/usr/share/LinuxRomKitchen/lrk-scripts -osnbextract $OSNB_FILE $PART1_FILE $PART2_FILE |zenity --progress --auto-close --pulsate</action> <action type="clear">FRAME_LOG</action> <action type="refresh">FRAME_LOG</action> <action type="clear">FRAME_SYSPACKAGES</action> <action type="refresh">FRAME_SYSPACKAGES</action> <action type="clear">FRAME_OEMPACKAGES</action> <action type="refresh">FRAME_OEMPACKAGES</action> <action type="clear">FRAME_ROMINFO</action> <action type="refresh">FRAME_ROMINFO</action> <action type="closewindow">OS2PKG_DIALOG</action> </button> </hbox> </vbox></window>'export NBH2NB_DIALOG='<window title="LRK: Extract NB from NBH" icon_name="applications-system"> <vbox> <chooser> <height>500</height><width>600</width> <variable>NBH_FILE</variable> </chooser> <hbox> <button> <input file stock="gtk-cancel"></input> <label>Cancel</label> <action type="closewindow">NBH2NB_DIALOG</action> </button> <button> <input file stock="gtk-ok"></input> <label>Extract</label> <action>/usr/share/LinuxRomKitchen/lrk-scripts -nbhextract $NBH_FILE |zenity --progress --auto-close --pulsate</action> <action type="clear">FRAME_LOG</action> <action type="refresh">FRAME_LOG</action> <action type="clear">FRAME_NB</action> <action type="refresh">FRAME_NB</action> <action type="closewindow">NBH2NB_DIALOG</action> </button> </hbox> </vbox></window>'export EXE2NBH_DIALOG='<window title="LRK: Extract NBH from Shipped EXE" icon_name="applications-system"> <vbox> <chooser> <height>500</height><width>600</width> <variable>EXE_FILE</variable> </chooser> <hbox> <button> <input file stock="gtk-cancel"></input> <label>Cancel</label> <action type="closewindow">EXE2NBH_DIALOG</action> </button> <button> <input file stock="gtk-ok"></input> <label>Extract</label> <action>/usr/share/LinuxRomKitchen/lrk-scripts -cabextract $EXE_FILE |zenity --progress --auto-close --pulsate</action> <action type="clear">FRAME_LOG</action> <action type="refresh">FRAME_LOG</action> <action type="clear">FRAME_NBH</action> <action type="refresh">FRAME_NBH</action> <action type="closewindow">EXE2NBH_DIALOG</action> </button> </hbox> </vbox></window>'export LRK_IFFSEDITOR='<window title="LRK: Initflashfiles Editor" icon_name="applications-system"><vbox> <edit> <variable>IFFEDITOR</variable> <width>650</width> <height>500</height> <input file>'$HOME/.lrk/initflashfiles.txt'</input> <output file>'$HOME/.lrk/initflashfiles.txt'</output> </edit> <hbox> <button> <input file stock="gtk-close"></input> <label>Close</label> <action type="closewindow">LRK_IFFSEDITOR</action> </button> <button> <input file stock="gtk-save"></input> <label>Save</label> <action type="save">IFFEDITOR</action> </button> <button> <input file stock="gtk-undo"></input>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -