mirror of
https://gitlab.com/Nanolx/qwad.git
synced 2024-11-22 02:29:18 +01:00
add -p cmd-opt
This commit is contained in:
parent
bb7ca22946
commit
7f38e480be
10
ChangeLog
10
ChangeLog
@ -4,11 +4,12 @@
|
||||
* only install qm-files for translation, not ts-files aswell
|
||||
* changed default directory to $HOME (so that file-selectors
|
||||
don't start at Qwads source or installation directory)
|
||||
* add command line options:
|
||||
* add command line options (NOTE: all paths must be absolute!):
|
||||
-h / --help = show help
|
||||
-v / --version = show Qwad version and exit
|
||||
-d / --download = download IOS (see examples below)
|
||||
-u / --unpack = unpack a wad file
|
||||
-p / --pack = pack a folder as wad
|
||||
-g / --getversions = get available versions of given IOS
|
||||
-c / --convert = convert IOS name to hex (and vice versa)
|
||||
======================================================================
|
||||
@ -22,9 +23,14 @@
|
||||
|
||||
**Unpack**
|
||||
qwad -u <WAD> <FOLDER>
|
||||
qwad -u IOS58.wad IOS58-Unpacked
|
||||
qwad -u $PWD/IOS58.wad $PWD/IOS58-Unpacked
|
||||
>> Result: IOS58-Unpacked/
|
||||
|
||||
**Pack**
|
||||
qwad -p <FOLDER> <WAD>
|
||||
qwad -p $PWD/IOS58-Unpacked/ $PWD/IOS58.wad
|
||||
>> Result: IOS58.wad
|
||||
|
||||
**GetVersions**
|
||||
qwad -g <IOS>
|
||||
qwad -g IOS9
|
||||
|
19
Qwad.pyw
19
Qwad.pyw
@ -35,7 +35,8 @@ def opts():
|
||||
help="IOS Version Output Decrypt Pack")
|
||||
parser.add_option('-u', "--unpack", dest="unpack", action="extend",
|
||||
type="string", metavar='Arguments', help="unpack a WAD")
|
||||
|
||||
parser.add_option('-p', "--pack", dest="pack", action="extend",
|
||||
type="string", metavar='Arguments', help="pack folder as WAD")
|
||||
parser.add_option('-g', "--getversions", dest="getversions",
|
||||
action="store_true", default=False, help="get available versions for IOS")
|
||||
parser.add_option('-c', "--convert", dest="convert",
|
||||
@ -88,13 +89,25 @@ def opts():
|
||||
else:
|
||||
os.mkdir(str(args[0]), 0755)
|
||||
if os.access(str(args[0]), os.W_OK):
|
||||
folder = str(args[0])
|
||||
UnpackingCLI(wad, folder).start()
|
||||
UnpackingCLI(wad, str(args[0])).start()
|
||||
sys.exit(0)
|
||||
else:
|
||||
print "Output folder %s not writeable." % str(args[0])
|
||||
sys.exit(1)
|
||||
|
||||
if options.pack:
|
||||
if os.access(str(options.pack[0]), os.R_OK):
|
||||
folder = str(options.pack[0])
|
||||
else:
|
||||
print "Input folder %s not readable." % str(options.pack[0])
|
||||
sys.exit(1)
|
||||
if os.access(os.path.dirname(str(args[0])), os.W_OK):
|
||||
PackingCLI(folder, str(args[0])).start()
|
||||
sys.exit(0)
|
||||
else:
|
||||
print "Output file %s can't be created." % str(args[0])
|
||||
sys.exit(1)
|
||||
|
||||
def main():
|
||||
# load our own translations
|
||||
translator = QTranslator()
|
||||
|
Loading…
Reference in New Issue
Block a user