{"id":27791327,"url":"https://github.com/winterreisender/webview-xmake","last_synced_at":"2025-04-30T19:00:00.778Z","repository":{"id":65796427,"uuid":"591862241","full_name":"Winterreisender/webview-xmake","owner":"Winterreisender","description":"A webview xmake repo. Also build shared and static libs.","archived":false,"fork":false,"pushed_at":"2023-11-17T08:46:23.000Z","size":41,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-30T18:59:56.646Z","etag":null,"topics":["shared-library","webview","xmake","xmake-repo"],"latest_commit_sha":null,"homepage":"","language":"Lua","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Winterreisender.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-22T05:45:45.000Z","updated_at":"2024-02-21T11:31:21.000Z","dependencies_parsed_at":"2023-11-17T08:54:25.278Z","dependency_job_id":"bd29c236-1e1a-4bb3-987a-6ef9942e0f57","html_url":"https://github.com/Winterreisender/webview-xmake","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Winterreisender%2Fwebview-xmake","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Winterreisender%2Fwebview-xmake/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Winterreisender%2Fwebview-xmake/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Winterreisender%2Fwebview-xmake/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Winterreisender","download_url":"https://codeload.github.com/Winterreisender/webview-xmake/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251767213,"owners_count":21640467,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["shared-library","webview","xmake","xmake-repo"],"created_at":"2025-04-30T19:00:00.693Z","updated_at":"2025-04-30T19:00:00.770Z","avatar_url":"https://github.com/Winterreisender.png","language":"Lua","funding_links":[],"categories":[],"sub_categories":[],"readme":"# webview-xmake\r\n\r\nBuild shared and static binary libs for [webview](https://github.com/webview/webview) using [xmake](https://xmake.io). Also a xmake package for [webview](https://github.com/webview/webview).\r\n\r\n## Supported Platforms\r\n\r\n|        | Windows | Linux | macOS | mingw |\r\n| ------ | ------- | ----- | ----- | ----- |\r\n| x86_64 | ✔      | ✔    | ✔    | ✔    |\r\n| arm64  | ✔      |       |  ✔   |       |\r\n| x86_32 | ✔      |       | -     |       |\r\n\r\n## Usage\r\n\r\n### Build Locally\r\n\r\nSee `.github/workflows/binary-build.yml` for detailed build steps.\r\n\r\nFor example, build for Windows x64:\r\n\r\n```shell\r\ncd source\r\nxmake f -p windows -a x64 -m release -P .\r\nxmake build -P . webview\r\n```\r\n\r\n### Use xmake package\r\n\r\n#### Quick start\r\n\r\n1. Create a xmake project\r\n\r\n```shell\r\nxmake create myproject\r\ncd myproject\r\n```\r\n\r\n2. Modify the `xmake.lua` in your project\r\n\r\n```lua\r\nadd_repositories(\"webview-xmake https://github.com/Winterreisender/webview-xmake.git\")\r\nadd_requires(\"webview 0.10.0.230210\")\r\nif is_plat(\"linux\") then\r\n    add_requires(\"pkgconfig::gtk+-3.0\", \"pkgconfig::webkit2gtk-4.0\", {system = true})\r\nend\r\n\r\ntarget(\"myproject\")\r\n    set_kind(\"binary\")\r\n    set_languages(\"c++17\")\r\n    add_packages(\"webview\")\r\n    add_files(\"src/test.cpp\")\r\n    if is_plat(\"linux\") then\r\n        add_packages(\"pkgconfig::gtk+-3.0\")\r\n        add_packages(\"pkgconfig::webkit2gtk-4.0\")\r\n    end\r\n    if is_plat(\"macosx\") then\r\n        set_languages(\"c++11\")\r\n        add_frameworks(\"WebKit\")\r\n    end\r\ntarget_end()\r\n```\r\n\r\n3. Write your code in `src/main.cpp`\r\n\r\n```c++\r\n#include \"webview.h\"\r\nint main() {\r\n    webview::webview w(false, nullptr);\r\n    w.set_title(\"Example\");\r\n    w.navigate(\"https://example.com\");\r\n    w.run();\r\n    return 0;\r\n}\r\n```\r\n\r\n4. Build and run\r\n\r\n```shell\r\nxmake -P .\r\nxmake run\r\n```\r\n\r\nYou can find the example in [example/myproject](example/myproject).\r\n\r\n## Credits\r\n\r\n| Project                                                                   | License                                                                             |\r\n| ------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- |\r\n| [xmake](https://xmake.io)                                                    | [Apache-2.0](https://github.com/xmake-io/xmake/blob/master/LICENSE.md)                 |\r\n| [webview](https://github.com/webview/webview)                                | [MIT](https://github.com/webview/webview/blob/master/LICENSE)                          |\r\n| [Microsoft Webview2](https://www.nuget.org/packages/Microsoft.Web.WebView2/) | [BSD-style](https://www.nuget.org/packages/Microsoft.Web.WebView2/1.0.1245.22/License) |\r\n\r\n## License\r\n\r\n```\r\nCopyright 2023 Winterreisender\r\n\r\nLicensed under the Apache License, Version 2.0 (the \"License\");\r\nyou may not use this file except in compliance with the License.\r\nYou may obtain a copy of the License at\r\n\r\n    http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nUnless required by applicable law or agreed to in writing, software\r\ndistributed under the License is distributed on an \"AS IS\" BASIS,\r\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\nSee the License for the specific language governing permissions and\r\nlimitations under the License.\r\n```\r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinterreisender%2Fwebview-xmake","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwinterreisender%2Fwebview-xmake","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwinterreisender%2Fwebview-xmake/lists"}