Giter Site home page Giter Site logo

fbs-tutorial's People

Contributors

bhandeland avatar jbest avatar mherrmann avatar serkandyck avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fbs-tutorial's Issues

How to set icon to installer?

I am developing an app on windows.
I am already check the tutorial of fbs.
But I still don't know how to set my own icon to app installer.

Thanks

Question: support multiple applications out of the box?

I'm sometimes a little confused on whether to set up an issue in fbs or here, in fbs-tutorial... ๐Ÿ˜‰ but here goes...

So I'm dabbling with setting up "secondary" applications such as a cmdline.exe next to my main Tutorial.exe. Right now, I need to use a custom build.py script to have this secondary application become frozen.
-- By the way; Perhaps it's unwise to refer to such applications as "secondary", as their functionality may be essential to the primary application.

@mherrmann do you think it would be worthwile to support multiple applications out of the box?
I'm thinking being able to specify which one to run on python -m fbs run, freeze all of them on python -m fbs freeze and so on.

I love the simplicity and straight-forwardness of fbs-tutorial. This type of change would imply you need to put apps inside of a folder for the macOS installer and some other changes... which may (or may not) make the whole approach of fbs slightly more complex (and hopefully not unreliable). I totally respect and understand if you feel that catering to use cases like this would make the code (or reliability) unnecessarily complex, even if I personally believe that being able to bundle more than one application isn't really such an edge case.

It's just a thought, would be interested to hear what you think about it. ๐Ÿ˜„

Using Qt.py instead of PyQt5 import

Hi again!

When I freeze my fbs-tutorial, it works great -- even when I use PySide2. ๐Ÿ˜„

However, I would like to actually use Qt.py in my source code, and then let Qt.py decide whether to pick up PySide2, PyQt5 or any other binding available. I realize this doesn't make sense in most use cases when producing a standalone app, but in my case, I wish some of my code base to be shared among different applications (including the case where the code is being executed in a PySide(1) environment).

When I use from Qt import QtWidgets in application_context.py, I can successfully python -m fbs run and python -m fbs freeze, but when I try to run my standalone app, it b0rks with the following and exits:

image

I am aware of that the issue is most likely on the Qt.py end (and/or possibly with PyInstaller) and perhaps not so much with fbs, but I'm trying to figure out what I could possibly do to fix this -- and so I'm posting this issue to just see if you have any ideas on where I should start looking for clues...

I've switched the fbs freeze/PyInstaller log level to INFO but the logs are identical when I freeze with PySide2 and with Qt.py. I've then moved on to check the target/PyInstaller/Tutorial/warnTutorial.txt but it doesn't say anything useful in terms of being unable to pick something specific up which seems related to my issue.

When I watch the target/Tutorial folder being built, I can see that the PyQt5 DLLs are being put there successfully, just like when using PyQt5 (and not Qt.py).

pyinstaller not found when freeze

I have pip install all the requirements and even pip install pyinstaller alone one more time just to make sure it is installed.
I did python3.5 -m pip install pyinstaller, it gives:

Requirement already satisfied: pyinstaller in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (3.3.1) Requirement already satisfied: setuptools in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from pyinstaller) (20.10.1) Requirement already satisfied: pefile>=2017.8.1 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from pyinstaller) (2017.11.5) Requirement already satisfied: macholib>=1.8 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from pyinstaller) (1.9) Requirement already satisfied: future in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from pefile>=2017.8.1->pyinstaller) (0.16.0) Requirement already satisfied: altgraph>=0.15 in /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages (from macholib>=1.8->pyinstaller) (0.15)

but when I do python3.5 -m fbs freeze
it raised the following error:
Traceback (most recent call last): File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 184, in _run_module_as_main "__main__", mod_spec) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 85, in _run_code exec(code, run_globals) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/fbs/__main__.py", line 4, in <module> main() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/fbs/cmdline.py", line 17, in main args.cmd() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/fbs/builtin_commands.py", line 38, in freeze freeze_mac() File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/fbs/freeze/mac.py", line 24, in freeze_mac run_pyinstaller(extra_args=pyinstaller_args + extra_pyinstaller_args) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/fbs/freeze/__init__.py", line 21, in run_pyinstaller run(cmdline, check=True) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 693, in run with Popen(*popenargs, **kwargs) as process: File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 947, in __init__ restore_signals, start_new_session) File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/subprocess.py", line 1551, in _execute_child raise child_exception_type(errno_num, err_msg) FileNotFoundError: [Errno 2] No such file or directory: 'pyinstaller'

Migrate existing project from fbs<0.2.0

I have an exising project using fbs.

I recently tried updating the requirements, and noticed that it fails to build for fbs version >= 0.2.0:

(venv) jzernik@jonathans-mbp:~/work/squeakclient $ python -m fbs freeze
Traceback (most recent call last):
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/Users/jzernik/work/squeakclient/venv/lib/python3.6/site-packages/fbs/__main__.py", line 4, in <module>
    main()
  File "/Users/jzernik/work/squeakclient/venv/lib/python3.6/site-packages/fbs/cmdline.py", line 26, in main
    args.fn(*fn_args)
  File "/Users/jzernik/work/squeakclient/venv/lib/python3.6/site-packages/fbs/builtin_commands/__init__.py", line 93, in freeze
    freeze_mac(debug=debug)
  File "/Users/jzernik/work/squeakclient/venv/lib/python3.6/site-packages/fbs/freeze/mac.py", line 27, in freeze_mac
    _generate_resources()
  File "/Users/jzernik/work/squeakclient/venv/lib/python3.6/site-packages/fbs/freeze/__init__.py", line 49, in _generate_resources
    _copy(path_fn, 'src/main/resources/' + profile, resources_dest_dir)
  File "/Users/jzernik/work/squeakclient/venv/lib/python3.6/site-packages/fbs/resources.py", line 99, in _copy
    copy_with_filtering(src, dst, files_to_filter=filter_)
  File "/Users/jzernik/work/squeakclient/venv/lib/python3.6/site-packages/fbs/resources.py", line 29, in copy_with_filtering
    if files_to_filter is None or src in to_filter:
  File "/Users/jzernik/work/squeakclient/venv/lib/python3.6/site-packages/fbs/resources.py", line 91, in __contains__
    if p.samefile(item) or p in item.parents:
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pathlib.py", line 1066, in samefile
    st = self.stat()
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pathlib.py", line 1156, in stat
    return self._accessor.stat(self)
  File "/usr/local/Cellar/python/3.6.5/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pathlib.py", line 387, in wrapped
    return strfunc(str(pathobj), *args)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/jzernik/work/squeakclient/src/freeze/mac/Contents/Info.plist'

