channel/menu-downloader WIP

This commit is contained in:
Christopher Roy Bratusek 2012-08-21 20:46:05 +02:00
parent ac68974d06
commit e9f3e9c821
5 changed files with 58 additions and 26 deletions

View File

@ -5,6 +5,7 @@
* logical sorting of IOS in downloader (IOS4 is the first, not after IOS39)
taken from: [http://code.activestate.com/recipes/135435/]
* ensure Python 2.x is used, Python 3.x is not yet supported
* separate combobox for choosing channels, system-menu in downloader [WIP]
-- 0.3 --
* Updated some porject's files which still referenced wii signer

View File

@ -173,9 +173,13 @@ class Ui_Qwad(object):
self.Title.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.Title.setObjectName("Title")
self.comboBox = QtGui.QComboBox(self.NUStab)
self.comboBox.setGeometry(QtCore.QRect(125, 10, 291, 25))
self.comboBox.setGeometry(QtCore.QRect(125, 10, 150, 25))
self.comboBox.setObjectName("comboBox")
self.comboBox.addItem(QtCore.QString())
self.comboBox2 = QtGui.QComboBox(self.NUStab)
self.comboBox2.setGeometry(QtCore.QRect(280, 10, 170, 25))
self.comboBox2.setObjectName("comboBox2")
self.comboBox2.addItem(QtCore.QString())
self.decryptCheck = QtGui.QCheckBox(self.NUStab)
self.decryptCheck.setEnabled(False)
self.decryptCheck.setGeometry(QtCore.QRect(40, 120, 171, 23))
@ -260,7 +264,8 @@ class Ui_Qwad(object):
self.enteredTitleID.setText(QtGui.QApplication.translate("Qwad", "000000000000000000", None, QtGui.QApplication.UnicodeUTF8))
self.TitleIDlabel.setText(QtGui.QApplication.translate("Qwad", "Title ID", None, QtGui.QApplication.UnicodeUTF8))
self.Title.setText(QtGui.QApplication.translate("Qwad", "Choose title:", None, QtGui.QApplication.UnicodeUTF8))
self.comboBox.setItemText(0, QtGui.QApplication.translate("Qwad", "Custom title ID", None, QtGui.QApplication.UnicodeUTF8))
self.comboBox.setItemText(0, QtGui.QApplication.translate("Qwad", "Choose IOS", None, QtGui.QApplication.UnicodeUTF8))
self.comboBox2.setItemText(0, QtGui.QApplication.translate("Qwad", "Choose Channel/Menu", None, QtGui.QApplication.UnicodeUTF8))
self.decryptCheck.setText(QtGui.QApplication.translate("Qwad", "Decrypt", None, QtGui.QApplication.UnicodeUTF8))
self.pack_in_WAD_checkbox.setText(QtGui.QApplication.translate("Qwad", "Pack into WAD", None, QtGui.QApplication.UnicodeUTF8))
self.VersionlineEdit.setText(QtGui.QApplication.translate("Qwad", "unset", None, QtGui.QApplication.UnicodeUTF8))

View File

@ -28,7 +28,9 @@ class MWQwad(QMainWindow, Ui_Qwad):
self.VersionlineEdit.setText(self.defaultversion)
for key in TitleIDs.sorted_copy(TitleIDs.TitleDict):
self.comboBox.addItem(key)
for ios in sorted(TitleIDs.IOSdict):
for key in TitleIDs.sorted_copy(TitleIDs.ChannelDict):
self.comboBox2.addItem(key)
for ios in TitleIDs.sorted_copy(TitleIDs.IOSdict):
self.IOSversion.addItem(ios)
self.getReady()
@ -43,7 +45,6 @@ class MWQwad(QMainWindow, Ui_Qwad):
os.chdir(CWD)
print "Done."
def ErrorDiag(self, error = QT_TR_NOOP("Unknown error")):
print error
QMessageBox.critical(None,
@ -214,6 +215,16 @@ class MWQwad(QMainWindow, Ui_Qwad):
self.enteredTitleID.setText(TitleIDs.TitleDict[str(selection)])
self.availableVersions.setText(TitleIDs.IOSdict[str(selection)])
@pyqtSignature("QString")
def on_comboBox2_currentIndexChanged(self, selection):
"""
Show the title ID of the selected title
"""
if self.comboBox2.findText(selection) != 0:
self.enteredTitleID.enabled = False
self.enteredTitleID.setText(TitleIDs.ChannelDict[str(selection)])
self.availableVersions.setText(TitleIDs.IOSdict[str(selection)])
@pyqtSignature("")
def on_enteredTitleID_returnPressed(self):
"""

View File

@ -509,13 +509,13 @@
<rect>
<x>125</x>
<y>10</y>
<width>291</width>
<width>121</width>
<height>25</height>
</rect>
</property>
<item>
<property name="text">
<string>Custom title ID</string>
<string>Choose IOS</string>
</property>
</item>
</widget>
@ -606,6 +606,21 @@
<string>unset</string>
</property>
</widget>
<widget class="QComboBox" name="comboBox2">
<property name="geometry">
<rect>
<x>260</x>
<y>10</y>
<width>121</width>
<height>25</height>
</rect>
</property>
<item>
<property name="text">
<string>Choose Channel</string>
</property>
</item>
</widget>
</widget>
</widget>
</widget>

View File

@ -44,13 +44,6 @@ def _generate_index(str):
return tuple(index)
TitleDict = {
"BOOT2":"0000000100000001",
"System Menu [JAP]":"0000000100000002",
"System Menu [PAL]":"0000000100000002",
"System Menu [USA]":"0000000100000002",
"System Menu [KOR]":"0000000100000002",
"BC":"0000000100000100",
"MIOS":"0000000100000101",
"IOS4":"0000000100000004",
"IOS9":"0000000100000009",
"IOS10":"000000010000000a",
@ -92,25 +85,32 @@ TitleDict = {
"IOS70":"0000000100000046",
"IOS80":"0000000100000050", }
Channeldict = {
ChannelDict = {
"BOOT2":"0000000100000001",
"System Menu [JAP]":"0000000100000002",
"System Menu [PAL]":"0000000100000002",
"System Menu [USA]":"0000000100000002",
"System Menu [KOR]":"0000000100000002",
"BC":"0000000100000100",
"MIOS":"0000000100000101",
#TODO: Add remaining Channels + UI
#QT_TR_NOOP("Wii Speak Channel"):"00010001484346xx",
#QT_TR_NOOP("Photo Channel 1.1 [USA]"):"0001000148415a45",
QT_TR_NOOP("Photo Channel 1.1 [PAL]"):"0001000148415a50",
#QT_TR_NOOP("Photo Channel 1.1 [PAL]"):"0001000148415a50",
#QT_TR_NOOP("Photo Channel 1.1 [JAP]"):"0001000148415a4a",
#QT_TR_NOOP("Metroid Prime 3 Preview"):"00010001484157xx",
QT_TR_NOOP("Nintendo Channel"):"00010001484154xx",
QT_TR_NOOP("Mii Contest Channel [USA]"):"0001000148415045",
QT_TR_NOOP("Mii Contest Channel [PAL]"):"0001000148415050",
QT_TR_NOOP("Mii Contest Channel [JAP]"):"000100014841504A",
QT_TR_NOOP("Everyone Votes Channel [USA]"):"0001000148414a45",
QT_TR_NOOP("Everyone Votes Channel [PAL]"):"0001000148414a50",
QT_TR_NOOP("Everyone Votes Channel [JAP]"):"0001000148414a4A",
#QT_TR_NOOP("Nintendo Channel"):"00010001484154xx",
#QT_TR_NOOP("Mii Contest Channel [USA]"):"0001000148415045",
#QT_TR_NOOP("Mii Contest Channel [PAL]"):"0001000148415050",
#QT_TR_NOOP("Mii Contest Channel [JAP]"):"000100014841504A",
#QT_TR_NOOP("Everyone Votes Channel [USA]"):"0001000148414a45",
#QT_TR_NOOP("Everyone Votes Channel [PAL]"):"0001000148414a50",
#QT_TR_NOOP("Everyone Votes Channel [JAP]"):"0001000148414a4A",
#QT_TR_NOOP("Opera / Internet Channel"):"00010001484144xx",
QT_TR_NOOP("Photo Channel"):"0001000248414141",
QT_TR_NOOP("Shopping Channel"):"0001000248414241",
QT_TR_NOOP("Mii Channel"):"001000248414341",
QT_TR_NOOP("Photo Channel 1.1"):"001000248415941",
#QT_TR_NOOP("Photo Channel"):"0001000248414141",
#QT_TR_NOOP("Shopping Channel"):"0001000248414241",
#QT_TR_NOOP("Mii Channel"):"001000248414341",
#QT_TR_NOOP("Photo Channel 1.1"):"001000248415941",
#QT_TR_NOOP("Wii Message Board"):"001000148414541",
#QT_TR_NOOP("Weather Channel-HAFx"):"00010002484146xx",
#QT_TR_NOOP("Weather Channel-HAFA"):"0001000248414641",