-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3e26e4f
commit 3d1b627
Showing
31 changed files
with
976 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,57 @@ | ||
# XLauncher-ui | ||
Launcher de Minecraft en el cual pueden jugar de manera segura además de personalizarlo por completo | ||
<div align="center"> | ||
<img src="XLauncher LogoX.webp" alt="Launcher de Minecraft" height="250"> | ||
</div> | ||
|
||
# Minecraft Launcher | ||
|
||
![1711569832079](XLauncher-UI.png "Interfaz del XLauncher") | ||
|
||
> Launcher de minecraft que hice para un video de YouTube | ||
![GitHub Downloads (all assets, all releases)](https://img.shields.io/github/downloads/KeimaSenpai/XLauncher-ui/total?style=for-the-badge&label=Download&color=%23756AB6) | ||
|
||
### 🔩Instalacion | ||
|
||
- Clonar repositorio | ||
|
||
```console | ||
git clone https://github.com/KeimaSenpai/Script-launcher-Minecraft.git | ||
``` | ||
|
||
- Crear entorno de desarrollo | ||
|
||
```console | ||
pip install virtualenv | ||
virtualenv env | ||
``` | ||
|
||
- Instalar dependencias | ||
|
||
```console | ||
pip install -r requirements.txt | ||
``` | ||
|
||
🔩Instalación para los usuarios de Cuba | ||
|
||
> Para que no gasten megas en la instalacion del paquete pueden usar este comando | ||
> Solo funciona para CUBA este comando | ||
```console | ||
python -m pip install -r requirements.txt --index-url http://nexus.prod.uci.cu/repository/pypi-proxy/simple/ --trusted-host nexus.prod.uci.cu | ||
``` | ||
|
||
### 📦Para empaquetar | ||
|
||
```console | ||
pyinstaller main.py --noconfirm --onedir --console --icon icon_windows.ico --name "XLauncher" | ||
``` | ||
|
||
> Link de la documentacion [LINK](https://minecraft-launcher-lib.readthedocs.io/en/stable/) | ||
## 📺Video de YouTube | ||
|
||
> Recuerda dejar Like y no dejes de suscribirte al canal 👍 | ||
> [CREA TU PROPIO LAUNCHER de MINECRAFT](https://youtu.be/5FmjSubDRyw?si=9brYY9OnENftZgft) | ||
## Personas que hicieron este proyecto posible | ||
[![Contribuidores](https://contrib.rocks/image?repo=KeimaSenpai/XLauncher-ui)](https://github.com/KeimaSenpai/XLauncher-ui/graphs/contributors) |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
import flet as ft | ||
|
||
|
||
from vews.home import * | ||
from vews.navegacion import * | ||
|
||
def main(page: ft.Page): | ||
page.title = "XLauncher" | ||
page.window_width = 760 | ||
page.window_height = 478 | ||
page.window_resizable = False | ||
page.padding = 0 | ||
page.fonts = { | ||
"mine":"fonts/minecraft.ttf", | ||
"mine_dun":"fonts/minecraft-dungeons.ttf" | ||
} | ||
|
||
#Se agrupan todas las paginas | ||
page.add( | ||
ft.Row( | ||
spacing=0, | ||
controls=[ | ||
nab, | ||
conte | ||
], | ||
) | ||
) | ||
|
||
ft.app(target=main, assets_dir='assets') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
""" | ||
Minecraft Libreria para ejecutar Minecraft | ||
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
import flet as ft | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
import os | ||
import json | ||
import subprocess | ||
import minecraft_launcher_lib | ||
|
||
user_windows = os.environ['USERNAME'] | ||
minecraft_directory = f"C://Users//{user_windows}//AppData//Roaming//.xlauncher" | ||
ruta_json = f"{minecraft_directory}//configuracion.json" | ||
|
||
async def prueba(e): | ||
print(e) | ||
|
||
async def play_mine(): | ||
global options | ||
with open(ruta_json, 'r') as file: | ||
data = json.load(file) | ||
|
||
if 'Nombre' in data and 'RAM' in data: | ||
mine_user = data['Nombre'] | ||
ram = data['RAM'] | ||
java_ruta = data.get('Java', None) | ||
|
||
forts = minecraft_launcher_lib.utils.get_installed_versions(minecraft_directory) | ||
for fort in forts: | ||
print(fort['id']) | ||
version = input('» ') | ||
|
||
options = { | ||
'username': mine_user, | ||
'uuid': '', | ||
'token': '', | ||
'executablePath':f'{java_ruta}', | ||
'defaultExecutablePath':f'{java_ruta}', | ||
|
||
"jvmArguments": [ | ||
f"-Xmx{ram}G", | ||
f"-Xms{ram}G", | ||
"-Xmn668m", | ||
"-XX:+DisableExplicitGC", | ||
"-XX:+UseConcMarkSweepGC", | ||
"-XX:+UseParNewGC", | ||
"-XX:+UseNUMA", | ||
"-XX:+CMSParallelRemarkEnabled", | ||
"-XX:MaxTenuringThreshold=15", | ||
"-XX:MaxGCPauseMillis=30", | ||
"-XX:GCPauseIntervalMillis=150", | ||
"-XX:+UseAdaptiveGCBoundary", | ||
"-XX:-UseGCOverheadLimit", | ||
"-XX:+UseBiasedLocking", | ||
"-XX:SurvivorRatio=8", | ||
"-XX:TargetSurvivorRatio=90", | ||
"-XX:MaxTenuringThreshold=15", | ||
"-Dfml.ignorePatchDiscrepancies=true", | ||
"-Dfml.ignoreInvalidMinecraftCertificates=true", | ||
"-XX:+UseFastAccessorMethods", | ||
"-XX:+UseCompressedOops", | ||
"-XX:+OptimizeStringConcat", | ||
"-XX:+AggressiveOpts", | ||
"-XX:ReservedCodeCacheSize=2048m", | ||
"-XX:+UseCodeCacheFlushing", | ||
"-XX:SoftRefLRUPolicyMSPerMB=10000", | ||
"-XX:ParallelGCThreads=10" | ||
], # The jvmArguments | ||
"launcherVersion": "1.0.2", | ||
} | ||
|
||
# Ejecutar Minecraft | ||
minecraft_command = minecraft_launcher_lib.command.get_minecraft_command( | ||
version, minecraft_directory, options) # type: ignore | ||
subprocess.run(minecraft_command) | ||
await play_mine() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
flet | ||
minecraft-launcher-lib | ||
pyinstaller | ||
flet_route |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
import flet as ft | ||
from flet_route import Params,Basket | ||
|
||
from minecraft_launcher.minecraft import prueba | ||
|
||
|
||
class Home(ft.UserControl): | ||
def __init__(self): | ||
super().__init__() | ||
|
||
def view(self,page:ft.Page,params:Params,basket:Basket): | ||
return ft.View( | ||
controls=[ | ||
ft.Text('Hola',size=30) | ||
] | ||
) | ||
|
||
|
||
|
||
minecraft_title = ft.Image( | ||
src='img/minecraft_title.png', | ||
height=170, | ||
) | ||
play = ft.ElevatedButton( | ||
"PLAY", | ||
style=ft.ButtonStyle( | ||
color='#191919', | ||
bgcolor='#68C90E', | ||
overlay_color='#447A12', | ||
shape=ft.RoundedRectangleBorder(radius=5) | ||
), | ||
on_click=prueba | ||
) | ||
|
||
conte = ft.Stack( | ||
[ | ||
ft.Image( | ||
src='img/Rectángulo.webp', | ||
height=478, | ||
width=681, | ||
fit=ft.ImageFit.COVER, | ||
), | ||
ft.Container( | ||
content=ft.Column( | ||
controls=[ | ||
minecraft_title, | ||
play | ||
], | ||
alignment=ft.MainAxisAlignment.CENTER, | ||
horizontal_alignment=ft.CrossAxisAlignment.CENTER | ||
), | ||
alignment=ft.alignment.center | ||
) | ||
|
||
], | ||
width=681, | ||
height=478 | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import flet as ft | ||
|
||
|
||
logo = ft.Container( | ||
content=ft.Image(src='img/logo.webp', height=45, width=45), | ||
alignment=ft.alignment.center, | ||
height=47, | ||
margin=10, | ||
) | ||
|
||
a = ft.IconButton( | ||
icon=ft.icons.PLAY_CIRCLE_FILL_OUTLINED, | ||
style=ft.ButtonStyle( | ||
color='#5B0098', | ||
bgcolor='#0C0C0C', | ||
shape=ft.RoundedRectangleBorder(radius=5) | ||
) | ||
) | ||
b = ft.IconButton( | ||
icon=ft.icons.ACCOUNT_CIRCLE, | ||
style=ft.ButtonStyle( | ||
color='#5B0098', | ||
bgcolor='#0C0C0C', | ||
shape=ft.RoundedRectangleBorder(radius=5) | ||
) | ||
) | ||
c = ft.IconButton( | ||
icon=ft.icons.NEWSPAPER_OUTLINED, | ||
style=ft.ButtonStyle( | ||
color='#5B0098', | ||
bgcolor='#0C0C0C', | ||
shape=ft.RoundedRectangleBorder(radius=5) | ||
) | ||
) | ||
d = ft.IconButton( | ||
icon=ft.icons.DOWNLOAD, | ||
style=ft.ButtonStyle( | ||
color='#5B0098', | ||
bgcolor='#0C0C0C', | ||
shape=ft.RoundedRectangleBorder(radius=5) | ||
) | ||
) | ||
e = ft.IconButton( | ||
icon=ft.icons.SETTINGS, | ||
style=ft.ButtonStyle( | ||
color='#5B0098', | ||
bgcolor='#0C0C0C', | ||
shape=ft.RoundedRectangleBorder(radius=5) | ||
) | ||
) | ||
iconos = ft.Column( | ||
controls=[ | ||
a, | ||
b, | ||
c, | ||
d, | ||
e | ||
] | ||
) | ||
|
||
#Navegacion principal de la app | ||
nab = ft.Container( | ||
content=ft.Column( | ||
spacing=100, | ||
controls=[ | ||
logo, | ||
iconos | ||
], | ||
alignment=ft.MainAxisAlignment.START, | ||
horizontal_alignment=ft.CrossAxisAlignment.CENTER, | ||
|
||
), | ||
height= 478, | ||
width= 70, | ||
bgcolor='#131313', | ||
alignment=ft.alignment.center | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import flet as ft |
Empty file.