Is there any guide for migrating an existing project to latest fbs version?

fbs freeze error: FileNotFoundError: Could not find msvcr110.dll on your PATH.

Hi,
I've being using fbs with python 3.6 to create an executable. After running the command fbs freeze this error came out to me. Even if I have installed Visual C++ Redistributable for Visual Studio 2012, the same result persists.
If someone could help me it would be really nice. Thanks you

Traceback (most recent call last):
File "C:\Users\SZ\PycharmProjects\fbs project\venv\Scripts\fbs-script.py", line 11, in
load_entry_point('fbs==0.8.6', 'console_scripts', 'fbs')()
File "C:\Users\SZ\PycharmProjects\fbs project\venv\lib\site-packages\fbs_main_.py", line 17, in main
fbs.cmdline.main()
File "C:\Users\SZ\PycharmProjects\fbs project\venv\lib\site-packages\fbs\cmdline.py", line 32, in main
fn(*args)
File "C:\Users\SZ\PycharmProjects\fbs project\venv\lib\site-packages\fbs\builtin_commands_init
.py", line 120, in freeze
freeze_windows(debug=debug)
File "C:\Users\SZ\PycharmProjects\fbs project\venv\lib\site-packages\fbs\freeze\windows.py", line 22, in freeze_windows
_add_missing_dlls()
File "C:\Users\SZ\PycharmProjects\fbs project\venv\lib\site-packages\fbs\freeze\windows.py", line 53, in _add_missing_dlls
) from None
FileNotFoundError: Could not find msvcr110.dll on your PATH. Please install the Visual C++ Redistributable for Visual Studio 2012 from:
https://www.microsoft.com/en-us/download/details.aspx?id=30679

https://github.com/mherrmann/fbs/issues

Trying to freeze the tutorial app but stuck at fbs freeze

Dear all,

I am trying to take the tutorial, however I am stuck at fbs freeze, where I get the following error code:

