This repository has been archived by the owner on Mar 29, 2020. It is now read-only.
forked from Khitiara/ForgeTheSane
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gui.py
46 lines (41 loc) · 1.45 KB
/
gui.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
import data_setup
import lib_cache_setup
import procedures
import multimc
import sys
import argparse
from gooey import Gooey, GooeyParser
force = False
@Gooey()
def main():
parser = GooeyParser(description="Create Forge Instances for MultiMC")
main = parser.add_argument_group('')
main.add_argument('--input',
metavar='Forge Installer',
help='The Forge Installer Jar you want to process',
nargs='+',
gooey_options={
'validator': {
'test': 'user_input[-4:] in {".jar"}',
'message': 'some helpful message'
}
},
required=True,
widget='MultiFileChooser')
options = parser.add_argument_group('Options')
options.add_argument('--force',
metavar='Force Redownload & Recreation',
help='Will force the redownload of all libraries and recreation of the instance',
widget='CheckBox')
args = parser.parse_args()
# print(args)
force = args.force
for file in args.input:
forge_file = file
# print(file.name)
lib_cache_setup.cache_setup()
procs = data_setup.data_setup(forge_file)
procedures.run_procs(procs)
multimc.make_instance(forge_file)
if __name__ == '__main__':
main()