-
-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ce39536
commit 65c9fa5
Showing
4 changed files
with
96 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import enum | ||
import sys | ||
|
||
|
||
class PlatformNotSupported(Exception): | ||
pass | ||
|
||
|
||
class HP(enum.Enum): | ||
"""HumbleBundle platform code name shown in subproducts>download section""" | ||
WINDOWS = 'windows' | ||
MAC = 'mac' | ||
LINUX = 'linux' | ||
ANDROID = 'android' | ||
AUDIO = 'audio' | ||
EBOOK = 'ebook' | ||
|
||
def __eq__(self, other): | ||
if type(other) == str: | ||
return self.value == other | ||
return super().__eq__(other) | ||
|
||
|
||
GAME_PLATFORMS = [HP.WINDOWS, HP.MAC, HP.LINUX] | ||
DLC_PLATFORMS = [HP.AUDIO, HP.EBOOK] # TODO push those with base game | ||
|
||
if sys.platform == 'win32': | ||
CURRENT_SYSTEM = HP.WINDOWS | ||
elif sys.platform == 'darwin': | ||
CURRENT_SYSTEM = HP.MAC | ||
else: | ||
raise PlatformNotSupported('GOG Galaxy 2.0 supports only Windows and macos for now') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters