Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

unofficial 0.2.1 (DanyL)

  • Loading branch information...
commit c76706456448a15be9d4afcef6dd6aa68dea9e50 1 parent 60b17d8
euss authored
2  README
View
@@ -5,7 +5,7 @@
/ ____/\____ \ __(__ < / \ / __)\ \/\/ /
/ / / \/ \ /\/\ Y / \ /
/___/ /________/_________/__/ \___|__/ \__/\__/
- PS3MFW Builder v0.2 OtherOS++
+ PS3MFW Builder v0.2.1 OtherOS++
==============================================================
------------
9 Settings.xml
View
@@ -0,0 +1,9 @@
+<Settings>
+ <language>English</language>
+ <BUILD_DIR></BUILD_DIR>
+ <PS3_KEYS></PS3_KEYS>
+ <Theme>xpnative</Theme>
+ <IN_FILE></IN_FILE>
+ <OUT_FILE></OUT_FILE>
+ <tasks> add_license_msg change_version patch_category_game</tasks>
+</Settings>
25 language/Deutsch.xml
View
@@ -0,0 +1,25 @@
+<Lang>
+ <Options>Optionen</Options>
+ <Tasks>Aufgaben</Tasks>
+ <Browse>Blהttern</Browse>
+ <Original_Firmware>Original Firmware :</Original_Firmware>
+ <Modified_Firmware>Geëndert Firmware :</Modified_Firmware>
+ <Build_MFW>Construct MFW</Build_MFW>
+ <Quit>Beenden</Quit>
+ <Settings>Einstellungen</Settings>
+ <About_PS3MFW_Builder>Über PS3MFW Builder</About_PS3MFW_Builder>
+ <Select_Official_firmware>Wהhlen Sie Official firmware</Select_Official_firmware>
+ <Select_Destination_MFW_firmware>Wהhlen Sie Target MFW firmware</Select_Destination_MFW_firmware>
+ <Build_MFW>Construct MFW</Build_MFW>
+ <Exit>Ausfahrt</Exit>
+ <File>Datei</File>
+ <Theme>Thema</Theme>
+ <Help>Hilfe</Help>
+ <Language>Sprache</Language>
+ <Save_settings>Sparen</Save_settings>
+ <Default_settings>Standard</Default_settings>
+ <PS3MFW_Builder_Settings>PS3MFW Builder Einstellungen</PS3MFW_Builder_Settings>
+ <Configure>Konfigurieren</Configure>
+ <Task_Options>Aufgaben-Optionen</Task_Options>
+ <successfully>Geהndert Firmware erfolgreich gebaut!</successfully>
+</Lang>
25 language/Dutch.xml
View
@@ -0,0 +1,25 @@
+<Lang>
+ <Options>Opties</Options>
+ <Tasks>Taken</Tasks>
+ <Browse>Bladeren</Browse>
+ <Original_Firmware>Originele Firmware :</Original_Firmware>
+ <Modified_Firmware>Gemodificeerde Firmware :</Modified_Firmware>
+ <Build_MFW>Bouw MFW</Build_MFW>
+ <Quit>Beëindigen</Quit>
+ <Settings>Instellingen</Settings>
+ <About_PS3MFW_Builder>Over PS3MFW Builder</About_PS3MFW_Builder>
+ <Select_Official_firmware>Selecteer Originele Firmware</Select_Official_firmware>
+ <Select_Destination_MFW_firmware>Select Doel MFW firmware</Select_Destination_MFW_firmware>
+ <Build_MFW>Bouw MFW</Build_MFW>
+ <Exit>Exit</Exit>
+ <File>Bestand</File>
+ <Theme>Thema</Theme>
+ <Help>Help</Help>
+ <Language>Taal</Language>
+ <Save_settings>Opslaan</Save_settings>
+ <Default_settings>Standaard</Default_settings>
+ <PS3MFW_Builder_Settings>PS3MFW Builder Instellingen</PS3MFW_Builder_Settings>
+ <Configure>Configureren</Configure>
+ <Task_Options>Taak Opties</Task_Options>
+ <successfully>Aangepaste Firmware met succes gebouwd!</successfully>
+</Lang>
25 language/English.xml
View
@@ -0,0 +1,25 @@
+<Lang>
+ <Options>Options</Options>
+ <Tasks>Tasks</Tasks>
+ <Browse>Browse</Browse>
+ <Original_Firmware>Original Firmware :</Original_Firmware>
+ <Modified_Firmware>Modified Firmware :</Modified_Firmware>
+ <Build_MFW>Build MFW</Build_MFW>
+ <Quit>Quit</Quit>
+ <Settings>Settings</Settings>
+ <About_PS3MFW_Builder>About PS3MFW Builder</About_PS3MFW_Builder>
+ <Select_Official_firmware>Select Official firmware</Select_Official_firmware>
+ <Select_Destination_MFW_firmware>Select Destination MFW firmware</Select_Destination_MFW_firmware>
+ <Build_MFW>Build MFW</Build_MFW>
+ <Exit>Exit</Exit>
+ <File>File</File>
+ <Theme>Theme</Theme>
+ <Help>Help</Help>
+ <Language>Language</Language>
+ <Save_settings>Save</Save_settings>
+ <Default_settings>Default</Default_settings>
+ <PS3MFW_Builder_Settings>PS3MFW Builder Settings</PS3MFW_Builder_Settings>
+ <Configure>Configure</Configure>
+ <Task_Options>Task Options</Task_Options>
+ <successfully>Modified Firmware Built successfully!</successfully>
+</Lang>
25 language/Espanol.xml
View
@@ -0,0 +1,25 @@
+<Lang>
+ <Options>Opciones</Options>
+ <Tasks>Tareas</Tasks>
+ <Browse>Navegar</Browse>
+ <Original_Firmware>Original Firmware :</Original_Firmware>
+ <Modified_Firmware>Modificado Firmware :</Modified_Firmware>
+ <Build_MFW>Construir MFW</Build_MFW>
+ <Quit>Cerrar</Quit>
+ <Settings>Configuración</Settings>
+ <About_PS3MFW_Builder>Sobre PS3MFW Builder</About_PS3MFW_Builder>
+ <Select_Official_firmware>Seleccione Oficial Firmware</Select_Official_firmware>
+ <Select_Destination_MFW_firmware>Seleccione Destino MFW Firmware</Select_Destination_MFW_firmware>
+ <Build_MFW>Construir MFW</Build_MFW>
+ <Exit>Salir</Exit>
+ <File>Archivo</File>
+ <Theme>Tema</Theme>
+ <Help>Ayuda</Help>
+ <Language>Idiomas</Language>
+ <Save_settings>Guardar</Save_settings>
+ <Default_settings>Defecto</Default_settings>
+ <PS3MFW_Builder_Settings>PS3MFW Configuración</PS3MFW_Builder_Settings>
+ <Configure>Configurar</Configure>
+ <Task_Options>Opciones Tareas</Task_Options>
+ <successfully>Firmware Construido Con Ésito!</successfully>
+</Lang>
25 language/Francaise.xml
View
@@ -0,0 +1,25 @@
+<Lang>
+ <Options>Options</Options>
+ <Tasks>Tגches</Tasks>
+ <Browse>Parcourir</Browse>
+ <Original_Firmware>Firmware d'origine :</Original_Firmware>
+ <Modified_Firmware>Firmware modifiי :</Modified_Firmware>
+ <Build_MFW>Construire MFW</Build_MFW>
+ <Quit>Arrךtez</Quit>
+ <Settings>Rיglages</Settings>
+ <About_PS3MFW_Builder>ְ propos PS3MFW Builder</About_PS3MFW_Builder>
+ <Select_Official_firmware>Sיlectionnez le firmware d'origine</Select_Official_firmware>
+ <Select_Destination_MFW_firmware>Sיlectionnez la cible Firmware MFW</Select_Destination_MFW_firmware>
+ <Build_MFW>Construire MFW</Build_MFW>
+ <Exit>Sortir</Exit>
+ <File>Fichier</File>
+ <Theme>Thטme</Theme>
+ <Help>Aide</Help>
+ <Language>Langue</Language>
+ <Save_settings>Enregistrer</Save_settings>
+ <Default_settings>Standard</Default_settings>
+ <PS3MFW_Builder_Settings>PS3MFW Builder Rיglages</PS3MFW_Builder_Settings>
+ <Configure>Configurer</Configure>
+ <Task_Options>Options de tגches</Task_Options>
+ <successfully>Modifiי Firmware construit avec succטs!</successfully>
+</Lang>
25 language/Fran�aise.xml
View
@@ -0,0 +1,25 @@
+<Lang>
+ <Options>Options</Options>
+ <Tasks>Tגches</Tasks>
+ <Browse>Parcourir</Browse>
+ <Original_Firmware>Firmware d'origine :</Original_Firmware>
+ <Modified_Firmware>Firmware modifiי :</Modified_Firmware>
+ <Build_MFW>Construire MFW</Build_MFW>
+ <Quit>Arrךtez</Quit>
+ <Settings>Rיglages</Settings>
+ <About_PS3MFW_Builder>ְ propos PS3MFW Builder</About_PS3MFW_Builder>
+ <Select_Official_firmware>Sיlectionnez le firmware d'origine</Select_Official_firmware>
+ <Select_Destination_MFW_firmware>Sיlectionnez la cible Firmware MFW</Select_Destination_MFW_firmware>
+ <Build_MFW>Construire MFW</Build_MFW>
+ <Exit>Sortir</Exit>
+ <File>Fichier</File>
+ <Theme>Thטme</Theme>
+ <Help>Aide</Help>
+ <Language>Langue</Language>
+ <Save_settings>Enregistrer</Save_settings>
+ <Default_settings>Standard</Default_settings>
+ <PS3MFW_Builder_Settings>PS3MFW Builder Rיglages</PS3MFW_Builder_Settings>
+ <Configure>Configurer</Configure>
+ <Task_Options>Options de tגches</Task_Options>
+ <successfully>Modifiי Firmware construit avec succטs!</successfully>
+</Lang>
24 language/Hebrew.xml
View
@@ -0,0 +1,24 @@
+<Lang>
+ <Options>אפשרויות</Options>
+ <Tasks>משימות</Tasks>
+ <Browse>עיון</Browse>
+ <Original_Firmware>קושחה מקורית :</Original_Firmware>
+ <Modified_Firmware>MFW קושחה :</Modified_Firmware>
+ <Build_MFW>MFW בנה</Build_MFW>
+ <Quit>צא</Quit>
+ <Settings>הגדרות</Settings>
+ <About_PS3MFW_Builder>PS3MFW Builder אודות</About_PS3MFW_Builder>
+ <Select_Official_firmware>מקורית קושחה בחר</Select_Official_firmware>
+ <Select_Destination_MFW_firmware>MFW קושחה יעד בחר</Select_Destination_MFW_firmware>
+ <Exit>יציאה</Exit>
+ <File>קובץ</File>
+ <Theme>ערכת נושא</Theme>
+ <Help>עזרה</Help>
+ <Language>שפה</Language>
+ <Save_settings>שמור</Save_settings>
+ <Default_settings>ברירת מחדל</Default_settings>
+ <PS3MFW_Builder_Settings>PS3MFW Builder הגדרות</PS3MFW_Builder_Settings>
+ <Configure>הגדר</Configure>
+ <Task_Options>אפשרויות משימה</Task_Options>
+ <successfully>הקושחה נבנתה בהצלחה!</successfully>
+</Lang>
26 language/Italian.xml
View
@@ -0,0 +1,26 @@
+<Lang>
+
+ <Options>Opzioni</Options>
+ <Tasks>Tasks</Tasks>
+ <Browse>Sfoglia </Browse>
+ <Original_Firmware>Firmware Ufficiale :</Original_Firmware>
+ <Modified_Firmware>Firmware Modificato:</Modified_Firmware>
+ <Build_MFW>Costruisci un MFW</Build_MFW>
+ <Quit>Esci</Quit>
+ <Settings>Impostazioni</Settings>
+ <About_PS3MFW_Builder>AboutPS3MFWBuilder</About_PS3MFW_Builder>
+ <Select_Official_firmware>Selezionailfirmwareufficiale</Select_Official_firmware>
+ <Select_Destination_MFW_firmware>Seleziona la destinazione del MFW</Select_Destination_MFW_firmware>
+ <Build_MFW>Costruisci un MFW</Build_MFW>
+ <Exit>Esci</Exit>
+ <File>File</File>
+ <Theme>Tema</Theme>
+ <Help>Aiuto</Help>
+ <Language>Lingua</Language>
+ <Save_settings>Salva</Save_settings>
+ <Default_settings>Impostazioni di default</Default_settings>
+ <PS3MFW_Builder_Settings>PS3MFWBuilderSettings</PS3MFW_Builder_Settings>
+ <Configure>Configura</Configure>
+ <Task_Options>Task Options</Task_Options>
+ <successfully>Firmware modificato costruito con successo!</successfully>
+</Lang>
25 language/L33t-var1.xml
View
@@ -0,0 +1,25 @@
+<Lang>
+ <Options>0p710n$</Options>
+ <Tasks>74$|{$</Tasks>
+ <Browse>Br0w$3</Browse>
+ <Original_Firmware>0r191n4£ ƒ1rmw4r3 :</Original_Firmware>
+ <Modified_Firmware>M0׀1ƒ13׀ ƒ1rmw4r3 :</Modified_Firmware>
+ <Build_MFW>Bµ1£׀ MƒW</Build_MFW>
+ <Quit>Qµ17</Quit>
+ <Settings>$3771n9$</Settings>
+ <About_PS3MFW_Builder>4b0µ7 P$3MƒW Bµ1£׀3r</About_PS3MFW_Builder>
+ <Select_Official_firmware>$3£3(7 0ƒƒ1(14£ ƒ1rmw4r3</Select_Official_firmware>
+ <Select_Destination_MFW_firmware>$3£3(7 ׀3$71n4710n MƒW ƒ1rmw4r3</Select_Destination_MFW_firmware>
+ <Build_MFW>Bµ1£׀ MƒW</Build_MFW>
+ <Exit>3x17</Exit>
+ <File>ƒ1£3</File>
+ <Theme>7h3m3</Theme>
+ <Help>H3£p</Help>
+ <Language>£4n9µ493</Language>
+ <Save_settings>$4v3</Save_settings>
+ <Default_settings>׀3ƒ4µ£7</Default_settings>
+ <PS3MFW_Builder_Settings>P$3MƒW Bµ1£׀3r $3771n9$</PS3MFW_Builder_Settings>
+ <Configure>(0nƒ19µr3</Configure>
+ <Task_Options>74$|{ 0p710n$</Task_Options>
+ <successfully>M0׀1ƒ13׀ ƒ1rmw4r3 Bµ1£7 $µ((3$$ƒµ££¥!</successfully>
+</Lang>
25 language/L33t-var2.xml
View
@@ -0,0 +1,25 @@
+<Lang>
+ <Options>0p7¡0n§</Options>
+ <Tasks>7@§k§</Tasks>
+ <Browse>Br0w§€</Browse>
+ <Original_Firmware>0r¡9¡n@£ ƒ¡rmw@r€ :</Original_Firmware>
+ <Modified_Firmware>M0‏¡ƒ¡€‏ ƒ¡rmw@r€ :</Modified_Firmware>
+ <Build_MFW>Bµ¡£‏ MƒW</Build_MFW>
+ <Quit>Qµ¡7</Quit>
+ <Settings>§€77¡n9§</Settings>
+ <About_PS3MFW_Builder>@b0µ7 P§3MƒW Bµ¡£‏€r</About_PS3MFW_Builder>
+ <Select_Official_firmware>§€£€ח7 0ƒƒ¡ח¡@£ ƒ¡rmw@r€</Select_Official_firmware>
+ <Select_Destination_MFW_firmware>§€£€ח7 ‏€§7¡n@7¡0n MƒW ƒ¡rmw@r€</Select_Destination_MFW_firmware>
+ <Build_MFW>Bµ¡£‏ MƒW</Build_MFW>
+ <Exit>€x¡7</Exit>
+ <File>ƒ¡£€</File>
+ <Theme>7h€m€</Theme>
+ <Help>H€£p</Help>
+ <Language>£@n9µ@9€</Language>
+ <Save_settings>§@v€</Save_settings>
+ <Default_settings>‏€ƒ@µ£7</Default_settings>
+ <PS3MFW_Builder_Settings>P§3MƒW Bµ¡£‏€r §€77¡n9§</PS3MFW_Builder_Settings>
+ <Configure>ח0nƒ¡9µr€</Configure>
+ <Task_Options>7@§k 0p7¡0n§</Task_Options>
+ <successfully>M0‏¡ƒ¡€‏ ƒ¡rmw@r€ Bµ¡£7 §µחח€§§ƒµ££¥!</successfully>
+</Lang>
25 language/Piglatin.xml
View
@@ -0,0 +1,25 @@
+<Lang>
+ <Options>Optionsyay</Options>
+ <Tasks>Askstay</Tasks>
+ <Browse>Owsebray</Browse>
+ <Original_Firmware>Originalyay Irmwarefay :</Original_Firmware>
+ <Modified_Firmware>Odifiedmay Irmwarefay :</Modified_Firmware>
+ <Build_MFW>Uildbay mFWay</Build_MFW>
+ <Quit>Uitqay</Quit>
+ <Settings>Ettingssay</Settings>
+ <About_PS3MFW_Builder>Aboutyay pSay3mFWay Uilderbay</About_PS3MFW_Builder>
+ <Select_Official_firmware>Electsay Officialyay irmwarefay</Select_Official_firmware>
+ <Select_Destination_MFW_firmware>Electsay Estinationday mFWay irmwarefay</Select_Destination_MFW_firmware>
+ <Build_MFW>Uildbay mFWay</Build_MFW>
+ <Exit>Exityay</Exit>
+ <File>Ilefay</File>
+ <Theme>Emethay</Theme>
+ <Help>Elphay</Help>
+ <Language>Anguagelay</Language>
+ <Save_settings>Avesay</Save_settings>
+ <Default_settings>Efaultday</Default_settings>
+ <PS3MFW_Builder_Settings>pSay3mFWay Uilderbay Ettingssay</PS3MFW_Builder_Settings>
+ <Configure>Onfigurecay</Configure>
+ <Task_Options>Asktay Optionsyay</Task_Options>
+ <successfully>Odifiedmay Irmwarefay Uiltbay uccessfullysay!</successfully>
+</Lang>
25 language/SwedishChef.xml
View
@@ -0,0 +1,25 @@
+<Lang>
+ <Options>Opshuns</Options>
+ <Tasks>Tesks</Tasks>
+ <Browse>Broose-a</Browse>
+ <Original_Firmware>Ooreeginel Furmvere-a :</Original_Firmware>
+ <Modified_Firmware>Mudeeffied Furmvere-a :</Modified_Firmware>
+ <Build_MFW>Booeeld MFV</Build_MFW>
+ <Quit>Qooeet</Quit>
+ <Settings>Setteengs</Settings>
+ <About_PS3MFW_Builder>Ebuoot PS3MFV Booeelder</About_PS3MFW_Builder>
+ <Select_Official_firmware>Select Ooffffeeciel furmvere-a</Select_Official_firmware>
+ <Select_Destination_MFW_firmware>Select Desteeneshun MFV furmvere-a</Select_Destination_MFW_firmware>
+ <Build_MFW>Booeeld MFV</Build_MFW>
+ <Exit>Ixeet</Exit>
+ <File>Feele-a</File>
+ <Theme>Zeeme-a</Theme>
+ <Help>Help</Help>
+ <Language>Lungooege-a</Language>
+ <Save_settings>Sefe-a</Save_settings>
+ <Default_settings>Deffoolt</Default_settings>
+ <PS3MFW_Builder_Settings>PS3MFV Booeelder Setteengs</PS3MFW_Builder_Settings>
+ <Configure>Cunffeegoore-a</Configure>
+ <Task_Options>Tesk Oopshuns</Task_Options>
+ <successfully>Mudeeffied Furmvere-a Booeelt sooccessffoolly!</successfully>
+</Lang>
22 ps3mfw
View
@@ -8,7 +8,7 @@
# License ("GPL") version 3, as published by the Free Software Foundation.
#
-set ::PS3MFW_VERSION "0.2"
+set ::PS3MFW_VERSION "0.2.1"
# Option --debug: Show verbose debugging information
# Option --silent: Disable log output
@@ -65,6 +65,14 @@ source [file join ${::PS3MFW_DIR} tar.tcl]
source [file join ${::PS3MFW_DIR} ps3mfw_base.tcl]
source [file join ${::PS3MFW_DIR} ps3mfw_tasks.tcl]
+set ::xmlang [::xml::LoadFile [file join $::PS3MFW_DIR Settings.xml]]
+
+if {[file exists [::xml::GetData ${::xmlang} "Settings:PS3_KEYS" 0]]} {
+ set ::env(PS3_KEYS) [::xml::GetData ${::xmlang} "Settings:PS3_KEYS" 0]
+} else {
+ set ::env(PS3_KEYS) " "
+}
+
set ::TASKS_DIR [file join ${::PS3MFW_DIR} tasks]
set ::taskfiles [get_sorted_task_files]
@@ -131,12 +139,20 @@ if {$::options(--build-dir) != ""} {
set ::BUILD_DIR $::options(--build-dir)
} else {
if { $::tcl_platform(platform) == "windows" && [info exists ::env(TEMP)]} {
- set ::BUILD_DIR [file join $::env(TEMP) PS3MFW]
+ if {[file exists [::xml::GetData ${::xmlang} "Settings:BUILD_DIR" 0]]} {
+ set ::BUILD_DIR [::xml::GetData ${::xmlang} "Settings:BUILD_DIR" 0]
+ } else {
+ set ::BUILD_DIR [file join $::env(TEMP) PS3MFW]
+ }
if {[catch {file mkdir ${::BUILD_DIR}}]} {
set ::BUILD_DIR [pwd]
}
} elseif {$::tcl_platform(platform) == "unix"} {
- set ::BUILD_DIR [file join /tmp PS3MFW]
+ if {[file exists [::xml::GetData ${::xmlang} "Settings:BUILD_DIR" 0]]} {
+ set ::BUILD_DIR [::xml::GetData ${::xmlang} "Settings:BUILD_DIR" 0]
+ } else {
+ set ::BUILD_DIR [file join /tmp PS3MFW]
+ }
if {[catch {file mkdir ${::BUILD_DIR}}]} {
set ::BUILD_DIR [pwd]
}
316 ps3mfw_gui.tcl
View
@@ -71,6 +71,24 @@ namespace eval ::gui {
proc create_gui {arguments selected_tasks} {
variable tasks
+ set ::settings [file join $::PS3MFW_DIR Settings.xml]
+ set ::xmlang [::xml::LoadFile $::settings]
+ set ::language [::xml::GetData ${::xmlang} "Settings:language" 0]
+ if { ${::language} == "" } {
+ set ::language "English"
+ }
+ set re [open [file join $::PS3MFW_DIR language ${::language}.xml] r]
+ # taken from Unicode and UTF-8 article (wiki.tcl.tk/515)
+ fconfigure $re -encoding binary
+ set InBuffer ""
+ set enc_xmllang ""
+ while {![eof $re]} {
+ append InBuffer [read $re 100]
+ append enc_xmllang [UTF8FullCodes InBuffer]
+ }
+ close $re
+ set ::xmllang [::xml::Load $enc_xmllang]
+
wm title . "PS3MFW Builder v${::PS3MFW_VERSION}"
create_menu
@@ -80,7 +98,10 @@ namespace eval ::gui {
bind . <Control-Shift-C> "console show"
}
- hijack_logs
+ bind . <Shift-R> {exec [info nameofexecutable] &
+ exit}
+
+ hijack_logs
if {[llength $arguments] > 2} {
wm withdraw .
@@ -97,8 +118,8 @@ namespace eval ::gui {
pack $right -side right -expand false -fill y -padx $::gui::padx -pady $::gui::pady
pack $middle -side left -expand true -fill both -padx $::gui::padx -pady $::gui::pady
set files [::ttk::frame .left.files]
- set options_frame [::ttk::labelframe .left.options -text "Options"]
- set tasks_labelframe [::ttk::labelframe .left.tasks -text "Tasks"]
+ set options_frame [::ttk::labelframe .left.options -text "[::xml::GetData ${::xmllang} "Lang:Options" 0]"]
+ set tasks_labelframe [::ttk::labelframe .left.tasks -text "[::xml::GetData ${::xmllang} "Lang:Tasks" 0]"]
set tasks_scrollframe [scrolledframe::scrolledframe .left.tasks.f \
-yscrollcommand [list ::gui::set_scroll $tasks_labelframe.sy] \
-xscrollcommand [list ::gui::set_scroll $tasks_labelframe.sx]]
@@ -117,25 +138,26 @@ namespace eval ::gui {
set input [::ttk::frame .left.files.input]
set output [::ttk::frame .left.files.output]
pack $input $output -side top -expand true -fill both -padx $::gui::padx -pady $::gui::pady
- set input_label [::ttk::label .left.files.input.label -text "Original Firmware :"]
+ set input_label [::ttk::label .left.files.input.label -text "[::xml::GetData ${::xmllang} "Lang:Original_Firmware" 0]"]
set input_entry [::ttk::entry .left.files.input.entry -textvariable ::IN_FILE]
- set input_button [::ttk::button .left.files.input.button -text "Browse" -command [list ::gui::browse open $input_entry [list { "PS3 Firmware Update" {*.PUP *.pup} }] ".PUP" "Choose the Official Firmware Update"]]
+ set input_button [::ttk::button .left.files.input.button -text "[::xml::GetData ${::xmllang} "Lang:Browse" 0]" -command [list ::gui::browse open "false" $input_entry [list { "PS3 Firmware Update" {*.PUP *.pup} }] ".PUP" "Choose the Official Firmware Update"]]
pack $input_label $input_entry $input_button -side left -expand true -fill x -anchor nw -padx $::gui::padx -pady $::gui::pady
- set output_label [::ttk::label .left.files.output.label -text "Modified Firmware :"]
+ set output_label [::ttk::label .left.files.output.label -text "[::xml::GetData ${::xmllang} "Lang:Modified_Firmware" 0]"]
set output_entry [::ttk::entry .left.files.output.entry -textvariable ::OUT_FILE]
- set output_button [::ttk::button .left.files.output.button -text "Browse" -command [list ::gui::browse save $output_entry [list { "PS3 Firmware Update" {*.PUP *.pup} }] ".PUP" "Choose the destination Modified Firmware"]]
+ set output_button [::ttk::button .left.files.output.button -text "[::xml::GetData ${::xmllang} "Lang:Browse" 0]" -command [list ::gui::browse save "false" $output_entry [list { "PS3 Firmware Update" {*.PUP *.pup} }] ".PUP" "Choose the destination Modified Firmware"]]
pack $output_label $output_entry $output_button -side left -expand true -fill x -anchor nw -padx $::gui::padx -pady $::gui::pady
set ::IN_FILE [lindex $arguments 0]
set ::OUT_FILE [lindex $arguments 1]
- set build [::ttk::button .right.build -text "Build MFW" -command ::gui::build_mfw]
- set exit [::ttk::button .right.exit -text "Quit" -command exit]
+ set build [::ttk::button .right.build -text "[::xml::GetData ${::xmllang} "Lang:Build_MFW" 0]" -command ::gui::build_mfw]
+ set setting [::ttk::button .right.lsettings -text "[::xml::GetData ${::xmllang} "Lang:Settings" 0]" -command ::gui::settings]
+ set exit [::ttk::button .right.exit -text "[::xml::GetData ${::xmllang} "Lang:Quit" 0]" -command exit]
set about [::ttk::frame .right.about]
- set themes [::ttk::labelframe .right.themes -text "Theme"]
+ set themes [::ttk::labelframe .right.themes -text "[::xml::GetData ${::xmllang} "Lang:Theme" 0]"]
populate_themes $themes
add_about_msg $about
- pack $about $build $exit -side top -expand false -fill both -padx $::gui::padx -pady $::gui::pady
+ pack $about $build $setting $exit -side top -expand false -fill both -padx $::gui::padx -pady $::gui::pady
unset ::options(--gui)
foreach opt [get_sorted_options [file normalize [info script]] [array names ::options]] {
@@ -173,6 +195,7 @@ namespace eval ::gui {
}
}
}
+ ::gui::load_settings
}
proc scrollWidget {w d} {
@@ -196,28 +219,30 @@ namespace eval ::gui {
set appmenu $menu.apple
$menu add cascade -label "PS3MFW Builder" -menu $appmenu
menu $appmenu -tearoff 0 -type normal
- $appmenu add command -label "About PS3MFW Builder" \
+ $appmenu add command -label "[::xml::GetData ${::xmllang} "Lang:About_PS3MFW_Builder" 0]" \
-command ::gui::about
$appmenu add separator
}
set filemenu [menu $menu.file -tearoff 0 -type normal]
- $filemenu add command -label "Select Official firmware" \
- -command [list ::gui::browse open .left.files.input.entry [list { "PS3 Firmware Update" {*.PUP *.pup} }] ".PUP" "Choose the Official Firmware Update"]
- $filemenu add command -label "Select Destination MFW firmware" \
- -command [list ::gui::browse save .left.files.output.entry [list { "PS3 Firmware Update" {*.PUP *.pup} }] ".PUP" "Choose the destination Modified Firmware"]
+ $filemenu add command -label "[::xml::GetData ${::xmllang} "Lang:Select_Official_firmware" 0]" \
+ -command [list ::gui::browse open "false" .left.files.input.entry [list { "PS3 Firmware Update" {*.PUP *.pup} }] ".PUP" "Choose the Official Firmware Update"]
+ $filemenu add command -label "[::xml::GetData ${::xmllang} "Lang:Select_Destination_MFW_firmware" 0]" \
+ -command [list ::gui::browse save "false" .left.files.output.entry [list { "PS3 Firmware Update" {*.PUP *.pup} }] ".PUP" "Choose the destination Modified Firmware"]
$filemenu add separator
- $filemenu add command -label "Build MFW" -command ::gui::build_mfw
+ $filemenu add command -label "[::xml::GetData ${::xmllang} "Lang:Build_MFW" 0]" -command ::gui::build_mfw
$filemenu add separator
- $filemenu add command -label "Exit" -command "exit"
+ $filemenu add command -label "[::xml::GetData ${::xmllang} "Lang:Settings" 0]" -command ::gui::settings
+ $filemenu add separator
+ $filemenu add command -label "[::xml::GetData ${::xmllang} "Lang:Exit" 0]" -command "exit"
set thememenu [menu $menu.theme -tearoff 0 -type normal]
set helpmenu [menu $menu.help -tearoff 0 -type normal]
- $helpmenu add command -label "About PS3MFW Builder" -command ::gui::about
+ $helpmenu add command -label "[::xml::GetData ${::xmllang} "Lang:About_PS3MFW_Builder" 0]" -command ::gui::about
- $menu add cascade -label "File" -menu $filemenu
- $menu add cascade -label "Theme" -menu $thememenu
- $menu add cascade -label "Help" -menu $helpmenu
+ $menu add cascade -label "[::xml::GetData ${::xmllang} "Lang:File" 0]" -menu $filemenu
+ $menu add cascade -label "[::xml::GetData ${::xmllang} "Lang:Theme" 0]" -menu $thememenu
+ $menu add cascade -label "[::xml::GetData ${::xmllang} "Lang:Help" 0]" -menu $helpmenu
. configure -menu $menu
}
@@ -235,7 +260,7 @@ namespace eval ::gui {
proc about { } {
destroy .about
toplevel .about
- wm title .about "About PS3MFW Builder"
+ wm title .about "[::xml::GetData ${::xmllang} "Lang:About_PS3MFW_Builder" 0]"
::ttk::frame .about.f
pack .about.f -expand true -fill both
@@ -251,6 +276,56 @@ namespace eval ::gui {
wm geometry .about ${w}x${h}+${middle_x}+${middle_y}
}
+ proc add_settings { settings } {
+
+ set icon128 [image create photo -file [file join ${::PS3MFW_DIR} images ps3mfw-icon-128.gif]]
+ pack [::ttk::label $settings.img -image $icon128 -anchor center] -expand false -fill both
+ set files [glob -directory [file join $::PS3MFW_DIR language] *]
+ list langlist ""
+ foreach filename ${files} {lappend langlist " [file rootname [file tail $filename]]"}
+ set lang [::ttk::combobox $settings.l -textvariable ::::selected_lang -values $langlist]
+ set ::selected_lang ${::language}
+ pack [::ttk::label $settings.2 -text "[::xml::GetData ${::xmllang} "Lang:Language" 0]:" -anchor center] -expand false -fill x
+ pack $lang -side top -expand false -fill none -anchor center
+ pack [::ttk::label $settings.3 -text "" -anchor center] -expand false -fill x
+ set temp [::ttk::frame $settings.temp]
+ set ps3_keys [::ttk::frame $settings.ps3_keys]
+ pack $temp $ps3_keys -side top -expand false -fill x
+ set temp_label [::ttk::label $settings.temp.1 -text "Temp Files:"]
+ set ::temp_entry [::ttk::entry $settings.temp.2 -textvariable ::temp_dir]
+ set ::temp_dir [file nativename ${::BUILD_DIR}]
+ set temp_button [::ttk::button $settings.temp.3 -text "[::xml::GetData ${::xmllang} "Lang:Browse" 0]" -command [list ::gui::browse_directory ${::temp_entry} "Select Temp directory:"]]
+ pack $temp_label $::temp_entry $temp_button -side left -expand true
+ set ps3_keys_label [::ttk::label $settings.ps3_keys.1 -text "PS3_KEYS:"]
+ set ::ps3_keys_entry [::ttk::entry $settings.ps3_keys.2 -textvariable ::ps3_keys_dir]
+ set ::ps3_keys_dir ${::env(PS3_KEYS)}
+ set ps3_keys_button [::ttk::button $settings.ps3_keys.3 -text "[::xml::GetData ${::xmllang} "Lang:Browse" 0]" -command [list ::gui::browse_directory ${::ps3_keys_entry} "Select PS3_KEYS directory:"]]
+ pack $ps3_keys_label $::ps3_keys_entry $ps3_keys_button -side left -expand true
+ set ssettings [::ttk::button $settings.7 -text "[::xml::GetData ${::xmllang} "Lang:Save_settings" 0]" -command ::gui::save_settings]
+ set csettings [::ttk::button $settings.8 -text "[::xml::GetData ${::xmllang} "Lang:Default_settings" 0]" -command ::gui::default_settings]
+ pack $ssettings $csettings -side left -expand true -fill none
+ }
+
+ proc settings { } {
+
+ destroy .settings
+ toplevel .settings
+ wm title .settings "[::xml::GetData ${::xmllang} "Lang:PS3MFW_Builder_Settings" 0]"
+
+ ::ttk::frame .settings.f
+ pack .settings.f -expand true -fill both
+ add_settings .settings.f
+
+ regexp {=?(\d+)x(\d+)[+\-](-?\d+)[+\-](-?\d+)} [winfo geometry .] -> width height x y
+ set middle_x [expr {$x + ($width / 2)}]
+ set middle_y [expr {$y + ($height / 2)}]
+ set w 320
+ set h 300
+ incr middle_x -[expr {int($w / 2)}]
+ incr middle_y -[expr {int($h / 2)}]
+ wm geometry .settings ${w}x${h}+${middle_x}+${middle_y}
+ }
+
proc populate_themes {themes} {
array set THEMES {
@@ -343,10 +418,35 @@ namespace eval ::gui {
set widget [::ttk::frame $w.$name]
set label [::ttk::label $w.$name.label -text "$description :"]
set entry [::ttk::entry $w.$name.entry -textvariable $option]
- set button [::ttk::button $w.$name.button -text "Browse" \
- -command [list ::gui::browse $action $entry "$fileTypes" ".${fileType}" "Choose $typeDesc File"]]
+ set button [::ttk::button $w.$name.button -text "[::xml::GetData ${::xmllang} "Lang:Browse" 0]" \
+ -command [list ::gui::browse $action "false" $entry "$fileTypes" ".${fileType}" "Choose $typeDesc File"]]
+ pack $label $entry $button -side left -expand true -fill x -anchor nw -padx $::gui::padx -pady $::gui::pady
+ }
+ files {
+ set action [lindex $typeargs 1]
+ set typeDesc [lindex $typeargs 2 0]
+ set fileType [lindex $typeargs 2 1]
+ set fileTypes [list [list $typeDesc [list *.[string toupper $fileType] *.[string tolower $fileType]]]]
+ #debug "Option action $name: $action"
+ #debug "Option typeDesc $name: $typeDesc"
+ #debug "Option Filetype $name: $fileType"
+ #debug "Option Filetypes $name: $fileTypes"
+ set widget [::ttk::frame $w.$name]
+ set label [::ttk::label $w.$name.label -text "$description :"]
+ set entry [::ttk::entry $w.$name.entry -textvariable $option]
+ set button [::ttk::button $w.$name.button -text "[::xml::GetData ${::xmllang} "Lang:Browse" 0]" \
+ -command [list ::gui::browse $action "true" $entry "$fileTypes" ".${fileType}" "Choose $typeDesc Files"]]
pack $label $entry $button -side left -expand true -fill x -anchor nw -padx $::gui::padx -pady $::gui::pady
}
+ directory {
+ set title [lindex $typeargs 1]
+ set widget [::ttk::frame $w.$name]
+ set label [::ttk::label $w.$name.label -text "$description :"]
+ set entry [::ttk::entry $w.$name.entry -textvariable $option]
+ set button [::ttk::button $w.$name.button -text "[::xml::GetData ${::xmllang} "Lang:Browse" 0]" \
+ -command [list ::gui::browse_directory $entry $title]]
+ pack $label $entry $button -side left -expand true -fill x -anchor nw -padx $::gui::padx -pady $::gui::pady
+ }
textarea {
set widget [::ttk::frame $w.$name]
set label [::ttk::label $w.$name.label -text "$description :"]
@@ -486,7 +586,7 @@ namespace eval ::gui {
}
- proc browse { type path filetypes extension title } {
+ proc browse { type multiple path filetypes extension title } {
append filetypes {
{ "All Files" {*.*} }
}
@@ -499,9 +599,9 @@ namespace eval ::gui {
if { ![file exists $initialfile] } {
set initialfile ""
- set file [tk_getOpenFile -defaultextension $extension -filetypes $filetypes -multiple false -parent $path -title $title]
+ set file [tk_getOpenFile -defaultextension $extension -filetypes $filetypes -multiple $multiple -parent $path -title $title]
} else {
- set file [tk_getOpenFile -defaultextension $extension -filetypes $filetypes -initialfile $initialfile -multiple false -parent $path -title $title]
+ set file [tk_getOpenFile -defaultextension $extension -filetypes $filetypes -initialfile $initialfile -multiple $multiple -parent $path -title $title]
}
} else {
set file [tk_getSaveFile -defaultextension $extension -filetypes $filetypes -initialfile ${::OUT_FILE} -parent $path -title $title]
@@ -511,6 +611,14 @@ namespace eval ::gui {
$path insert 0 $file
}
}
+
+ proc browse_directory { path title } {
+ set file [tk_chooseDirectory -parent $path -title $title]
+ if {$file != ""} {
+ $path delete 0 end
+ $path insert 0 $file
+ }
+ }
proc set_gui_state { state } {
.left.files.input.entry configure -state $state
@@ -598,11 +706,161 @@ namespace eval ::gui {
log "Error running script: $res" 1
tk_messageBox -default ok -message "FATAL ERROR: $res" -icon error
} else {
- tk_messageBox -default ok -message "Modified Firmware Built successfully!" -icon info
+ tk_messageBox -default ok -message "[::xml::GetData ${::xmllang} "Lang:successfully" 0]" -icon info
}
enable_gui
}
+ proc UTF8FullCodes pBuffer {
+ # taken from Unicode and UTF-8 article (wiki.tcl.tk/515)
+ upvar $pBuffer Buffer
+ set LastPos [string length $Buffer]
+ incr LastPos -1
+ set nBytes 1
+ for {set Pos $LastPos} {$Pos >= 0} {incr Pos -1} {
+ set Code [scan [string index $Buffer $Pos] %c]
+ if { $Code < 0x80 } {
+ break
+ }
+ if { $Code < 0xbf } {
+ incr nBytes
+ } else {
+ for {set Bytes 2} {$Bytes <= 6} {incr Bytes} {
+ # > Check for zero at Position (7 - Bytes)
+ if {0 == (( 1 << (7 - $Bytes)) & $Code)} {
+ break
+ }
+ }
+ puts "Bytes=$Bytes"
+ if { $Bytes == $nBytes } {
+ set Pos $LastPos
+ break
+ } else {
+ incr Pos -1
+ break
+ }
+ }
+ }
+ set Res [encoding convertfrom utf-8 [string range $Buffer 0 $Pos]]
+ incr Pos
+ set Buffer [string range $Buffer $Pos end]
+ return $Res
+ }
+
+ proc load_settings { } {
+
+ set ::IN_FILE [::xml::GetData ${::xmlang} "Settings:IN_FILE" 0]
+ set ::OUT_FILE [::xml::GetData ${::xmlang} "Settings:OUT_FILE" 0]
+
+ variable tasks
+ set selected_tasks [list]
+ foreach task [array names tasks] {
+ catch {unset ::${task}::options}
+ if {$tasks($task)} {
+ lappend selected_tasks $task
+ }
+ }
+
+ set data [::xml::GetData ${::xmlang} "Settings:tasks" 0]
+
+ foreach task $selected_tasks {
+ set ::gui::tasks($task) false
+ }
+
+ foreach task $data {
+ set ::gui::tasks($task) true
+ }
+
+ if { [::xml::GetData ${::xmlang} "Settings:Theme" 0] != "" } {
+ ::ttk::setTheme [::xml::GetData ${::xmlang} "Settings:Theme" 0]
+ variable theme [set ::ttk::currentTheme]
+ }
+ }
+
+ proc save_settings { } {
+
+ set fs $::settings
+ set ::xmlang [::xml::LoadFile $fs]
+
+ sed_in_place $fs "<IN_FILE>[::xml::GetData ${::xmlang} "Settings:IN_FILE" 0]</IN_FILE>" "<IN_FILE>${::IN_FILE}</IN_FILE>"
+ sed_in_place $fs "<OUT_FILE>[::xml::GetData ${::xmlang} "Settings:OUT_FILE" 0]</OUT_FILE>" "<OUT_FILE>${::OUT_FILE}</OUT_FILE>"
+
+ variable theme
+ sed_in_place $fs "<Theme>[::xml::GetData ${::xmlang} "Settings:Theme" 0]</Theme>" "<Theme>${theme}</Theme>"
+
+ variable tasks
+ set selected_tasks [list]
+ foreach task [array names tasks] {
+ catch {unset ::${task}::options}
+ if {$tasks($task)} {
+ lappend selected_tasks $task
+ }
+ }
+
+ set taskslist ""
+ foreach task ${selected_tasks} {
+ append taskslist " $task"
+ }
+
+ sed_in_place $fs "<tasks>[::xml::GetData ${::xmlang} "Settings:tasks" 0]</tasks>" "<tasks>${taskslist}</tasks>"
+
+ if {${::selected_lang} != [::xml::GetData ${::xmlang} "Settings:language" 0] & ${::selected_lang} != "" | [string trim ${::ps3_keys_dir}] != [::xml::GetData ${::xmlang} "Settings:PS3_KEYS" 0] | ${::temp_dir} != [file join /tmp PS3MFW] & ${::temp_dir} != [::xml::GetData ${::xmlang} "Settings:BUILD_DIR" 0]} {
+ sed_in_place $fs "<language>[::xml::GetData ${::xmlang} "Settings:language" 0]</language>" "<language>[string trim ${::selected_lang}]</language>"
+
+ if {[file exists ${::temp_dir}]} {
+ sed_in_place $fs "<BUILD_DIR>[::xml::GetData ${::xmlang} "Settings:BUILD_DIR" 0]</BUILD_DIR>" "<BUILD_DIR>${::temp_dir}</BUILD_DIR>"
+ } else {
+ sed_in_place $fs "<BUILD_DIR>[::xml::GetData ${::xmlang} "Settings:BUILD_DIR" 0]</BUILD_DIR>" "<BUILD_DIR></BUILD_DIR>"
+ }
+
+ if {[file exists ${::ps3_keys_dir}]} {
+ sed_in_place $fs "<PS3_KEYS>[::xml::GetData ${::xmlang} "Settings:PS3_KEYS" 0]</PS3_KEYS>" "<PS3_KEYS>${::ps3_keys_dir}</PS3_KEYS>"
+ } else {
+ sed_in_place $fs "<PS3_KEYS>[::xml::GetData ${::xmlang} "Settings:PS3_KEYS" 0]</PS3_KEYS>" "<PS3_KEYS></PS3_KEYS>"
+ }
+
+ exec [info nameofexecutable] &
+ exit
+ }
+ }
+
+ proc default_settings { } {
+ set ::temp_dir ""
+ set ::ps3_keys_dir ""
+ set ::IN_FILE ""
+ set ::OUT_FILE ""
+
+ variable tasks
+ set selected_tasks [list]
+ foreach task [array names tasks] {
+ catch {unset ::${task}::options}
+ if {$tasks($task)} {
+ lappend selected_tasks $task
+ }
+ }
+
+ foreach task $selected_tasks {
+ set ::gui::tasks($task) false
+ }
+
+ foreach task [list add_license_msg change_version patch_category_game] {
+ set ::gui::tasks($task) true
+ }
+
+ set ::selected_lang "English"
+
+ if { $::tcl_platform(os) == "Linux" } {
+ ::ttk::setTheme clam
+ } elseif { $::tcl_platform(platform) == "windows" } {
+ ::ttk::setTheme xpnative
+ } else {
+ ::ttk::setTheme aqua
+ }
+ variable theme [set ::ttk::currentTheme]
+
+ ::gui::save_settings
+ }
+
proc print_log {msg {tag {}}} {
if {[winfo exists .middle.log]} {
.middle.log configure -state normal
22 tasks/README
View
@@ -5,7 +5,7 @@
/ ____/\____ \ __(__ < / \ / __)\ \/\/ /
/ / / \/ \ /\/\ Y / \ /
/___/ /________/_________/__/ \___|__/ \__/\__/
- PS3MFW tasks v0.2 OtherOS++
+ PS3MFW tasks v0.2.1 OtherOS++
==============================================================
Several exciting new tasks have been created. The most interesting one is a new privacy patch, which keeps PS3 from sending personally identifiable information to many configurable domain names: After jailbreak became available for PS3, reverse engineers discovered that the PS3 collects a multitude of personal information without your knowledge, such as such as your TV model, a list of all usb devices (including product IDs) you ever plugged into your PS3, usage statistics, which games and media you play and more.
@@ -16,17 +16,33 @@ Additionally, several new customizations including a firmware version spoofer, a
The new tasks can be found at www.git-hacks.com/ps3mfw
+------------------------
+Unofficial 0.2.1 'DanyL'
+------------------------
+Added in main, options to save settings for:
+- Language (translations added for German/Deutsch, Dutch/Nederlands, English, Spanish/Espanol, French/Fran�aise, Hebrew, Italian, and some non-realworld languages: L33t-var1, L33t-var2, Piglatin & SwedishChef).
+- Temp folder
+- PS3_KEYS folder
+- Save/Default for all the settings, including selected/unselected tasks, original/modified firmware paths, theme and so on.
+Keybind added: you can restart PS3MFW Builder by pressing Shift-R.
+
-----------------------------------
BREAKDOWN OF ALL NEW/EXTENDED TASKS
-----------------------------------
+- homebrew_category.tcl - Add "Homebrew" category to the XMB
+
+- language_pack.tcl - Add/change Language Pack's, for XMB translations, see: http://www.ps3hax.net/2011/08/xmb-translation-guide/
+
+- tv_category.tcl - Add "TV" category to the XMB
+
- patch_appldr.tcl - Patch Appldr to allow Fself (3.10-3.30 / 3.40-3.55) set debug true (Experimental!)
-- patch_emer_init.tcl - Added 100 GameOS/OtherOS Sizes (10-1000GB in 10GB increments)
+- patch_emer_init.tcl - Added 100 GameOS/OtherOS Sizes (10-1000GB in 10GB increments) quick&dirty alpha version (final needs radiobuttons, slider and/or inputbox)
- patch_shop2.tcl - Converts demo/promo firmwares to enable installing on retail PS3s (thus enabling password lockout, demo-mode and package installer in systemmenu), without the need for service mode!
-- spoof_version.tcl - More spoof added (all Retail/CEX 1.x, 2.x, 3.x up to including 3.72)
+- spoof_version.tcl - More spoof added (all Retail/CEX 1.x, 2.x, 3.x up to including 3.73)
- ps3mfw_base.tcl - Merged 0.2++ spoof (needed for spoof_version.tcl) and OtherOS++ SPP (needed for patch_profile.tcl)
145 tasks/homebrew_category.tcl
View
@@ -0,0 +1,145 @@
+#!/usr/bin/tclsh
+#
+# ps3mfw -- PS3 MFW creator
+#
+# Copyright (C) Anonymous Developers (Code Monkeys)
+#
+# This software is distributed under the terms of the GNU General Public
+# License ("GPL") version 3, as published by the Free Software Foundation.
+#
+
+# Priority: 1000
+# Description: Add "Homebrew" category to the XMB
+
+# Option --homebrew-cat: Category to replace
+
+# Type --homebrew-cat: combobox {{Users} {Photo} {Music} {Video} {TV} {Game} {Network} {PlayStation® Network} {Friends}}
+
+
+namespace eval ::homebrew_category {
+
+ array set ::homebrew_category::options {
+ --homebrew-cat "Category"
+ }
+
+ proc main {} {
+ set CATEGORY_TV_XML [file join dev_flash vsh resource explore xmb category_tv.xml]
+ set CATEGORY_GAME_TOOL2_XML [file join dev_flash vsh resource explore xmb category_game_tool2.xml]
+ set EXPLORE_PLUGIN_FULL_RCO [file join dev_flash vsh resource explore_plugin_full.rco]
+ set XMB_INGAME_RCO [file join dev_flash vsh resource xmb_ingame.rco]
+
+ if {$::homebrew_category::options(--homebrew-cat) == "Users"} {
+ set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_user.xml]
+ }
+
+ if {$::homebrew_category::options(--homebrew-cat) == "Photo"} {
+ set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_photo.xml]
+ }
+
+ if {$::homebrew_category::options(--homebrew-cat) == "Music"} {
+ set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_music.xml]
+ }
+
+ if {$::homebrew_category::options(--homebrew-cat) == "Video"} {
+ set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_video.xml]
+ }
+
+ if {$::homebrew_category::options(--homebrew-cat) == "TV"} {
+ set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_tv.xml]
+ set XMB_PLUGIN [file join dev_flash vsh module xmb_plugin.sprx]
+ modify_devflash_file $XMB_PLUGIN ::homebrew_category::patch_self
+ }
+
+ if {$::homebrew_category::options(--homebrew-cat) == "Game"} {
+ set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_game.xml]
+ }
+
+ if {$::homebrew_category::options(--homebrew-cat) == "Network"} {
+ set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_network.xml]
+ }
+
+ if {$::homebrew_category::options(--homebrew-cat) == "PlayStation® Network"} {
+ set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_psn.xml]
+ }
+
+ if {$::homebrew_category::options(--homebrew-cat) == "Friends"} {
+ set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_friend.xml]
+ }
+
+ modify_devflash_file $CATEGORY_TV_XML ::homebrew_category::find_nodes
+ modify_devflash_file $CATEGORY_GAME_TOOL2_XML ::homebrew_category::find_nodes_2
+ modify_devflash_file $CATEGORY_XML ::homebrew_category::inject_nodes
+ modify_rco_file $EXPLORE_PLUGIN_FULL_RCO ::homebrew_category::callback_homebrew
+ modify_rco_file $XMB_INGAME_RCO ::homebrew_category::callback_homebrew
+ }
+
+ proc patch_self {self} {
+ log "Patching [file tail $self]"
+ ::modify_self_file $self ::homebrew_category::patch_elf
+ }
+
+ proc patch_elf {elf} {
+ log "Patching [file tail $elf] to add tv category"
+
+ set search "\x64\x65\x76\x5f\x68\x64\x64\x30\x2f\x67\x61\x6d\x65\x2f\x42\x43\x45\x53\x30\x30\x32\x37\x35"
+ set replace "\x64\x65\x76\x5f\x66\x6c\x61\x73\x68\x2f\x64\x61\x74\x61\x2f\x63\x65\x72\x74\x00\x00\x00\x00"
+
+ catch_die {::patch_elf $elf $search 0 $replace} \
+ "Unable to patch self [file tail $elf]"
+ }
+
+ proc find_nodes { file } {
+ log "Parsing XML: [file tail $file]"
+ set xml [::xml::LoadFile $file]
+
+ set ::XMBML [::xml::GetNodeByAttribute $xml "XMBML" version "1.0"]
+
+ if {$::XMBML == ""} {
+ die "Could not parse $file"
+ }
+ }
+
+ proc find_nodes_2 { file } {
+ log "Parsing XML: [file tail $file]"
+ set xml [::xml::LoadFile $file]
+
+ set ::query_package_files [::xml::GetNodeByAttribute $xml "XMBML:View:Items:Query" key "seg_package_files"]
+ set ::view_package_files [::xml::GetNodeByAttribute $xml "XMBML:View" id "seg_package_files"]
+ set ::view_packages [::xml::GetNodeByAttribute $xml "XMBML:View" id "seg_packages"]
+
+ if {$::query_package_files == "" || $::view_package_files == "" || $::view_packages == "" } {
+ die "Could not parse $file"
+ }
+
+ set ::query_gamedebug [::xml::GetNodeByAttribute $xml "XMBML:View:Items:Query" key "seg_gamedebug"]
+ set ::view_gamedebug [::xml::GetNodeByAttribute $xml "XMBML:View" id "seg_gamedebug"]
+
+ if {$::query_gamedebug == "" || $::view_gamedebug== "" } {
+ die "Could not parse $file"
+ }
+ }
+
+ proc inject_nodes { file } {
+ log "Modifying XML: [file tail $file]"
+ set xml [::xml::LoadFile $file]
+
+ set xml [::xml::ReplaceNode $xml [::xml::GetNodeIndicesByAttribute $xml "XMBML" version "1.0"] $::XMBML]
+ set xml [::xml::InsertNode $xml [::xml::GetNodeIndicesByAttribute $xml "XMBML:View:Items:Query" key "seg_gameexit"] $::query_package_files]
+ set xml [::xml::InsertNode $xml {2 end 0} $::view_package_files]
+ set xml [::xml::InsertNode $xml {2 end 0} $::view_packages]
+ set xml [::xml::InsertNode $xml [::xml::GetNodeIndicesByAttribute $xml "XMBML:View:Items:Query" key "seg_gameexit"] $::query_gamedebug]
+ set xml [::xml::InsertNode $xml {2 end 0} $::view_gamedebug]
+
+ unset ::query_package_files
+ unset ::view_package_files
+ unset ::view_packages
+ unset ::query_gamedebug
+ unset ::view_gamedebug
+ ::xml::SaveToFile $xml $file
+ }
+
+ proc callback_homebrew {path args} {
+ log "Patching English.xml into [file tail $path]"
+ sed_in_place [file join $path English.xml] $::homebrew_category::options(--homebrew-cat) Homebrew
+}
+}
135 tasks/language_pack.tcl
View
@@ -0,0 +1,135 @@
+#!/usr/bin/tclsh
+#
+# ps3mfw -- PS3 MFW creator
+#
+# Copyright (C) Anonymous Developers (Code Monkeys)
+#
+# This software is distributed under the terms of the GNU General Public
+# License ("GPL") version 3, as published by the Free Software Foundation.
+#
+
+# Priority: 950
+# Description: Language Pack
+
+# Option --language-pack: Language Pack path
+# Option --language-replace: Language Pack to replace (keep empty for none)
+# Option --language-font: Replace fonts
+
+# Type --language-pack: file open {"Language Pack" {.LP}}
+# Type --language-replace: combobox {{} {English} {French} {German} {Italian} {Finnish} {Dutch} {Danish} {Swedish} {Spanish} {Russian} {Portugese} {Norwegian} {Korean} {ChineseTrad} {ChineseSimpl} {Japanese}}
+# Type --language-font: boolean
+
+
+namespace eval ::language_pack {
+
+ array set ::language_pack::options {
+ --language-pack "Language_Pack.LP"
+ --language-replace ""
+ --language-font true
+ }
+
+ proc main {} {
+ variable options
+ set fontPrefix "SCE-PS3-"
+ set langpackDir [file join ${::BUILD_DIR} langpack]
+ file delete -force $langpackDir
+ extract_tar $options(--language-pack) ${langpackDir}
+
+ set fontFiles {{CP-R-KANA} {DH-R-CGB} {MT-BI-LATIN} {MT-B-LATIN} {MT-I-LATIN} {MT-R-LATIN} {NR-B-JPN} {NR-L-JPN} {NR-R-EXT} {NR-R-JPN} {RD-BI-LATIN} {RD-B-LATIN} {RD-B-LATIN2} {RD-I-LATIN} {RD-LI-LATIN} {RD-L-LATIN} {RD-L-LATIN2} {RD-R-LATIN} {RD-R-LATIN2} {SR-R-EXT} {SR-R-JPN} {SR-R-LATIN} {SR-R-LATIN2} {VR-R-LATIN} {VR-R-LATIN2} {YG-B-KOR} {YG-L-KOR} {YG-R-KOR}}
+
+ if {$::language_pack::options(--language-font)} {
+ foreach fontFile $fontFiles {
+ set devflashFontFile [file join dev_flash data font ${fontPrefix}${fontFile}.TTF]
+ set langpackFontFile [file join ${langpackDir} font ${fontPrefix}${fontFile}.TTF]
+ if {[file exists ${langpackFontFile}]} {
+ ::modify_devflash_file ${devflashFontFile} ::language_pack::callback_font ${langpackFontFile}
+ }
+ }
+ }
+
+ set rcoFiles {{ap_plugin} {audioplayer_plugin} {audioplayer_plugin_dummy} {audioplayer_plugin_mini} {audioplayer_plugin_util} {auth_plugin} {autodownload_plugin} {avc_game_plugin} {avc_plugin} {avc2_game_plugin} {avc2_game_video_plugin} {avc2_text_plugin} {bdp_disccheck_plugin} {bdp_plugin} {bdp_storage_plugin} {category_setting_plugin} {checker_plugin} {custom_render_plugin} {data_copy_plugin} {deviceconf_plugin} {dlna_plugin} {download_plugin} {edy_plugin} {eula_cddb_plugin} {eula_hcopy_plugin} {eula_net_plugin} {explore_category_friend} {explore_category_game} {explore_category_music} {explore_category_network} {explore_category_photo} {explore_category_psn} {explore_category_sysconf} {explore_category_tv} {explore_category_user} {explore_category_video} {explore_plugin_ft} {explore_plugin_full} {explore_plugin_game} {explore_plugin_np} {filecopy_plugin} {friendim_plugin} {friendim_plugin_game} {friendml_plugin} {friendml_plugin_game} {friendtrophy_plugin} {friendtrophy_plugin_game} {game_ext_plugin} {game_indicator_plugin} {game_plugin} {gamedata_plugin} {gamelib_plugin} {gameupdate_plugin} {hknw_plugin} {idle_plugin} {impose_plugin} {kensaku_plugin} {msgdialog_plugin} {musicbrowser_plugin} {nas_plugin} {netconf_plugin} {newstore_effect} {newstore_plugin} {np_eula_plugin} {np_matching_plugin} {np_multisignin_plugin} {np_trophy_ingame} {np_trophy_plugin} {npsignin_plugin} {osk_plugin} {oskfullkeypanel_plugin} {oskpanel_plugin} {pesm_plugin} {photo_network_sharing_plugin} {photolist_plugin} {photoupload_plugin} {photoviewer_plugin} {playlist_plugin} {poweroff_plugin} {premo_plugin} {print_plugin} {profile_plugin} {profile_plugin_mini} {ps3_savedata_plugin} {rec_plugin} {regcam_plugin} {sacd_plugin} {scenefolder_plugin} {screenshot_plugin} {search_service} {software_update_plugin} {soundvisualizer_plugin} {strviewer_plugin} {subdisplay_plugin} {sv_pseudoaudioplayer_plugin} {sysconf_plugin} {system_plugin} {thumthum_plugin} {upload_util} {user_info_plugin} {user_plugin} {videodownloader_plugin} {videoeditor_plugin} {videoplayer_plugin} {videoplayer_util} {vmc_savedata_plugin} {wboard_plugin} {webbrowser_plugin} {webrender_plugin} {xmb_ingame} {xmb_plugin_normal} {ycon_manual_plugin}}
+
+ foreach rcoFile $rcoFiles {
+ set devflashRcoFile [file join dev_flash vsh resource ${rcoFile}.rco]
+
+ if {$options(--language-replace) == ""} {
+ } else {
+ if {[file isdirectory [file join ${langpackDir} replace]]} {
+ set replacelangpackRcoFile [file join ${langpackDir} replace ${rcoFile}.xml]
+ if {[file exists $replacelangpackRcoFile]} {
+ set mode "0"
+ ::modify_rco_file ${devflashRcoFile} ::language_pack::callback_rco ${replacelangpackRcoFile} ${mode} {empty}
+ }
+ }
+ }
+
+ if {[file isdirectory [file join ${langpackDir} edit]]} {
+ set langs {{English} {French} {German} {Italian} {Finnish} {Dutch} {Danish} {Swedish} {Spanish} {Russian} {Portugese} {Norwegian} {Korean} {ChineseTrad} {ChineseSimpl} {Japanese}}
+ foreach lang $langs {
+ set editlangpackRcoFile [file join ${langpackDir} edit ${rcoFile} ${lang}.xml]
+ if {[file exists $editlangpackRcoFile]} {
+ set mode "1"
+ ::modify_rco_file ${devflashRcoFile} ::language_pack::callback_rco ${editlangpackRcoFile} ${mode} ${lang}
+ }
+ }
+ }
+
+ if {[file exists [file join ${langpackDir} format.txt]]} {
+ set formatlangpackRcoFile [file join ${langpackDir} format.txt]
+ if {[file exists $formatlangpackRcoFile]} {
+ set mode "2"
+ ::modify_rco_file ${devflashRcoFile} ::language_pack::callback_rco ${formatlangpackRcoFile} ${mode} ${rcoFile}
+ }
+ }
+ }
+ }
+
+ proc callback_font { dst src } {
+ if {[file exists ${src}]} {
+ if {[file exists ${dst}]} {
+ log "Replacing font file [file tail ${dst}] with [file tail ${src}]"
+ copy_file -force ${src} ${dst}
+ } else {
+ die "Font file ${dst} does not exist"
+ }
+ } else {
+ die "Font file ${src} does not exist"
+ }
+ }
+
+ proc callback_rco {path src mode name} {
+ variable options
+
+ if {${mode} == "0" } {
+ set dst [file join ${path} $options(--language-replace).xml]
+ }
+
+ if {${mode} == "1" } {
+ set dst [file join ${path} ${name}.xml]
+ }
+
+ if {${mode} == "2" } {
+ set dst [file join ${::CUSTOM_PUP_DIR} "update_files" "dev_flash" "dev_flash" "vsh" "resource" ${name}.rco.xml]
+ }
+
+ if {[file exists ${src}]} {
+ if {[file exists ${dst}]} {
+ if {${mode} != "2" } {
+ log "Replacing ${dst}"
+ copy_file -force ${src} ${dst}
+ } else {
+ log "Patching format"
+ set re [open ${src} r]
+ set format [read $re]
+ set read [read [open ${dst} r]]
+ sed_in_place ${read} utf16 ${format}
+ close $re
+ }
+ } else {
+ die "${dst} does not exist"
+ }
+ } else {
+ die "${src} does not exist"
+ }
+ }
+}
47 tasks/tv_category.tcl
View
@@ -0,0 +1,47 @@
+#!/usr/bin/tclsh
+#
+# ps3mfw -- PS3 MFW creator
+#
+# Copyright (C) Anonymous Developers (Code Monkeys)
+#
+# This software is distributed under the terms of the GNU General Public
+# License ("GPL") version 3, as published by the Free Software Foundation.
+#
+
+# Priority: 1050
+# Description: Add "TV" category to the XMB
+
+# Option --tv-cat: Show TV category in xmb no matter if your country support it.
+
+# Type --tv-cat: boolean
+
+
+namespace eval ::tv_category {
+
+ array set ::tv_category::options {
+ --tv-cat true
+ }
+
+ proc main {} {
+ if {$::tv_category::options(--tv-cat)} {
+ set CATEGORY_XML [file join dev_flash vsh resource explore xmb category_tv.xml]
+ set XMB_PLUGIN [file join dev_flash vsh module xmb_plugin.sprx]
+ modify_devflash_file $XMB_PLUGIN ::tv_category::patch_self
+ }
+ }
+
+ proc patch_self {self} {
+ log "Patching [file tail $self]"
+ ::modify_self_file $self ::tv_category::patch_elf
+ }
+
+ proc patch_elf {elf} {
+ log "Patching [file tail $elf] to add tv category"
+
+ set search "\x64\x65\x76\x5f\x68\x64\x64\x30\x2f\x67\x61\x6d\x65\x2f\x42\x43\x45\x53\x30\x30\x32\x37\x35"
+ set replace "\x64\x65\x76\x5f\x66\x6c\x61\x73\x68\x2f\x64\x61\x74\x61\x2f\x63\x65\x72\x74\x00\x00\x00\x00"
+
+ catch_die {::patch_elf $elf $search 0 $replace} \
+ "Unable to patch self [file tail $elf]"
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.