fbs freeze Traceback (most recent call last): File "c:\programdata\anaconda3\envs\fbstut\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\programdata\anaconda3\envs\fbstut\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\ProgramData\Anaconda3\envs\fbstut\Scripts\pyinstaller.exe\__main__.py", line 7, in <module> File "c:\programdata\anaconda3\envs\fbstut\lib\site-packages\PyInstaller\__main__.py", line 111, in run run_build(pyi_config, spec_file, **vars(args)) File "c:\programdata\anaconda3\envs\fbstut\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs) File "c:\programdata\anaconda3\envs\fbstut\lib\site-packages\PyInstaller\building\build_main.py", line 838, in main build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build')) File "c:\programdata\anaconda3\envs\fbstut\lib\site-packages\PyInstaller\building\build_main.py", line 784, in build exec(text, spec_namespace) File "<string>", line 18, in <module> File "c:\programdata\anaconda3\envs\fbstut\lib\site-packages\PyInstaller\building\api.py", line 98, in __init__ self.__postinit__() File "c:\programdata\anaconda3\envs\fbstut\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__ self.assemble() File "c:\programdata\anaconda3\envs\fbstut\lib\site-packages\PyInstaller\building\api.py", line 128, in assemble self.code_dict = { File "c:\programdata\anaconda3\envs\fbstut\lib\site-packages\PyInstaller\building\api.py", line 129, in <dictcomp> key: strip_paths_in_code(code) File "c:\programdata\anaconda3\envs\fbstut\lib\site-packages\PyInstaller\building\utils.py", line 662, in strip_paths_in_code return code_func(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize, TypeError: an integer is required (got type bytes) Traceback (most recent call last): File "c:\programdata\anaconda3\envs\fbstut\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\programdata\anaconda3\envs\fbstut\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\ProgramData\Anaconda3\envs\fbstut\Scripts\fbs.exe\__main__.py", line 7, in <module> File "c:\programdata\anaconda3\envs\fbstut\lib\site-packages\fbs\__main__.py", line 17, in _main fbs.cmdline.main() File "c:\programdata\anaconda3\envs\fbstut\lib\site-packages\fbs\cmdline.py", line 32, in main fn(*args) File "c:\programdata\anaconda3\envs\fbstut\lib\site-packages\fbs\builtin_commands\__init__.py", line 120, in freeze freeze_windows(debug=debug) File "c:\programdata\anaconda3\envs\fbstut\lib\site-packages\fbs\freeze\windows.py", line 18, in freeze_windows run_pyinstaller(args, debug) File "c:\programdata\anaconda3\envs\fbstut\lib\site-packages\fbs\freeze\__init__.py", line 47, in run_pyinstaller run(args, check=True) File "c:\programdata\anaconda3\envs\fbstut\lib\subprocess.py", line 512, in run raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['pyinstaller', '--name', 'TutorialApp', '--noupx', '--log-level', 'ERROR', '--noconfirm', '--windowed', '--icon', 'C:\\WINDOWS\\system32\\src\\main\\icons\\Icon.ico', '--distpath', 'C:\\WINDOWS\\system32\\target', '--specpath', 'C:\\WINDOWS\\system32\\target\\PyInstaller', '--workpath', 'C:\\WINDOWS\\system32\\target\\PyInstaller', '--additional-hooks-dir', 'c:\\programdata\\anaconda3\\envs\\fbstut\\lib\\site-packages\\fbs\\freeze\\hooks', '--runtime-hook', 'C:\\WINDOWS\\system32\\target\\PyInstaller\\fbs_pyinstaller_hook.py', 'C:\\WINDOWS\\system32\\src\\main\\python\\main.py']' returned non-zero exit status 1.

Perhaps it's noteworthy, but I am working on Win 10, and have installed PyQt5==5.12.2 rather than PyQt5==5.9.2

Best,
Robbin

KeyError: 'public_settings'

This is what happened when I executed fbs run:

Traceback (most recent call last):
File "/Users/charleslure/src/main/python/main.py", line 313, in
appctxt = ApplicationContext()
File "/Users/charleslure/src/main/python/fbs_runtime/application_context/init.py", line 31, in init
self.app
File "/Users/charleslure/src/main/python/fbs_runtime/application_context/init.py", line 54, in app
result.setApplicationName(self.build_settings['app_name'])
File "/Users/charleslure/src/main/python/fbs_runtime/application_context/init.py", line 65, in build_settings
return _source.load_build_settings(self._project_dir)
File "/Users/charleslure/src/main/python/fbs_runtime/_source.py", line 37, in load_build_settings
return filter_public_settings(all_settings)
File "/Users/charleslure/src/main/python/fbs_runtime/_fbs.py", line 27, in filter_public_settings
return {k: settings[k] for k in settings['public_settings']}
KeyError: 'public_settings'

It gets solved somehow and I guess I shouldn't use ApplicationContext (imported from fbs_runtime.application_context.PyQt5) after the [ if name == "main": ]. The ApplicationContext is in the file PyQt.py which is in this path: /Users/thisisme/venv/lib/python3.7/site-packages/fbs_runtime/application_context/PyQt5.py

------------------------ update ------------------------

No matter how much you want to use PyCharm, note that the folder /Users/thisisme/venv is only available for fbs, which requires fbs to run the scripts in this path on its own: /Users/thisisme/venv/lib/python3.7/site-packages/fbs_runtime

So, DO NOT copy this folder into the /Users/thisisme/src/main/python3.7. REPEAT: DON'T DO IT

fbs freeze fails with Python 3.5

I get the following message on fbs freeze :

Traceback (most recent call last):
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\runpy.py", line 170, in run_module_as_main
"main", mod_spec)
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\Users\saurabh.prakash\AppData\Local\Programs\Python\Python35\Scripts\pyinstaller.exe_main
.py", line 7, in
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\PyInstaller_main
.py", line 114, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\PyInstaller_main_.py", line 65, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\building\build_main.py", line 734, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\building\build_main.py", line 681, in build
exec(code, spec_namespace)
File "D:\OneDrive - Tally Solutions Pvt. Ltd\desktop\Tracker\target\PyInstaller\Tracker.spec", line 17, in
noarchive=False)
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\building\build_main.py", line 244, in init
self.postinit()
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\building\datastruct.py", line 160, in postinit
self.assemble()
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\building\build_main.py", line 343, in assemble
excludes=self.excludes, user_hook_dirs=self.hookspath)
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\analysis.py", line 734, in initialize_modgraph
user_hook_dirs=user_hook_dirs,
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\analysis.py", line 116, in init
self._reset(user_hook_dirs)
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\analysis.py", line 134, in _reset
self._hooks = self._cache_hooks("")
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\analysis.py", line 215, in _cache_hooks
return ModuleHookCache(self, hook_dirs)
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\imphook.py", line 100, in init
self._cache_hook_dirs(hook_dirs)
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\imphook.py", line 133, in cache_hook_dirs
hook_module_name_prefix=self.hook_module_name_prefix,
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\PyInstaller\depend\imphook.py", line 289, in init
assert self.hook_module_name not in HOOKS_MODULE_NAMES
AssertionError
Traceback (most recent call last):
File "C:\Users\saurabh.prakash\AppData\Local\Programs\Python\Python35\Scripts\fbs-script.py", line 9, in
load_entry_point('fbs==0.8.4', 'console_scripts', 'fbs')()
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\fbs_main
.py", line 17, in main
fbs.cmdline.main()
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\fbs\cmdline.py", line 32, in main
fn(*args)
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\fbs\builtin_commands_init
.py", line 120, in freeze
freeze_windows(debug=debug)
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\fbs\freeze\windows.py", line 18, in freeze_windows
run_pyinstaller(args, debug)
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\fbs\freeze_init
.py", line 47, in run_pyinstaller
run(args, check=True)
File "c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\subprocess.py", line 711, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['pyinstaller', '--name', 'Tracker', '--noupx', '--log-level', 'ERROR', '--noconfirm', '--windowed', '--icon', 'D:\OneDrive - Tally Solutions Pvt. Ltd\desktop\Tracker\src\main\icons\Icon.ico', '--distpath', 'D:\OneDrive - Tally Solutions Pvt. Ltd\desktop\Tracker\target', '--specpath', 'D:\OneDrive - Tally Solutions Pvt. Ltd\desktop\Tracker\target\PyInstaller', '--workpath', 'D:\OneDrive - Tally Solutions Pvt. Ltd\desktop\Tracker\target\PyInstaller', '--additional-hooks-dir', 'c:\users\saurabh.prakash\appdata\local\programs\python\python35\lib\site-packages\fbs\freeze\hooks', '--runtime-hook', 'D:\OneDrive - Tally Solutions Pvt. Ltd\desktop\Tracker\target\PyInstaller\fbs_pyinstaller_hook.py', 'D:\OneDrive - Tally Solutions Pvt. Ltd\desktop\Tracker\src\main\python\main.py']' returned non-zero exit status 1

FBS Freeze fail on Windows with Python3.8

FBS Freeze on Windows with Python 3.8 fails. Here is the stack trace.

