Exemple #1
0
 def test1_verify_disk_space(self, mock_os_statvfs):
     frsize = 4096
     bavail = 29699
     mock_os_statvfs().f_frsize = frsize
     mock_os_statvfs().f_bavail = bavail
     backup_installer = copy.deepcopy(installer.get_game_size_from_unzip)
     installer.get_game_size_from_unzip = MagicMock()
     installer.get_game_size_from_unzip.return_value = 524288000
     game = Game("Beneath A Steel Sky",
                 install_dir="/home/makson/GOG Games/Beneath a Steel Sky",
                 platform="linux")
     installer_file = "/beneath_a_steel_sky_en_gog_2_20150.sh"
     exp = "Not enough space to extract game. Required: 524288000 Available: 121647104"
     obs = installer.verify_disk_space(game, installer_file)
     installer.get_game_size_from_unzip = backup_installer
     self.assertEqual(exp, obs)
Exemple #2
0
    def test1_check_if_game_start_process_spawned_final_process(
            self, mock_check_output, mock_getpid):
        mock_check_output.return_value = b"""UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 lis24 ?        00:00:02 /sbin/init splash
root         2     0  0 lis24 ?        00:00:00 [kthreadd]
root         3     2  0 lis24 ?        00:00:00 [rcu_gp]
root         4     2  0 lis24 ?        00:00:00 [rcu_par_gp]
root         6     2  0 lis24 ?        00:00:00 [kworker/0:0H-kblockd]
"""
        mock_getpid.return_value = 1000
        err_msg = "Error Message"
        game = Game("Test Game", install_dir="/test/install/dir")
        exp = err_msg
        obs = launcher.check_if_game_start_process_spawned_final_process(
            err_msg, game)
        self.assertEqual(exp, obs)
Exemple #3
0
 def test1_verify_installer_integrity(self, mock_listdir, mock_hash,
                                      mock_is_file):
     md5_sum = "5cc68247b61ba31e37e842fd04409d98"
     installer_name = "beneath_a_steel_sky_en_gog_2_20150.sh"
     mock_is_file.return_value = True
     mock_hash().hexdigest.return_value = md5_sum
     mock_listdir.return_value = [installer_name]
     game = Game("Beneath A Steel Sky",
                 install_dir="/home/makson/GOG Games/Beneath a Steel Sky",
                 md5sum={installer_name: md5_sum})
     installer_path = "/home/user/.cache/minigalaxy/download/" \
                      "Beneath a Steel Sky/{}".format(installer_name)
     exp = ""
     with patch("builtins.open", mock_open(read_data=b"")):
         obs = installer.verify_installer_integrity(game, installer_path)
     self.assertEqual(exp, obs)
