Open JokerQyou opened 10 years ago
@JokerQyou interesting idea, please send me poc.
Any update on this @maxkrivich @JokerQyou
Hmmm, I wonder how I missed the last notification from this thread. I'll take a look and try to reproduce it this weekend. I'll post my progress here.
@JokerQyou @jajoosam thank you, I will be waiting for any updates from you.
Okay. This is easier to reproduce than I thought. Basically it's like this:
pync
and pyinstaller
.main.py
:# coding: utf-8
import time
import pync
if __name__ == '__main__':
pync.notify('Hello World', title='PyInstaller')
time.sleep(3)
pync.notify('About to quit')
time.sleep(1)
pyinstaller -y -w --clean -n PyncPoC --osx-bundle-identifier test.debug.pync_poc main.py
.dist/PyncPoC.app/Contents/MacOS/PyncPoC
.@JokerQyou Thanks, I will try as soon as possible
This would be great if there's a fix or some workaround, any update on this? @maxkrivich @JokerQyou
I kinda found a workaround for this problem by putting the pync folder into my resources folder, which are then bundled into the app.app/Contents/MacOS folder. Because pync is searching for the terminal-notifier.app from the folder its been called (os.path.dirname(file) == /path/to/app.app/Contents/MacOS/pync, this works for me now.
self.app_path = os.path.join(
os.path.dirname(__file__),
"vendor/terminal-notifier-%s/terminal-notifier.app" % self.TERMINAL_NOTIFIER_VERSION
)
self.bin_path = os.path.join(self.app_path, "Contents/MacOS/terminal-notifier")
So in the resulting app bundle the terminal-notifier.app should be found in /path/to/app.app/Contents/MacOS/pync/vendor/terminal-notifier-2.0.0/terminal-notifier.app.
Hi SeTeM! First of all thanks for providing this python binding of Terminal-Notifier. I found it failed within a PyInstaller bundled
.app
folder. And as I could not ask every end user to install terminal-notifier, I decide to pack thevendor
folder into the.app
bundle. But that leaded to another problem: the path ofvendor
folder was coded as the same level ofTerminalNotifier.py
file, yetTerminalNotifier.py
would be bundled into a.pyz
archive file. If this could be solved I'd be very much appreciated.