Skip to content

Commit ab8aae9

Browse files
author
calmilamsy
committed
v0.6 EOL
I will only make a windows compiled executable for this release. + Added the ability to set a custom java location per instance.
1 parent 8fc9288 commit ab8aae9

File tree

6 files changed

+74
-33
lines changed

6 files changed

+74
-33
lines changed

compile_unix.sh

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,8 @@
1-
echo Change the 4th line in this batch file to your python install.
2-
3-
# CHANGE THIS TO WHAT YOUR PYTHON 3.6+ INSTALL IS (e.g.: C:\Program Files\python\scripts\python.exe
4-
export pythonver=python3
5-
6-
echo Is \"$pythonver\" the correct python 3.6+ directory?
7-
echo CTRL+C if incorrect.
8-
9-
read -p "Press enter to continue..."
10-
11-
echo Creating venv.
12-
$pythonver -m venv venv
13-
141
echo Activating venv.
152
chmod a+x venv/bin/activate
163
source venv/bin/activate
174

18-
echo Adding dependencies.
19-
pip install pyqt5 requests appdirs pyinstaller pypresence mitmproxy
20-
215
echo Using pyinstaller.
226
pyinstaller -y -F -i "favicon.ico" --add-data "background.png":"." --add-data "logo.png":"." --add-data "favicon.ico":"." --add-data "blogbackground.png":"." --add-data "blog.html":"." --add-data "refresh.png":"." --add-data "venv/lib/python3.7/site-packages/mitmproxy/addons/onboardingapp":"mitmproxy/addons/onboardingapp" --add-data "EasyMineLauncher.jar":"." pymcl.py
23-
echo Complete!
7+
echo Done!
248
read -p "Press enter to continue..."

compile_win.bat

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,5 @@
11
@echo OFF
22

3-
echo Change the 4th line in this batch file to your python install.
4-
@rem CHANGE THIS TO WHAT YOUR PYTHON 3.6+ INSTALL IS (e.g.: C:\Program Files\python\scripts\python.exe
5-
set pythonver=python
6-
7-
echo Is "%pythonver%" the correct python 3.6+ directory?
8-
echo Close the window if incorrect.
9-
PAUSE
10-
11-
virtualenv venv
12-
13-
echo Activating venv. && venv\scripts\activate && echo Adding dependencies. && pip install pyqt5 requests appdirs pypresence mitmproxy pyinstaller && echo Using pyinstaller. && pyinstaller -y -F -i "favicon.ico" --add-data "background.png";"." --add-data "logo.png";"." --add-data "favicon.ico";"." --add-data "blogbackground.png";"." --add-data "blog.html";"." --add-data "refresh.png";"." --add-data "venv\Lib\site-packages\mitmproxy\addons\onboardingapp";"mitmproxy\addons\onboardingapp" --add-data "EasyMineLauncher.jar";"." pymcl.py
14-
echo Complete!
3+
echo Activating venv. && venv\scripts\activate && echo Using pyinstaller. && pyinstaller -y -F -i "favicon.ico" --add-data "background.png";"." --add-data "logo.png";"." --add-data "favicon.ico";"." --add-data "blogbackground.png";"." --add-data "blog.html";"." --add-data "refresh.png";"." --add-data "venv\Lib\site-packages\mitmproxy\addons\onboardingapp";"mitmproxy\addons\onboardingapp" --add-data "EasyMineLauncher.jar";"." pymcl.py
4+
echo Done!
155
PAUSE

config.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@
278278
}
279279
}
280280

281-
VER = "v0.6 Alpha Pre 4.2"
281+
VER = "v0.6 EOL"
282282

283283
PRINT_INFO = True
284284
PRINT_WARN = True

mainlauncher.py

Lines changed: 32 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -296,11 +296,14 @@ def launch(self):
296296
elif not self.loginBox.text().isalnum():
297297
raise TypeError("Username not alphanumeric!")
298298

299-
self.launchArgs = ["java"]
299+
self.launchArgs = []
300+
if self.instanceConfig["javaloc"] != "":
301+
self.launchArgs.append(self.instanceConfig["javaloc"])
302+
else:
303+
self.launchArgs.append("java")
300304
for arg in self.instanceConfig["javaargs"].split(" -"):
301305
if not len(arg) < 3:
302306
self.launchArgs.append("-" + arg)
303-
304307
if self.instanceConfig["proxyskin"] or self.instanceConfig["proxysound"] or self.instanceConfig["proxycape"]:
305308
self.proxy = utils.minecraftProxy(doSkinFix=self.instanceConfig["proxyskin"], doSoundFix=self.instanceConfig["proxysound"], doCapeFix=self.instanceConfig["proxycape"], loop=asyncio.new_event_loop())
306309
self.proxy.start()
@@ -347,7 +350,7 @@ def launch(self):
347350
self.launchArgs = []
348351
except Exception as e:
349352
# Tragic.
350-
self.error("Minecraft is unable to start. Make sure you have java and minecraft installed and an alphanumeric username set.\nCheck your launch args if you have set any too.")
353+
self.error("Minecraft is unable to start. Make sure you have java and minecraft installed and an alphanumeric username set.\nCheck your launch args and java location if you have set any too.")
351354
utils.logger.info("Rejected username: " + self.loginBox.text())
352355
utils.logger.info(e)
353356

