{"action":"created","issue":{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1193","labels_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1193/labels{/name}","comments_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1193/comments","events_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1193/events","html_url":"https://github.com/pyinstaller/pyinstaller/issues/1193","id":58663903,"number":1193,"title":"PyQt5.4 QtWebEngine with Mac OS app bundle \"Couldn't mmap icudtl.dat\"","user":{"login":"tallforasmurf","id":1137018,"avatar_url":"https://avatars.githubusercontent.com/u/1137018?v=3","gravatar_id":"","url":"https://api.github.com/users/tallforasmurf","html_url":"https://github.com/tallforasmurf","followers_url":"https://api.github.com/users/tallforasmurf/followers","following_url":"https://api.github.com/users/tallforasmurf/following{/other_user}","gists_url":"https://api.github.com/users/tallforasmurf/gists{/gist_id}","starred_url":"https://api.github.com/users/tallforasmurf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tallforasmurf/subscriptions","organizations_url":"https://api.github.com/users/tallforasmurf/orgs","repos_url":"https://api.github.com/users/tallforasmurf/repos","events_url":"https://api.github.com/users/tallforasmurf/events{/privacy}","received_events_url":"https://api.github.com/users/tallforasmurf/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/labels/hooks","name":"hooks","color":"fef2c0"},{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/labels/more%20work","name":"more work","color":"c7def8"},{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/labels/OS%20X","name":"OS X","color":"d4c5f9"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/milestones/11","html_url":"https://github.com/pyinstaller/pyinstaller/milestones/PyInstaller%203.1","labels_url":"https://api.github.com/repos/pyinstaller/pyinstaller/milestones/11/labels","id":1290827,"number":11,"title":"PyInstaller 3.1","description":"* close all feature- and enhancement-requests known at the time 3.0 was released\r\n* clean up the code base (which seams to be necessary after integrating modulegraph)\r\n* update manual and explain better how !PyInstaller works internally.","creator":{"login":"htgoebel","id":784161,"avatar_url":"https://avatars.githubusercontent.com/u/784161?v=3","gravatar_id":"","url":"https://api.github.com/users/htgoebel","html_url":"https://github.com/htgoebel","followers_url":"https://api.github.com/users/htgoebel/followers","following_url":"https://api.github.com/users/htgoebel/following{/other_user}","gists_url":"https://api.github.com/users/htgoebel/gists{/gist_id}","starred_url":"https://api.github.com/users/htgoebel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/htgoebel/subscriptions","organizations_url":"https://api.github.com/users/htgoebel/orgs","repos_url":"https://api.github.com/users/htgoebel/repos","events_url":"https://api.github.com/users/htgoebel/events{/privacy}","received_events_url":"https://api.github.com/users/htgoebel/received_events","type":"User","site_admin":false},"open_issues":86,"closed_issues":3,"state":"open","created_at":"2015-09-04T16:32:45Z","updated_at":"2015-09-25T09:02:27Z","due_on":"2015-12-30T23:00:00Z","closed_at":null},"comments":3,"created_at":"2015-02-23T22:56:38Z","updated_at":"2015-09-25T09:02:27Z","closed_at":null,"body":"I have been trying to build a PyQt5.4 app that uses the new QtWebEngine browser module. PyInstaller does its usual thing and copies the relevant modules into .app/Contents/MacOS. However the app will fail to start with the message \"Couldn't mmap icudtl.dat\". This message is the sign of a major complication with bundling QtWebEngine for Mac OSX.\r\n\r\nThe problem is that unlike the other QtXxxx modules, which can operate correctly from inside the MacOS folder, QtWebEngine has to be installed as a \"framework\" in the Frameworks folder. Based on email with a Qt developer, the commit that initiates that change is here (https://codereview.qt-project.org/#/c/99052/) and the code that implements it is here (https://github.com/qtproject/qttools/blob/dev/src/macdeployqt/shared/shared.cpp).\r\n\r\nBottom line, in order for QtWebEngine to work in a MacOS app, the folder structure must be:\r\n```\r\nmyscript.app/\r\n    Frameworks/\r\n        QtWebEngineCore.framework/\r\n            Helpers@ -> Verssion/Current/Helpers\r\n            Libraries@ -> Versions/Current/Libraries\r\n            QtWebEngineCore@ -> Versions/Current/QtWebEngineCore\r\n            Resources@ -> Versions/Current/Resources\r\n            Versions/\r\n                Current/\r\n                    QtWebEngineCore (executable)\r\n                    Resources/\r\n                        Info.plist with the following two keys:\r\n                        CFBundleExecutable: QtWebEngineCore\r\n                        CFBundleIdentifier: org.qt-project.QtWebEngineCore\r\n                        icudtl.dat\r\n                        qtwebengine_locales/*.pak\r\n                        qtwebengine_resources.pak\r\n                Helpers/QtWebEngineProcess.app\r\n                Libraries/ffmpegsumo.so\r\n    MacOS/\r\n        myscript\r\n        other binaries needed by PyQt\r\n```\r\nThis is the structure of files and folders that is built by the Qt tool \"macdeployqt\" (source linked above). I created this structure manually in an app built by PyInstaller. I deleted QtWebEngineCore from inside MacOS, and built the structure above by ``cp -R `` from an example app built by macdeployqt.\r\n\r\nAlso there remain two modules in MacOS that link to QtWebEngineCore (QtWebEngine and QtWebEngineWidgets) and I had to use install_name_tool to change their links from ``@executable_path/QtWebEngineCore`` to ``@executable_path/../Frameworks/QtWebEngineCore.framework/QtWebEngineCore``.\r\n\r\nAlso, the QtWebEngineCore module has links to other modules such as QtWebEngine and QtGui, and these have to be changed to ``@executable_path/../MacOS/whatever``.\r\n\r\nIt is not clear to me how such changes could be performed in a hook.\r\n"},"comment":{"url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/comments/143165134","html_url":"https://github.com/pyinstaller/pyinstaller/issues/1193#issuecomment-143165134","issue_url":"https://api.github.com/repos/pyinstaller/pyinstaller/issues/1193","id":143165134,"user":{"login":"matysek","id":527280,"avatar_url":"https://avatars.githubusercontent.com/u/527280?v=3","gravatar_id":"","url":"https://api.github.com/users/matysek","html_url":"https://github.com/matysek","followers_url":"https://api.github.com/users/matysek/followers","following_url":"https://api.github.com/users/matysek/following{/other_user}","gists_url":"https://api.github.com/users/matysek/gists{/gist_id}","starred_url":"https://api.github.com/users/matysek/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/matysek/subscriptions","organizations_url":"https://api.github.com/users/matysek/orgs","repos_url":"https://api.github.com/users/matysek/repos","events_url":"https://api.github.com/users/matysek/events{/privacy}","received_events_url":"https://api.github.com/users/matysek/received_events","type":"User","site_admin":false},"created_at":"2015-09-25T09:02:27Z","updated_at":"2015-09-25T09:02:27Z","body":"@glennra Are you going to work  on it?"}}