{"action":"created","issue":{"url":"https://api.github.com/repos/sanack/node-jq/issues/58","repository_url":"https://api.github.com/repos/sanack/node-jq","labels_url":"https://api.github.com/repos/sanack/node-jq/issues/58/labels{/name}","comments_url":"https://api.github.com/repos/sanack/node-jq/issues/58/comments","events_url":"https://api.github.com/repos/sanack/node-jq/issues/58/events","html_url":"https://github.com/sanack/node-jq/pull/58","id":195856545,"number":58,"title":"Windows compatibility","user":{"login":"MaanooAk","id":6997990,"avatar_url":"https://avatars.githubusercontent.com/u/6997990?v=3","gravatar_id":"","url":"https://api.github.com/users/MaanooAk","html_url":"https://github.com/MaanooAk","followers_url":"https://api.github.com/users/MaanooAk/followers","following_url":"https://api.github.com/users/MaanooAk/following{/other_user}","gists_url":"https://api.github.com/users/MaanooAk/gists{/gist_id}","starred_url":"https://api.github.com/users/MaanooAk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaanooAk/subscriptions","organizations_url":"https://api.github.com/users/MaanooAk/orgs","repos_url":"https://api.github.com/users/MaanooAk/repos","events_url":"https://api.github.com/users/MaanooAk/events{/privacy}","received_events_url":"https://api.github.com/users/MaanooAk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-12-15T16:50:41Z","updated_at":"2016-12-17T16:46:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sanack/node-jq/pulls/58","html_url":"https://github.com/sanack/node-jq/pull/58","diff_url":"https://github.com/sanack/node-jq/pull/58.diff","patch_url":"https://github.com/sanack/node-jq/pull/58.patch"},"body":"## Install binaries\r\nJq can't be build by a command in windows, there is no config file for windows yet.\r\nMy solution to this is to download the executable and not the source.\r\n\r\nSo I use a map to find which file is the executable for the platform and arch:\r\n```js\r\nconst DOWNLOAD_MAP = {\r\n  'win32': {\r\n    'def': 'jq-win32.exe',\r\n    'x64': 'jq-win64.exe'\r\n  }\r\n}\r\n```\r\nIf the platform is not in the map the old ways apply (download, config, make).\r\nIf you want you can add more this like:\r\n```js\r\nconst DOWNLOAD_MAP = {\r\n  'win32': {\r\n    'def': 'jq-win32.exe',\r\n    'x64': 'jq-win64.exe'\r\n  },\r\n  'linux': {\r\n    'def': 'jq-linux32',\r\n    'x64': 'jq-linux64'\r\n  }\r\n}\r\n```\r\n\r\n#### Notes\r\n- A `win32` platform can be 64-bit\r\n- Made the executable filename variable because in windows is `jq.exe` and not `jq`\r\n- The dep `download` that I added is already used by the `bin-build`\r\n\r\n## Paths and Tests\r\nThe absolute paths is not the problem, the problem is the size of the path.\r\nIt is an [issue](https://github.com/stedolan/jq/issues/1205) in jq.\r\n\r\nTemporarily I made the paths in the tests relative (= smaller) so they can run.\r\n\r\n#### Notes\r\n- The stringify returns only `\\n` instead of `\\r\\n` so I did a fast replacement\r\n\r\n## More text\r\nSolves #54 that I opened. \r\nHope you appreciate my effort, waiting feedback.\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/sanack/node-jq/issues/comments/267772701","html_url":"https://github.com/sanack/node-jq/pull/58#issuecomment-267772701","issue_url":"https://api.github.com/repos/sanack/node-jq/issues/58","id":267772701,"user":{"login":"davesnx","id":3763599,"avatar_url":"https://avatars.githubusercontent.com/u/3763599?v=3","gravatar_id":"","url":"https://api.github.com/users/davesnx","html_url":"https://github.com/davesnx","followers_url":"https://api.github.com/users/davesnx/followers","following_url":"https://api.github.com/users/davesnx/following{/other_user}","gists_url":"https://api.github.com/users/davesnx/gists{/gist_id}","starred_url":"https://api.github.com/users/davesnx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davesnx/subscriptions","organizations_url":"https://api.github.com/users/davesnx/orgs","repos_url":"https://api.github.com/users/davesnx/repos","events_url":"https://api.github.com/users/davesnx/events{/privacy}","received_events_url":"https://api.github.com/users/davesnx/received_events","type":"User","site_admin":false},"created_at":"2016-12-17T16:46:26Z","updated_at":"2016-12-17T16:46:26Z","body":"Hey @MaanooAk,\r\n\r\nThanks for the time absolutely. We really apreciate that! \r\nWe don't have any experience on NodeJS running on Windows and this would help alot.\r\n\r\nWe are trying to create a Continous Integration for Windows on appveyor [here](https://github.com/sanack/node-jq/pull/56) and actually we are trying the same approach as you did. Download the executable and move it to the right place; but we are facing jq issues arround Windows Support [here](https://github.com/stedolan/jq/issues/1155) and [here](https://github.com/stedolan/jq/issues/1205).\r\n\r\nThey are commenting that the 1.5 version published is out-to-date and in master is fixed, but still their [appveyor](https://github.com/stedolan/jq/blob/master/appveyor.yml) is commented.\r\n\r\nDid jq@1.5 works on your machine?\r\n\r\n"}}
{"actor":{"display_login":"davesnx"}}