Exemple #4
0
    def __add_tiles(self, current_tiles):
        # Refresh games list from API
        games = []
        if not self.offline:
            try:
                games = self.api.get_library()
            except:
                GLib.idle_add(self.__show_error,
                              _("Failed to retrieve library"),
                              _("Couldn't connect to GOG servers"))
                self.offline = True

        # Get installed games
        installed_games = self.__get_installed_games()

        # Only add games if they aren't already in the list. Otherwise just reload their state
        if not self.offline:
            for game in games:
                not_found = True
                for tile in current_tiles:
                    if self.__games_match(tile.game.name, game.name):
                        not_found = False
                        tile.game = game
                        break
                if not_found:
                    # Check if game is already installed
                    install_dir = ""
                    for installed_game in installed_games:
                        if installed_game["name"] == game.name:
                            print("Found game: {}".format(game.name))
                            install_dir = installed_game["dir"]
                            break
                    # Create the game tile
                    GLib.idle_add(self.__add_tile, game, install_dir)
        else:
            for game in installed_games:
                not_found = True
                for tile in current_tiles:
                    if tile.game.name == game["name"]:
                        not_found = False
                        break
                if not_found:
                    # Create the game tile
                    GLib.idle_add(self.__add_tile, Game(game["name"], 0, ""),
                                  game["dir"])

        GLib.idle_add(self.__update_library_view)
    def test2_check_if_game_start_process_spawned_final_process(
            self, mock_check_output, mock_getpid):
        mock_check_output.return_value = b"""UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 lis24 ?        00:00:02 /sbin/init splash
root         2     0  0 lis24 ?        00:00:00 [kthreadd]
root         3     2  0 lis24 ?        00:00:00 [rcu_gp]
root         4     2  0 lis24 ?        00:00:00 [rcu_par_gp]
root         6     2  0 lis24 ?        00:00:00 [kworker/0:0H-kblockd]
makson    1006     2  0 lis24 ?        00:00:00 /bin/sh /home/makson/.paradoxlauncher/launcher-v2.2020.15/Paradox Launcher --pdxlGameDir /home/makson/GOG Games/Stellaris/game --gameDir /home/makson/GOG Games/Stellaris/game
"""
        mock_getpid.return_value = 1000
        err_msg = "Error Message"
        game = Game("Stellaris", install_dir="/home/makson/GOG Games")
        exp = ""
        obs = launcher.check_if_game_start_process_spawned_final_process(
            err_msg, game)
        self.assertEqual(exp, obs)
    def test_remove_installer_same_content(self, mock_os_path_isdir,
                                           mock_compare_directories,
                                           mock_config, mock_shutil_rmtree):
        """
        Same content of installer and keep dir
        """
        mock_os_path_isdir.return_value = True
        mock_compare_directories.return_value = True
        mock_config.side_effect = [True, "/home/i/GOG Games/installer"]

        game1 = Game("Beneath A Steel Sky",
                     install_dir="/home/test/GOG Games/Beneath a Steel Sky",
                     platform="linux")
        installer_path = "/home/i/.cache/minigalaxy/download/Beneath a Steel Sky/beneath_a_steel_sky_en_gog_2_20150.sh"
        obs = installer.remove_installer(game1, installer_path)
        assert not mock_shutil_rmtree.called
        self.assertEqual(obs, "")
    def test_remove_installer_no_keep(self, mock_os_path_isdir,
                                      mock_compare_directories, mock_config,
                                      mock_shutil_rmtree):
        """
        Disabled keep_installer
        """
        mock_os_path_isdir.return_value = True
        mock_compare_directories.return_value = False
        mock_config.return_value = False

        game1 = Game("Beneath A Steel Sky",
                     install_dir="/home/test/GOG Games/Beneath a Steel Sky",
                     platform="linux")
        installer_path = "/home/i/.cache/minigalaxy/download/Beneath a Steel Sky/beneath_a_steel_sky_en_gog_2_20150.sh"
        obs = installer.remove_installer(game1, installer_path)
        assert mock_shutil_rmtree.called
        self.assertEqual(obs, "")
    def test3_check_if_game_start_process_spawned_final_process(self, mock_check_output, mock_getpid):
        mock_check_output.return_value = b"""UID        PID  PPID  C STIME TTY          TIME CMD
root     12486     2  0 17:47 ?        00:00:00 [kworker/u17:3-kcryptd]
root     12543     2  0 17:53 ?        00:00:00 [kworker/u17:1-kcryptd]
root     12617     2  0 18:02 ?        00:00:00 [kworker/5:1-ata_sff]
root     12652     2  0 18:07 ?        00:00:00 [kworker/0:0-events]
root     12682     2  0 18:08 ?        00:00:00 [kworker/5:2-ata_sff]
root     12699     2  0 18:08 ?        00:00:00 [kworker/u17:0-kcryptd]
makson   12783  6690  1 18:09 pts/4    00:00:01 /usr/bin/python3 build/scripts-3.7/minigalaxy
makson   12866  1378  0 18:09 pts/4    00:00:00 /bin/sh /home/makson/.paradoxlauncher/launcher-v2.2021.1/Paradox Launcher --pdxlGameDir /home/makson/GOG Games/Imperator Rome/game/launcher --gameDir /home/makson/GOG Games/Imperator Rome/game/launcher
"""
        mock_getpid.return_value = 1000
        err_msg = "Error Message"
        game = Game("Imperator: Rome", install_dir="/home/makson/GOG Games")
        exp = ""
        obs = launcher.check_if_game_start_process_spawned_final_process(err_msg, game)
        self.assertEqual(exp, obs)
    def test_remove_installer_from_keep(self, mock_os_path_isdir,
                                        mock_compare_directories, mock_config,
                                        mock_shutil_rmtree, mock_shutil_move):
        """
        Called from keep dir
        """
        mock_os_path_isdir.return_value = True
        mock_compare_directories.return_value = False
        mock_config.side_effect = [True, "/home/i/GOG Games"]

        game1 = Game("Beneath A Steel Sky",
                     install_dir="/home/test/GOG Games/Beneath A Steel Sky",
                     platform="linux")
        installer_path = "/home/i/GOG Games/installer/Beneath A Steel Sky/beneath_a_steel_sky_en_gog_2_20150.sh"
        obs = installer.remove_installer(game1, installer_path)
        assert not mock_shutil_rmtree.called
        assert not mock_shutil_move.called
        self.assertEqual(obs, "")
