{"action":"created","issue":{"url":"https://api.github.com/repos/ggreer/the_silver_searcher/issues/623","labels_url":"https://api.github.com/repos/ggreer/the_silver_searcher/issues/623/labels{/name}","comments_url":"https://api.github.com/repos/ggreer/the_silver_searcher/issues/623/comments","events_url":"https://api.github.com/repos/ggreer/the_silver_searcher/issues/623/events","html_url":"https://github.com/ggreer/the_silver_searcher/issues/623","id":60083973,"number":623,"title":"(info) ag builds out of the box for windows using MXE","user":{"login":"avih","id":2164962,"avatar_url":"https://avatars.githubusercontent.com/u/2164962?v=3","gravatar_id":"","url":"https://api.github.com/users/avih","html_url":"https://github.com/avih","followers_url":"https://api.github.com/users/avih/followers","following_url":"https://api.github.com/users/avih/following{/other_user}","gists_url":"https://api.github.com/users/avih/gists{/gist_id}","starred_url":"https://api.github.com/users/avih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avih/subscriptions","organizations_url":"https://api.github.com/users/avih/orgs","repos_url":"https://api.github.com/users/avih/repos","events_url":"https://api.github.com/users/avih/events{/privacy}","received_events_url":"https://api.github.com/users/avih/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-03-06T10:24:21Z","updated_at":"2015-03-08T18:37:29Z","closed_at":null,"body":"It's not a bug, but I figured this info could be useful.\r\n\r\nThe windows build which is linked from the wiki/docs is quite old - 0.18.1-1129 from 2014-01 .\r\n\r\nApparently it can be cross-compiled to windows using MXE without any modifications using `./build.sh --host=i686-w64-mingw32.static` (or whatever the specific target is). I just used it to build git master (0.29.1).\r\n\r\nIt probably requires building few dependencies first with MXE, but I'm not sure exactly which they are since apparently I had them built already (but they're all supported with vanilla MXE). Specifically, I'm not sure which package installs `lzma.h` (maybe `xz`), but the other deps should be trivial.\r\n\r\nFWIW, the statically linked `ag.exe` is about 1.2M, after `[target-]strip` it's about 400k, and after `upx` it's about 150k.\r\n\r\nI didn't test it extensively, but other than requiring explicit `--color` to actually show colors (which still doesn't show colors correctly on normal `cmd.exe` console - but does show colors correctly with terminal wrappers such as `ansicon` or `conEmu`), it seems to be working well.\r\n\r\nJust an FYI, and thanks for a great tool :)"},"comment":{"url":"https://api.github.com/repos/ggreer/the_silver_searcher/issues/comments/77766519","html_url":"https://github.com/ggreer/the_silver_searcher/issues/623#issuecomment-77766519","issue_url":"https://api.github.com/repos/ggreer/the_silver_searcher/issues/623","id":77766519,"user":{"login":"avih","id":2164962,"avatar_url":"https://avatars.githubusercontent.com/u/2164962?v=3","gravatar_id":"","url":"https://api.github.com/users/avih","html_url":"https://github.com/avih","followers_url":"https://api.github.com/users/avih/followers","following_url":"https://api.github.com/users/avih/following{/other_user}","gists_url":"https://api.github.com/users/avih/gists{/gist_id}","starred_url":"https://api.github.com/users/avih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/avih/subscriptions","organizations_url":"https://api.github.com/users/avih/orgs","repos_url":"https://api.github.com/users/avih/repos","events_url":"https://api.github.com/users/avih/events{/privacy}","received_events_url":"https://api.github.com/users/avih/received_events","type":"User","site_admin":false},"created_at":"2015-03-08T18:37:29Z","updated_at":"2015-03-08T18:37:29Z","body":"Before you start building MXE packages, you can choose your target (typically you only need to do that once, unless you need several targets side by side - which I don't). I don't recall what's the default target name is, but it might be different than the one I use.\r\n\r\nSo yes, whatever your MXE target is, that's what you need to use with `--host=...`.\r\n\r\nGlad it works for you.\r\n\r\n"}}