Traceback (most recent call last):
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\runpy.py", line 193, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python38\Scripts\pyinstaller.exe\__main__.py", line 9, in <module>
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\__main__.py", line 111, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\build_main.py", line 838, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\build_main.py", line 784, in build
    exec(text, spec_namespace)
  File "<string>", line 18, in <module>
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\api.py", line 98, in __init__
    self.__postinit__()
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
    self.assemble()
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\api.py", line 128, in assemble
    self.code_dict = {
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\api.py", line 129, in <dictcomp>
    key: strip_paths_in_code(code)
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\utils.py", line 654, in strip_paths_in_code
    consts = tuple(
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\utils.py", line 655, in <genexpr>
    strip_paths_in_code(const_co, new_filename)
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\site-packages\PyInstaller\building\utils.py", line 662, in strip_paths_in_code
    return code_func(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize,
TypeError: an integer is required (got type bytes)
Traceback (most recent call last):
  File "C:\Users\xxxx\AppData\Local\Programs\Python\Python38\Scripts\fbs-script.py", line 11, in <module>
    load_entry_point('fbs==0.9.0', 'console_scripts', 'fbs')()
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\site-packages\fbs\__main__.py", line 17, in _main
    fbs.cmdline.main()
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\site-packages\fbs\cmdline.py", line 32, in main
    fn(*args)
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\site-packages\fbs\builtin_commands\__init__.py", line 120, in freeze
    freeze_windows(debug=debug)
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\site-packages\fbs\freeze\windows.py", line 18, in freeze_windows
    run_pyinstaller(args, debug)
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\site-packages\fbs\freeze\__init__.py", line 48, in run_pyinstaller
    run(args, check=True)
  File "c:\users\xxxx\appdata\local\programs\python\python38\lib\subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['pyinstaller', '--name', 'My Project', '--noupx', '--log-level', 'ERROR', '--noconfirm', '--windowed', '--icon', 'E:\\project-case\\src\\main\\icons\\Icon.ico', '--distpath', 'E:\\project-case\\target', '--specpath', 'E:\\project-case\\target\\PyInstaller', '--workpath', 'E:\\project-case\\target\\PyInstaller', '--additional-hooks-dir', 'c:\\users\\xxxx\\appdata\\local\\programs\\python\\python38\\lib\\site-packages\\fbs\\freeze\\hooks', '--runtime-hook', 'E:\\project-case\\target\\PyInstaller\\fbs_pyinstaller_hook.py', 'E:\\project-case\\src\\main\\python\\main.py']' returned non-zero exit status 1.

Organizing parts of a large application

Hi again @mherrmann!

In src/main/python, it seems like the intention is we can add multiple folders here in case our application is made out of multiple packages/parts. I've noticed that the tutorial example can import anything which resides here (very nice!) when running using python -m fbs run.

For example, I've got an application I'm experimenting with, which I might want to "fbs-ify" which is separated into many parts. Trying to simplify, here's an example of what my app could be made out of:

  1. Base app UI
  2. Models and modules (callable from UI or headlessly)
  3. Sub-apps (QMainWindow or QWidget based Python MVC-style UIs launched from the base UI)

I'm thinking I could organize them in fbs by placing each "part" in a subfolder under src/main/python, as they could then be imported via a simple "import part" statement. However, I'm noticing that they won't get included in the app bundle when freezing (on Windows).

To make a frozen app work, I have to place a copy of everything in the "resources" folder prior to the freeze, and it will successfully get bundled with the standalone app. So I'm starting to wonder how I should plan the file structure when using fbs... I don't want to put the same file in two locations so to speak.

What would you advise I do here?

My goal is to be able to have the standalone fbs application be able to import a certain module, but also allow for a headless way of importing the same module (meaning using Python).

EDIT: A very simple example is to just add an extrafile.py next to the tutorial's main.py and import this file in main.py. This will work fine with python -m fbs run but the extrafile.py file will not be included with the standalone app when performing a python -m fbs run, and thus the standalone app will crash.

Codesigning and Notarizing fbs built .app bundles

I have been working on notarizing a fbs generated .app bundle. I know fbs currently does not support code signing and notarization, but I would be happy to post what I've learned; and various steps and fixes along the way if it would help integrate these features at some point. I currently have my application codesigned, and am working on the notarization process.

I'm not sure where the appropriate place to put that information would be; hence opening the issue and seeing what you would prefer.

Thanks again for making this awesome package.

I have an issue deploying a tensorflow contained exe

Fbs is working properly, and python -m fbs run is also working for my main script, but when I freeze the model , there are many warnings and when I run the exe file in target then it shows failed to execute script main

I am having the following error


87082 WARNING: lib not found: lib_blas_su.2UNBVF3XUJ6LXUE74AWX6SW54UVZEM5P.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\linalg\cython_lapack.cp36-win_amd64.pyd
87146 WARNING: lib not found: lib_blas_su.2UNBVF3XUJ6LXUE74AWX6SW54UVZEM5P.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\linalg\cython_blas.cp36-win_amd64.pyd
87257 WARNING: lib not found: libnnls.IXEEHJUCGHJL42YZEM6UIEMROJWXHMLJ.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\optimize_nnls.cp36-win_amd64.pyd
87306 WARNING: lib not found: libslsqp_op.NNY57ZXZ43A4RH3YWFA7BKHP5PC2K3I5.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\optimize_slsqp.cp36-win_amd64.pyd
87370 WARNING: lib not found: libchkder.6HLXPVTQJEGRZGLI5DFRMNW3SS76BHP6.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\optimize_minpack.cp36-win_amd64.pyd
87434 WARNING: lib not found: libcobyla2.JEGTSUUFJ7DFXWZN5PAYZTTLBDATC4WD.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\optimize_cobyla.cp36-win_amd64.pyd
87498 WARNING: lib not found: liblbfgsb.LTROWG5MXPUSP7N2YCW3QUHJE37DB7K5.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\optimize_lbfgsb.cp36-win_amd64.pyd
87549 WARNING: lib not found: libdcsrch.I2AOPDCXAPDRFNPWY55H5UE7XZSU5CVN.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\optimize\minpack2.cp36-win_amd64.pyd
87634 WARNING: lib not found: lib_arpack-.ZSFN7AZ4NRWSAUZTEZLC7L2IVIRDDNFR.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\sparse\linalg\eigen\arpack_arpack.cp36-win_amd64.pyd
87734 WARNING: lib not found: libgetbreak.WYF32CNQCVMHFKRVSHNE3EGBPQL7SWIB.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\sparse\linalg\isolve_iterative.cp36-win_amd64.pyd
88283 WARNING: lib not found: libdfitpack.KTCF3EOE66VRDKN45KBQA4VBAIS552IF.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\interpolate\dfitpack.cp36-win_amd64.pyd
88336 WARNING: lib not found: libbispeu.5N2XSD7URZS4WTOSLTOG4DDMA4HGB46U.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\interpolate_fitpack.cp36-win_amd64.pyd
88384 WARNING: lib not found: libblkdta00.EBMXOKVWTYK6NSUJLSZFNQ6CEWS6SU3V.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\integrate\lsoda.cp36-win_amd64.pyd
88432 WARNING: lib not found: libdop853.6TJTQZW3I3Q3QIDQHEOBEZKJ3NYRXI4B.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\integrate_dop.cp36-win_amd64.pyd
88480 WARNING: lib not found: libvode.M2PR7ET5DWOC2TSRZM44MAX2MG4YDRX3.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\integrate\vode.cp36-win_amd64.pyd
88528 WARNING: lib not found: libdqag.JBSUT27DU6KSWWLH5EAFVANLG5T4CPYH.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\integrate_quadpack.cp36-win_amd64.pyd
88592 WARNING: lib not found: libblkdta00.EBMXOKVWTYK6NSUJLSZFNQ6CEWS6SU3V.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\integrate_odepack.cp36-win_amd64.pyd
88653 WARNING: lib not found: libspecfun.BHLTWMBI4EYWDACZN4DQUESSDJRJNGEL.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\special\specfun.cp36-win_amd64.pyd
88704 WARNING: lib not found: libdgamln.D35ZEOCATK4OZQSX5UEWEF62EM2ECCPX.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\special_ufuncs.cp36-win_amd64.pyd
88772 WARNING: lib not found: libdet.YKP4TFVQQVNWGO5ZEH7E6CRNLZ42FK5D.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\linalg_flinalg.cp36-win_amd64.pyd
88836 WARNING: lib not found: libwrap_dum.CLCNYV3KUDVQF2VOOGW7JOOKWHJ2FDXT.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\linalg_flapack.cp36-win_amd64.pyd
88899 WARNING: lib not found: libwrap_dum.ASTX55GIE5U6BF4YKSWUU6TBMWRPJ2I4.gfortran-win_amd64.dll dependency of e:\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\scipy\linalg_fblas.cp36-win_amd64.pyd

fbs freeze failed

"Ubuntu 20.04, python 3.6 in venv"

Traceback (most recent call last):
File "/home/umang/Desktop/repos/Venv/bin/fbs", line 8, in
sys.exit(_main())
File "/home/umang/Desktop/repos/Venv/lib/python3.6/site-packages/fbs/main.py", line 17, in _main
fbs.cmdline.main()
File "/home/umang/Desktop/repos/Venv/lib/python3.6/site-packages/fbs/cmdline.py", line 32, in main
fn(*args)
File "/home/umang/Desktop/repos/Venv/lib/python3.6/site-packages/fbs/builtin_commands/init.py", line 125, in freeze
freeze_ubuntu(debug=debug)
File "/home/umang/Desktop/repos/Venv/lib/python3.6/site-packages/fbs/freeze/ubuntu.py", line 4, in freeze_ubuntu
freeze_linux(debug)
File "/home/umang/Desktop/repos/Venv/lib/python3.6/site-packages/fbs/freeze/linux.py", line 8, in freeze_linux
run_pyinstaller(debug=debug)
File "/home/umang/Desktop/repos/Venv/lib/python3.6/site-packages/fbs/freeze/init.py", line 48, in run_pyinstaller
run(args, check=True)
File "/usr/lib/python3.6/subprocess.py", line 438, in run
output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['pyinstaller', '--name', 'Awesome', '--noupx', '--log-level', 'ERROR', '--noconfirm', '--distpath', '/home/umang/Desktop/repos/Venv/target', '--specpath', '/home/umang/Desktop/repos/Venv/target/PyInstaller', '--workpath', '/home/umang/Desktop/repos/Venv/target/PyInstaller', '--additional-hooks-dir', '/home/umang/Desktop/repos/Venv/lib/python3.6/site-packages/fbs/freeze/hooks', '--runtime-hook', '/home/umang/Desktop/repos/Venv/target/PyInstaller/fbs_pyinstaller_hook.py', '/home/umang/Desktop/repos/Venv/src/main/python/main.py']' returned non-zero exit status 1.

Your Bundle ID is Empty - FBS startproject error

Bug: Your Bundle ID is empty.
I checked Apple Developer Center and I installed each of my certificates in the right way.
This bug happened during the fbs startproject
and I checked the plist.info and tried everything I googled.

During fbs startproject
Add ID Bundle was asked and I provided it correctly.
I guess it's because this id was not added to the app.

readme.md // download link outdated

The download link in the readme.md seems to be incorrect/outdated. In this zip, there is no requirements.txt, no src folder, just a plain main.py. I guess this is not intended and should rather point to the current version of the tutorial? I don't know how to link to the latest version without releases, elsewise I would change it directly.

...
on second thought, the whole tutorial seems to be outdated and non-functional? requirements.txt requires fbs==0.1.0 instead of 0.9.0? main.py inside main/python/tutorial imports tutorial.application_context, so it should rather be in main/python...? I am confused.

Problem with Tensorflow and PyTorch packaging with FBS

I am trying to build a binary executable file out of my trained neural network which used either Tensorflow or Pytorch.

But FBS fails to build a package around it and it can not fit the trained model file in .pth format for instance for PyTorch into the .DEB file.

PySide2 example

Is it possible to add an pyside2 example or add a reference of any pyside2 project that uses fbs ?

fbs freeze fails

with this error:

(venv) E:\DEV\facecontroller\fbs-tutorial>fbs freeze
Traceback (most recent call last):
  File "E:\DEV\facecontroller\fbs-tutorial\venv\Scripts\pyinstaller-script.py", line 11, in <module>
    load_entry_point('PyInstaller==3.4', 'console_scripts', 'pyinstaller')()
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\PyInstaller\__main__.py", line 111, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\PyInstaller\building\build_main.py", line 838, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\PyInstaller\building\build_main.py", line 784, in build
    exec(text, spec_namespace)
  File "<string>", line 29, in <module>
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\PyInstaller\building\api.py", line 424, in __init__
    strip_binaries=self.strip, upx_binaries=self.upx,
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\PyInstaller\building\api.py", line 196, in __init__
    self.__postinit__()
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
    self.assemble()
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\PyInstaller\building\api.py", line 273, in assemble
    pylib_name = os.path.basename(bindepend.get_python_library_path())
  File "C:\Users\blury\AppData\Local\Programs\Python\Python37\lib\ntpath.py", line 214, in basename
    return split(p)[1]
  File "C:\Users\blury\AppData\Local\Programs\Python\Python37\lib\ntpath.py", line 183, in split
    p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Traceback (most recent call last):
  File "E:\DEV\facecontroller\fbs-tutorial\venv\Scripts\fbs-script.py", line 11, in <module>
    load_entry_point('fbs==0.6.1', 'console_scripts', 'fbs')()
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\fbs\__main__.py", line 17, in _main
    fbs.cmdline.main()
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\fbs\cmdline.py", line 31, in main
    fn(*args)
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\fbs\builtin_commands\__init__.py", line 113, in freeze
    freeze_windows(debug=debug)
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\fbs\freeze\windows.py", line 18, in freeze_windows
    run_pyinstaller(args, debug)
  File "e:\dev\facecontroller\fbs-tutorial\venv\lib\site-packages\fbs\freeze\__init__.py", line 43, in run_pyinstaller
    run(args, check=True)
  File "C:\Users\blury\AppData\Local\Programs\Python\Python37\lib\subprocess.py", line 487, in run
    output=stdout, stderr=stderr)
subprocess.CalledProcessError: Command '['pyinstaller', '--name', 'faceController', '--noupx', '--log-level', 'ERROR', '--noconfirm', '--windowed', '--icon', 'E:\\DEV\\facecontroller\\fbs-tutorial\\src\\main\\icons\\Icon.ico', '--distpath', 'E:\\DEV\\facecontroller\\fbs-tutorial\\target', '--specpath', 'E:\\DEV\\facecontroller\\fbs-tutorial\\target\\PyInstaller', '--workpath', 'E:\\DEV\\facecontroller\\fbs-tutorial\\target\\PyInstaller', 'E:\\DEV\\facecontroller\\fbs-tutorial\\src\\main\\python\\main.py', '--runtime-hook', 'C:\\Users\\blury\\AppData\\Local\\Temp\\tmp5zr3d8w3\\fbs_pyinstaller_hook.py']' returned non-zero exit status 1.

windows doc yupdate

On a fresh installation of windows 7 on virtual box, I did 2 things more not explained in your tutorial.

fbs freeze 
==> ImportError: No module named win32com.client
pip install pypiwin32    

fbs freeze  
===> MSVCR100.dll is missing, Install Visual C++ Visual Studio 2012
https://www.microsoft.com/en-us/download/confirmation.aspx?id=30679    

fbs freeze  
===> Works ! 

two minor improvements

  • would be good to note beforehand you need to install pip install wheel.
  • same goes for ruby, ruby-gem and npm. I had to install it system-wide - actually would be nice to have this installed locally only!

Thanks, otherwise great tut!

AppImage Support for Linux

There is no support for Linux when creating an installer. If you have a DMG installer for MacOS it might be easy to create an AppImage for Linux as well.

Freeze fails with Python3.6

I know you said only Python3.5 is supported but I just wanted to let you know that I tried on Windows with Python3.6 and got this error.

15268 WARNING: lib not found: api-ms-win-crt-heap-l1-1-0.dll dependency of c:\users\cody\downloads\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\PyQt5\Qt\bin\MSVCP140.dll
Traceback (most recent call last):
  File "C:\Users\Cody\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 193, in _run_module_as_main
    "__main__", mod_spec)
  File "C:\Users\Cody\AppData\Local\Programs\Python\Python36\lib\runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "C:\Users\Cody\Downloads\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\fbs\__main__.py", line 4, in <module>
    main()
  File "C:\Users\Cody\Downloads\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\fbs\__init__.py", line 20, in main
    args.cmd()
  File "C:\Users\Cody\Downloads\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\fbs\__init__.py", line 56, in freeze
    freeze_windows()
  File "C:\Users\Cody\Downloads\fbs-tutorial-master\fbs-tutorial-master\venv\lib\site-packages\fbs\freeze\windows.py", line 22, in freeze_windows
    remove(path('target/App.app/' + dll_name))
FileNotFoundError: [WinError 2] The system cannot find the file specified: 'C:\\Users\\Cody\\Downloads\\fbs-tutorial-master\\fbs-tutorial-master\\target\\App.app\\python35.dll'

Frozen App Crushes: No module named 'fbs_runtime' & images not included during fbs run & .ini QSettings dead

MacOS 10.15.5
PyQt 5.14.0
PyCharm 2019.3.4

Everything was absolutely fine BUT:

When I execute fbs run, the app is abnormal:
1, the QSetting files in .ini format won't work (the GUI won't interactive with it)
2, the DB files acted in the same way
3, the images of my app failed to load

