-
Notifications
You must be signed in to change notification settings - Fork 2
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
0 parents
commit f89de75
Showing
7 changed files
with
793 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from sys import platform | ||
from os import system | ||
import getpass | ||
|
||
user = getpass.getuser() | ||
|
||
|
||
if platform == "win32": | ||
system("rd /s /q build") | ||
system("rd /s /q dist") | ||
system("del /q *.spec") | ||
system(f'pyinstaller --noconfirm --onefile --windowed --uac-admin --icon "../tlauncher.ico" --add-data "C:/Users/{user}/AppData/Local/Programs/Python/Python311/Lib/site-packages/customtkinter;customtkinter/" "../main.pyw"') | ||
system("del /q *.spec") | ||
system("rd /s /q build") | ||
system("rd /s /q %USERPROFILE%\AppData\Local\pyinstaller") | ||
system("explorer dist") | ||
|
||
if platform == "linux" or platform == "linux2" or platform == "unix": | ||
print("Для данной системы не поддерживается автоматическая сборка (возможно в будущем добавлю)!") | ||
input() |
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 @@ | ||
customtkinter | ||
pyinstaller | ||
tkinter |
Large diffs are not rendered by default.
Oops, something went wrong.
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,17 @@ | ||
[![Youtube](https://user-images.githubusercontent.com/64781822/185656066-cdb875f1-ade6-4499-ae50-79a4f61fdc3e.png)](https://www.youtube.com/@hzfmain/) [![Telegram](https://user-images.githubusercontent.com/64781822/185657127-657c530b-3849-4931-ab91-63d6f0508330.png)](https://t.me/hzfnews) [![VK](https://user-images.githubusercontent.com/64781822/185657778-21a240e2-da1f-4b72-b37e-447c9adebfcb.png)](https://vk.com/hzforum1) [![Discord](https://user-images.githubusercontent.com/64781822/185659753-b997c6db-c91a-42c0-8876-6826d46568ba.png)](https://discord.com/invite/7bneGfUS5h) | ||
___ | ||
# 💻 Меню | ||
![menu-windows](https://i.imgur.com/3pXAk74.png) | ||
___ | ||
# 👻 Установка | ||
* **pip install -r requirements.txt** | ||
___ | ||
# 💎 Запуск | ||
* **python main.pyw** or **main.exe** | ||
___ | ||
# 💰 Поддержать проект: | ||
|
||
+ #### **QIWI Кошелёк** | ||
+ [**`Перевод по никнейму`**](https://qiwi.com/n/AVENCORESDONATE) | ||
+ **Сбер:** 2202 2050 7215 4401 | ||
+ **ВТБ:** 2200 2404 1001 8580 |
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,79 @@ | ||
from tkinter.messagebox import showerror, showinfo | ||
import customtkinter | ||
import webbrowser | ||
import tkinter | ||
|
||
|
||
infotext = """Данный патч отключает рекламу в TLauncher. | ||
После нажатия кнопки "Патч" происходит запись серверов, откуда грузится реклама в файл Hosts. | ||
После патча желательно открыть командную строку и ввести команду "ipconfig /flushdns". | ||
Если реклама осталась - перезагружай ПК, отключай VPN.""" | ||
|
||
def openavtor(): | ||
webbrowser.open("https://t.me/avencores") | ||
|
||
def tllegavy(): | ||
webbrowser.open("https://tlaun.ch/?lang=ru") | ||
|
||
def openyt(): | ||
webbrowser.open("https://www.youtube.com/watch?v=XnjADh9xxYI") | ||
|
||
def patcher(): | ||
try: | ||
patchtodir = "C:\Windows\System32\drivers\etc\hosts" | ||
|
||
f = open(patchtodir, "a") | ||
f.writelines("\n\n# Tlauncher patcher by avencores (Tkinter version)") | ||
f.writelines("\n127.0.0.1 repo.tlauncher.org") | ||
f.writelines("\n127.0.0.1 advancedrepository.com") | ||
f.writelines("\n127.0.0.1 page.tlauncher.org") | ||
f.writelines("\n127.0.0.1 tmonitoring.com") | ||
f.writelines("\n127.0.0.1 tlauncher.org/repo/update/downloads/configs/inner_servers.json") | ||
f.writelines("\n127.0.0.1 tlauncher.org/repo/update/lch/additional_hot_servers.json") | ||
f.writelines("\n127.0.0.1 tlauncher.org/repo/update/lch/servers/hot_servers-1.0.json") | ||
f.writelines("\n127.0.0.1 tlauncher.org/repo/update/lch/additional_hot_servers-1.0.json") | ||
f.writelines("\n127.0.0.1 ad.tlauncher.org") | ||
f.writelines("\n127.0.0.1 promo.tlauncher.org") | ||
f.writelines("\n127.0.0.1 stats.tlauncher.org") | ||
f.writelines("\n127.0.0.1 statistics.tlauncher.org") | ||
f.writelines("\n127.0.0.1 analytics.tlauncher.org") | ||
f.writelines("\n# End Tlauncher patcher by avencores (Tkinter version)") | ||
showinfo(title="Успешно", message="Патч был успешно установлен!") | ||
except: | ||
showerror(title="Ошибка", message="Патч не был установлен!") | ||
|
||
|
||
customtkinter.set_appearance_mode("System") | ||
customtkinter.set_default_color_theme("blue") | ||
|
||
class App(customtkinter.CTk): | ||
def __init__(self): | ||
super().__init__() | ||
|
||
self.geometry("400x400") | ||
self.title("Tlauncher RemoveAD") | ||
self.iconbitmap("tlauncher.ico") # не работает при сборке | ||
self.resizable(False, False) | ||
|
||
self.frame = customtkinter.CTkTextbox(self, width=350, height=190, border_width=2) | ||
self.frame.place(x=200, y=130, anchor=tkinter.CENTER) | ||
self.frame.insert("0.0", infotext) | ||
|
||
self.button = customtkinter.CTkButton(self, text="Патч", width=200, command=patcher) | ||
self.button.place(x=200, y=250, anchor=tkinter.CENTER) | ||
|
||
self.button = customtkinter.CTkButton(self, text="Автор утилиты", width=200, command=openavtor) | ||
self.button.place(x=200, y=290, anchor=tkinter.CENTER) | ||
|
||
self.button = customtkinter.CTkButton(self, text="Видео гайд (YouTube)", width=200, command=openyt) | ||
self.button.place(x=200, y=330, anchor=tkinter.CENTER) | ||
|
||
self.button = customtkinter.CTkButton(self, text="Скачать TLaucnher (TL Legacy)", width=200, command=tllegavy) | ||
self.button.place(x=200, y=370, anchor=tkinter.CENTER) | ||
|
||
if __name__ == "__main__": | ||
app = App() | ||
app.mainloop() |
Binary file not shown.