def convertdata(soundexename,videoexename,srcfolder,destfolder): filelist = os.listdir(srcfolder) error = 0 for item in filelist: # # If a sound file, convert to 4 bits per sample if item.lower().endswith('.wav'): src = os.path.join(srcfolder,item) dest = os.path.join(destfolder,item[:-4]) # Only if newer if burger.isthesourcenewer(src,dest)==True: cmd = soundexename + ' -s "' + src + '" "' + dest + '"' error = subprocess.call(cmd,cwd=srcfolder,shell=True) elif item.lower().endswith('.gif'): # Copy any other file as is src = os.path.join(srcfolder,item) dest = os.path.join(destfolder,item[:-4]) # Only if newer if burger.isthesourcenewer(src,dest)==True: cmd = videoexename + ' -v "' + src + '" "' + dest + '"' error = subprocess.call(cmd,cwd=srcfolder,shell=True) # Abort on error if error!=0: break return error
def convertdata(soundexename, videoexename, srcfolder, destfolder): filelist = os.listdir(srcfolder) error = 0 for item in filelist: # # If a sound file, convert to 4 bits per sample if item.lower().endswith('.wav'): src = os.path.join(srcfolder, item) dest = os.path.join(destfolder, item[:-4]) # Only if newer if burger.isthesourcenewer(src, dest) == True: cmd = soundexename + ' -s "' + src + '" "' + dest + '"' error = subprocess.call(cmd, cwd=srcfolder, shell=True) elif item.lower().endswith('.gif'): # Copy any other file as is src = os.path.join(srcfolder, item) dest = os.path.join(destfolder, item[:-4]) # Only if newer if burger.isthesourcenewer(src, dest) == True: cmd = videoexename + ' -v "' + src + '" "' + dest + '"' error = subprocess.call(cmd, cwd=srcfolder, shell=True) # Abort on error if error != 0: break return error
def main(workingDir): # # The tool to build a DOS app only exists under windows # if burger.hostmachine() != 'windows': return 0 # # Create the output folder # binfolder = os.path.join(workingDir, 'bin') burger.createfolderifneeded(binfolder) # # Build if needed # comfile = os.path.join(binfolder, 'resetega.com') sourcefile = os.path.join(workingDir, 'resetega.i86') if burger.isthesourcenewer(sourcefile, comfile): # # Use jwasm to create a COM file # cmd = 'jwasm -bin -Fo"' + comfile + '" "' + sourcefile + '"' error = subprocess.call(cmd, cwd=workingDir, shell=True) if error != 0: return error # # Update in perforce # sdks = burger.getsdksfolder() destfile = os.path.join(sdks, 'dos', 'bin', 'resetega.com') error = burger.copyfileandcheckoutifneeded(comfile, destfile) if error != 0: return 0 return 0
def main(workingDir): # # The tool to build a DOS app only exists under windows # if burger.hostmachine()!='windows': return 0 # # Create the output folder # binfolder = os.path.join(workingDir,'bin') burger.createfolderifneeded(binfolder) # # Build if needed # comfile = os.path.join(binfolder,'resetega.com') sourcefile = os.path.join(workingDir,'resetega.i86') if burger.isthesourcenewer(sourcefile,comfile): # # Use jwasm to create a COM file # cmd = 'jwasm -bin -Fo"' + comfile + '" "' + sourcefile + '"' error = subprocess.call(cmd,cwd=workingDir,shell=True) if error!=0: return error # # Update in perforce # sdks = burger.getsdksfolder(); destfile = os.path.join(sdks,'dos','bin','resetega.com') error = burger.copyfileandcheckoutifneeded(comfile,destfile) if error!=0: return 0 return 0
def main(workingDir): # # Create the output folder if needed # toolfolder = os.path.dirname(workingDir) destfolder = os.path.join(toolfolder, 'bin') burger.createfolderifneeded(destfolder) # # Update the map files # filelist = [ ['icon', 'spaceace.icon#ca0000'], # Icon file ['buildall', 'SpaceAce#b3db03'], # Application file ['spaceacerez', 'SpaceAce#b3db03r'] # Resource file ] error = 0 for item in filelist: src = os.path.join(workingDir, item[0] + '.a65') dest = os.path.join(destfolder, item[1]) if burger.isthesourcenewer(src, dest) == True: cmd = 'a65816 . ' + item[0] + '.a65' error = subprocess.call(cmd, cwd=workingDir, shell=True) if error != 0: return error # # Do some cleanup # burger.deletefileifpresent(os.path.join(workingDir, '_FileInformation.txt')) return error
def main(workingDir): # # Create the output folder if needed # toolfolder = os.path.dirname(workingDir) destfolder = os.path.join(toolfolder,'bin') burger.createfolderifneeded(destfolder) # # Update the map files # filelist = [ ['icon','spaceace.icon#ca0000'], # Icon file ['buildall','SpaceAce#b3db03'], # Application file ['spaceacerez','SpaceAce#b3db03r'] # Resource file ] error = 0 for item in filelist: src = os.path.join(workingDir,item[0] + '.a65') dest = os.path.join(destfolder,item[1]) if burger.isthesourcenewer(src,dest)==True: cmd = 'a65816 . ' + item[0] + '.a65' error = subprocess.call(cmd,cwd=workingDir,shell=True) if error!=0: return error # # Do some cleanup # burger.deletefileifpresent(os.path.join(workingDir,'_FileInformation.txt')) return error