{"id":20536256,"url":"https://github.com/easysoft/phiwrapper","last_synced_at":"2025-04-14T07:21:27.940Z","repository":{"id":43552687,"uuid":"303919995","full_name":"easysoft/phiwrapper","owner":"easysoft","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-08T08:35:04.000Z","size":46,"stargazers_count":37,"open_issues_count":2,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-27T21:02:19.161Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/easysoft.png","metadata":{"files":{"readme":"Readme.EN.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}},"created_at":"2020-10-14T06:13:39.000Z","updated_at":"2025-02-06T03:55:59.000Z","dependencies_parsed_at":"2022-09-15T14:51:25.409Z","dependency_job_id":null,"html_url":"https://github.com/easysoft/phiwrapper","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easysoft%2Fphiwrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easysoft%2Fphiwrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easysoft%2Fphiwrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easysoft%2Fphiwrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/easysoft","download_url":"https://codeload.github.com/easysoft/phiwrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248837175,"owners_count":21169379,"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":[],"created_at":"2024-11-16T00:36:02.586Z","updated_at":"2025-04-14T07:21:27.904Z","avatar_url":"https://github.com/easysoft.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# phiwrapper\n\nphiwrapper is a tool for wrapping multi-arch/platform binaries into fat \"binary\".\n\nphiwrapper make same file running at Windows and unix like systems by using batsh. For example: you can pack you PHP codes, Windows PHP binaries downloaded from windows.php.net and static compiled PHP binaries for linux, then double-click packed file on Windows or `sh thatfile.bat` on linux to run same service written in same PHP file at two different platform.\n\nphiwrapper now support Windows 7+ and linux on x86_64 and macOS on x86_64, this support list will be extend in future.\n\n## TODOs \u0026\u0026 WIPs\n\n- [x] zip.js -- zip.js is WIP, you need pack bins and code dir into build/build.zip youself.\n- [ ] cliargs, cleanup, sudo/runas...\n- [ ] tests and continuous test\n- [ ] x86 unix-like compatibility\n- [ ] more platforms\n- [ ] shrink unzip size\n\n## Packing\n\n### Dependencies (Windows)\n\nphiwrapper using wsh to run its code, so there's no dependency.\n\n### Dependencies (Unix-like)\n\nnodejs needed.\n\n### Prepare binaries\n\nFetch binaries tools form github to tools dir:\n```\ngit clone https://github.com/longyan/phiwrapper_binaries tools\n```\n\nPrepare platform-specified binaries:\n\nFor example : Download Windows PHP binaries from windows.php.net, static compile PHP at linux (If you dont want provide huge glibc together), then put them in bin/win and bin/linuxx64\n\n### Prepare codes\n\nPut platform-independent codes on code dir:\n\nFor example : echo '\u003c?php phpinfo();' \u003e code/info.php\n\n### Configure\n\nCopy config.js.example to config.js then modify it as you like, option is explained in that file.\n\n### Pack-up\n\n```batsh\nmkwrapper.bat\n```\n```bash\n./mkwrapper.sh\n```\n\n## Limitions\n\nphiwrapper simply concatenate files together, it's not native fat binary format like Mach-O, so the packed file will be large, you may want to shrink size of binaries used.\n\n## OSS License\n\nphiwrapper using Apache License 2.0 with exceptions\n\nthat meaning you need not append full license into packed binaries.\n\n```\nCopyright 2020 Longyan\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n    http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n\nAs an exception, if, as a result of your packing your files, portions\nof this Software are embedded into an partial form of such source code,\nyou may redistribute such embedded portions in such partial form without\ncomplying with the conditions of Sections 4(a), 4(b) and 4(d) of the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasysoft%2Fphiwrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feasysoft%2Fphiwrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasysoft%2Fphiwrapper/lists"}