When the app is frozen:
1, app crushes when clicked;
2, when running the app in the terminal:
ModuleNotFoundError: No module named 'fbs_runtime'
[7046] Failed to execute script fbs_pyinstaller_hook
logout

------------- Update -------------

Follow the link below and this issue can be solved. (But the .ini file issues are not included)
Make sure all your resources (such as .db files, images, etc...but not necessarily including the .py files you created and imported) are copied into the path: src/main/resources/base, instead of any other paths! No matter whether your resources are single files or files in folders.
Just one thing: I wish that fbs can not only locate resources, but also folders. But this small issue can be avoided while programming. It just makes the processing of using .ini files related to GUI a little bit time consuming.

Do you consider providing a GUI App so that things can be even easier?
I do consider giving it a try when I'm free.

https://stackoverflow.com/questions/61311076/deploying-pyqt5-using-fbs-with-a-sqlite-database

------------- Update -------------

Still working on the .ini files. Hope they can work normally.

Guidance for Properly Logging

It would be good if the tutorial provided some guidance on how to setup logging, especially for macOS, where the logger FileHandler only takes relative paths, and thus attempts to write in a read-only portion of the app bundle.

On Linux, the logging.handlers.FileHandler appeared to work fine (wrote to the user home directory if I remember right), I have not tested on Windows.

