Skip to content

Commit

Permalink
Nintendont Game Installer - 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
bennyman123abc committed Dec 5, 2016
1 parent e183b13 commit cec2fd0
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions nintendont-game-installer.py
Expand Up @@ -41,10 +41,14 @@
os.makedirs(outputDrive + "games")
elif outputExists == True:
print(outputDrive + "games/ already exists. Continuing!")
if os.path.isdir(outputDrive + "games/dumpinfo") == False:
print(outputDrive + "games/dumpinfo/ does not exist. Creating it now!")
os.makedirs(outputDrive + "games/dumpinfo")
elif os.path.isdir(outputDrive + "games/dumpinfo") == True:
print(outputDrive + "games/dumpinfo/ already exists. Continuing!")

for file in os.listdir(inputDir):
if file.endswith(".iso"):
posInstalled = False
base = os.path.basename(file)
game = os.path.splitext(base)[0]
installDir = outputDrive + "games/" + game
Expand All @@ -53,16 +57,16 @@
os.makedirs(installDir)
elif os.path.isdir(installDir) == True:
print(installDir + "/ already exists. Continuing!")
posInstalled = True
if os.path.exists(installDir + "/" + "game.iso") == True:
print(game + " is already installed. Continuing!")
os.remove(inputDir + file)
elif os.path.exists(installDir + "/" + "game.iso") == False:
print("Installing " + game + ". This may take a few minutes!")
copyfile(inputDir + file, installDir + "/" + file)
os.rename(installDir + "/" + file, installDir + "/" + "game.iso")
os.remove(inputDir + file)
print("Installing " + game)
os.rename(inputDir + file, installDir + "/" + "game.iso")
elif file.endswith(".bca"):
os.remove(inputDir + file)
elif file.endswith("dumpinfo.txt"):
print("Moving " + file)
os.rename(inputDir + file, outputDrive + "/games/dumpinfo/" + file)
print("Games have finished installing. Quitting in 5 seconds")
time.sleep(5)

0 comments on commit cec2fd0

Please sign in to comment.