{"action":"created","issue":{"url":"https://api.github.com/repos/mherrmann/fbs-tutorial/issues/8","repository_url":"https://api.github.com/repos/mherrmann/fbs-tutorial","labels_url":"https://api.github.com/repos/mherrmann/fbs-tutorial/issues/8/labels{/name}","comments_url":"https://api.github.com/repos/mherrmann/fbs-tutorial/issues/8/comments","events_url":"https://api.github.com/repos/mherrmann/fbs-tutorial/issues/8/events","html_url":"https://github.com/mherrmann/fbs-tutorial/issues/8","id":302332657,"number":8,"title":"Organizing parts of a large application","user":{"login":"fredrikaverpil","id":994357,"avatar_url":"https://avatars2.githubusercontent.com/u/994357?v=4","gravatar_id":"","url":"https://api.github.com/users/fredrikaverpil","html_url":"https://github.com/fredrikaverpil","followers_url":"https://api.github.com/users/fredrikaverpil/followers","following_url":"https://api.github.com/users/fredrikaverpil/following{/other_user}","gists_url":"https://api.github.com/users/fredrikaverpil/gists{/gist_id}","starred_url":"https://api.github.com/users/fredrikaverpil/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fredrikaverpil/subscriptions","organizations_url":"https://api.github.com/users/fredrikaverpil/orgs","repos_url":"https://api.github.com/users/fredrikaverpil/repos","events_url":"https://api.github.com/users/fredrikaverpil/events{/privacy}","received_events_url":"https://api.github.com/users/fredrikaverpil/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-03-05T15:01:00Z","updated_at":"2018-03-08T10:42:00Z","closed_at":null,"author_association":"NONE","body":"Hi again @mherrmann!\r\n\r\nIn `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`.\r\n\r\nFor 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:\r\n1. Base app UI\r\n2. Models and modules (callable from UI or headlessly)\r\n3. Sub-apps (QMainWindow or QWidget based Python MVC-style UIs launched from the base UI)\r\n\r\nI'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).\r\n\r\nTo 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.\r\n\r\nWhat would you advise I do here?\r\n\r\nMy 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).\r\n\r\nEDIT: 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."},"comment":{"url":"https://api.github.com/repos/mherrmann/fbs-tutorial/issues/comments/371450456","html_url":"https://github.com/mherrmann/fbs-tutorial/issues/8#issuecomment-371450456","issue_url":"https://api.github.com/repos/mherrmann/fbs-tutorial/issues/8","id":371450456,"user":{"login":"mherrmann","id":1076393,"avatar_url":"https://avatars0.githubusercontent.com/u/1076393?v=4","gravatar_id":"","url":"https://api.github.com/users/mherrmann","html_url":"https://github.com/mherrmann","followers_url":"https://api.github.com/users/mherrmann/followers","following_url":"https://api.github.com/users/mherrmann/following{/other_user}","gists_url":"https://api.github.com/users/mherrmann/gists{/gist_id}","starred_url":"https://api.github.com/users/mherrmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mherrmann/subscriptions","organizations_url":"https://api.github.com/users/mherrmann/orgs","repos_url":"https://api.github.com/users/mherrmann/repos","events_url":"https://api.github.com/users/mherrmann/events{/privacy}","received_events_url":"https://api.github.com/users/mherrmann/received_events","type":"User","site_admin":false},"created_at":"2018-03-08T10:42:00Z","updated_at":"2018-03-08T10:42:00Z","author_association":"OWNER","body":"> Do you think I could get the cmdline.exe to be built in the gui directory?\r\n\r\nI'm not sure; You could try PyInstaller's `-y` option, but I don't know if that deletes the existing directory first. If it does, I think you'll have to copy the two directories together in a separate step.\r\n\r\n> I'm going to make a public fork out of fbs-tutorial\r\n\r\nSounds good :-)"}}
{"actor":{"display_login":"mherrmann"}}