adding build file, updating gititgnore, adding check in backup to create archive if source is present
This commit is contained in:
7
.gitignore
vendored
7
.gitignore
vendored
@@ -220,8 +220,11 @@ compile_commands.json
|
|||||||
**/tempCodeRunnerFile.py
|
**/tempCodeRunnerFile.py
|
||||||
|
|
||||||
output/**
|
output/**
|
||||||
|
archive/**
|
||||||
|
.vscode
|
||||||
|
backup
|
||||||
|
database
|
||||||
|
report/**
|
||||||
# Rust
|
# Rust
|
||||||
target/
|
target/
|
||||||
uv.lock
|
uv.lock
|
||||||
|
|||||||
17
build.py
Normal file
17
build.py
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
|
||||||
|
|
||||||
|
def build_release():
|
||||||
|
print(f"Building Application")
|
||||||
|
os.system(
|
||||||
|
f"uv run python -m nuitka --standalone --output-dir=build --include-package=PyQt6 --include-package=pygments --include-data-dir=./config=config --include-data-dir=./docs=docs --include-data-dir=./icons=icons --include-data-dir=./.venv/Lib/site-packages/PyQt6/=PyQt6 --windows-icon-from-ico=icons/icon.ico main.py"
|
||||||
|
)
|
||||||
|
shutil.copytree(
|
||||||
|
".venv/Lib/site-packages/PyQt6/", "build/main.dist/PyQt6/", dirs_exist_ok=True
|
||||||
|
)
|
||||||
|
shutil.move("build/main.dist", "build/LibrarySystem")
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
build_release()
|
||||||
@@ -29,7 +29,7 @@ class Backup:
|
|||||||
self.backup = True
|
self.backup = True
|
||||||
|
|
||||||
def createBackup(self):
|
def createBackup(self):
|
||||||
if os.path.exists(self.archivePath):
|
if os.path.exists(self.archivePath) and os.path.exists(self.source_path):
|
||||||
# copy the active database to the archive path, add _[date]
|
# copy the active database to the archive path, add _[date]
|
||||||
day = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
|
day = datetime.datetime.now().strftime("%Y%m%d%H%M%S")
|
||||||
# copy the active database to the archive path, add _[date]
|
# copy the active database to the archive path, add _[date]
|
||||||
|
|||||||
Reference in New Issue
Block a user