diff --git a/README.md b/README.md index 35013a5..657dc04 100644 --- a/README.md +++ b/README.md @@ -57,3 +57,10 @@ pip install buildozer buildozer android debug ``` + +# Build Desktop Binary (Windows, Linux, Mac) +``` +pip install pyinstaller kivymd plyer +pyinstaller main.spec +``` +On Windows binary can be found now at dist/main.exe \ No newline at end of file diff --git a/main.spec b/main.spec new file mode 100644 index 0000000..7f13344 --- /dev/null +++ b/main.spec @@ -0,0 +1,44 @@ +# -*- mode: python ; coding: utf-8 -*- + +from PyInstaller.building.build_main import * +import sys +import os + +path = os.path.abspath(".") +#kivymd_repo_path = path.split("demos")[0] +#sys.path.insert(0, kivymd_repo_path) + +from kivy_deps import sdl2, glew +from kivymd import hooks_path as kivymd_hooks_path + +a = Analysis( + ["main.py"], + pathex=[path], + binaries=[], + datas=[], + hiddenimports=[ + + ], + hookspath=[kivymd_hooks_path], + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=None, + noarchive=False, +) +pyz = PYZ(a.pure, a.zipped_data, cipher=None) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + *[Tree(p) for p in (sdl2.dep_bins + glew.dep_bins)], + debug=False, + strip=False, + upx=True, + console=True, + name='main' +) \ No newline at end of file