Exemple #10
0
 def test2_get_version(self):
     api = Api()
     test_game = Game("Test Game", platform="linux")
     dlc_name = "Test DLC"
     game_info = API_GET_INFO_TOONSTRUCK
     game_info["expanded_dlcs"] = [{
         "title": dlc_name,
         "downloads": {
             "installers": [{
                 "os": "linux",
                 "version": "1.2.3.4"
             }]
         }
     }]
     exp = "1.2.3.4"
     obs = api.get_version(test_game,
                           gameinfo=API_GET_INFO_TOONSTRUCK,
                           dlc_name=dlc_name)
     self.assertEqual(exp, obs)
Exemple #11
0
    def get_library(self):
        err_msg = ""
        games = []
        if self.active_token:
            current_page = 1
            all_pages_processed = False
            url = "https://embed.gog.com/account/getFilteredProducts"

            while not all_pages_processed:
                params = {
                    'mediaType': 1,  # 1 means game
                    'page': current_page,
                }
                response = self.__request(url, params=params)
                total_pages = response["totalPages"]

                for product in response["products"]:
                    if product["id"] not in IGNORE_GAME_IDS:
                        # Only support Linux unless the show_windows_games setting is enabled
                        if product["worksOn"]["Linux"]:
                            platform = "linux"
                        elif Config.get("show_windows_games"):
                            platform = "windows"
                        else:
                            continue
                        if not product["url"]:
                            print("{} ({}) has no store page url".format(
                                product["title"], product['id']))
                        game = Game(name=product["title"],
                                    url=product["url"],
                                    game_id=product["id"],
                                    image_url=product["image"],
                                    platform=platform)
                        games.append(game)
                if current_page == total_pages:
                    all_pages_processed = True
                current_page += 1
        else:
            err_msg = "Couldn't connect to GOG servers"
        return games, err_msg
Exemple #12
0
 def test2_set_dlc_status(self, mock_isfile):
     mock_isfile.return_value = False
     dlc_name = "Neverwinter Nights: Test DLC"
     dlc_status = False
     with patch("builtins.open", mock_open()) as m:
         game = Game("Game Name test2")
         game.read_installed_version = MagicMock()
         game.installed_version = "1"
         game.set_dlc_status(dlc_name, dlc_status)
     mock_c = m.mock_calls
     write_string = ""
     for kall in mock_c:
         name, args, kwargs = kall
         if name == "().write":
             write_string = "{}{}".format(write_string, args[0])
     expected = '[{"Neverwinter Nights: Test DLC": "not-installed"}, {}]'
     observed = write_string
     self.assertEqual(expected, observed)
