Commit
This commit is contained in:
parent
fa0ac5ef6a
commit
b0d4c8976e
BIN
.gmclcore/env/aria2c64.exe
vendored
Normal file
BIN
.gmclcore/env/aria2c64.exe
vendored
Normal file
Binary file not shown.
6
.gmclcore/logs/2022-01-09.logs
Normal file
6
.gmclcore/logs/2022-01-09.logs
Normal file
@ -0,0 +1,6 @@
|
||||
[2022-01-09 12:32:21] [INFO] Initing running env...
|
||||
[2022-01-09 12:32:24] [INFO] Creating daemon thread...
|
||||
[2022-01-09 12:39:35] [INFO] Initing running env...
|
||||
[2022-01-09 12:39:36] [INFO] Creating daemon thread...
|
||||
[2022-01-09 12:43:55] [INFO] Initing running env...
|
||||
[2022-01-09 12:43:56] [INFO] Creating daemon thread...
|
@ -1,3 +0,0 @@
|
||||
from GMCLCore import *
|
||||
launcher=GMCLCore()
|
||||
launcher.PrintAllLog()
|
78
GMCLCore/__init__.py
Normal file
78
GMCLCore/__init__.py
Normal file
@ -0,0 +1,78 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# ________ _____ _________ .____ _________
|
||||
# / _____/ / \ \_ ___ \| | \_ ___ \ ___________ ____
|
||||
# / \ ___ / \ / \/ \ \/| | / \ \/ / _ \_ __ _/ __ \
|
||||
# \ \_\ / Y \ \___| |__\ \___( <_> | | \\ ___/
|
||||
# \______ \____|__ /\______ |_______ \______ /\____/|__| \___ >
|
||||
# \/ \/ \/ \/ \/ \/
|
||||
#
|
||||
# Ghink Minecraft Launcher
|
||||
# Copyleft Ghink Network Studio
|
||||
# Bigsk (https://www.xiaxinzhe.cn)
|
||||
# See the LICENSE
|
||||
#
|
||||
|
||||
import os, platform
|
||||
import urllib.request
|
||||
|
||||
def networkTest(source = r"https://www.baidu.com", retry = 3):
|
||||
flag = False
|
||||
for i in range(retry):
|
||||
try:
|
||||
fp = urllib.request.urlopen(source)
|
||||
fp.read(100).decode()
|
||||
fp.close()
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
flag = True
|
||||
return flag
|
||||
|
||||
modules = (
|
||||
"psutil",
|
||||
"requests"
|
||||
)
|
||||
|
||||
retry = 3
|
||||
mirrors = "https://pypi.tuna.tsinghua.edu.cn/simple"
|
||||
for m in modules:
|
||||
try:
|
||||
exec("import {}".format(m))
|
||||
except Exception as e:
|
||||
print(e)
|
||||
if networkTest():
|
||||
for i in range(retry):
|
||||
if platform.system == "Windows":
|
||||
os.system("pip install -i {} {}".format(mirrors, m))
|
||||
else:
|
||||
os.system("pip3 install -i {} {}".format(mirrors, m))
|
||||
try:
|
||||
exec("import {}".format(m))
|
||||
except:
|
||||
if i == retry - 1:
|
||||
raise ImportError("Failed to import modules {}! ".format(m))
|
||||
else:
|
||||
break
|
||||
else:
|
||||
raise ImportError("Failed to import modules {}! ".format(m))
|
||||
|
||||
from GMCLCore.config import *
|
||||
|
||||
__version__ = "{} {}".format(VERSION[0], ".".join(str(c) for c in VERSION[1]))
|
||||
__name__ = "GMCLCore"
|
||||
__all__ = []
|
||||
|
||||
from GMCLCore.main import *
|
||||
|
||||
print("Welcome to GMCLCore {}!".format(__version__))
|
||||
print(
|
||||
'''
|
||||
________ _____ _________ .____ _________
|
||||
/ _____/ / \ \_ ___ \| | \_ ___ \ ___________ ____
|
||||
/ \ ___ / \ / \/ \ \/| | / \ \/ / _ \_ __ _/ __ \
|
||||
\ \_\ / Y \ \___| |__\ \___( <_> | | \\ ___/
|
||||
\______ \____|__ /\______ |_______ \______ /\____/|__| \___ >
|
||||
\/ \/ \/ \/ \/ \/
|
||||
'''
|
||||
)
|
1
GMCLCore/__main__.py
Normal file
1
GMCLCore/__main__.py
Normal file
@ -0,0 +1 @@
|
||||
# Silence is gold
|
BIN
GMCLCore/__pycache__/__init__.cpython-37.pyc
Normal file
BIN
GMCLCore/__pycache__/__init__.cpython-37.pyc
Normal file
Binary file not shown.
BIN
GMCLCore/__pycache__/config.cpython-37.pyc
Normal file
BIN
GMCLCore/__pycache__/config.cpython-37.pyc
Normal file
Binary file not shown.
BIN
GMCLCore/__pycache__/gaming.cpython-37.pyc
Normal file
BIN
GMCLCore/__pycache__/gaming.cpython-37.pyc
Normal file
Binary file not shown.
BIN
GMCLCore/__pycache__/log4py.cpython-37.pyc
Normal file
BIN
GMCLCore/__pycache__/log4py.cpython-37.pyc
Normal file
Binary file not shown.
BIN
GMCLCore/__pycache__/main.cpython-37.pyc
Normal file
BIN
GMCLCore/__pycache__/main.cpython-37.pyc
Normal file
Binary file not shown.
12
GMCLCore/config.py
Normal file
12
GMCLCore/config.py
Normal file
@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# Ghink Minecraft Launcher
|
||||
# Copyleft Ghink Network Studio
|
||||
# Bigsk (https://www.xiaxinzhe.cn)
|
||||
# See the LICENSE
|
||||
#
|
||||
|
||||
VERSION = (
|
||||
"Alpha",
|
||||
(1, 0, 0)
|
||||
)
|
162
GMCLCore/log4py.py
Normal file
162
GMCLCore/log4py.py
Normal file
@ -0,0 +1,162 @@
|
||||
import os, time, shutil
|
||||
from threading import Thread
|
||||
|
||||
class log(object):
|
||||
def __init__(self, workdir):
|
||||
'''
|
||||
Init vars and threads.
|
||||
'''
|
||||
self.FATAL = "FATAL"
|
||||
self.ERROR = "ERROR"
|
||||
self.WARN = "WARN"
|
||||
self.INFO = "INFO"
|
||||
self.__levelMap = {
|
||||
'FATAL': self.FATAL,
|
||||
'ERROR': self.ERROR,
|
||||
'WARN': self.WARN,
|
||||
'INFO': self.INFO
|
||||
}
|
||||
if type(workdir) != str:
|
||||
raise TypeError("Wrong type for param @workdir")
|
||||
self.workdir = workdir
|
||||
self.__logs = []
|
||||
if os.path.exists("{}\\logs".format(workdir)) and os.path.isfile("{}\\logs".format(workdir)):
|
||||
guard = Thread(target = self.__daemon)
|
||||
guard.start()
|
||||
else:
|
||||
try:
|
||||
os.makedirs("{}\\logs".format(workdir), exist_ok = True)
|
||||
daemon = Thread(target = self.__daemon)
|
||||
daemon.daemon = True
|
||||
daemon.start()
|
||||
except:
|
||||
raise PermissionError("Failed to operate the log file! ")
|
||||
def __daemon(self):
|
||||
'''
|
||||
Guard thread for recording logs and archiving.
|
||||
'''
|
||||
workdir = "{}\\logs".format(self.workdir)
|
||||
self.__suicide = False
|
||||
def archive(workdir):
|
||||
timeStamp = time.time()
|
||||
logsList = []
|
||||
for fname in os.listdir(workdir):
|
||||
if os.path.isfile("{}\\{}".format(workdir, fname)):
|
||||
logsList.append("{}\\{}".format(workdir, fname))
|
||||
archiveList = []
|
||||
today = time.strftime("%Y-%m-%d", time.localtime(timeStamp))
|
||||
# yesterday = time.strftime("%Y-%m-%d", time.localtime(timeStamp - 86400))
|
||||
flag = False
|
||||
for fname in logsList:
|
||||
if os.path.basename(fname) != "{}.logs".format(today) and os.path.splitext(fname)[-1] == ".logs":
|
||||
archiveList.append(fname)
|
||||
flag = True
|
||||
if flag:
|
||||
self.info("Archiving logs.")
|
||||
'''
|
||||
#Archive all logs before today in a single zip file
|
||||
os.makedirs("{}\\{}".format(workdir,yesterday),exist_ok=True)
|
||||
for fname in archiveList:
|
||||
shutil.move(fname,"{}\\{}".format(workdir,yesterday))
|
||||
shutil.make_archive("{}\\{}".format(workdir,yesterday),"zip",workdir,yesterday)
|
||||
shutil.rmtree("{}\\{}".format(workdir,yesterday))
|
||||
'''
|
||||
# Archive each log in independence zip file
|
||||
for fname in archiveList:
|
||||
basename = os.path.basename(fname)
|
||||
shutil.make_archive("{}\\{}".format(workdir, os.path.splitext(basename)[0]), "zip", workdir, basename)
|
||||
try:
|
||||
os.remove("{}\\{}".format(workdir, basename))
|
||||
except:
|
||||
pass
|
||||
|
||||
Thread(target = archive, args = (workdir,)).start()
|
||||
while True:
|
||||
timeStamp = time.time()
|
||||
today = time.strftime("%Y-%m-%d", time.localtime(timeStamp))
|
||||
while True:
|
||||
with open("{}\\{}.logs".format(workdir,today),"a+") as fb:
|
||||
data, self.__logs = self.__logs, []
|
||||
for log in data:
|
||||
fb.write("[{}] [{}] {}\n".format(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(log[0])), log[1], log[2]))
|
||||
if self.__suicide or today != time.strftime("%Y-%m-%d", time.localtime()):
|
||||
break
|
||||
archive(workdir)
|
||||
if self.__suicide:
|
||||
break
|
||||
def suicide(self):
|
||||
'''
|
||||
Suicide the guard thread.
|
||||
Before close the program, You have to exec this function.
|
||||
'''
|
||||
self.__suicide = True
|
||||
def record(self, level = "INFO", *content, split = " ", output = True):
|
||||
'''
|
||||
Record logs.
|
||||
@*content: The content for your log
|
||||
@split: The split text for your each log
|
||||
@level: The level for your log level
|
||||
@output: Print the log or not
|
||||
'''
|
||||
temp = []
|
||||
for con in content:
|
||||
temp.append(str(con))
|
||||
content = split.join(temp)
|
||||
if type(level) != str or level not in self.__levelMap.values():
|
||||
raise TypeError("Wrong type for param @level")
|
||||
if type(output) != bool:
|
||||
raise TypeError("Wrong type for param @output")
|
||||
timeStamp = time.time()
|
||||
self.__logs.append((timeStamp, level.upper(), content))
|
||||
if output:
|
||||
print("[{}] [{}] {}".format(time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(timeStamp)), level.upper(), content))
|
||||
def info(self, *content, split = " ", output = True):
|
||||
'''
|
||||
Record logs for info level.
|
||||
@*content: The content for your log
|
||||
@split: The split text for your each log
|
||||
@output: Print the log or not
|
||||
'''
|
||||
temp = []
|
||||
for con in content:
|
||||
temp.append(str(con))
|
||||
content = split.join(temp)
|
||||
self.record("INFO", content, split = split, output = output)
|
||||
def warn(self, *content, split = " ", output = True):
|
||||
'''
|
||||
Record logs for warn level.
|
||||
@*content: The content for your log
|
||||
@split: The split text for your each log
|
||||
@output: Print the log or not
|
||||
'''
|
||||
temp = []
|
||||
for con in content:
|
||||
temp.append(str(con))
|
||||
content = split.join(temp)
|
||||
self.record("WARN", content, split = split, output = output)
|
||||
def error(self, *content, split = " ", output = True):
|
||||
'''
|
||||
Record logs for error level.
|
||||
@*content: The content for your log
|
||||
@split: The split text for your each log
|
||||
@output: Print the log or not
|
||||
'''
|
||||
temp = []
|
||||
for con in content:
|
||||
temp.append(str(con))
|
||||
content = split.join(temp)
|
||||
self.record("ERROR", content, split = split, output = output)
|
||||
def fatal(self, *content, split = " ", output = True):
|
||||
'''
|
||||
Record logs for fatal level.
|
||||
@*content: The content for your log
|
||||
@split: The split text for your each log
|
||||
@output: Print the log or not
|
||||
'''
|
||||
temp = []
|
||||
for con in content:
|
||||
temp.append(str(con))
|
||||
content = split.join(temp)
|
||||
self.record("FATAL", content, split = split, output = output)
|
||||
self.__suicide = True
|
||||
raise Exception(content)
|
161
GMCLCore/main.py
Normal file
161
GMCLCore/main.py
Normal file
@ -0,0 +1,161 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# ________ _____ _________ .____ _________
|
||||
# / _____/ / \ \_ ___ \| | \_ ___ \ ___________ ____
|
||||
# / \ ___ / \ / \/ \ \/| | / \ \/ / _ \_ __ _/ __ \
|
||||
# \ \_\ / Y \ \___| |__\ \___( <_> | | \\ ___/
|
||||
# \______ \____|__ /\______ |_______ \______ /\____/|__| \___ >
|
||||
# \/ \/ \/ \/ \/ \/
|
||||
#
|
||||
# Ghink Minecraft Launcher
|
||||
# Copyleft Ghink Network Studio
|
||||
# Bigsk (https://www.xiaxinzhe.cn)
|
||||
# See the LICENSE
|
||||
#
|
||||
|
||||
# Standard
|
||||
import os, platform, hashlib, requests
|
||||
import urllib.request, urllib.parse
|
||||
from threading import Thread
|
||||
# Extend
|
||||
import psutil
|
||||
# Self
|
||||
import GMCLCore.log4py as log4py
|
||||
from GMCLCore.config import *
|
||||
|
||||
class Core(object):
|
||||
|
||||
# Define constant
|
||||
ARIA = "ARIA"
|
||||
|
||||
OFFICIAL = "OFFICIAL"
|
||||
BMCLAPI = "BMCLAPI"
|
||||
|
||||
OFFLINE = "OFFLINE"
|
||||
MOJANG = "MOJANG"
|
||||
MICROSOFT = "MICROSOFT"
|
||||
|
||||
def __init__(self, workDir = ".gmclcore"):
|
||||
# Define constant
|
||||
self.ENV_SOURCE = "https://resource.ghink.net/application/rely"
|
||||
|
||||
# Define launcher vars
|
||||
self.__name= "GMCLCore"
|
||||
self.__version = "{} {}".format(VERSION[0], ".".join(str(c) for c in VERSION[1]))
|
||||
self.__workDir = workDir
|
||||
self.__system = platform.system()
|
||||
self.parallel = psutil.cpu_count()
|
||||
self.parallelType = self.ARIA
|
||||
self.useragent = "{}/{}".format(self.__name, self.__version)
|
||||
|
||||
# Create workdir
|
||||
os.makedirs(self.__workDir, exist_ok = True)
|
||||
if self.__system == "Windows":
|
||||
import win32api, win32con
|
||||
win32api.SetFileAttributes(self.__workDir, win32con.FILE_ATTRIBUTE_HIDDEN)
|
||||
|
||||
# Init log object
|
||||
self.l = log4py.log(self.__workDir)
|
||||
|
||||
# Define default game vars
|
||||
self.gameDir = os.path.join(os.path.dirname(__file__), ".minecraft")
|
||||
self.javaPath = self.searchJava()
|
||||
self.gameMem = self.autoMemory()
|
||||
self.authType = self.OFFLINE
|
||||
self.id = "Steve"
|
||||
self.uuid = self.generateUUID(self.id)
|
||||
|
||||
# Prepare running env
|
||||
self.l.info("Initing running env...")
|
||||
self.initEnv()
|
||||
|
||||
# Create daemon thread
|
||||
self.l.info("Creating daemon thread...")
|
||||
self.__daemonThread = Thread(target = self.__daemon)
|
||||
self.__daemonThread.daemon = True
|
||||
self.__daemonThread.start()
|
||||
|
||||
def initEnv(self):
|
||||
os.makedirs(os.path.join(self.__workDir, "env"), exist_ok = True)
|
||||
if self.networkTest():
|
||||
source = self.urljoin(self.ENV_SOURCE, "aria2c")
|
||||
if self.__system == "Windows":
|
||||
if "64" in platform.machine():
|
||||
self.__ariaPath = os.path.join(self.__workDir, "env", "aria2c64.exe")
|
||||
source = self.urljoin(source, "win64")
|
||||
elif "32" in platform.machine() or "86" in platform.machine():
|
||||
self.__ariaPath = os.path.join(self.__workDir, "env", "aria2c32.exe")
|
||||
source = self.urljoin(source, "win32")
|
||||
else:
|
||||
self.l.fatal("Unsupported processor architecture! ")
|
||||
if not os.path.exists(self.__ariaPath):
|
||||
with open(self.__ariaPath, "wb") as fb:
|
||||
try:
|
||||
content = requests.get(self.urljoin(source, "aria2c.exe"), headers = {"user-agent": self.useragent}).content
|
||||
fb.write(content)
|
||||
except Exception as e:
|
||||
self.l.warn("Failed to install running env aria2c! System return: {}".format(e))
|
||||
elif self.__system == "Linux":
|
||||
self.__ariaPath = self.urljoin(self.__workDir, "env", "aria2c")
|
||||
source = self.urljoin(source, "linux")
|
||||
if not os.path.exists(self.__ariaPath):
|
||||
with open(self.__ariaPath, "wb") as fb:
|
||||
try:
|
||||
content = requests.get(self.urljoin(source, "aria2c"), headers = {"user-agent": self.useragent}).content
|
||||
fb.write(content)
|
||||
except Exception as e:
|
||||
self.l.warn("Failed to install running env aria2c! System return: {}".format(e))
|
||||
elif self.__system == "Darwin":
|
||||
self.__ariaPath = self.urljoin(self.__workDir, "env", "aria2c")
|
||||
source = self.urljoin(source, "darwin")
|
||||
if not os.path.exists(self.__ariaPath):
|
||||
with open(self.__ariaPath, "wb") as fb:
|
||||
try:
|
||||
content = requests.get(self.urljoin(source, "aria2c"), headers = {"user-agent": self.useragent}).content
|
||||
fb.write(content)
|
||||
except Exception as e:
|
||||
self.l.warn("Failed to install running env aria2c! System return: {}".format(e))
|
||||
|
||||
def __daemon(self):
|
||||
while True:
|
||||
pass
|
||||
|
||||
def urljoin(self, *args: str):
|
||||
result = os.path.join(*args)
|
||||
for i in range(result.count("\\")):
|
||||
result = result.replace("\\", "/")
|
||||
return result
|
||||
|
||||
def networkTest(self, source = r"https://www.baidu.com", retry = 3):
|
||||
flag = False
|
||||
for i in range(retry):
|
||||
try:
|
||||
fp = urllib.request.urlopen(source)
|
||||
fp.read(100).decode()
|
||||
fp.close()
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
flag = True
|
||||
return flag
|
||||
|
||||
def searchJava(self):
|
||||
javaEnv = os.environ.get("Path", None) if self.__system == "Windows" else os.environ.get("PATH", None)
|
||||
if javaEnv:
|
||||
javaEnv = javaEnv.split(";") if self.__system == "Windows" else javaEnv.split(":")
|
||||
for j in javaEnv:
|
||||
for name in ("Java", "java", "JAVA", "Jre", "jre", "JRE"):
|
||||
if name in j:
|
||||
java = j
|
||||
merge = os.path.join(java, "javaw.exe" if self.__system == "Windows" else "java")
|
||||
if os.path.exists(merge):
|
||||
return merge
|
||||
|
||||
def autoMemory(self):
|
||||
return 0.8 * (psutil.virtual_memory().free / 1024 ** 2)
|
||||
|
||||
def generateUUID(self, id):
|
||||
result = hashlib.md5()
|
||||
result.update("".join(('OfflinePlayer:', id)).encode())
|
||||
result = result.hexdigest()
|
||||
return result
|
178
LICENSE
178
LICENSE
@ -1,165 +1,21 @@
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
Copyright (c) 2014-present Ghink Network Studio
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
This version of the GNU Lesser General Public License incorporates
|
||||
the terms and conditions of version 3 of the GNU General Public
|
||||
License, supplemented by the additional permissions listed below.
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
0. Additional Definitions.
|
||||
|
||||
As used herein, "this License" refers to version 3 of the GNU Lesser
|
||||
General Public License, and the "GNU GPL" refers to version 3 of the GNU
|
||||
General Public License.
|
||||
|
||||
"The Library" refers to a covered work governed by this License,
|
||||
other than an Application or a Combined Work as defined below.
|
||||
|
||||
An "Application" is any work that makes use of an interface provided
|
||||
by the Library, but which is not otherwise based on the Library.
|
||||
Defining a subclass of a class defined by the Library is deemed a mode
|
||||
of using an interface provided by the Library.
|
||||
|
||||
A "Combined Work" is a work produced by combining or linking an
|
||||
Application with the Library. The particular version of the Library
|
||||
with which the Combined Work was made is also called the "Linked
|
||||
Version".
|
||||
|
||||
The "Minimal Corresponding Source" for a Combined Work means the
|
||||
Corresponding Source for the Combined Work, excluding any source code
|
||||
for portions of the Combined Work that, considered in isolation, are
|
||||
based on the Application, and not on the Linked Version.
|
||||
|
||||
The "Corresponding Application Code" for a Combined Work means the
|
||||
object code and/or source code for the Application, including any data
|
||||
and utility programs needed for reproducing the Combined Work from the
|
||||
Application, but excluding the System Libraries of the Combined Work.
|
||||
|
||||
1. Exception to Section 3 of the GNU GPL.
|
||||
|
||||
You may convey a covered work under sections 3 and 4 of this License
|
||||
without being bound by section 3 of the GNU GPL.
|
||||
|
||||
2. Conveying Modified Versions.
|
||||
|
||||
If you modify a copy of the Library, and, in your modifications, a
|
||||
facility refers to a function or data to be supplied by an Application
|
||||
that uses the facility (other than as an argument passed when the
|
||||
facility is invoked), then you may convey a copy of the modified
|
||||
version:
|
||||
|
||||
a) under this License, provided that you make a good faith effort to
|
||||
ensure that, in the event an Application does not supply the
|
||||
function or data, the facility still operates, and performs
|
||||
whatever part of its purpose remains meaningful, or
|
||||
|
||||
b) under the GNU GPL, with none of the additional permissions of
|
||||
this License applicable to that copy.
|
||||
|
||||
3. Object Code Incorporating Material from Library Header Files.
|
||||
|
||||
The object code form of an Application may incorporate material from
|
||||
a header file that is part of the Library. You may convey such object
|
||||
code under terms of your choice, provided that, if the incorporated
|
||||
material is not limited to numerical parameters, data structure
|
||||
layouts and accessors, or small macros, inline functions and templates
|
||||
(ten or fewer lines in length), you do both of the following:
|
||||
|
||||
a) Give prominent notice with each copy of the object code that the
|
||||
Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the object code with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
4. Combined Works.
|
||||
|
||||
You may convey a Combined Work under terms of your choice that,
|
||||
taken together, effectively do not restrict modification of the
|
||||
portions of the Library contained in the Combined Work and reverse
|
||||
engineering for debugging such modifications, if you also do each of
|
||||
the following:
|
||||
|
||||
a) Give prominent notice with each copy of the Combined Work that
|
||||
the Library is used in it and that the Library and its use are
|
||||
covered by this License.
|
||||
|
||||
b) Accompany the Combined Work with a copy of the GNU GPL and this license
|
||||
document.
|
||||
|
||||
c) For a Combined Work that displays copyright notices during
|
||||
execution, include the copyright notice for the Library among
|
||||
these notices, as well as a reference directing the user to the
|
||||
copies of the GNU GPL and this license document.
|
||||
|
||||
d) Do one of the following:
|
||||
|
||||
0) Convey the Minimal Corresponding Source under the terms of this
|
||||
License, and the Corresponding Application Code in a form
|
||||
suitable for, and under terms that permit, the user to
|
||||
recombine or relink the Application with a modified version of
|
||||
the Linked Version to produce a modified Combined Work, in the
|
||||
manner specified by section 6 of the GNU GPL for conveying
|
||||
Corresponding Source.
|
||||
|
||||
1) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (a) uses at run time
|
||||
a copy of the Library already present on the user's computer
|
||||
system, and (b) will operate properly with a modified version
|
||||
of the Library that is interface-compatible with the Linked
|
||||
Version.
|
||||
|
||||
e) Provide Installation Information, but only if you would otherwise
|
||||
be required to provide such information under section 6 of the
|
||||
GNU GPL, and only to the extent that such information is
|
||||
necessary to install and execute a modified version of the
|
||||
Combined Work produced by recombining or relinking the
|
||||
Application with a modified version of the Linked Version. (If
|
||||
you use option 4d0, the Installation Information must accompany
|
||||
the Minimal Corresponding Source and Corresponding Application
|
||||
Code. If you use option 4d1, you must provide the Installation
|
||||
Information in the manner specified by section 6 of the GNU GPL
|
||||
for conveying Corresponding Source.)
|
||||
|
||||
5. Combined Libraries.
|
||||
|
||||
You may place library facilities that are a work based on the
|
||||
Library side by side in a single library together with other library
|
||||
facilities that are not Applications and are not covered by this
|
||||
License, and convey such a combined library under terms of your
|
||||
choice, if you do both of the following:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work based
|
||||
on the Library, uncombined with any other library facilities,
|
||||
conveyed under the terms of this License.
|
||||
|
||||
b) Give prominent notice with the combined library that part of it
|
||||
is a work based on the Library, and explaining where to find the
|
||||
accompanying uncombined form of the same work.
|
||||
|
||||
6. Revised Versions of the GNU Lesser General Public License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions
|
||||
of the GNU Lesser General Public License from time to time. Such new
|
||||
versions will be similar in spirit to the present version, but may
|
||||
differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Library as you received it specifies that a certain numbered version
|
||||
of the GNU Lesser General Public License "or any later version"
|
||||
applies to it, you have the option of following the terms and
|
||||
conditions either of that published version or of any later version
|
||||
published by the Free Software Foundation. If the Library as you
|
||||
received it does not specify a version number of the GNU Lesser
|
||||
General Public License, you may choose any version of the GNU Lesser
|
||||
General Public License ever published by the Free Software Foundation.
|
||||
|
||||
If the Library as you received it specifies that a proxy can decide
|
||||
whether future versions of the GNU Lesser General Public License shall
|
||||
apply, that proxy's public statement of acceptance of any version is
|
||||
permanent authorization for you to choose that version for the
|
||||
Library.
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
9
Test.py
9
Test.py
@ -1,8 +1,5 @@
|
||||
from GMCLCore import *
|
||||
launcher=GMCLCore()
|
||||
|
||||
launcher.EnableAriaDownload()
|
||||
launcher.EnableAutoLogPrint()
|
||||
launcher.Download("http://mirrors.163.com/kali-images/kali-weekly/kali-linux-2020-W47-installer-netinst-i386.iso","test.iso")
|
||||
import platform, subprocess, urllib.parse, os, requests
|
||||
import GMCLCore
|
||||
|
||||
launcher.PrintAllLog()
|
||||
Core = GMCLCore.Core()
|
Reference in New Issue
Block a user