Build with PyInstaller
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
ao-recipes-helper.spec
|
||||
ao_recipes_helper_gui.egg-info/
|
||||
build/
|
||||
dist/
|
||||
@@ -0,0 +1,5 @@
|
||||
python -m venv .venv
|
||||
.\.venv\bin\Activate.ps1
|
||||
pip install .
|
||||
pip install pyinstaller
|
||||
python -m PyInstaller --add-binary .\recipes.db:. --onefile --name ao-recipes-helper main.py --windowed
|
||||
+7
-1
@@ -1,5 +1,7 @@
|
||||
import sqlite3
|
||||
import io
|
||||
import os
|
||||
import sys
|
||||
from PIL import Image, ImageTk
|
||||
import tkinter as tk
|
||||
from tkinter import ttk
|
||||
@@ -138,7 +140,11 @@ def close(root, db):
|
||||
|
||||
def main():
|
||||
root = tk.Tk()
|
||||
db = sqlite3.connect("recipes.db")
|
||||
root.geometry("900x900+20+20")
|
||||
path = "recipes.db"
|
||||
if hasattr(sys, '_MEIPASS'):
|
||||
path = os.path.join(sys._MEIPASS, "recipes.db")
|
||||
db = sqlite3.connect(path)
|
||||
db.create_function("UPPER", 1, str.upper)
|
||||
images = {
|
||||
a: b
|
||||
|
||||
Reference in New Issue
Block a user