Fixes for python 3.12
This commit is contained in:
parent
5355675a6a
commit
d5cd159d2c
@ -901,7 +901,7 @@ class BOIIIWD(ctk.CTk):
|
|||||||
start_time = 0
|
start_time = 0
|
||||||
while not os.path.exists(map_folder) and not self.settings_tab.stopped:
|
while not os.path.exists(map_folder) and not self.settings_tab.stopped:
|
||||||
process = subprocess.Popen(
|
process = subprocess.Popen(
|
||||||
[steamcmd_path + "\steamcmd.exe"] + command.split(),
|
[steamcmd_path + "/steamcmd.exe"] + command.split(),
|
||||||
stdout=None if self.settings_tab.console else subprocess.PIPE,
|
stdout=None if self.settings_tab.console else subprocess.PIPE,
|
||||||
stderr=None if self.settings_tab.console else subprocess.PIPE,
|
stderr=None if self.settings_tab.console else subprocess.PIPE,
|
||||||
text=True,
|
text=True,
|
||||||
@ -954,7 +954,7 @@ class BOIIIWD(ctk.CTk):
|
|||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
process = subprocess.Popen(
|
process = subprocess.Popen(
|
||||||
[steamcmd_path + "\steamcmd.exe"] + command.split(),
|
[steamcmd_path + "/steamcmd.exe"] + command.split(),
|
||||||
stdout=None if self.settings_tab.console else subprocess.PIPE,
|
stdout=None if self.settings_tab.console else subprocess.PIPE,
|
||||||
stderr=None if self.settings_tab.console else subprocess.PIPE,
|
stderr=None if self.settings_tab.console else subprocess.PIPE,
|
||||||
text=True,
|
text=True,
|
||||||
|
@ -581,7 +581,7 @@ class SettingsTab(ctk.CTkFrame):
|
|||||||
boiii_folder_entry.insert(0, selected_folder)
|
boiii_folder_entry.insert(0, selected_folder)
|
||||||
|
|
||||||
def open_steam_browser():
|
def open_steam_browser():
|
||||||
selected_folder = ctk.filedialog.askdirectory(title="Select Steam Folder (ex: C:\Program Files (x86)\Steam)")
|
selected_folder = ctk.filedialog.askdirectory(title="Select Steam Folder (ex: C:/Program Files (x86)/Steam)")
|
||||||
if selected_folder:
|
if selected_folder:
|
||||||
steam_folder_entry.delete(0, "end")
|
steam_folder_entry.delete(0, "end")
|
||||||
steam_folder_entry.insert(0, selected_folder)
|
steam_folder_entry.insert(0, selected_folder)
|
||||||
@ -600,7 +600,7 @@ class SettingsTab(ctk.CTkFrame):
|
|||||||
boiii_folder = boiii_folder_entry.get()
|
boiii_folder = boiii_folder_entry.get()
|
||||||
|
|
||||||
if not os.path.exists(steam_folder) and not os.path.exists(ws_folder):
|
if not os.path.exists(steam_folder) and not os.path.exists(ws_folder):
|
||||||
show_message("Not found", "Either you have no items downloaded from Steam or wrong path, please recheck path (ex: C:\Program Files (x86)\Steam)")
|
show_message("Not found", "Either you have no items downloaded from Steam or wrong path, please recheck path (ex: C:/Program Files (x86)/Steam)")
|
||||||
return
|
return
|
||||||
|
|
||||||
if not os.path.exists(boiii_folder):
|
if not os.path.exists(boiii_folder):
|
||||||
|
12
build.py
12
build.py
@ -1,3 +1,5 @@
|
|||||||
|
import os
|
||||||
|
import shutil
|
||||||
import PyInstaller.__main__
|
import PyInstaller.__main__
|
||||||
from distutils.sysconfig import get_python_lib
|
from distutils.sysconfig import get_python_lib
|
||||||
|
|
||||||
@ -13,7 +15,6 @@ PyInstaller.__main__.run([
|
|||||||
"--noconfirm",
|
"--noconfirm",
|
||||||
"--onefile",
|
"--onefile",
|
||||||
"--windowed",
|
"--windowed",
|
||||||
"--ascii",
|
|
||||||
"--icon", f"{ICON}",
|
"--icon", f"{ICON}",
|
||||||
"--add-data", "boiiiwd_package/resources;resources",
|
"--add-data", "boiiiwd_package/resources;resources",
|
||||||
"--add-data", "boiiiwd_package/src;imports",
|
"--add-data", "boiiiwd_package/src;imports",
|
||||||
@ -23,7 +24,10 @@ PyInstaller.__main__.run([
|
|||||||
"--add-data", "boiiiwd_package/src;settings_tab",
|
"--add-data", "boiiiwd_package/src;settings_tab",
|
||||||
"--add-data", "boiiiwd_package/src;update_window",
|
"--add-data", "boiiiwd_package/src;update_window",
|
||||||
"--add-data", "boiiiwd_package/src;main",
|
"--add-data", "boiiiwd_package/src;main",
|
||||||
"--add-data", f"{site_packages_path}\customtkinter;customtkinter",
|
"--add-data", f"{site_packages_path}/customtkinter;customtkinter",
|
||||||
"--add-data", f"{site_packages_path}\CTkMessagebox;CTkMessagebox",
|
"--add-data", f"{site_packages_path}/CTkMessagebox;CTkMessagebox",
|
||||||
"--add-data", f"{site_packages_path}\CTkToolTip;CTkToolTip",
|
"--add-data", f"{site_packages_path}/CTkToolTip;CTkToolTip",
|
||||||
])
|
])
|
||||||
|
|
||||||
|
current_directory = os.path.dirname(__file__)
|
||||||
|
shutil.copy2(os.path.join(current_directory, "dist", "BOIIIWD.exe"), current_directory)
|
||||||
|
Loading…
Reference in New Issue
Block a user