Exemple #13
0
 def test1_set_dlc_status(self, mock_isfile):
     mock_isfile.return_value = True
     json_content = '[{"Neverwinter Nights: Wyvern Crown of Cormyr": "not-installed", ' \
                    '"Neverwinter Nights: Infinite Dungeons": "updatable", "Neverwinter Nights: Pirates of ' \
                    'the Sword Coast": "installed"}, {}]'
     dlc_name = "Neverwinter Nights: Wyvern Crown of Cormyr"
     dlc_status = True
     with patch("builtins.open", mock_open(read_data=json_content)) as m:
         game = Game("Game Name test2")
         game.read_installed_version = MagicMock()
         game.installed_version = "1"
         game.set_dlc_status(dlc_name, dlc_status)
     mock_c = m.mock_calls
     write_string = ""
     for kall in mock_c:
         name, args, kwargs = kall
         if name == "().write":
             write_string = "{}{}".format(write_string, args[0])
     expected = '[{"Neverwinter Nights: Wyvern Crown of Cormyr": "installed", ' \
                '"Neverwinter Nights: Infinite Dungeons": "updatable", "Neverwinter Nights: Pirates of ' \
                'the Sword Coast": "installed"}, {"Neverwinter Nights: Wyvern Crown of Cormyr": {}}]'
     observed = write_string
     self.assertEqual(expected, observed)
Exemple #14
0
    def test_local_and_api_comparison(self):
        larry1_api = Game(
            "Leisure Suit Larry 1 - In the Land of the Lounge Lizards",
            game_id=1207662033)
        larry1_local_gog = Game(
            "Leisure Suit Larry",
            install_dir="/home/user/Games/Leisure Suit Larry",
            game_id=1207662033)
        larry1_local_minigalaxy = Game(
            "Leisure Suit Larry",
            install_dir=
            "/home/wouter/Games/Leisure Suit Larry 1 - In the Land of the Lounge Lizards",
            game_id=1207662033)

        self.assertEqual(larry1_local_gog, larry1_local_minigalaxy)
        self.assertEqual(larry1_local_minigalaxy, larry1_api)
        self.assertEqual(larry1_local_gog, larry1_api)

        larry2_api = Game(
            "Leisure Suit Larry 2 - Looking For Love (In Several Wrong Places)",
            game_id=1207662053)
        larry2_local_minigalaxy = Game(
            "Leisure Suit Larry 2",
            install_dir=
            "/home/user/Games/Leisure Suit Larry 2 - Looking For Love (In Several Wrong Places)",
            game_id=1207662053)
        larry2_local_gog = Game(
            "Leisure Suit Larry 2",
            install_dir="/home/user/Games/Leisure Suit Larry 2",
            game_id=1207662053)

        self.assertNotEqual(larry1_api, larry2_api)
        self.assertNotEqual(larry2_local_gog, larry1_api)
        self.assertNotEqual(larry2_local_gog, larry1_local_gog)
        self.assertNotEqual(larry2_local_gog, larry1_local_minigalaxy)
        self.assertNotEqual(larry2_local_minigalaxy, larry1_api)
        self.assertNotEqual(larry2_local_minigalaxy, larry1_local_minigalaxy)
 def test_get_dosbox_exe_cmd(self):
     files = ['thumbnail.jpg', 'docs', 'support', 'dosbox_bbb_single.conf', 'dosbox_aaa.conf', 'dosbox']
     game = Game("Test Game", install_dir="/test/install/dir")
     exp = ["dosbox", "-conf", "dosbox_aaa.conf", "-conf", "dosbox_bbb_single.conf", "-no-console", "-c", "exit"]
     obs = launcher.get_dosbox_exe_cmd(game, files)
     self.assertEqual(exp, obs)
Exemple #16
0
 def test1_get_install_directory_name(self):
     game = Game("Get Install Directory Test1")
     expected = "Get Install Directory Test1"
     observed = game.get_install_directory_name()
     self.assertEqual(expected, observed)
Exemple #17
0
 def test2_get_install_directory_name(self):
     game = Game("Get\r Install\n Directory Test2!@#$%")
     expected = "Get Install Directory Test2"
     observed = game.get_install_directory_name()
     self.assertEqual(expected, observed)
