add build details

This commit is contained in:
Ross Kruger
2024-06-21 11:27:31 +01:00
parent 69371bf9df
commit e52349ab46
2 changed files with 51 additions and 1 deletions
+4 -1
View File
@@ -5,7 +5,10 @@ a = Analysis(
['anon_gui.py'],
pathex=[],
binaries=[],
datas=[],
datas=[
('icon\\icon1.ico', 'icon'),
('icon\\icon1.png', 'icon'),
],
hiddenimports=[],
hookspath=[],
hooksconfig={},
+47
View File
@@ -0,0 +1,47 @@
import shutil
from pathlib import Path
import PyInstaller.__main__
import typer
from rich import print
from rich.progress import Progress
app = typer.Typer()
@app.command()
def build(build: bool = True, copy: bool = True, test: bool = False):
if build:
print("Building with PyInstaller")
PyInstaller.__main__.run([
"anon_gui.spec"
])
if copy:
print("Copying file")
source = Path(r"C:\Users\krugerro\Desktop\uploader\dist\anon_gui.exe" )
dest =Path(r"T:\rad-tools\uploader" )
n = 0
while True:
if n > 5:
break
s = n if n > 0 else ""
filename = Path(f"cris_tools{s}.exe")
print(f"Destination: {filename}")
try:
shutil.copy(source, dest / filename)
break
except PermissionError:
n = n + 1
if __name__ == "__main__":
app()