Thanks for the awesome package!

Login screen before actually starting main application?

If the main application requires a login/authorization phase, and I wish to show this before actually showing my main application, what would you advise I do?

Should I call a modal dialog window from my application_context.py's run function which would stop and wait for a successful logon before continuing with showing the main application?

Uninstaller

Please only use this issue tracker for problems with the tutorial.
For help with fbs in general, please use:

https://github.com/mherrmann/fbs/issues

I've accidentally install the installer on a wrong dir, and when i uninstall it, it delete all of the file in the dir.
Is it how it should behave?
or i miss something?

failed to execute script main

First of all, thank Mr.mherrmann for fbs library
I have used fbs to make an installer pyqt5 but file .exe not working (fbs run is worked)
no import error found when i run fbs clean and fbs freeze --debug, I don't know how to fix this ...

Screenshot from 2019-08-17 23-33-28

here is all pakage I used:

  • altgraph==0.16.1
  • APScheduler==3.6.1
  • fbs==0.8.3
  • future==0.17.1
  • macholib==1.11
  • numpy==1.17.0
  • pefile==2019.4.18
  • PyInstaller==3.4
  • PyQt5==5.9.2
  • pytz==2019.2
  • pywin32==224
  • pywin32-ctypes==0.2.0
  • sip==4.19.8
  • six==1.12.0
  • tzlocal==2.0.0
    environment: venv , window10, Pycharm
    Thank for reading!

Please only use this issue tracker for problems with the tutorial.
For help with fbs in general, please use:

https://github.com/mherrmann/fbs/issues

FileNotFoundError: [Errno 2] Could not locate resource

HI I am new to fbs and PyQt
It is very nice tool to generate the executable. I like this very much, Very thankful to your time and effort