Exemple #18
0
 def test2_get_gamesdb_info(self):
     api = Api()
     api._Api__request_gamesdb = MagicMock()
     api._Api__request_gamesdb.side_effect = [{
         'id': '51622789000874509',
         'game_id': '51154268886064420',
         'platform_id': 'gog',
         'external_id': '1508702879',
         'game': {
             'genres': [{
                 'id': '51071904337940794',
                 'name': {
                     '*': 'Strategy',
                     'en-US': 'Strategy'
                 },
                 'slug': 'strategy'
             }],
             'summary': {
                 '*': 'Stellaris description'
             },
             'visible_in_library':
             True,
             'aggregated_rating':
             78.5455,
             'game_modes': [{
                 'id': '53051895165351137',
                 'name': 'Single player',
                 'slug': 'single-player'
             }, {
                 'id': '53051908711988230',
                 'name': 'Multiplayer',
                 'slug': 'multiplayer'
             }],
             'horizontal_artwork': {
                 'url_format':
                 'https://images.gog.com/742acfb77ec51ca48c9f96947bf1fc0ad8f0551c9c9f338021e8baa4f08e449f{formatter}.{ext}?namespace=gamesdb'
             },
             'background': {
                 'url_format':
                 'https://images.gog.com/742acfb77ec51ca48c9f96947bf1fc0ad8f0551c9c9f338021e8baa4f08e449f{formatter}.{ext}?namespace=gamesdb'
             },
             'vertical_cover': {
                 'url_format':
                 'https://images.gog.com/8d822a05746670fb2540e9c136f0efaed6a2d5ab698a9f8bd7f899d21f2022d2{formatter}.{ext}?namespace=gamesdb'
             },
             'cover': {
                 'url_format':
                 'https://images.gog.com/8d822a05746670fb2540e9c136f0efaed6a2d5ab698a9f8bd7f899d21f2022d2{formatter}.{ext}?namespace=gamesdb'
             },
             'logo': {
                 'url_format':
                 'https://images.gog.com/c50a5d26c42d84b4b884976fb89d10bb3e97ebda0c0450285d92b8c50844d788{formatter}.{ext}?namespace=gamesdb'
             },
             'icon': {
                 'url_format':
                 'https://images.gog.com/c85cf82e6019dd52fcdf1c81d17687dd52807835f16aa938abd2a34e5d9b99d0{formatter}.{ext}?namespace=gamesdb'
             },
             'square_icon': {
                 'url_format':
                 'https://images.gog.com/c3adc81bf37f1dd89c9da74c13967a08b9fd031af4331750dbc65ab0243493c8{formatter}.{ext}?namespace=gamesdb'
             }
         }
     }]
     test_game = Game("Stellaris")
     exp = {
         'cover':
         'https://images.gog.com/8d822a05746670fb2540e9c136f0efaed6a2d5ab698a9f8bd7f899d21f2022d2.png?namespace=gamesdb',
         'vertical_cover':
         'https://images.gog.com/8d822a05746670fb2540e9c136f0efaed6a2d5ab698a9f8bd7f899d21f2022d2.png?namespace=gamesdb',
         'background':
         'https://images.gog.com/742acfb77ec51ca48c9f96947bf1fc0ad8f0551c9c9f338021e8baa4f08e449f.png?namespace=gamesdb',
         'summary': {
             '*': 'Stellaris description'
         },
         'genre': {
             '*': 'Strategy',
             'en-US': 'Strategy'
         }
     }
     obs = api.get_gamesdb_info(test_game)
     self.assertEqual(exp, obs)
Exemple #19
0
 def test2_get_status_file_path(self):
     game = Game(name="Europa Universalis 2",
                 install_dir="/home/user/GoG Games//Europa Universalis II")
     expected = "/home/user/.config/minigalaxy/games/Europa Universalis II.json"
     observed = game.get_status_file_path()
     self.assertEqual(expected, observed)
Exemple #20
0
 def test1_get_version(self):
     api = Api()
     test_game = Game("Test Game", platform="linux")
     exp = "gog-2"
     obs = api.get_version(test_game, gameinfo=API_GET_INFO_TOONSTRUCK)
     self.assertEqual(exp, obs)
