diff --git a/Makefile b/Makefile index cf39b5a..b6c95b0 100644 --- a/Makefile +++ b/Makefile @@ -1,3 +1,7 @@ +TARGET=thechart +VERSION=1.0.0 +ROOT=/home/will +ICON=chart-671.png setup-env: pip3 install pipenv pipenv --python 3.13 @@ -9,7 +13,10 @@ setup-env: build: docker buildx build --platform linux/amd64,linux/arm64 -t ${IMAGE} --push . install: - pyinstaller --name thechart --onefile --windowed --hidden-import='PIL._tkinter_finder' src/main.py + pyinstaller --name ${TARGET} --onefile --windowed --hidden-import='PIL._tkinter_finder' --icon='${ICON}' --add-data=".env:." src/main.py + cp -f ./dist/${TARGET} ${ROOT}/Applications/ + cp -f ./deploy/${TARGET}.desktop ${ROOT}/.local/share/applications/ + desktop-file-validate ${ROOT}/.local/share/applications/${TARGET}.desktop run: python src/main.py start: @@ -17,11 +24,11 @@ start: stop: docker-compose down test: - docker-compose exec thechart pipenv run pytest -v --tb=short + docker-compose exec ${TARGET} pipenv run pytest -v --tb=short lint: - docker-compose exec thechart pipenv run pre-commit run --all-files + docker-compose exec ${TARGET} pipenv run pre-commit run --all-files format: - docker-compose exec thechart pipenv run pre-commit run --all-files --show-diff + docker-compose exec ${TARGET} pipenv run pre-commit run --all-files --show-diff shell: - docker-compose exec -it thechart /bin/bash + docker-compose exec -it ${TARGET} /bin/bash .PHONY: setup-env build install run start stop test lint format shell diff --git a/chart-671.png b/chart-671.png new file mode 100644 index 0000000..bbe41f3 Binary files /dev/null and b/chart-671.png differ diff --git a/deploy/thechart.desktop b/deploy/thechart.desktop new file mode 100644 index 0000000..c2ebd6f --- /dev/null +++ b/deploy/thechart.desktop @@ -0,0 +1,8 @@ +[Desktop Entry] +Type=Application +Terminal=false +Name=Thechart +Exec=sh -c "/home/will/Applications/thechart /home/will/Documents/thechart_data.csv" +Icon=/home/will/Code/thechart/chart-671.png +Categories=Utility; +StartupWMClass=tk # Crucial for Dock icon persistence