예제 #1
0
def main():
    """ for FFXIV skip intro cutscene to allow game to work.
    """
    # Fixes the startup process.
    util.replace_command('ffxivboot.exe', 'ffxivboot64.exe')
    util.protontricks('hidewineexports=enable')
    # disable new character intro cutscene to prevent black screen loop
    configpath = os.path.join(
        util.protonprefix(),
        'drive_c/users/steamuser/My Documents/My Games/FINAL FANTASY XIV - A Realm Reborn'
    )
    if not os.path.exists(configpath):
        os.makedirs(configpath)
    configgame = os.path.join(configpath, 'FFXIV.cfg')
    if not os.path.isfile(configgame):
        f = open(configgame, "w+")
        f.write(
            "<FINAL FANTASY XIV Config File>\n\n<Cutscene Settings>\nCutsceneMovieOpening 1"
        )
        f.close
    configpath = os.path.join(
        util.protonprefix(),
        'drive_c/users/steamuser/My Documents/My Games/FINAL FANTASY XIV - A Realm Reborn'
    )
    if not os.path.exists(configpath):
        os.makedirs(configpath)
    configgame = os.path.join(configpath, 'FFXIV_BOOT.cfg')
    if not os.path.isfile(configgame):
        f = open(configgame, "w+")
        f.write("<FINAL FANTASY XIV Boot Config File>\n\n<Version>\nBrowser 1")
        f.close
예제 #2
0
    def test_prefix_valid(self):
        """ Check if prefix contains required files
        """

        prefix_files = os.listdir(util.protonprefix())
        self.assertTrue('dosdevices' in prefix_files)
        self.assertTrue('drive_c' in prefix_files)
        self.assertTrue('userdef.reg' in prefix_files)
        self.assertTrue('user.reg' in prefix_files)
예제 #3
0
파일: 22370.py 프로젝트: wereii/protonfixes
def main():
    """ Run script extender if it exists.
    """

    # Fixes the startup process.
    if not os.path.isfile(os.path.join(os.getcwd(), 'xlive.dll')):
        xlivepath = os.path.join(util.protonprefix(), 'drive_c/windows/syswow64/xlive.dll')
        shutil.copy(xlivepath, os.path.join(os.getcwd(), 'xlive.dll'))
    if os.path.isfile(os.path.join(os.getcwd(), 'fose_loader.exe')):
        util.replace_command('FalloutLauncher.exe', 'fose_loader.exe')
예제 #4
0
def main():
    """ disable Easy Anti-Cheat and online play, disable uplay overlay and change closebehavior
    """

    uplayconfigpath = os.path.join(util.protonprefix(), 'drive_c/users/steamuser/Local Settings/Application Data/Ubisoft Game Launcher')
    if not os.path.exists(uplayconfigpath):
        os.makedirs(uplayconfigpath)
    uplayconfigfile = os.path.join(uplayconfigpath, 'settings.yml')
    if not os.path.isfile(uplayconfigfile):
        f = open(uplayconfigfile,"w+")
        f.write("overlay:\n  enabled: false\n  fps_enabled: false\n  warning_enabled: false\nuser:\n  closebehavior: CloseBehavior_Close\n  landingpage: LandingPageLastPlayedGame\n")
        f.close
예제 #5
0
def main():
    """ for FFXIV skip intro cutscene to allow game to work.
    """

    # disable new character intro cutscene to prevent black screen loop
    configpath = os.path.join(util.protonprefix(), 'drive_c/users/steamuser/My Documents/My Games/FINAL FANTASY XIV - A Realm Reborn')
    if not os.path.exists(configpath):
        os.makedirs(configpath)
    configgame = os.path.join(configpath, 'FFXIV.cfg')
    if not os.path.isfile(configgame):
        f = open(configgame,"w+")
        f.write("<FINAL FANTASY XIV Config File>\n\n<Cutscene Settings>\nCutsceneMovieOpening 1")
        f.close
예제 #6
0
def main():
    """ Change setting FSAA to 0 in graphics.config
    """

    config = (util.protonprefix() + "drive_c/users/steamuser/Local Settings/" +
              "Application Data/Crashday/config/graphics.config")

    # https://stackoverflow.com/a/45435707
    with open(config, 'r') as file:
        json_data = json.load(file)
        if 'FSAA' in json_data:
            json_data['FSAA'] = 0
    with open(config, 'w') as file:
        json.dump(json_data, file, indent=4)
예제 #7
0
def main():
    """ for FFXIV skip intro cutscene to allow game to work.
    """
    # disable new character intro cutscene to prevent black screen loop
    configpath = os.path.join(
        util.protonprefix(),
        'drive_c/users/steamuser/My Documents/SQUARE ENIX/FINAL FANTASY X&X-2 HD Remaster'
    )
    if not os.path.exists(configpath):
        os.makedirs(configpath)
    configgame = os.path.join(configpath, 'GameSetting.ini')
    if not os.path.isfile(configgame):
        f = open(configgame, "w+")
        f.write("Language=en")
        f.close