I placed the UI file in path "src/main/icons/resources/test.ui"

and call UI in code like
appctxt.get_resource("resources/test.ui")

while I run fbs run, it executes like a charm.
After I create the installer I got the error like
FileNotFoundError: [Errno 2] Could not locate resource

FileNotFoundError: [Errno 2] Could not locate resource: 'resources/test.ui'
[26071] Failed to execute script main

The installer does not consider those files while generating the execution. is i need to mention those files? please guide me

PyQt 5.9.2 appears broken

When running pip install PyQt5==5.9.2 I receive the error

ERROR: Could not find a version that satisfies the requirement sip<4.20,>=4.19.4 (from PyQt5==5.9.2) (from versions: 5.0.0, 5.0.1, 5.1.0, 5.1.1, 5.1.2, 5.2.0, 5.3.0, 5.4.0, 5.5.0)
ERROR: No matching distribution found for sip<4.20,>=4.19.4 (from PyQt5==5.9.2)

failed to execute script fbs_pyinstaller _ hook

Hello, I have just tried fbs today, then I try to compile .py (pyqt5) to .exe with fbs, when I run command fbs run everything work ok but when I clicked to .exe app it throws this error. What happend here ? How I can fix this?
os: Windows 10
Thank for reading!
Screenshot from 2019-08-02 07-40-41
Please only use this issue tracker for problems with the tutorial.
For help with fbs in general, please use:

https://github.com/mherrmann/fbs/issues

Your App's Bundle ID is Empty

System: MacOS 0.15.5

Everything was okay but...oops

I followed every step according to the Apple Developer's website
Created an App ID, installed certificates and everything
But When I used Transporter to upload the .apk file it shows this:

Your App's Bundle ID is Empty

If I use Application Loader instead, the error is:

You must supply a CFBundleIdentifier for this request.

I googled it and checked the info.plist.
Bundle OS Type code's key and value are both alright...
Strange thing is, even the .spec file has made everything correct about bundle id.

Hmm could you tell what is going on?
Do I have to re-install or recreate an App ID or re-project it?

@mherrmann One more step and I can upload my app! THANK YOU!!!!!!!!!!

fbs installer failed on mac

Hello, can't finish creating the application. Command fbs run works. Any idea what should I do?
python 3.6.5
PyInstaller==3.4
PyQt5==5.15.2

fbs installer
hdiutil: detach failed - No such file or directory

When trying to do it manually I see more details but not much

created: /../target/rw.Name.dmg
Mounting disk image...
Unmounting disk image...
hdiutil: detach failed - No such file or directory

fbs run (and freeze) fails with anaconda

Hi,

On my windows installation I use anaconda with python3.6 for my GUI, which fails when trying to run fbs run, and subsequently when trying to run fbs freeze. The error messages are:
fbs run:
Traceback (most recent call last): File "c:\users\wouter\anaconda3\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\wouter\anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\Wouter\Anaconda3\Scripts\fbs.exe\__main__.py", line 9, in <module> File "c:\users\wouter\anaconda3\lib\site-packages\fbs\__main__.py", line 17, in _main fbs.cmdline.main() File "c:\users\wouter\anaconda3\lib\site-packages\fbs\cmdline.py", line 32, in main fn(*args) File "c:\users\wouter\anaconda3\lib\site-packages\fbs\builtin_commands\__init__.py", line 93, in run subprocess.run([sys.executable, path(SETTINGS['main_module'])], env=env) KeyError: 'main_module'

fbs freeze:
Traceback (most recent call last): File "c:\users\wouter\anaconda3\lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\wouter\anaconda3\lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\Users\Wouter\Anaconda3\Scripts\fbs.exe\__main__.py", line 9, in <module> File "c:\users\wouter\anaconda3\lib\site-packages\fbs\__main__.py", line 17, in _main fbs.cmdline.main() File "c:\users\wouter\anaconda3\lib\site-packages\fbs\cmdline.py", line 32, in main fn(*args) File "c:\users\wouter\anaconda3\lib\site-packages\fbs\builtin_commands\__init__.py", line 108, in freeze app_name = SETTINGS['app_name'] KeyError: 'app_name'

I had some issues with Anaconda before, with a missing python3.dll file, but that is resolved now. I cannot use a different python version, and I highly prefer to use anaconda since it makes the installation of cartopy easier, which I need. Do you have a suggestion on how to proceed?

Kind regards

Can't get fbs installer to work

Whilst following the tutorial I encounter the following error on the last step (fbs installer):

(venv) MacBook-Pro-AVL:test Alex$ fbs installer
hdiutil: resize: failed. Invalid argument (22)
Traceback (most recent call last):
  File "/Users/Alex/Desktop/GUI_course/test/venv/bin/fbs", line 11, in <module>
    load_entry_point('fbs==0.8.6', 'console_scripts', 'fbs')()
  File "/Users/Alex/Desktop/GUI_course/test/venv/lib/python3.6/site-packages/fbs/__main__.py", line 17, in _main
    fbs.cmdline.main()
  File "/Users/Alex/Desktop/GUI_course/test/venv/lib/python3.6/site-packages/fbs/cmdline.py", line 32, in main
    fn(*args)
  File "/Users/Alex/Desktop/GUI_course/test/venv/lib/python3.6/site-packages/fbs/builtin_commands/__init__.py", line 183, in installer
    create_installer_mac()
  File "/Users/Alex/Desktop/GUI_course/test/venv/lib/python3.6/site-packages/fbs/installer/mac/__init__.py", line 27, in create_installer_mac
    check_call(pdata, stdout=DEVNULL)
  File "/Users/Alex/.pyenv/versions/3.6.7/Python.framework/Versions/3.6/lib/python3.6/subprocess.py", line 291, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['/Users/Alex/Desktop/GUI_course/test/venv/lib/python3.6/site-packages/fbs/installer/mac/create-dmg/create-dmg', '--no-internet-enable', '--volname', 'Tutorial', '--app-drop-link', '170', '10', '--icon', 'Tutorial.app', '0', '10', '/Users/Alex/Desktop/GUI_course/test/target/Tutorial.dmg', '/Users/Alex/Desktop/GUI_course/test/target/Tutorial.app']' returned non-zero exit status 22.**

I'm using Python 3.6.7
macOSX 10.15.3
fbs==0.8.6
PyInstaller==3.4
PyQt5==5.9.2

I tried using other versions of PyQt5 (tried PyQt5==5.14.2) and Python (3.7.1) and I get the same error.

