Compare commits
99 Commits
Author | SHA1 | Date | |
---|---|---|---|
8b62106587
|
|||
076bf84410
|
|||
6136fee405
|
|||
8ebd834e73
|
|||
a4fc72dc52 | |||
d94d0f409c | |||
6323778c5f | |||
08181a63a1
|
|||
e380df8257
|
|||
2a6df12ee6
|
|||
8fd4745572
|
|||
2591b2e029
|
|||
f1aa69b2bd
|
|||
a98834de6c | |||
fe6034506f | |||
62e283a406 | |||
744feb6799 | |||
d0d3a7a90f | |||
42e948c605 | |||
24418c83fa | |||
8a0bc87c1a | |||
881b12e57b | |||
2e5327c61e | |||
c668af53a4 | |||
23ba39313f | |||
c2ec0b63e4 | |||
7ad66a0b50 | |||
4c1ed93639 | |||
3222eff7c6 | |||
596c93fb2d | |||
65d4d25ccc | |||
a47eb47b24 | |||
5a806555d5 | |||
6455539b4b | |||
ba75ec33d0 | |||
4a6874915b | |||
0657b7c0a6 | |||
7ce2d70c8b | |||
e1efb6e0d2 | |||
219bc5ba5c | |||
af9dfb6f90 | |||
52195f81a3 | |||
e37a9fe8d4 | |||
0667b44461 | |||
606eedd664 | |||
b38e3ca913 | |||
4666891e42 | |||
1ecc7be9ce | |||
a9cfb980ae | |||
468c01196b | |||
4de323f10f | |||
cce2a595a9 | |||
713c80e6ef | |||
a9a64937fe | |||
13f5892bdf | |||
4bb4093619 | |||
26551e4547 | |||
6811b8b489 | |||
077fe2a5a0 | |||
24d49165f7 | |||
bc16ba4342 | |||
170be4769b | |||
5090e87a42 | |||
be5ee732bc | |||
092d4eef40 | |||
7763251148 | |||
a841dff101 | |||
8898d4629e | |||
7365db7520 | |||
7ce77aba19 | |||
bea2b94a22 | |||
de111ebc48 | |||
d86d1d242d | |||
f1bc1c5220 | |||
1cfd9e2d3f | |||
c70b05aff6 | |||
48be1ab8cb | |||
c5a9489349 | |||
625f7cff96 | |||
6afec28969 | |||
1e43ad7cba | |||
4d87832f0e | |||
d55eb23c97 | |||
028f2376d1 | |||
8febffc663 | |||
2a9df607d6 | |||
33fca2093b | |||
c1d52c7f95 | |||
235c06422d | |||
1e3db4d6de | |||
b2beb3cbbc | |||
e4ecb9ba74 | |||
1385f06ff0 | |||
7368e2478c | |||
8692b83ad3 | |||
e305d3affd | |||
12b467fa9b | |||
acefff8723 | |||
c1980e7951 |
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
mc_start.exe
|
||||
for_build/
|
||||
|
10
CHANGELOG.md
Normal file
10
CHANGELOG.md
Normal file
@ -0,0 +1,10 @@
|
||||
## 2021-07-22
|
||||
+ move `./docs/` to `ph-pages` branch.
|
||||
|
||||
## 2021-07-21
|
||||
+ update launcher to 1.17.1
|
||||
> java 16 to run need
|
||||
|
||||
## 2020-10-10
|
||||
+ add return notification for generate libraries list.
|
||||
+ add output parameter for make libs script.
|
24
README.md
24
README.md
@ -1,17 +1,15 @@
|
||||
Minecraft Batch Launcher
|
||||
========================
|
||||
# Minecraft [Java Edition] Batch Launcher
|
||||
|
||||
### Русская справка ###
|
||||
Скрипт для запуска Minecraft без официального лаунчера.
|
||||
Собирается **Quick Batch File Compiler** для создание exe'шника.
|
||||
**Features:**
|
||||
|
||||
При первом запуске создается файл `nickname.txt` в папке профиля (`%GAME_DIR%`).
|
||||
* 📋 Open source. Just launch the game, nothing more
|
||||
* 🏷️ Change player name
|
||||
* 🧰 No need for extra deps
|
||||
* ⚙️ No configuration required
|
||||
|
||||
**Описание переменных**
|
||||
## Minecraft Natives
|
||||
The natives catalog is located on [Mega.nz](https://mega.nz/#F!hUNg0Y6I!93cYw1NZg4MUWUHaVrCO7w).
|
||||
|
||||
## ChangeLog
|
||||
See [CHANGELOG.md](CHANGELOG.md).
|
||||
|
||||
+ `%MC_DIR%` - директория с файлами Minecraft. По умолчанию `%appdata%\.minecraft`
|
||||
+ `%NATIVES_DIR%` - директория с библиотеками для запуск игры.
|
||||
Можно взять [отсюда](https://github.com/IIIypuk/minecraft-launcher/tree/master/natives).
|
||||
+ `%GAME_DIR%` - директория с файлами пользователя. Ресурс-паки, сохранения, скриншоты и др.
|
||||
+ `%ASSETS_DIR%` - директория с библиотеками. Лежит в корне папки Minecraft (`%MC_DIR%\assets`).
|
||||
+ `%VERSION%` - номер версии Minecraft (`%MC_DIR%\versions\%VERSION%`).
|
||||
|
Binary file not shown.
Binary file not shown.
49
mc_start.bat
49
mc_start.bat
@ -1,49 +0,0 @@
|
||||
@ECHO OFF
|
||||
REM QBFC Project Options Begin
|
||||
REM HasVersionInfo: Yes
|
||||
REM Companyname: http://iiiypuk.me/
|
||||
REM Productname: Minecraft Launcher
|
||||
REM Filedescription: Minecraft Launcher
|
||||
REM Copyrights: IIIypuk
|
||||
REM Trademarks:
|
||||
REM Originalname: mc_start.exe
|
||||
REM Comments: Script for launch Minecraft without official Mojang launcher
|
||||
REM Productversion: 1. 0. 0. 0
|
||||
REM Fileversion: 1. 2. 0. 0
|
||||
REM Internalname:
|
||||
REM Appicon: minecraft.ico
|
||||
REM AdministratorManifest: No
|
||||
REM QBFC Project Options End
|
||||
ECHO ON
|
||||
@echo off
|
||||
cd \
|
||||
|
||||
:: main directory of the game
|
||||
set MC_DIR="C:\IIIypuk\Minecraft"
|
||||
|
||||
:: look README.md file
|
||||
set NATIVES_DIR="%MC_DIR%\natives\1.7.2"
|
||||
|
||||
:: Are stored here...
|
||||
:: saves/, resourcepacks/ and screenshots/ dirs
|
||||
:: and options.txt and servers.dat files
|
||||
set GAME_DIR="%MC_DIR%\profile"
|
||||
|
||||
:: libraries and resource dir (requires no changes)
|
||||
set ASSETS_DIR="%MC_DIR%\assets"
|
||||
|
||||
:: version minecraft (from versions/ dir)
|
||||
set VERSION="1.7.2"
|
||||
|
||||
:: player nickname (the over head)
|
||||
if /i not exist "%GAME_DIR%\nickname.txt" (
|
||||
echo Steve > "%GAME_DIR%\nickname.txt"
|
||||
)
|
||||
set /p PLAYER= < "%GAME_DIR%\nickname.txt"
|
||||
|
||||
|
||||
:: running minecraft
|
||||
cd %MC_DIR%
|
||||
|
||||
java -Xmx512M -Djava.library.path=%NATIVES_DIR% -cp "%MC_DIR%\libraries\org\apache\logging\log4j\log4j-api\2.0-beta9\log4j-api-2.0-beta9.jar;%MC_DIR%\libraries\org\apache\logging\log4j\log4j-core\2.0-beta9\log4j-core-2.0-beta9.jar;%MC_DIR%\libraries\com\ibm\icu\icu4j-core-mojang\51.2\icu4j-core-mojang-51.2.jar;%MC_DIR%\libraries\com\mojang\authlib\1.3\authlib-1.3.jar;%MC_DIR%\libraries\io\netty\netty-all\4.0.10.Final\netty-all-4.0.10.Final.jar;%MC_DIR%\libraries\java3d\vecmath\1.3.1\vecmath-1.3.1.jar;%MC_DIR%\libraries\net\sf\trove4j\trove4j\3.0.3\trove4j-3.0.3.jar;%MC_DIR%\libraries\net\sf\jopt-simple\jopt-simple\4.5\jopt-simple-4.5.jar;%MC_DIR%\libraries\com\paulscode\codecjorbis\20101023\codecjorbis-20101023.jar;%MC_DIR%\libraries\com\paulscode\codecwav\20101023\codecwav-20101023.jar;%MC_DIR%\libraries\com\paulscode\librarylwjglopenal\20100824\librarylwjglopenal-20100824.jar;%MC_DIR%\libraries\com\paulscode\libraryjavasound\20101123\libraryjavasound-20101123.jar;%MC_DIR%\libraries\com\paulscode\soundsystem\20120107\soundsystem-20120107.jar;%MC_DIR%\libraries\com\google\guava\guava\15.0\guava-15.0.jar;%MC_DIR%\libraries\org\apache\commons\commons-lang3\3.1\commons-lang3-3.1.jar;%MC_DIR%\libraries\commons-io\commons-io\2.4\commons-io-2.4.jar;%MC_DIR%\libraries\net\java\jinput\jinput\2.0.5\jinput-2.0.5.jar;%MC_DIR%\libraries\net\java\jinput\jinput-platform\2.0.5\jinput-platform-2.0.5-natives-windows.jar;%MC_DIR%\libraries\net\java\jutils\jutils\1.0.0\jutils-1.0.0.jar;%MC_DIR%\libraries\com\google\code\gson\gson\2.2.4\gson-2.2.4.jar;%MC_DIR%\libraries\org\lwjgl\lwjgl\lwjgl\2.9.0\lwjgl-2.9.0.jar;%MC_DIR%\libraries\org\lwjgl\lwjgl\lwjgl_util\2.9.0\lwjgl_util-2.9.0.jar;%MC_DIR%\versions\1.7.2\1.7.2.jar" net.minecraft.client.main.Main --username %PLAYER% --version %VERSION% --gameDir %GAME_DIR% --assetsDir %ASSETS_DIR% --accessToken 0
|
||||
|
BIN
minecraft.ico
BIN
minecraft.ico
Binary file not shown.
Before Width: | Height: | Size: 345 KiB |
Binary file not shown.
75
tools/make_libs.py
Normal file
75
tools/make_libs.py
Normal file
@ -0,0 +1,75 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
## Requirements PIP: click
|
||||
|
||||
"""Parse Minecraft version.json file and return using libs"""
|
||||
|
||||
__version__ = "1.0.5"
|
||||
|
||||
import sys
|
||||
import json
|
||||
import click
|
||||
|
||||
|
||||
@click.command()
|
||||
@click.option("-p", "--platform", default=sys.platform, help="Output platform (win32, linux, darwin).")
|
||||
@click.option("-o", "--output", default="tty", help="Output option (tty, txt).")
|
||||
def make_output(platform, output):
|
||||
"""Return libraries list"""
|
||||
|
||||
libraries = parse_libs()
|
||||
|
||||
# OS libs separate
|
||||
_ = {"win32": ";", "linux": ":", "darwin": ":"}
|
||||
|
||||
out_lib = str()
|
||||
|
||||
# Generate libraries list
|
||||
for lib in libraries:
|
||||
out_lib = out_lib + "$MC_DIR/libraries/{0}".format(lib) + _[platform]
|
||||
|
||||
out_lib = out_lib + "$MC_DIR/versions/$GAME_VERSION/$GAME_VERSION.jar"
|
||||
|
||||
# Replace for OS shell variable symbol
|
||||
if platform == "win32":
|
||||
out_lib = out_lib.replace("$MC_DIR", "%MC_DIR%")
|
||||
out_lib = out_lib.replace("$GAME_VERSION", "%GAME_VERSION%")
|
||||
|
||||
if output == "tty":
|
||||
click.echo(out_lib)
|
||||
|
||||
if platform == "win32":
|
||||
print("\nWindows generate libraries list complete!")
|
||||
elif platform in ("linux", "darwin"):
|
||||
print("\nUnix generate libraries list complete!")
|
||||
elif output == "txt":
|
||||
with open("./libs.txt", "w", encoding="utf-8") as f:
|
||||
f.write(out_lib)
|
||||
|
||||
if platform == "win32":
|
||||
print("\nWindows generate libraries list complete!\n" "See libs.txt file.")
|
||||
elif platform in ("linux", "darwin"):
|
||||
print("\nUnix generate libraries list complete!\n" "See libs.txt file.")
|
||||
|
||||
|
||||
def parse_libs():
|
||||
"""Make libraries list from version.json file"""
|
||||
|
||||
_ = []
|
||||
|
||||
try:
|
||||
with open("./version.json", "r", encoding="utf-8") as f:
|
||||
file_data = json.loads(f.read())
|
||||
|
||||
for lib in file_data["libraries"]:
|
||||
_.append(lib["downloads"]["artifact"]["path"])
|
||||
except FileNotFoundError:
|
||||
print("ERROR: File version.json not found.")
|
||||
sys.exit(-1)
|
||||
|
||||
return _
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
# pylint: disable=no-value-for-parameter
|
||||
make_output()
|
48
unix/mc_start.sh
Executable file
48
unix/mc_start.sh
Executable file
File diff suppressed because one or more lines are too long
49
windows/mc_start.bat
Normal file
49
windows/mc_start.bat
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user