Require the newest EditPI
This commit is contained in:
parent
53ee8721fa
commit
190d3f907b
|
@ -51,7 +51,9 @@ if os.path.exists("/usr/lib/planet-launcher/"):
|
|||
|
||||
try:
|
||||
_ = gettext.translation(
|
||||
"main", localedir=str(absolute_path) + "/assets/translations/", languages=[LOCALE]
|
||||
"main",
|
||||
localedir=str(absolute_path) + "/assets/translations/",
|
||||
languages=[LOCALE],
|
||||
).gettext
|
||||
except:
|
||||
_ = gettext.translation(
|
||||
|
@ -154,15 +156,15 @@ class ConfigPluto(QDialog):
|
|||
) # Button for Pre-installed debs
|
||||
self.premade_btn.clicked.connect(self.link_appimage) # Connect to the function
|
||||
|
||||
#self.flatpak_btn = QPushButton(_("Link flatpak")) # Button for linking flatpak
|
||||
#self.flatpak_btn.clicked.connect(self.link_flatpak) # Connect to the function
|
||||
# self.flatpak_btn = QPushButton(_("Link flatpak")) # Button for linking flatpak
|
||||
# self.flatpak_btn.clicked.connect(self.link_flatpak) # Connect to the function
|
||||
|
||||
# Adding things to widgets
|
||||
layout.addWidget(titlewidget)
|
||||
layout.addWidget(info_label)
|
||||
layout.addWidget(self.executable_btn)
|
||||
layout.addWidget(self.premade_btn)
|
||||
#layout.addWidget(self.flatpak_btn)
|
||||
# layout.addWidget(self.flatpak_btn)
|
||||
|
||||
self.setLayout(layout)
|
||||
|
||||
|
@ -538,13 +540,13 @@ class Planet(QMainWindow):
|
|||
self.serversedit = QTextEdit() # Create a text editing area
|
||||
|
||||
if not os.path.exists(f"/home/{USER}/.minecraft-pi/servers.txt"):
|
||||
with open(f"/home/{USER}/.minecraft-pi/servers.txt", 'w') as servers:
|
||||
with open(f"/home/{USER}/.minecraft-pi/servers.txt", "w") as servers:
|
||||
servers.write("pbptanarchy.tk")
|
||||
|
||||
self.serversedit.textChanged.connect(
|
||||
self.save_servers
|
||||
) # Connect on change to the save function
|
||||
with open(f"/home/{USER}/.minecraft-pi/servers.txt", 'r') as servers:
|
||||
with open(f"/home/{USER}/.minecraft-pi/servers.txt", "r") as servers:
|
||||
self.serversedit.setPlainText(
|
||||
servers.read()
|
||||
) # Set the text of the text editing area
|
||||
|
@ -619,14 +621,14 @@ class Planet(QMainWindow):
|
|||
|
||||
self.delete_appimage_button = QPushButton(_("Delete"))
|
||||
self.delete_appimage_button.clicked.connect(self.delete_appimage)
|
||||
|
||||
|
||||
mcpit_install_label = QLabel(_("Install texture pack"))
|
||||
|
||||
|
||||
self.import_mcpit_button = QPushButton(_("Select file"))
|
||||
self.import_mcpit_button.clicked.connect(self.install_texture_pack)
|
||||
|
||||
|
||||
mcpit_delete_label = QLabel(_("Delete texture pack"))
|
||||
|
||||
|
||||
self.delete_mcpit_button = QPushButton(_("Delete"))
|
||||
self.delete_mcpit_button.clicked.connect(mcpit.erase_pack)
|
||||
|
||||
|
@ -638,12 +640,12 @@ class Planet(QMainWindow):
|
|||
|
||||
layout.addWidget(appimage_label, 2, 0)
|
||||
layout.addWidget(self.delete_appimage_button, 2, 1)
|
||||
|
||||
|
||||
layout.addWidget(mcpit_install_label)
|
||||
layout.addWidget(self.import_mcpit_button, 3, 1)
|
||||
|
||||
layout.addWidget(self.import_mcpit_button, 3, 1)
|
||||
|
||||
layout.addWidget(mcpit_delete_label)
|
||||
layout.addWidget(self.delete_mcpit_button, 4, 1)
|
||||
layout.addWidget(self.delete_mcpit_button, 4, 1)
|
||||
|
||||
widget.setLayout(layout)
|
||||
|
||||
|
@ -746,16 +748,18 @@ class Planet(QMainWindow):
|
|||
Image.open(filename[0]).crop((0, 0, 64, 32)).convert("RGBA").save(
|
||||
f"/home/{USER}/.minecraft-pi/overrides/images/mob/char.png"
|
||||
)
|
||||
|
||||
|
||||
def install_texture_pack(self):
|
||||
pack = QFileDialog.getOpenFileName(
|
||||
self, _("Select pack file"), "/", "mcpit files (*.mcpit);;PePack files (*.zip *.pepack)"
|
||||
self,
|
||||
_("Select pack file"),
|
||||
"/",
|
||||
"mcpit files (*.mcpit);;PePack files (*.zip *.pepack)",
|
||||
)
|
||||
if pack[1] == "mcpit files (*.mcpit)":
|
||||
mcpit.mcpit_install(pack[0], False)
|
||||
mcpit.mcpit_install(pack[0], False)
|
||||
else:
|
||||
mcpit.pepack_install(pack[0])
|
||||
|
||||
|
||||
def delete_config(self):
|
||||
dialog = QMessageBox()
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
Package: planet-launcher
|
||||
Version: 1.2.0
|
||||
Version: 1.2.1
|
||||
Architecture: all
|
||||
Maintainer: mcpiscript <mcpiscript@gmail.com>
|
||||
Depends: python3-pyqt5, python3:any, python3-pyqt5.qtwebkit, python3-pyqt5.qtsvg, python3-pyqt5.qtwebkit, python3-pyqt5.qtmultimedia, gcc
|
||||
Depends: python3-pyqt5, python3:any, python3-pyqt5.qtwebkit, python3-pyqt5.qtsvg, python3-pyqt5.qtwebkit, python3-pyqt5.qtmultimedia
|
||||
Replaces: mcpil, mcpil-r, gmcpil, jmcpil
|
||||
Recommends: python3-pyqtdarkmode, python3-minecraftpi
|
||||
Provides: pi-nbt, mcpiedit, mcpit, editpi
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
pip3 install pyqtdarktheme pypresence pillow darkdetect qtwidgets editpi mcpit
|
||||
pip3 install pyqtdarktheme pypresence pillow darkdetect qtwidgets editpi>=1.1 mcpit
|
||||
link /usr/lib/planet-launcher/main.py /usr/bin/planet-launcher
|
||||
chmod 755 /usr/lib/planet-launcher/main.py
|
||||
link /usr/lib/planet-launcher/assets/misc/planet-launcher.desktop /usr/share/applications/planet-launcher.desktop
|
||||
link /usr/lib/planet-launcher/textures.py /usr/bin/mcpit
|
||||
gcc /usr/lib/planet-launcher/pi-nbt.c -o /usr/bin/pi-nbt
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
rm -rf /usr/bin/planet-launcher
|
||||
rm -rf /usr/share/applications/planet-launcher.desktop
|
||||
rm -rf /usr/bin/pi-nbt
|
||||
rm -rf /usr/bin/mcpit
|
||||
|
|
Loading…
Reference in New Issue