{"action":"created","comment":{"url":"https://api.github.com/repos/godotengine/godot/pulls/comments/151503199","pull_request_review_id":77222533,"id":151503199,"diff_hunk":"@@ -115,7 +115,125 @@ void actual_discoverer_handler() {\n \tProjectSettings::get_singleton()->save();\n }\n \n-GDNativeSingletonDiscover *discoverer = NULL;\n+static GDNativeSingletonDiscover *discoverer = NULL;\n+\n+class GDNativeExportPlugin : public EditorExportPlugin {\n+\n+protected:\n+\tvirtual void _export_file(const String &p_path, const String &p_type, const Set<String> &p_features);\n+};\n+\n+void GDNativeExportPlugin::_export_file(const String &p_path, const String &p_type, const Set<String> &p_features) {\n+\tif (p_type != \"GDNativeLibrary\") {\n+\t\treturn;\n+\t}\n+\n+\tRef<GDNativeLibrary> lib = ResourceLoader::load(p_path);\n+\n+\tif (lib.is_null()) {\n+\t\treturn;\n+\t}\n+\n+\tRef<ConfigFile> config = lib->get_config_file();\n+\n+\tString entry_lib_path;\n+\t{\n+\n+\t\tList<String> entry_keys;\n+\t\tconfig->get_section_keys(\"entry\", &entry_keys);\n+\n+\t\tfor (List<String>::Element *E = entry_keys.front(); E; E = E->next()) {\n+\t\t\tString key = E->get();\n+\n+\t\t\tVector<String> tags = key.split(\".\");\n+\n+\t\t\tbool skip = false;\n+\t\t\tfor (int i = 0; i < tags.size(); i++) {\n+\t\t\t\tbool has_feature = p_features.has(tags[i]);\n+\n+\t\t\t\tif (!has_feature) {\n+\t\t\t\t\tskip = true;\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\tif (skip) {\n+\t\t\t\tcontinue;\n+\t\t\t}\n+\n+\t\t\tentry_lib_path = config->get_value(\"entry\", key);\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\tVector<String> dependency_paths;\n+\t{\n+\n+\t\tList<String> dependency_keys;\n+\t\tconfig->get_section_keys(\"dependencies\", &dependency_keys);\n+\n+\t\tfor (List<String>::Element *E = dependency_keys.front(); E; E = E->next()) {\n+\t\t\tString key = E->get();\n+\n+\t\t\tVector<String> tags = key.split(\".\");\n+\n+\t\t\tbool skip = false;\n+\t\t\tfor (int i = 0; i < tags.size(); i++) {\n+\t\t\t\tbool has_feature = p_features.has(tags[i]);\n+\n+\t\t\t\tif (!has_feature) {\n+\t\t\t\t\tskip = true;\n+\t\t\t\t\tbreak;\n+\t\t\t\t}\n+\t\t\t}\n+\n+\t\t\tif (skip) {\n+\t\t\t\tcontinue;\n+\t\t\t}\n+\n+\t\t\tdependency_paths = config->get_value(\"dependencies\", key);\n+\t\t\tbreak;\n+\t\t}\n+\t}\n+\n+\tbool is_statically_linked = false;\n+\t{\n+\n+\t\tList<String> static_linking_keys;\n+\t\tconfig->get_section_keys(\"static_linking\", &static_linking_keys);\n+\n+\t\tfor (List<String>::Element *E = static_linking_keys.front(); E; E = E->next()) {\n+\t\t\tString key = E->get();\n+\n+\t\t\tVector<String> tags = key.split(\".\");\n+\n+\t\t\tbool skip = false;\n+\n+\t\t\tfor (int i = 0; i < tags.size(); i++) {\n+\t\t\t\tbool has_feature = p_features.has(tags[i]);","path":"modules/gdnative/register_types.cpp","position":127,"original_position":127,"commit_id":"f1099c7221bace0e8d4811a6f6b39f33f80bd7ff","original_commit_id":"f1099c7221bace0e8d4811a6f6b39f33f80bd7ff","user":{"login":"karroffel","id":5209613,"avatar_url":"https://avatars0.githubusercontent.com/u/5209613?v=4","gravatar_id":"","url":"https://api.github.com/users/karroffel","html_url":"https://github.com/karroffel","followers_url":"https://api.github.com/users/karroffel/followers","following_url":"https://api.github.com/users/karroffel/following{/other_user}","gists_url":"https://api.github.com/users/karroffel/gists{/gist_id}","starred_url":"https://api.github.com/users/karroffel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karroffel/subscriptions","organizations_url":"https://api.github.com/users/karroffel/orgs","repos_url":"https://api.github.com/users/karroffel/repos","events_url":"https://api.github.com/users/karroffel/events{/privacy}","received_events_url":"https://api.github.com/users/karroffel/received_events","type":"User","site_admin":false},"body":"I think and hope that the architecture will be a tag, it would just not find a library and should error out when trying to load \"\"","created_at":"2017-11-16T18:46:37Z","updated_at":"2017-11-16T18:46:38Z","html_url":"https://github.com/godotengine/godot/pull/12949#discussion_r151503199","pull_request_url":"https://api.github.com/repos/godotengine/godot/pulls/12949","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/godotengine/godot/pulls/comments/151503199"},"html":{"href":"https://github.com/godotengine/godot/pull/12949#discussion_r151503199"},"pull_request":{"href":"https://api.github.com/repos/godotengine/godot/pulls/12949"}},"in_reply_to_id":151418382},"pull_request":{"url":"https://api.github.com/repos/godotengine/godot/pulls/12949","id":152821296,"html_url":"https://github.com/godotengine/godot/pull/12949","diff_url":"https://github.com/godotengine/godot/pull/12949.diff","patch_url":"https://github.com/godotengine/godot/pull/12949.patch","issue_url":"https://api.github.com/repos/godotengine/godot/issues/12949","number":12949,"state":"closed","locked":false,"title":"[GDNative] export plugin","user":{"login":"karroffel","id":5209613,"avatar_url":"https://avatars0.githubusercontent.com/u/5209613?v=4","gravatar_id":"","url":"https://api.github.com/users/karroffel","html_url":"https://github.com/karroffel","followers_url":"https://api.github.com/users/karroffel/followers","following_url":"https://api.github.com/users/karroffel/following{/other_user}","gists_url":"https://api.github.com/users/karroffel/gists{/gist_id}","starred_url":"https://api.github.com/users/karroffel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karroffel/subscriptions","organizations_url":"https://api.github.com/users/karroffel/orgs","repos_url":"https://api.github.com/users/karroffel/repos","events_url":"https://api.github.com/users/karroffel/events{/privacy}","received_events_url":"https://api.github.com/users/karroffel/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-11-15T16:25:29Z","updated_at":"2017-11-16T18:46:38Z","closed_at":"2017-11-15T17:05:22Z","merged_at":"2017-11-15T17:05:22Z","merge_commit_sha":"9543801d51910cdf61123f591fd91993f57782ae","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":{"url":"https://api.github.com/repos/godotengine/godot/milestones/4","html_url":"https://github.com/godotengine/godot/milestone/4","labels_url":"https://api.github.com/repos/godotengine/godot/milestones/4/labels","id":1449702,"number":4,"title":"3.0","description":"","creator":{"login":"akien-mga","id":4701338,"avatar_url":"https://avatars0.githubusercontent.com/u/4701338?v=4","gravatar_id":"","url":"https://api.github.com/users/akien-mga","html_url":"https://github.com/akien-mga","followers_url":"https://api.github.com/users/akien-mga/followers","following_url":"https://api.github.com/users/akien-mga/following{/other_user}","gists_url":"https://api.github.com/users/akien-mga/gists{/gist_id}","starred_url":"https://api.github.com/users/akien-mga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akien-mga/subscriptions","organizations_url":"https://api.github.com/users/akien-mga/orgs","repos_url":"https://api.github.com/users/akien-mga/repos","events_url":"https://api.github.com/users/akien-mga/events{/privacy}","received_events_url":"https://api.github.com/users/akien-mga/received_events","type":"User","site_admin":false},"open_issues":344,"closed_issues":3612,"state":"open","created_at":"2015-12-08T11:42:08Z","updated_at":"2017-11-16T18:27:28Z","due_on":null,"closed_at":null},"commits_url":"https://api.github.com/repos/godotengine/godot/pulls/12949/commits","review_comments_url":"https://api.github.com/repos/godotengine/godot/pulls/12949/comments","review_comment_url":"https://api.github.com/repos/godotengine/godot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/godotengine/godot/issues/12949/comments","statuses_url":"https://api.github.com/repos/godotengine/godot/statuses/f1099c7221bace0e8d4811a6f6b39f33f80bd7ff","head":{"label":"karroffel:gdnative-export","ref":"gdnative-export","sha":"f1099c7221bace0e8d4811a6f6b39f33f80bd7ff","user":{"login":"karroffel","id":5209613,"avatar_url":"https://avatars0.githubusercontent.com/u/5209613?v=4","gravatar_id":"","url":"https://api.github.com/users/karroffel","html_url":"https://github.com/karroffel","followers_url":"https://api.github.com/users/karroffel/followers","following_url":"https://api.github.com/users/karroffel/following{/other_user}","gists_url":"https://api.github.com/users/karroffel/gists{/gist_id}","starred_url":"https://api.github.com/users/karroffel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karroffel/subscriptions","organizations_url":"https://api.github.com/users/karroffel/orgs","repos_url":"https://api.github.com/users/karroffel/repos","events_url":"https://api.github.com/users/karroffel/events{/privacy}","received_events_url":"https://api.github.com/users/karroffel/received_events","type":"User","site_admin":false},"repo":{"id":79216068,"name":"godot","full_name":"karroffel/godot","owner":{"login":"karroffel","id":5209613,"avatar_url":"https://avatars0.githubusercontent.com/u/5209613?v=4","gravatar_id":"","url":"https://api.github.com/users/karroffel","html_url":"https://github.com/karroffel","followers_url":"https://api.github.com/users/karroffel/followers","following_url":"https://api.github.com/users/karroffel/following{/other_user}","gists_url":"https://api.github.com/users/karroffel/gists{/gist_id}","starred_url":"https://api.github.com/users/karroffel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karroffel/subscriptions","organizations_url":"https://api.github.com/users/karroffel/orgs","repos_url":"https://api.github.com/users/karroffel/repos","events_url":"https://api.github.com/users/karroffel/events{/privacy}","received_events_url":"https://api.github.com/users/karroffel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/karroffel/godot","description":"Godot Engine – Multi-platform 2D and 3D game engine","fork":true,"url":"https://api.github.com/repos/karroffel/godot","forks_url":"https://api.github.com/repos/karroffel/godot/forks","keys_url":"https://api.github.com/repos/karroffel/godot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/karroffel/godot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/karroffel/godot/teams","hooks_url":"https://api.github.com/repos/karroffel/godot/hooks","issue_events_url":"https://api.github.com/repos/karroffel/godot/issues/events{/number}","events_url":"https://api.github.com/repos/karroffel/godot/events","assignees_url":"https://api.github.com/repos/karroffel/godot/assignees{/user}","branches_url":"https://api.github.com/repos/karroffel/godot/branches{/branch}","tags_url":"https://api.github.com/repos/karroffel/godot/tags","blobs_url":"https://api.github.com/repos/karroffel/godot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/karroffel/godot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/karroffel/godot/git/refs{/sha}","trees_url":"https://api.github.com/repos/karroffel/godot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/karroffel/godot/statuses/{sha}","languages_url":"https://api.github.com/repos/karroffel/godot/languages","stargazers_url":"https://api.github.com/repos/karroffel/godot/stargazers","contributors_url":"https://api.github.com/repos/karroffel/godot/contributors","subscribers_url":"https://api.github.com/repos/karroffel/godot/subscribers","subscription_url":"https://api.github.com/repos/karroffel/godot/subscription","commits_url":"https://api.github.com/repos/karroffel/godot/commits{/sha}","git_commits_url":"https://api.github.com/repos/karroffel/godot/git/commits{/sha}","comments_url":"https://api.github.com/repos/karroffel/godot/comments{/number}","issue_comment_url":"https://api.github.com/repos/karroffel/godot/issues/comments{/number}","contents_url":"https://api.github.com/repos/karroffel/godot/contents/{+path}","compare_url":"https://api.github.com/repos/karroffel/godot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/karroffel/godot/merges","archive_url":"https://api.github.com/repos/karroffel/godot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/karroffel/godot/downloads","issues_url":"https://api.github.com/repos/karroffel/godot/issues{/number}","pulls_url":"https://api.github.com/repos/karroffel/godot/pulls{/number}","milestones_url":"https://api.github.com/repos/karroffel/godot/milestones{/number}","notifications_url":"https://api.github.com/repos/karroffel/godot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/karroffel/godot/labels{/name}","releases_url":"https://api.github.com/repos/karroffel/godot/releases{/id}","deployments_url":"https://api.github.com/repos/karroffel/godot/deployments","created_at":"2017-01-17T10:26:31Z","updated_at":"2017-01-17T10:26:37Z","pushed_at":"2017-11-15T16:24:44Z","git_url":"git://github.com/karroffel/godot.git","ssh_url":"git@github.com:karroffel/godot.git","clone_url":"https://github.com/karroffel/godot.git","svn_url":"https://github.com/karroffel/godot","homepage":"https://godotengine.org","size":190464,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"godotengine:master","ref":"master","sha":"0130bbfac000be512117baaca4cc8a08d525d9d2","user":{"login":"godotengine","id":6318500,"avatar_url":"https://avatars2.githubusercontent.com/u/6318500?v=4","gravatar_id":"","url":"https://api.github.com/users/godotengine","html_url":"https://github.com/godotengine","followers_url":"https://api.github.com/users/godotengine/followers","following_url":"https://api.github.com/users/godotengine/following{/other_user}","gists_url":"https://api.github.com/users/godotengine/gists{/gist_id}","starred_url":"https://api.github.com/users/godotengine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/godotengine/subscriptions","organizations_url":"https://api.github.com/users/godotengine/orgs","repos_url":"https://api.github.com/users/godotengine/repos","events_url":"https://api.github.com/users/godotengine/events{/privacy}","received_events_url":"https://api.github.com/users/godotengine/received_events","type":"Organization","site_admin":false},"repo":{"id":15634981,"name":"godot","full_name":"godotengine/godot","owner":{"login":"godotengine","id":6318500,"avatar_url":"https://avatars2.githubusercontent.com/u/6318500?v=4","gravatar_id":"","url":"https://api.github.com/users/godotengine","html_url":"https://github.com/godotengine","followers_url":"https://api.github.com/users/godotengine/followers","following_url":"https://api.github.com/users/godotengine/following{/other_user}","gists_url":"https://api.github.com/users/godotengine/gists{/gist_id}","starred_url":"https://api.github.com/users/godotengine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/godotengine/subscriptions","organizations_url":"https://api.github.com/users/godotengine/orgs","repos_url":"https://api.github.com/users/godotengine/repos","events_url":"https://api.github.com/users/godotengine/events{/privacy}","received_events_url":"https://api.github.com/users/godotengine/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/godotengine/godot","description":"Godot Engine – Multi-platform 2D and 3D game engine","fork":false,"url":"https://api.github.com/repos/godotengine/godot","forks_url":"https://api.github.com/repos/godotengine/godot/forks","keys_url":"https://api.github.com/repos/godotengine/godot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/godotengine/godot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/godotengine/godot/teams","hooks_url":"https://api.github.com/repos/godotengine/godot/hooks","issue_events_url":"https://api.github.com/repos/godotengine/godot/issues/events{/number}","events_url":"https://api.github.com/repos/godotengine/godot/events","assignees_url":"https://api.github.com/repos/godotengine/godot/assignees{/user}","branches_url":"https://api.github.com/repos/godotengine/godot/branches{/branch}","tags_url":"https://api.github.com/repos/godotengine/godot/tags","blobs_url":"https://api.github.com/repos/godotengine/godot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/godotengine/godot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/godotengine/godot/git/refs{/sha}","trees_url":"https://api.github.com/repos/godotengine/godot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/godotengine/godot/statuses/{sha}","languages_url":"https://api.github.com/repos/godotengine/godot/languages","stargazers_url":"https://api.github.com/repos/godotengine/godot/stargazers","contributors_url":"https://api.github.com/repos/godotengine/godot/contributors","subscribers_url":"https://api.github.com/repos/godotengine/godot/subscribers","subscription_url":"https://api.github.com/repos/godotengine/godot/subscription","commits_url":"https://api.github.com/repos/godotengine/godot/commits{/sha}","git_commits_url":"https://api.github.com/repos/godotengine/godot/git/commits{/sha}","comments_url":"https://api.github.com/repos/godotengine/godot/comments{/number}","issue_comment_url":"https://api.github.com/repos/godotengine/godot/issues/comments{/number}","contents_url":"https://api.github.com/repos/godotengine/godot/contents/{+path}","compare_url":"https://api.github.com/repos/godotengine/godot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/godotengine/godot/merges","archive_url":"https://api.github.com/repos/godotengine/godot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/godotengine/godot/downloads","issues_url":"https://api.github.com/repos/godotengine/godot/issues{/number}","pulls_url":"https://api.github.com/repos/godotengine/godot/pulls{/number}","milestones_url":"https://api.github.com/repos/godotengine/godot/milestones{/number}","notifications_url":"https://api.github.com/repos/godotengine/godot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/godotengine/godot/labels{/name}","releases_url":"https://api.github.com/repos/godotengine/godot/releases{/id}","deployments_url":"https://api.github.com/repos/godotengine/godot/deployments","created_at":"2014-01-04T16:05:36Z","updated_at":"2017-11-16T16:02:26Z","pushed_at":"2017-11-16T18:27:28Z","git_url":"git://github.com/godotengine/godot.git","ssh_url":"git@github.com:godotengine/godot.git","clone_url":"https://github.com/godotengine/godot.git","svn_url":"https://github.com/godotengine/godot","homepage":"https://godotengine.org","size":203189,"stargazers_count":11335,"watchers_count":11335,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2547,"mirror_url":null,"archived":false,"open_issues_count":2385,"forks":2547,"open_issues":2385,"watchers":11335,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/godotengine/godot/pulls/12949"},"html":{"href":"https://github.com/godotengine/godot/pull/12949"},"issue":{"href":"https://api.github.com/repos/godotengine/godot/issues/12949"},"comments":{"href":"https://api.github.com/repos/godotengine/godot/issues/12949/comments"},"review_comments":{"href":"https://api.github.com/repos/godotengine/godot/pulls/12949/comments"},"review_comment":{"href":"https://api.github.com/repos/godotengine/godot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/godotengine/godot/pulls/12949/commits"},"statuses":{"href":"https://api.github.com/repos/godotengine/godot/statuses/f1099c7221bace0e8d4811a6f6b39f33f80bd7ff"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"karroffel"}}