Exemple #21
0
 def test3_get_download_info(self):
     api = Api()
     api.get_info = MagicMock()
     api.get_info.return_value = {
         'downloads': {
             'installers': [{
                 'id':
                 'installer_windows_en',
                 'name':
                 'Toonstruck',
                 'os':
                 'windows',
                 'language':
                 'en',
                 'language_full':
                 'English',
                 'version':
                 '1.0',
                 'total_size':
                 939524096,
                 'files': [{
                     'id':
                     'en1installer0',
                     'size':
                     1048576,
                     'downlink':
                     'https://api.gog.com/products/1207666633/downlink/installer/en1installer0'
                 }, {
                     'id':
                     'en1installer1',
                     'size':
                     938475520,
                     'downlink':
                     'https://api.gog.com/products/1207666633/downlink/installer/en1installer1'
                 }]
             }, {
                 'id':
                 'installer_mac_en',
                 'name':
                 'Toonstruck',
                 'os':
                 'mac',
                 'language':
                 'en',
                 'language_full':
                 'English',
                 'version':
                 'gog-3',
                 'total_size':
                 975175680,
                 'files': [{
                     'id':
                     'en2installer0',
                     'size':
                     975175680,
                     'downlink':
                     'https://api.gog.com/products/1207666633/downlink/installer/en2installer0'
                 }]
             }, {
                 'id':
                 'installer_windows_fr',
                 'name':
                 'Toonstruck',
                 'os':
                 'windows',
                 'language':
                 'fr',
                 'language_full':
                 'français',
                 'version':
                 '1.0',
                 'total_size':
                 985661440,
                 'files': [{
                     'id':
                     'fr1installer0',
                     'size':
                     1048576,
                     'downlink':
                     'https://api.gog.com/products/1207666633/downlink/installer/fr1installer0'
                 }, {
                     'id':
                     'fr1installer1',
                     'size':
                     984612864,
                     'downlink':
                     'https://api.gog.com/products/1207666633/downlink/installer/fr1installer1'
                 }]
             }, {
                 'id':
                 'installer_mac_fr',
                 'name':
                 'Toonstruck',
                 'os':
                 'mac',
                 'language':
                 'fr',
                 'language_full':
                 'français',
                 'version':
                 'gog-3',
                 'total_size':
                 1023410176,
                 'files': [{
                     'id':
                     'fr2installer0',
                     'size':
                     1023410176,
                     'downlink':
                     'https://api.gog.com/products/1207666633/downlink/installer/fr2installer0'
                 }]
             }]
         }
     }
     m_config.Config.get.return_value = "en"
     test_game = Game("Test Game")
     exp = {
         'id':
         'installer_windows_en',
         'name':
         'Toonstruck',
         'os':
         'windows',
         'language':
         'en',
         'language_full':
         'English',
         'version':
         '1.0',
         'total_size':
         939524096,
         'files': [{
             'id':
             'en1installer0',
             'size':
             1048576,
             'downlink':
             'https://api.gog.com/products/1207666633/downlink/installer/en1installer0'
         }, {
             'id':
             'en1installer1',
             'size':
             938475520,
             'downlink':
             'https://api.gog.com/products/1207666633/downlink/installer/en1installer1'
         }]
     }
     obs = api.get_download_info(test_game)
     self.assertEqual(exp, obs)
