コード例 #1
0
def preloadchecks():
    color.text("Running preload checks...", color.FG_GREEN)

    pd(os.getcwd())
    if DEBUG:
        pd("Cheating, moving to")
        os.chdir(r"C:/Users/Daniel/Desktop/lrr-notprime")  # TEMPORARY HACK
        pd(os.getcwd())

    try:
        with open('LegoRR.exe') as f:
            pd("Executable located.")
            global WADSAREPRIME
            WADSAREPRIME = wadtool.checkwads()
            if not os.path.exists("d3drm.dll"):
                if hasattr(sys, "frozen") and sys.frozen in ("windows_exe",
                                                             "console_exe"):
                    zipf = zipfile.ZipFile(sys.executable)
                    zipf.extract("d3drm.dll")
    except BaseException, e:
        global LMSREADY
        LMSREADY = False
        if not r"C:/Program Files" in os.getcwd():
            print ""
            tex = textwrap.wrap(
                "Game not found.  I'm going to go now. " +
                "I suggest you put this in the same folder as the Rock Raiders exe, like you were told to do.\n"
            )
            # add search function?
            for t in tex:
                print " " + t
            cleanup()
        else:
            tex = textwrap.wrap(
                "You've got the game installed, but you shouldn't mess with the copy in Program"
                +
                "Files.  Usually you copy it elsewhere for modding, so you have a clean copy"
                +
                "for when it inevitably breaks.  Your Desktop is usually a good place for it.\n"
                + "Want me to do that for you?\n")
            for t in tex:
                print " " + t

            print "[YES/no] ",
            sys.stdout.flush()
            try:
                r = str(sys.stdin.readline()[:-1])
            except:
                r = None
            if 'yes' in r.lower() or r is None:
                # add testing for files
                shutil.copytree(
                    os.getcwd(),
                    os.path.join(os.path.expanduser('~/Desktop/'),
                                 os.path.basename(os.getcwd())))
コード例 #2
0
def preloadchecks():
    color.text("Running preload checks...", color.FG_GREEN)

    pd(os.getcwd())
    if DEBUG:
        pd("Cheating, moving to")
        os.chdir(r"C:/Users/Daniel/Desktop/lrr-notprime")  # TEMPORARY HACK
        pd(os.getcwd())

    try:
        with open('LegoRR.exe') as f:
            pd("Executable located.")
            global WADSAREPRIME
            WADSAREPRIME = wadtool.checkwads()
            if not os.path.exists("d3drm.dll"):
                if hasattr(sys, "frozen") and sys.frozen in ("windows_exe", "console_exe"):
                    zipf = zipfile.ZipFile(sys.executable)
                    zipf.extract("d3drm.dll")
    except BaseException, e:
        global LMSREADY
        LMSREADY = False
        if not r"C:/Program Files" in os.getcwd():
            print ""
            tex = textwrap.wrap("Game not found.  I'm going to go now. " +
            "I suggest you put this in the same folder as the Rock Raiders exe, like you were told to do.\n")
            # add search function?
            for t in tex: print " " + t
            cleanup()
        else:
            tex = textwrap.wrap(
            "You've got the game installed, but you shouldn't mess with the copy in Program" +
            "Files.  Usually you copy it elsewhere for modding, so you have a clean copy" +
            "for when it inevitably breaks.  Your Desktop is usually a good place for it.\n" +
            "Want me to do that for you?\n")
            for t in tex: print " " + t

            print "[YES/no] ",
            sys.stdout.flush()
            try: r = str(sys.stdin.readline()[:-1])
            except: r = None
            if 'yes' in r.lower() or r is None:
                # add testing for files
                shutil.copytree(os.getcwd(), os.path.join(os.path.expanduser('~/Desktop/'), os.path.basename(os.getcwd())))
コード例 #3
0
def primeWADs():
    if not wadtool.checkwads(): WADSAREPRIME = wadtool.primewads()
    else: color.text("Wad check failed.", color.FG_YELLOW)
コード例 #4
0
def primeWADs():
    if not wadtool.checkwads(): WADSAREPRIME = wadtool.primewads()
    else: color.text("Wad check failed.", color.FG_YELLOW)