path = os.path.dirname(os.path.realpath(__file__))
return path + "/../"
+def parse_args():
+ for arg in sys.argv:
+ if arg == "-v":
+ sys.argv.remove(arg)
+
+ if getattr(sys, 'frozen', False):
+ f = open(path() + ".pyinstaller_commit", "r")
+ print(f.read(), end="")
+ f.close()
+ else:
+ print("option '-v' can only be used in bundled package")
+ sys.exit()
+
def duration_to_min_sec(duration):
minutes = int(duration / 60)
seconds = int(duration) % 60
+import helpers
+
+helpers.parse_args()
+
import kivy
kivy.require("1.9.1")
from kivy.app import App
from kivy.lang import Builder
from helpers.key import Key
from helpers.mapping import Mapping
-import helpers
class KeyList(RelativeLayout):
keylist = ListProperty([])
# -*- mode: python -*-
+import os
from kivy.tools.packaging.pyinstaller_hooks import get_deps_minimal, hookspath, runtime_hooks
excluded_and_hidden_modules = get_deps_minimal(video=None, camera=None, audio=None, clipboard=None, spelling=None)
excluded_and_hidden_modules['hiddenimports'] += [ 'six', 'packaging', 'packaging.version', 'packaging.specifiers', 'packaging.requirements']
+commit_message = os.popen('git log -1 --format="%h %ci"').read()
+pyinstaller_file = open(".pyinstaller_commit", "w")
+pyinstaller_file.write(commit_message)
+pyinstaller_file.close()
+
a = Analysis(['music_sampler.py'],
binaries=None,
datas=[
('fonts/*', 'fonts'),
- ('music_sampler.kv', '.')
+ ('music_sampler.kv', '.'),
+ ('.pyinstaller_commit', '.')
],
hookspath=hookspath(),
runtime_hooks=runtime_hooks(),