Migrate existing project from fbs<0.2.0
yzernik opened this issue · 4 comments
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?
Sorry for the trouble. fbs is still young and I take liberty to still change its API so future generations don't have to live with unnecessary old cruft.
To make this somewhat more bearable, I do my best to explain necessary migrations in the list of releases. I suggest you look at this list and work upwards from 0.2.0.
If you still run into trouble, do let me know. I'm happy to help.
Finally, please report issues at mherrmann/fbs/issues instead of here (the issue tracker of the tutorial).
Oh, and that particular error might have just been fixed by release 0.3.4.
Thank you for the help.
I was able to get it working with just a few changes:
- Remove the "resources_to_filter" field from src/build/settings/mac.json
- Add the "version" field to src/build/settings/base.json
- Add a new src/build/settings/linux.json file
Happy to hear it!
What's squeakclient? :)