Skip to content

Commit

Permalink
v1.0.0 commit
Browse files Browse the repository at this point in the history
  • Loading branch information
EricGoldsteinNz authored and EricGoldsteinNz committed Oct 6, 2023
1 parent 1426d73 commit 478275c
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 23 deletions.
2 changes: 1 addition & 1 deletion build.bat
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@echo off
set ver=0.5.1
set ver=1.0.0
rem build script for the distributable versions of tadpole
if not exist "venv\" (
py -m venv venv
Expand Down
24 changes: 8 additions & 16 deletions tadpole.py
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ def __init__(self):
self.btn_delete_roms = QPushButton("Delete selcted ROMs...")
self.btn_delete_roms.setEnabled(False)
selector_layout.addWidget(self.btn_delete_roms)
self.btn_delete_roms.clicked.connect(self.deleteROMs)
self.btn_delete_roms.clicked.connect(self.deleteAllSelectedROMs)

# Game Table Widget
self.tbl_gamelist = QTableWidget()
Expand Down Expand Up @@ -336,7 +336,7 @@ def loadMenus(self):
self.menu_roms.addAction(BackupAllSaves_action)
# Help Menu
self.menu_help = self.menuBar().addMenu("&Help")
action_sf2000_boot_light = QAction(QIcon(self.style().standardIcon(QStyle.StandardPixmap.SP_DialogSaveButton)), "Fix SF2000 not booting - Attemps to fix only the firmaware file (bisrv.asd) ", self, triggered=self.FixSF2000BootLight)
action_sf2000_boot_light = QAction(QIcon(self.style().standardIcon(QStyle.StandardPixmap.SP_DialogSaveButton)), "Fix SF2000 not booting - Attempts to fix only the firmware file (bisrv.asd) ", self, triggered=self.FixSF2000BootLight)
self.menu_help.addAction(action_sf2000_boot_light)
action_sf2000_boot = QAction(QIcon(self.style().standardIcon(QStyle.StandardPixmap.SP_DialogSaveButton)), "Fix SF2000 not booting - Reformats SD card and reinstalls all OS files", self, triggered=self.FixSF2000Boot)
self.menu_help.addAction(action_sf2000_boot)
Expand Down Expand Up @@ -792,11 +792,6 @@ def deleteROM(self, rom_path):
if ret == qm.Yes:
try:
tadpole_functions.deleteROM(rom_path)
#if console == 'ARCADE':
# arcadeZIPROM = tadpole_functions.extractFileNameFromZFB(rom_path)
# arcadeZIPPath = os.path.join(drive, console, 'bin', arcadeZIPROM)
# os.remove(arcadeZIPPath)
#os.remove(rom_path)
except Exception:
QMessageBox.about(self, "Error","Could not delete file.")
RunFrogTool(drive,console)
Expand Down Expand Up @@ -1128,8 +1123,10 @@ def addShortcutImages(self):
if os.path.exists('currentBackground.temp.png'):
os.remove('currentBackground.temp.png')

# TODO this should call the existing delete function rather than doubling up
def deleteROMs(self):
"""
Action function to find all selected ROMs and delete them, then runfrogtool and reload the table
"""
def deleteAllSelectedROMs(self):
drive = self.combobox_drive.currentText()
console = self.combobox_console.currentText()
qm = QMessageBox
Expand All @@ -1141,17 +1138,12 @@ def deleteROMs(self):
try:
objGame = self.ROMList[item.row()]
result = tadpole_functions.deleteROM(objGame.ROMlocation)
#if console == 'ARCADE':
# arcadeZIPROM = tadpole_functions.extractFileNameFromZFB(objGame.ROMlocation)
# arcadeZIPPath = os.path.join(drive, console, 'bin', arcadeZIPROM)
# os.remove(arcadeZIPPath)
#os.remove(objGame.ROMlocation)
except Exception:
result = False
if result:
QMessageBox.about(self, "Success",f"Successfully deleted selected ROMs.")
QMessageBox.about(self, "Success",f"Successfully deleted all selected ROMs.")
else:
QMessageBox.about(self, "Error","Could not delete ROM.")
QMessageBox.about(self, "Error","An error occurred while trying to delete the ROMs. PLease check the log file.")
RunFrogTool(drive,console)

def copyUserSelectedDirectoryButton(self):
Expand Down
4 changes: 2 additions & 2 deletions tadpole_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -898,7 +898,7 @@ def createZFBFile(drive, pngPath, romPath):
return False

def deleteROM(ROMfilePath):
print(f"Tadpole_functions~ Deleting ROM: {ROMfilePath}")
logging.info(f"Tadpole_functions~ Deleting ROM: {ROMfilePath}")
ext = os.path.splitext(ROMfilePath)[1]
if(ext == ".zfb"): #ROM is arcade, need to also delete the zip file in bin
print("Arcade ROM")
Expand All @@ -907,7 +907,7 @@ def deleteROM(ROMfilePath):
try:
os.remove(os.path.join(base,"bin",arcadezip))
except:
logging.error(f"ERROR: tadpole_functions~deleteROM: failed to delete arcadezip ({arcadezip})")
logging.error(f"ERROR: tadpole_functions~deleteROM: failed to delete arcadezip ({ROMfilePath})")
# We dont return False here because the main point is to delete the provided ROMfilePath file
# Delete the zxx file
try:
Expand Down
8 changes: 4 additions & 4 deletions versioninfo
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VSVersionInfo(
ffi=FixedFileInfo(
filevers=(0, 5, 1, 0),
prodvers=(0, 5, 1, 0),
filevers=(1, 0, 0, 0),
prodvers=(1, 0, 0, 0),
mask=0x3f,
flags=0x0,
OS=0x4,
Expand All @@ -15,12 +15,12 @@ VSVersionInfo(
u'080904B0',
[StringStruct(u'CompanyName', u'EricGoldstein'),
StringStruct(u'FileDescription', u'tadpole'),
StringStruct(u'FileVersion', u'0.5.1'),
StringStruct(u'FileVersion', u'1.0.0'),
StringStruct(u'InternalName', u'tadpole'),
StringStruct(u'LegalCopyright', u'by EricGoldstein 2023'),
StringStruct(u'OriginalFilename', u'tadpole.exe'),
StringStruct(u'ProductName', u'tadpole'),
StringStruct(u'ProductVersion', u'0.5.1')])
StringStruct(u'ProductVersion', u'1.0.0')])
]),
VarFileInfo([VarStruct(u'Translation', [2057, 1200])])
]
Expand Down

0 comments on commit 478275c

Please sign in to comment.