예제 #8
0
def main():
    """ Create a ManiaPlanet folder in compatdata and link the prefixes for every game_bottle.
        With this games ManiaPlanet games can be switched while in game. (Same as in windows now)
    """

    game_proton_bottle = os.path.dirname(os.path.dirname(util.protonprefix()))
    compdata_folder = os.path.dirname(game_proton_bottle)
    mania_planet_pfx = os.path.join(compdata_folder, "ManiaPlanet")

    if not os.path.exists(mania_planet_pfx):
        log("Could not find ManiaPlanet directory.")
        log("Creating new folder and symlinking games to it.")
        pfx_folder = os.path.join(game_proton_bottle, "pfx")
        os.rename(pfx_folder, mania_planet_pfx)
        os.symlink(mania_planet_pfx, pfx_folder)

    for game_id in mania_planet_games:
        game_pfx = os.path.join(compdata_folder, str(game_id), "pfx")
        log("Checking {}".format(game_id))
        if not os.path.exists(game_pfx):
            log("No prefix for {} found, skipping.".format(game_id))
            continue
        if os.path.islink(game_pfx):
            log("{} is already a symlink, skipping.".format(game_id))
            continue

        log("Copying contents of {} to ManiaPlanet folder.".format(game_id))
        for src_dir, _, files in os.walk(game_pfx):
            dst_dir = src_dir.replace(game_pfx, mania_planet_pfx, 1)
            for file_ in files:
                src_file = os.path.join(src_dir, file_)
                dst_file = os.path.join(dst_dir, file_)
                if os.path.exists(dst_file) or not os.path.exists(src_file):
                    continue
                try:
                    shutil.move(src_file, dst_file)
                    log("Moving {} to {}".format(src_file, dst_file))
                except FileNotFoundError:
                    # FIXME: paths with special chars (&, whitespace) do not work!
                    log("Can't move {}. Continuing anyway.".format(src_file))
        log("Removing {}".format(game_pfx))
        shutil.rmtree(game_pfx)
        log("Symlinking {} prefix to ManiaPlanet folder.".format(game_id))
        os.symlink(mania_planet_pfx, game_pfx)
    log("All DONE")
예제 #9
0
def main():
    """ Requires seccomp
    """

    util.use_seccomp()
    util.replace_command('launcher.exe', 'mafiadefinitiveedition.exe')
    util.protontricks('d3dcompiler_47')
    util.set_environment('WINEDLLOVERRIDES', 'dxgi=n')
    configpath = os.path.join(
        util.protonprefix(),
        'drive_c/users/steamuser/My Documents/My Games/Mafia Definitive Edition/Saves'
    )
    if not os.path.exists(configpath):
        os.makedirs(configpath)
    configgame = os.path.join(configpath, 'videoconfig.cfg')
    if not os.path.isfile(configgame):
        f = open(configgame, "w+")
        f.write("-6 0 1920 1080 0 0 0 0 0")
        f.close
예제 #10
0
def main():
    """ Need to install vcrun2008 and T2Fix
    """

    util.protontricks('vcrun2008')
    prefix = util.protonprefix()
    # The TFix silent options only works with C:\Games\Thief
    game_path = util.get_game_install_path()
    games_path = os.path.join(prefix, 'drive_c', 'Games')
    tf_games_path = os.path.join(games_path, 'Thief 2 The Metal Age')
    if not os.path.islink(tf_games_path):
        os.makedirs(games_path, exist_ok=True)
        os.symlink(game_path, tf_games_path)
    tfix_path = os.path.join(game_path, TFIX_FILENAME)
    if not (os.path.isfile(tfix_path)
            and download.sha1sum(tfix_path) == TFIX_SHA1SUM):
        download.gdrive_download(TFIX_GDRIVE_ID, game_path)
    thief_exe = os.path.join(game_path, 'Thief2.exe')
    if download.sha1sum(thief_exe) != THIEF_EXE_TFIX_SHA1SUM:
        util.wine_run([TFIX_FILENAME, ])
예제 #11
0
def main():
    """ Run script extender if it exists.
    """

    # Fixes the startup process.
    if not os.path.isfile(os.path.join(os.getcwd(), 'xlive.dll')):
        xlivepath = os.path.join(util.protonprefix(),
                                 'drive_c/windows/syswow64/xlive.dll')
        shutil.copy(xlivepath, os.path.join(os.getcwd(), 'xlive.dll'))
    if os.path.isfile(os.path.join(os.getcwd(), 'fose_loader.exe')):
        zenity_bin = splash.sys_zenity_path()
        if not zenity_bin:
            return
        zenity_cmd = ' '.join([
            zenity_bin, '--question', '--text',
            '"Would you like to run the game with Script Extender?"',
            '--no-wrap'
        ])
        zenity = subprocess.Popen(zenity_cmd, shell=True)
        zenity.communicate()
        if not zenity.returncode:
            util.replace_command('FalloutLauncher.exe', 'fose_loader.exe')
예제 #12
0
def main():
    """ Create a ManiaPlanet folder in comptdata and link every game_bottle.
        With this games ManiaPlanet games can be switched while in game. (Same as in windows now)
    """

    game_proton_bottle = os.path.dirname(os.path.dirname(util.protonprefix()))
    compdata_folder = os.path.dirname(game_proton_bottle)
    mania_planet_folder = os.path.join(compdata_folder, "ManiaPlanet")

    if not os.path.exists(mania_planet_folder):
        log("Could not find ManiaPlanet directory.")
        log("Creating new folder and symlinking Games to it.")
        os.rename(game_proton_bottle, mania_planet_folder)
        os.symlink(mania_planet_folder, game_proton_bottle)

        for game_id in mania_planet_games:
            game_path = os.path.join(compdata_folder, str(game_id))
            if game_path == game_proton_bottle:
                continue
            if os.path.exists(game_path):
                os.remove(game_id)

            os.symlink(mania_planet_folder, game_path)
        log("All DONE")
예제 #13
0
    def test_is_dir(self):
        """ Check if a directory is returned
        """

        prefix = util.protonprefix()
        self.assertTrue(os.path.isdir(prefix))