{"action":"created","issue":{"url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/1321","repository_url":"https://api.github.com/repos/Smoothieware/Smoothieware","labels_url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/1321/labels{/name}","comments_url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/1321/comments","events_url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/1321/events","html_url":"https://github.com/Smoothieware/Smoothieware/pull/1321","id":319583125,"number":1321,"title":"Feature/Microsoft Visual Studio Tasks","user":{"login":"markmaker","id":9963310,"avatar_url":"https://avatars1.githubusercontent.com/u/9963310?v=4","gravatar_id":"","url":"https://api.github.com/users/markmaker","html_url":"https://github.com/markmaker","followers_url":"https://api.github.com/users/markmaker/followers","following_url":"https://api.github.com/users/markmaker/following{/other_user}","gists_url":"https://api.github.com/users/markmaker/gists{/gist_id}","starred_url":"https://api.github.com/users/markmaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markmaker/subscriptions","organizations_url":"https://api.github.com/users/markmaker/orgs","repos_url":"https://api.github.com/users/markmaker/repos","events_url":"https://api.github.com/users/markmaker/events{/privacy}","received_events_url":"https://api.github.com/users/markmaker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-02T14:44:58Z","updated_at":"2018-05-02T15:46:47Z","closed_at":null,"author_association":"NONE","pull_request":{"url":"https://api.github.com/repos/Smoothieware/Smoothieware/pulls/1321","html_url":"https://github.com/Smoothieware/Smoothieware/pull/1321","diff_url":"https://github.com/Smoothieware/Smoothieware/pull/1321.diff","patch_url":"https://github.com/Smoothieware/Smoothieware/pull/1321.patch"},"body":"# Microsoft Visual Studio Build Tasks\r\n\r\nAdds simple Build tasks to Microsoft Visual Studio \"Open Folder\" development. This is the new cool way to edit almost any type of cross platform project:\r\n\r\n> In Visual Studio 2017, you can open code from nearly any type of directory-based project into Visual Studio without the need for a solution or project file. This means you can, for example, clone a repo on GitHub, open it directly into Visual Studio, and begin developing, without having to create a solution or project. If needed, you can specify custom build tasks and launch parameters through simple JSON files.\r\n> \r\n> After you open your code files in Visual Studio, Solution Explorer displays all the files in the folder. You can click on any file to begin editing it. In the background, Visual Studio starts indexing the files to enable IntelliSense, navigation, and refactoring features. As you edit, create, move, or delete files, Visual Studio tracks the changes automatically and continuously updates its IntelliSense index. Code will appear with syntax colorization and, in many cases, include basic IntelliSense statement completion.\r\n\r\nhttps://docs.microsoft.com/en-us/visualstudio/ide/develop-code-in-visual-studio-without-projects-or-solutions\r\n\r\nYou can simply open the Smoothieware project using `File` / `Open Folder...` and choose the Smoothieware folder. You'll get all the nice stuff described above. \r\n\r\nThis pull request adds simple `Build`, `Rebuild`, `Clean ` tasks as described here.\r\n\r\nhttps://docs.microsoft.com/en-us/visualstudio/ide/customize-build-and-debug-tasks-in-visual-studio\r\n\r\nYou can then right-click on the `makefile` in the Smoothieware root folder and choose one of the tasks in the context menu (see Screenshot):\r\n![grafik](https://user-images.githubusercontent.com/9963310/39528722-29c4a316-4e25-11e8-9740-4cc1bff48e57.png)\r\n\r\n**NOTE**: In order for this to work, you need to re-install the build tools using `win_install.cmd` and this will only succeed if you delete your existing `gcc-arm-none-eabi` folder first, otherwise `win_install.cmd` will fail trying to recreate that directory.\r\n\r\n ### Why is re-installing needed?\r\n\r\nI needed to modify `win_install.cmd` to slightly change the generated `BuildCommand.cmd` and `buildenv.cmd` to propagate and execute a command line passed as arguments. This way Visual Studio can send the build commands into the proper build environment. I have tried recreating the environment directly in the task, but failed. But calling the **central** `BuildShell.cmd` may be more future proof anyway. \r\n\r\n**NOTE 2**: as per Visual Studio's [standard](https://docs.microsoft.com/en-us/visualstudio/ide/customize-build-and-debug-tasks-in-visual-studio), `tasks.vs.json` is in the `.vs` subdirectory so it might be hidden from some directory views. \r\n\r\nIn Visual Studio use the Show all Files Button to see it:\r\n![grafik](https://user-images.githubusercontent.com/9963310/39529204-67b9af6c-4e26-11e8-871a-f2605a7d4d40.png)\r\n"},"comment":{"url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/comments/386024804","html_url":"https://github.com/Smoothieware/Smoothieware/pull/1321#issuecomment-386024804","issue_url":"https://api.github.com/repos/Smoothieware/Smoothieware/issues/1321","id":386024804,"user":{"login":"markmaker","id":9963310,"avatar_url":"https://avatars1.githubusercontent.com/u/9963310?v=4","gravatar_id":"","url":"https://api.github.com/users/markmaker","html_url":"https://github.com/markmaker","followers_url":"https://api.github.com/users/markmaker/followers","following_url":"https://api.github.com/users/markmaker/following{/other_user}","gists_url":"https://api.github.com/users/markmaker/gists{/gist_id}","starred_url":"https://api.github.com/users/markmaker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/markmaker/subscriptions","organizations_url":"https://api.github.com/users/markmaker/orgs","repos_url":"https://api.github.com/users/markmaker/repos","events_url":"https://api.github.com/users/markmaker/events{/privacy}","received_events_url":"https://api.github.com/users/markmaker/received_events","type":"User","site_admin":false},"created_at":"2018-05-02T15:46:47Z","updated_at":"2018-05-02T15:46:47Z","author_association":"NONE","body":"Hi wolfmanjm\r\n\r\nThanks for the quick reply. \r\n\r\nI struggle to see the red line here, please advise. \r\n\r\nYou already have some .cmd files in the repo. Those _only_ run against `cmd.exe` and _only_ on Microsoft Windows ... neither of which are open source, as far as I know. \r\n\r\nWhat is the difference for the single .json file I add here? \r\n\r\nAfter all, I am not commiting Visual Studio binaries and _in now way_ does this change mean you become somehow _dependent_ on Visual Studio. You can still build from the command-line, in fact this tiny solution does nothing else. \r\n\r\nIf it is your \"political\" principle not to embrace such products _at all_, then I could understand (not agree). But I don't see how adding this to the Wiki would make a difference, then? \r\n\r\nThank you for having a fresh look.\r\n\r\n_Mark\r\n"}}
{"actor":{"display_login":"markmaker"}}