Exemplo n.º 1
0
Arquivo: ice.py Projeto: rrfenton/Ice
def main():
    log_both("=========================Starting Ice")
    # Find all of the ROMs that are currently in the designated folders
    roms = console.find_all_roms()
    # Find the Steam Account that the user would like to add ROMs for
    user_ids = steam_user_manager.user_ids_on_this_machine()
    grid_manager = IceGridImageManager()
    for user_id in user_ids:
        log_both("---------------Running for user %s" % str(user_id))
        # Load their shortcuts into a SteamShortcutManager object
        shortcuts_path = steam_user_manager.shortcuts_file_for_user_id(user_id)
        try:
            shortcuts_manager = SteamShortcutManager(shortcuts_path)
        except IOError:
            log_both(
                'No previous shortcuts file found for this user. Skipping them.'
            )
            continue
        rom_manager = IceROMManager(shortcuts_manager)
        # Add the new ROMs in each folder to our Shortcut Manager
        rom_manager.sync_roms(roms)
        # Generate a new shortcuts.vdf file with all of the new additions
        shortcuts_manager.save()
        log_both("---Downloading grid images")
        grid_manager.update_user_images(user_id, roms)
    log_both("=========================Finished")
Exemplo n.º 2
0
Arquivo: ice.py Projeto: fizzduden/Ice
def main():
    if steam_is_running():
        ice_logger.log_error("Ice cannot be run while Steam is open. Please close Steam and try again")
        return

    ice_logger.log("Starting Ice")
    # Find all of the ROMs that are currently in the designated folders
    roms = console.find_all_roms()
    # Find the Steam Account that the user would like to add ROMs for
    user_ids = steam_user_manager.user_ids_on_this_machine()
    grid_manager = IceGridImageManager()
    for user_id in user_ids:
        ice_logger.log("Running for user %s" % str(user_id))
        # Load their shortcuts into a SteamShortcutManager object
        shortcuts_path = steam_user_manager.shortcuts_file_for_user_id(user_id)
        shortcuts_manager = SteamShortcutManager(shortcuts_path)
        rom_manager = IceROMManager(shortcuts_manager)
        # Add the new ROMs in each folder to our Shortcut Manager
        rom_manager.sync_roms(roms)
        # Generate a new shortcuts.vdf file with all of the new additions
        shortcuts_manager.save()
        if IceGridImageManager.should_download_images():
            ice_logger.log('Downloading grid images')
            grid_manager.update_user_images(user_id,roms)
        else:
            ice_logger.log('Skipping "Download Image" step')

    ice_logger.log('Ice finished')
Exemplo n.º 3
0
Arquivo: ice.py Projeto: PiotrWpl/Ice
def main():
    if steam_is_running():
        log_both("Ice cannot be run while Steam is open. Please close Steam and try again")
        return
    log_both("=========================Starting Ice")
    fs.create_directory_if_needed(fs.roms_directory(), log="Creating ROMs directory at %s" % fs.roms_directory())
    # Find all of the ROMs that are currently in the designated folders
    roms = console.find_all_roms()
    # Find the Steam Account that the user would like to add ROMs for
    user_ids = steam_user_manager.user_ids_on_this_machine()
    grid_manager = IceGridImageManager()
    for user_id in user_ids:
        log_both("---------------Running for user %s" % str(user_id))
        # Load their shortcuts into a SteamShortcutManager object
        shortcuts_path = steam_user_manager.shortcuts_file_for_user_id(user_id)
        shortcuts_manager = SteamShortcutManager(shortcuts_path)
        rom_manager = IceROMManager(shortcuts_manager)
        # Add the new ROMs in each folder to our Shortcut Manager
        rom_manager.sync_roms(roms)
        # Generate a new shortcuts.vdf file with all of the new additions
        shortcuts_manager.save()
        if IceGridImageManager.should_download_images():
            log_both("---Downloading grid images")
            grid_manager.update_user_images(user_id,roms)
        else:
            log_both("Skipping 'Download Image' step")
    log_both("=========================Finished")
Exemplo n.º 4
0
Arquivo: ice.py Projeto: ch13696/Ice
def main():
    log_both("=========================Starting Ice")
    # Find all of the ROMs that are currently in the designated folders
    roms = console.find_all_roms()
    # Find the Steam Account that the user would like to add ROMs for
    user_ids = steam_user_manager.user_ids_on_this_machine()
    grid_manager = IceGridImageManager()
    for user_id in user_ids:
        log_both("---------------Running for user %s" % str(user_id))
        # Load their shortcuts into a SteamShortcutManager object
        shortcuts_path = steam_user_manager.shortcuts_file_for_user_id(user_id)
        try:
            shortcuts_manager = SteamShortcutManager(shortcuts_path)
        except IOError:
            log_both('No previous shortcuts file found for this user. Skipping them.')
            continue
        rom_manager = IceROMManager(shortcuts_manager)
        # Add the new ROMs in each folder to our Shortcut Manager
        rom_manager.sync_roms(roms)
        # Generate a new shortcuts.vdf file with all of the new additions
        shortcuts_manager.save()
        if IceGridImageManager.should_download_images():
            log_both("---Downloading grid images")
            grid_manager.update_user_images(user_id,roms)
        else:
            log_both("Skipping 'Download Image' step")
    log_both("=========================Finished")
Exemplo n.º 5
0
def main():
    if steam_is_running():
        ice_logger.log_error(
            "Ice cannot be run while Steam is open. Please close Steam and try again"
        )
        return

    ice_logger.log("Starting Ice")
    # Find all of the ROMs that are currently in the designated folders
    roms = console.find_all_roms()
    # Find the Steam Account that the user would like to add ROMs for
    user_ids = steam_user_manager.user_ids_on_this_machine()
    grid_manager = IceGridImageManager()
    for user_id in user_ids:
        ice_logger.log("Running for user %s" % str(user_id))
        # Load their shortcuts into a SteamShortcutManager object
        shortcuts_path = steam_user_manager.shortcuts_file_for_user_id(user_id)
        shortcuts_manager = SteamShortcutManager(shortcuts_path)
        rom_manager = IceROMManager(shortcuts_manager)
        # Add the new ROMs in each folder to our Shortcut Manager
        rom_manager.sync_roms(roms)
        # Backup the current shortcuts.vdf file
        shortcuts_manager.backup()
        # Generate a new shortcuts.vdf file with all of the new additions
        shortcuts_manager.save()
        grid_manager.update_user_images(user_id, roms)
    ice_logger.log('Ice finished')