-
Notifications
You must be signed in to change notification settings - Fork 4
/
launcher_globals.py
104 lines (73 loc) · 2.69 KB
/
launcher_globals.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
import platform
import os
### DEBUG VARIABLE ###
TESTING_NF = False
LOCAL_GAME_DOWNLOAD = False
LOCAL_GAME_SERVER = False
CURRENT_PLATFORM = platform.system()
PLATFORM_ALL = 'all'
CURRENT_PATH = os.getcwd()
if TESTING_NF:
print ('Host operating system: ' + CURRENT_PLATFORM)
####################################
########## For the parser ##########
####################################
### DEBUGGING PURPOSES FOR LOCAL AND REMOTE FILE NAMES ###
if LOCAL_GAME_DOWNLOAD:
RESOURCE_FILE = 'LOCAL_RESOURCE_LINKS.yaml'
RESOURCE_LINK = 'http://10.0.0.29/index.php/s/95etFJlljKx7Fj5/download'
else:
RESOURCE_FILE = 'REMOTE_RESOURCE_LINKS.yaml'
RESOURCE_LINK = 'https://dl.dropboxusercontent.com/s/jydre9jhj3m9gci/REMOTE_RESOURCE_LINKS.yaml?dl=0'
RESOURCE_NAME = 'resource-links'
### DECLERATION TO PATH ###
BASE_FILEPATH_D = 'base'
RESOURCE_FILEPATH_D = 'resources'
if CURRENT_PLATFORM == 'Linux':
BASE_FILEPATH_S = './'
RESOURCE_FILEPATH_S = './resources/'
elif CURRENT_PLATFORM == 'Darwin':
BASE_FILEPATH_S = './'
RESOURCE_FILEPATH_S = './resources/'
else:
BASE_FILEPATH_S = '.\\'
RESOURCE_FILEPATH_S = 'resources\\'
####################################
########## For the launcher ##########
####################################
### Phrases ###
DOWNLOADING_FILE = 'Downloading: %s'
DOWNLOAD_COMPLETE_FILE = '%s has completed.'
FILE_UPTODATE = '%s is up to date.'
FILE_DOWNLOAD_FAILED = 'Could not download %s !'
LINK_INVALID = 'WARNING!!! Something went wrong while parsing: %s !'
UPDATED_STARTED = 'Update has begun! Please wait...'
FILE_CURRENT = 'File %s is already up to date.'
UPDATE_COMPLETE = 'The game is up to date!'
UPDATE_FAILED = 'Update has failed!'
ARCHIVE_EXTRACTING = 'Extracting: %s'
ARCHIVE_COMPLETE = 'Finished extracting %s'
ARCHIVE_FAILED = 'Could not extract %s'
MD5_FAILED = 'Failed retriving MD5 hash for %s !'
LAUNCHER_STATE_WAITING = 'Please login...'
LAUNCHER_STATE_UPDATING = 'Please wait...'
LAUNCHER_STATE_LAUNCHING = 'Have fun!'
LAUNCHER_STATUS_LOGIN = 'Welcome!'
LAUNCHER_STATUS_GIVE_INPUT = 'You must enter a username and password.'
LAUNCHER_STATUS_INVALID_UP = 'You have entered an invalid username or password.'
LAUNCHER_STATUS_FAILURE = 'Something went wrong while updating.'
##########################################
########## For the game starter ##########
##########################################
### Game server ###
if LOCAL_GAME_SERVER:
GAME_SERVER = '127.0.0.1'
else:
GAME_SERVER = '157.185.125.55'
### Relative paths to python install ###
if CURRENT_PLATFORM == 'Linux':
PYTHON_PATH = '/usr/bin/python3'
elif CURRENT_PLATFORM == 'Darwin':
PYTHON_PATH = 'python3.10'
else:
PYTHON_PATH = '\panda3d\python\ppython.exe'