langdetect icon indicating copy to clipboard operation
langdetect copied to clipboard

Add support for PyInstaller

Open martingull opened this issue 7 years ago • 2 comments

Define MESSAGE_FILENAME in the following way to support exe file creation. Add to messages.py

class Messages(object):

if getattr(sys, 'frozen', False):
    # If the application is run as a bundle, the pyInstaller bootloader
    # extends the sys module by a flag frozen=True and sets the app path into variable _MEIPASS'.
    MESSAGES_FILENAME = path.join(sys._MEIPASS, 'messages.properties')
else:
    MESSAGES_FILENAME = path.join(path.dirname(__file__), 'messages.properties')

martingull avatar Dec 18 '17 16:12 martingull

This seems to be part of the problem. However, pyInstaller ignores the binaries, so those needs to be added manually

martingull avatar Jan 17 '18 07:01 martingull

I've got the same problem. Do you solved it somehow? @martingull

freakaton avatar Aug 27 '18 14:08 freakaton