rendered paste body--- convertor.py (revision 47)
+++ convertor.py (working copy)
@@ -120,6 +120,29 @@
linker = target['linker']
linker = linker(source, dest, linkwrapper, converted)
linker.output(result)
-
+
+
+def Usage():
+ print "%s: Usage: %s sourcefile targetfile targetplatform" % (sys.argv[0], sys.argv[0])
+ print ""
+ print "\tsourcefile\tProgram to alkynate"
+ print "\ttargetfile\tOutput filename for the new binary"
+ print "\ttargetplatform\tPlatform to convert to, see TARGETS below"
+ print ""
+ print "!!!Don't forget that you have to be located in the Converter directory!!!"
+ print ""
+ print "TARGETS"
+ print "Currently supported targets:"
+ for target in Targets.__targets__:
+ print " %s" % target.__target_desc__['name']
+ print ""
+ print "EXAMPLES"
+ print "%s /mnt/windows/winmine.exe /tmp/winmine.linux Linux" % sys.argv[0]
+
+
if __name__=='__main__':
- sys.exit(Convertor().convertCLI(sys.argv[1:]))
\ No newline at end of file
+ if len(sys.argv) < 4:
+ Usage();
+ sys.exit(1);
+
+ sys.exit(Convertor().convertCLI(sys.argv[1:]))