@@ -508,6 +511,23 @@ def createConfigTab(self):
508511
self.enableAutoProxyCape.setChecked(mainWin.instanceConfig["proxycape"])
509512
self.enableAutoProxyCape.move(150, 137)
510513

514+
self.javaLoc = QLineEdit(self.configTab, text=mainWin.instanceConfig["javaargs"])
515+
self.javaLoc.resize(310, 24)
516+
self.javaLoc.move(150, 160)
517+
518+
try:
519+
mainWin.instanceConfig["javaloc"]
520+
except:
521+
mainWin.instanceConfig["javaloc"] = ""
522+
self.javaLoc = QLineEdit(self.configTab, text=mainWin.instanceConfig["javaloc"])
523+
self.javaLoc.resize(310, 24)
524+
self.javaLoc.move(150, 160)
525+
526+
self.getJavDirButton = QPushButton("...", self.configTab)
527+
self.getJavDirButton.resize(24, 22)
528+
self.getJavDirButton.move(465, 160)
529+
self.getJavDirButton.clicked.connect(self.getJavDir)
530+
511531
# Labelz
512532
self.javaArgsLabel = QLabel(self.configTab, text="Java arguments:")
513533
self.javaArgsLabel.resize(100, 20)
@@ -549,11 +569,20 @@ def createConfigTab(self):
549569
self.enableAutoProxyCapeLabel2.resize(250, 20)
550570
self.enableAutoProxyCapeLabel2.move(170, 132)
551571

572+
self.javaArgsLabel = QLabel(self.configTab, text="Java location:")
573+
self.javaArgsLabel.resize(100, 20)
574+
self.javaArgsLabel.move(20, 160)
575+
552576
def getDir(self):
553577
fileName, _ = QFileDialog.getOpenFileName(self, "Select a Mod ZIP File", os.path.expanduser("~"), "Mod Archive (*.zip;*.jar)")
554578
if fileName:
555579
self.modZipDir.setText(fileName)
556580

581+
def getJavDir(self):
582+
fileName, _ = QFileDialog.getOpenFileName(self, "Select a JRE", os.path.expanduser("~"), "JRE (*)")
583+
if fileName:
584+
self.javaLoc.setText(fileName)
585+
557586

558587
# Fires when options window is closed.
559588
def closeEvent(self, event, *args, **kwargs):

setup_unix.sh

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
echo Change the 4th line in this batch file to your python install.
2+
3+
# CHANGE THIS TO WHAT YOUR PYTHON 3.6+ INSTALL IS (e.g.: C:\Program Files\python\scripts\python.exe
4+
export pythonver=python3
5+
6+
echo Is \"$pythonver\" the correct python 3.6+ directory?
7+
echo CTRL+C if incorrect.
8+
9+
read -p "Press enter to continue..."
10+
11+
echo Creating venv.
12+
$pythonver -m venv venv
13+
14+
echo Activating venv.
15+
chmod a+x venv/bin/activate
16+
source venv/bin/activate
17+
18+
echo Adding dependencies.
19+
pip install pyqt5 requests appdirs pyinstaller pypresence mitmproxy
20+
21+
echo Done!
22+
read -p "Press enter to continue..."

setup_win.bat

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
@echo OFF
2+
3+
echo Change the 5th line in this batch file to your python install.
4+
@rem CHANGE THIS TO WHAT YOUR PYTHON 3.6+ INSTALL IS (e.g.: C:\Program Files\python\scripts\python.exe
5+
set pythonver=python
6+
7+
echo Is "%pythonver%" the correct python 3.6+ directory?
8+
echo Close the window if incorrect.
9+
PAUSE
10+
11+
virtualenv venv
12+
13+
echo Activating venv. && venv\scripts\activate && echo Adding dependencies. && pip install pyqt5 requests appdirs pypresence mitmproxy pyinstaller
14+
15+
echo Done!
16+
PAUSE

0 commit comments

Comments
 (0)