Skip to content

Commit

Permalink
1.0.1
Browse files Browse the repository at this point in the history
Agregado indicador de descarga.
Agregado opción de instalar Fabric
  • Loading branch information
KeimaSenpai committed Feb 18, 2024
1 parent bb3fa31 commit 5c8895e
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 13 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/python-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,20 @@ jobs:
- name: Compress folder
shell: powershell
run: |
Compress-Archive -Path dist/XLauncher -DestinationPath XLauncher.zip
Compress-Archive -Path dist/XLauncher -DestinationPath XLauncher-Windows.zip
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
tag_name: v1.0.0
release_name: XLauncher v1.0.0
tag_name: v1.0.1
release_name: XLauncher v1.0.1
body: |
This is the first release.
- Agregado indicador de por donde va la descarga.
- Agregada la opcion de instalar Fabric
- Proximamente login con cuenta Premium
draft: false
prerelease: false
- name: Upload Release Asset
Expand All @@ -44,6 +47,6 @@ jobs:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./XLauncher.zip
asset_name: XLauncher.zip
asset_path: ./XLauncher-Windows.zip
asset_name: XLauncher-Windows.zip
asset_content_type: application/zip
13 changes: 9 additions & 4 deletions main.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import asyncio
import os
# Importaciones locales
from minecraft_launcher.minecraft import install_forge, install_minecraft, play_mine
from minecraft_launcher.minecraft import install_fabric, install_forge, install_minecraft, play_mine


VERSION = ('1.0.0 (Beta)')
VERSION = ('1.0.1')
user_windows = os.environ['USERNAME']
minecraft_directory = f"C://Users//{user_windows}//AppData//Roaming//.xlauncher"

Expand All @@ -24,7 +24,8 @@ async def menu():
▐Play Minecraft (1)
▐Instalar Versiones (2)
▐Instalar Forge (3)
▐Para info de del script (4)
▐Instalar Fabric (4)
▐Para info de del script (5)
▐Si quiere salir escriba (0)
''')

Expand All @@ -36,6 +37,8 @@ async def menu():
if select == "3":
await install_forge()
if select == "4":
await install_fabric()
if select == "5":
await info_app()
if select == "0":
exit
Expand All @@ -51,9 +54,11 @@ async def info_app():
»Simple scipt par ejecutar Minecraft
y jugar de manera no premium.
»Desarrollado por KeimaSenpai.
» Desarrollado por KeimaSenpai.
»Telegram - https://t.me/KeimaSenpai
»YouTube - https://www.youtube.com/@KeimaSenpaiYT
»GitHub - https://github.com/KeimaSenpai/XLauncher-Script
»Version: {VERSION}\n
''')
print('Escribe (0) para volver')
Expand Down
38 changes: 35 additions & 3 deletions minecraft_launcher/minecraft.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,39 @@
import os
import subprocess


user_windows = os.environ['USERNAME']
minecraft_directory = f"C://Users//{user_windows}//AppData//Roaming//.xlauncher"


# Indicador de por donde va la instalación
current_max = 0

def set_status(status: str):
print(status)


def set_progress(progress: int):
if current_max != 0:
print(f"{progress}/{current_max}")


def set_max(new_max: int):
global current_max
current_max = new_max

callback = {
"setStatus": set_status,
"setProgress": set_progress,
"setMax": set_max
}



# Insalación de Minecraft
async def install_minecraft():
minecraft_version = input('Versió: ')
minecraft_launcher_lib.install.install_minecraft_version(
minecraft_version, minecraft_directory)
minecraft_version, minecraft_directory, callback=callback)
print(f'» Instalada la version {minecraft_version}')


Expand All @@ -22,9 +45,18 @@ async def install_forge():
forfe = minecraft_launcher_lib.forge.find_forge_version(forge_ver)
print(forfe)
minecraft_launcher_lib.forge.install_forge_version(
forfe, minecraft_directory)
forfe, minecraft_directory, callback=callback)
print(f'Instalado Forge {forfe}')

async def install_fabric():
print('Dime la versión')
fabric_ver = input('» ')
fabric_supor_ver = minecraft_launcher_lib.fabric.is_minecraft_version_supported(fabric_ver)
if fabric_supor_ver == False:
print('No es compatible esa versión')
await install_fabric()
else:
fabric = minecraft_launcher_lib.fabric.install_fabric(fabric_ver, minecraft_directory, callback=callback)

async def play_mine():
print('Dígame su nombre')
Expand Down

1 comment on commit 5c8895e

@KeimaSenpai
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahí vamos jajaja

Please sign in to comment.