Exemple #22
0
 def test_get_stripped_name(self):
     name_string = "Beneath A Steel Sky"
     game = Game(name_string)
     expected = "BeneathASteelSky"
     observed = game.get_stripped_name()
     self.assertEqual(expected, observed)
 def test2_run_game_subprocess(self, launcher_mock, mock_popen, mock_os_chdir, mock_os_getcwd):
     mock_popen.side_effect = FileNotFoundError()
     game = Game("Test Game", install_dir="/test/install/dir")
     exp = ('No executable was found in /test/install/dir', None)
     obs = launcher.run_game_subprocess(game)
     self.assertEqual(exp, obs)
 def test_get_start_script_exe_cmd(self):
     files = ['thumbnail.jpg', 'docs', 'support', 'game', 'start.sh', 'minigalaxy-dlc.json', 'gameinfo']
     game = Game("Test Game", install_dir="/test/install/dir")
     exp = ["/test/install/dir/start.sh"]
     obs = launcher.get_start_script_exe_cmd(game, files)
     self.assertEqual(exp, obs)
 def test_get_scummvm_exe_cmd(self):
     files = ['thumbnail.jpg', 'data', 'docs', 'support', 'beneath.ini', 'scummvm', 'start.sh', 'gameinfo']
     game = Game("Test Game", install_dir="/test/install/dir")
     exp = ["scummvm", "-c", "beneath.ini"]
     obs = launcher.get_scummvm_exe_cmd(game, files)
     self.assertEqual(exp, obs)
 def test3_get_windows_exe_cmd(self, mock_os_chdir, mo):
     goggame_1207658919_info_content = """{
     "buildId": "52095557858882770",
     "clientId": "49843178982252086",
     "gameId": "1207658919",
     "language": "English",
     "languages": [
     "en-US"
     ],
     "name": "Rayman Forever",
     "playTasks": [
     {
     "arguments": "-conf \\"..\\\\dosboxRayman.conf\\" -conf \\"..\\\\dosboxRayman_single.conf\\" -noconsole -c \\"exit\\"",
     "category": "game",
     "isPrimary": true,
     "languages": [
         "*"
     ],
     "name": "Rayman Forever",
     "path": "DOSBOX\\\\dosbox.exe",
     "type": "FileTask",
     "workingDir": "DOSBOX"
     },
     {
     "arguments": "1207658919",
     "category": "tool",
     "languages": [
         "*"
     ],
     "name": "Graphic Mode Setup",
     "path": "DOSBOX\\\\GOGDOSConfig.exe",
     "type": "FileTask",
     "workingDir": "DOSBOX"
     },
     {
     "category": "document",
     "languages": [
         "*"
     ],
     "link": "http://www.gog.com/support/rayman_forever",
     "name": "Support",
     "type": "URLTask"
     },
     {
     "category": "document",
     "languages": [
         "*"
     ],
     "name": "Manual",
     "path": "Manual.pdf",
     "type": "FileTask"
     },
     {
     "category": "tool",
     "languages": [
         "*"
     ],
     "name": "Mapper",
     "path": "RayKit\\\\Mapper.exe",
     "type": "FileTask",
     "workingDir": "RayKit"
     }
     ],
     "rootGameId": "1207658919",
     "version": 1
     }"""
     mo.side_effect = (mock_open(
         read_data=goggame_1207658919_info_content).return_value, )
     files = [
         'goggame-1207658919.script', 'DOSBOX', 'thumbnail.jpg', 'game.gog',
         'unins000.dat', 'webcache.zip', 'EULA.txt', 'Music',
         'dosboxRayman_single.conf', 'Rayman', 'unins000.exe',
         'support.ico', 'prefix', 'goggame-1207658919.info', 'Manual.pdf',
         'gog.ico', 'unins000.msg', 'goggame-1207658919.hashdb', 'RayFan',
         'dosboxRayman.conf', 'unins000.ini', 'thumbnail_100.jpg', 'RayKit',
         'game.ins', 'goggame-1207658919.ico', 'goglog.ini',
         'Launch Rayman Forever.lnk', 'cloud_saves', 'thumbnail_196.jpg'
     ]
     game = Game("Test Game", install_dir="/test/install/dir")
     exp = [
         'wine', 'start', '/b', '/wait', '/d', 'DOSBOX',
         'DOSBOX\\dosbox.exe', '-conf', '"..\\dosboxRayman.conf"', '-conf',
         '"..\\dosboxRayman_single.conf"', '-noconsole', '-c', '"exit"'
     ]
     obs = launcher.get_windows_exe_cmd(game, files)
     self.assertEqual(exp, obs)