fbs's mailing list

tried to sign up for mail chimp at the end of README.md and failed, yet good luck great project

raise CalledProcessError(retcode, process.args, subprocess.CalledProcessError: Command '['pyinstaller',

Hi,

First of all congratulation for this project. It looks great.

I just found your tool and follow your tutorial. I get an issue with your tutorial code.

My environment is:
conda 4.8.4
python 3.8
PyQt5 5.12.3
Pyinstaller 3.4
Mac OS X Catalina 10.15.6


(base) gbbtz@MacBookgb myapp_0002 % fbs freeze
Traceback (most recent call last):
  File "/Users/gbbtz/opt/anaconda3/bin/pyinstaller", line 8, in <module>
    sys.exit(run())
  File "/Users/gbbtz/opt/anaconda3/lib/python3.8/site-packages/PyInstaller/__main__.py", line 111, in run
    run_build(pyi_config, spec_file, **vars(args))
  File "/Users/gbbtz/opt/anaconda3/lib/python3.8/site-packages/PyInstaller/__main__.py", line 63, in run_build
    PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
  File "/Users/gbbtz/opt/anaconda3/lib/python3.8/site-packages/PyInstaller/building/build_main.py", line 838, in main
    build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
  File "/Users/gbbtz/opt/anaconda3/lib/python3.8/site-packages/PyInstaller/building/build_main.py", line 784, in build
    exec(text, spec_namespace)
  File "<string>", line 18, in <module>
  File "/Users/gbbtz/opt/anaconda3/lib/python3.8/site-packages/PyInstaller/building/api.py", line 98, in __init__
    self.__postinit__()
  File "/Users/gbbtz/opt/anaconda3/lib/python3.8/site-packages/PyInstaller/building/datastruct.py", line 158, in __postinit__
    self.assemble()
  File "/Users/gbbtz/opt/anaconda3/lib/python3.8/site-packages/PyInstaller/building/api.py", line 128, in assemble
    self.code_dict = {
  File "/Users/gbbtz/opt/anaconda3/lib/python3.8/site-packages/PyInstaller/building/api.py", line 129, in <dictcomp>
    key: strip_paths_in_code(code)
  File "/Users/gbbtz/opt/anaconda3/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 654, in strip_paths_in_code
    consts = tuple(
  File "/Users/gbbtz/opt/anaconda3/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 655, in <genexpr>
    strip_paths_in_code(const_co, new_filename)
  File "/Users/gbbtz/opt/anaconda3/lib/python3.8/site-packages/PyInstaller/building/utils.py", line 662, in strip_paths_in_code
    return code_func(co.co_argcount, co.co_kwonlyargcount, co.co_nlocals, co.co_stacksize,
TypeError: an integer is required (got type bytes)
Traceback (most recent call last):
  File "/Users/gbbtz/opt/anaconda3/bin/fbs", line 8, in <module>
    sys.exit(_main())
  File "/Users/gbbtz/opt/anaconda3/lib/python3.8/site-packages/fbs/__main__.py", line 17, in _main
    fbs.cmdline.main()
  File "/Users/gbbtz/opt/anaconda3/lib/python3.8/site-packages/fbs/cmdline.py", line 32, in main
    fn(*args)
  File "/Users/gbbtz/opt/anaconda3/lib/python3.8/site-packages/fbs/builtin_commands/__init__.py", line 114, in freeze
    freeze_mac(debug=debug)
  File "/Users/gbbtz/opt/anaconda3/lib/python3.8/site-packages/fbs/freeze/mac.py", line 22, in freeze_mac
    run_pyinstaller(args, debug)
  File "/Users/gbbtz/opt/anaconda3/lib/python3.8/site-packages/fbs/freeze/__init__.py", line 48, in run_pyinstaller
    run(args, check=True)
  File "/Users/gbbtz/opt/anaconda3/lib/python3.8/subprocess.py", line 512, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['pyinstaller', '--name', 'Mymyapp', '--noupx', '--log-level', 'ERROR', '--noconfirm', '--windowed', '--icon', '/Users/gbbtz/CFF Dropbox/gb Buttez/cff/Python/myapp_0002/target/Icon.icns', '--osx-bundle-identifier', 'com.gb.mymyapp', '--distpath', '/Users/gbbtz/CFF Dropbox/gb Buttez/cff/Python/myapp_0002/target', '--specpath', '/Users/gbbtz/CFF Dropbox/gb Buttez/cff/Python/myapp_0002/target/PyInstaller', '--workpath', '/Users/gbbtz/CFF Dropbox/gb Buttez/cff/Python/myapp_0002/target/PyInstaller', '--additional-hooks-dir', '/Users/gbbtz/opt/anaconda3/lib/python3.8/site-packages/fbs/freeze/hooks', '--runtime-hook', '/Users/gbbtz/CFF Dropbox/gb Buttez/cff/Python/myapp_0002/target/PyInstaller/fbs_pyinstaller_hook.py', '/Users/gbbtz/CFF Dropbox/gb Buttez/cff/Python/myapp_0002/src/main/python/main.py']' returned non-zero exit status 1.


Do you know this issue?

Tutorial fails with Missing DLLs

Trying the tutorial it fails for me on Win10 at python -m fbs freeze. I get a lot of warnings:
15655 WARNING: lib not found: api-ms-win-crt-*
and then a failure with:
FileNotFoundError: [Errno 2] No such file or directory: 'c:\\Windows\\System32\\api-ms-win-crt-multibyte-l1-1-0.dll'

Any suggestions what to look for to fix this?

Structuring main app as submodule

Hello!

The fbs-tutorial is a nice way to explain how fbs works. I'm now thinking about how I can structure my app(s) around fbs-tutorial.

Say I want to develop my app using git. How would I reap the benefits of future fbs-tutorial updates?
Let's say, for example, that I develop my own app as a git submodule of fbs-tutorial (or the other way around; having fbs-tutorial as a submodule of my app).

Today, it feels quite fine to manually track updates to fbs-tutorial, like the recent change where the NSIS settings were moved. But down the line, changes may get harder to track.

Before I propose any suggestions on app layout, @mherrmann what would you recommend?

How to modify NSIS settings?

Where should I modify the NSIS settings used when performing a python -m fbs installer?

For example, I'd like to change the default install path from C:\Program Files (x86)\Tutorial to C:\Program Files\Tutorial, since my Python app is 64-bit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.