Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

add vscode support 馃殰under development馃敤 #202

Closed
wants to merge 11 commits into from

Conversation

Projects
None yet
3 participants
@hiroMTB
Copy link
Contributor

commented May 17, 2019

Not finished yet, do not merge, please馃檹

馃殾 STATUS

  • generate project
  • update project
  • test with addon
  • test recursive feature
  • test on OSX
  • test on Windows
  • test on Linux
  • test on RPi
  • send related PR to oF main repo

馃帹 Update commandLinePG project files
Need to add vscodeProject.h/.cpp

  • Xcode
  • visual studio
  • Qt
  • Code Blocks !?

鈿狅笍 NOTICE
Project's template files must be located in /openFrameworks/scripts/templates/vscode. I put these in this repo (/templates/vscode) in order to test quickly and deploy later.

馃挕 vscode project configuration
I refer to following repos. Still not sure about the best settings.
https://github.com/npisanti/of_vscode
https://github.com/robertofazio/openFrameworks_VisualStudioCode_Example
https://github.com/hiroMTB/vscode_oF

鉁忥笍 Command line arguments
Please make sure to pass -p"vscode" argument when you debug command line executable.
In Xcode, we can set at Scheme.
-v
-o"/path/to/oF"
-a""
-p"vscode"
"/path/to/of/app/myApps/mySketch"

鉂楋笍Edit

  • Please make a empty "vscode" folder under /openFrameworks/scritps/templates for frontend app test.

hiroMTB added some commits May 17, 2019

start vscode support, generate project works fine but update does not鈥
鈥 implemented yet (NOTICE : template is not included in this commit, should be pushed to openframeworks/scripts/templates/vscode)

@hiroMTB hiroMTB changed the title [under development] add vscode support [:construction:under development] add vscode support May 17, 2019

@hiroMTB hiroMTB changed the title [:construction:under development] add vscode support [under development] add vscode support May 17, 2019

@hiroMTB hiroMTB changed the title [under development] add vscode support 鈿狅笍[under development] add vscode support May 17, 2019

@hiroMTB hiroMTB changed the title 鈿狅笍[under development] add vscode support add vscode support 馃殰under development馃敤 May 17, 2019

@hiroMTB hiroMTB marked this pull request as ready for review May 17, 2019

hiroMTB added some commits May 17, 2019

fix Open in IDE button for linux
xdg-open will open project file with text editor.
We use "code'" command to open vscode. User need to install vscode in advance.
@Daandelange

This comment has been minimized.

Copy link
Member

commented on 46a6671 May 20, 2019

Hey, I'm not able to test/confirm this right now but it was the way how to open it in qt-creator, some years ago :)
I think on linux, we do mainly makefiles + any text editor.
Alternative compilers = qt or vs... I'm not quite sur how this should be handled.

I think xdg-open is installed by default and can be user-configured while code requires to have vs installed.

This comment has been minimized.

Copy link
Member

replied May 20, 2019

Oh, sorry your commit is all right, it only applies to VSC projects. :)
Forget what I said above. O:-)

@arturoc

This comment has been minimized.

Copy link
Member

commented May 20, 2019

Hiroshi, about the target platform, until now we've had a default config for each platform so for linux is makefiles + qt for osx makefiles + xcode...

But we've never supported more than one possible ide option per platform until now.

I see two ways to solve it:

  • We add vscode files by default when creating a project along with the other defaults we have right now, that way projects will work right away with any of the supported IDEs

  • We have a default and this constants, OF_TARGET_LINUX... only refer to the default but then we have ways to specify an alternartive IDE we would need to pass a parameter to the command line PG specifying the IDE apart from the platform and the command line PG (and ofxProjectGenerator) handles that. If none is passed then it uses the defaults.

I think option number 2 makes more sense

@hiroMTB

This comment has been minimized.

Copy link
Contributor Author

commented May 20, 2019

@Daandelange
Thanks!
Right now PG generate Qt project together with make files. And about Open IDE button, when we don't have Visual Studio 2017 or Xcode installed, the button does not work. So I guess it's okay to use "code" command here. But we can roll back if there is a good solution for this. :-)

@arturoc
Thanks, I see the point. Option #2 sounds better for me too.
vscode needs invisible folder of /.vscode. And it could contain huge files(sometimes several GB) which stores autocomplete database(probably). So it can be annoying to have this invisible folder for those who don't use vscode.

To implement option #2, I assume we need like following changes,

  • Frontend: provide one more dropdown list to let user select altanative IDE option
  • CommnadLine: receive additional argument, e.g. ./projectGenerator -a' ' -p'linuxarmv6l' -i"vscode"

hmm...

@hiroMTB

This comment has been minimized.

Copy link
Contributor Author

commented May 20, 2019

@arturoc

This comment has been minimized.

Copy link
Member

commented May 20, 2019

It might be that we don't really need a second dropdown, if the config files for every platform are the same then vscode can just be one more option in the dropdown we have until now as you have it.

@hiroMTB

This comment has been minimized.

Copy link
Contributor Author

commented May 20, 2019

@hiroMTB

This comment has been minimized.

Copy link
Contributor Author

commented May 21, 2019

I sent 2 more PR to support more IDEs. (sorry for mess 馃槄)

#203 strip ofTargetPlatform
#204 add quick implementation of altanative IDE option

#203 looks simpler and more flexible for me.

@hiroMTB

This comment has been minimized.

Copy link
Contributor Author

commented May 21, 2019

We've concluded that we add vscode support via -t, -template option of command line PG.
And we do not change PG in the meant time.
For detailed discussion at #203.

@hiroMTB hiroMTB closed this May 21, 2019

@Daandelange

This comment has been minimized.

Copy link
Member

commented May 22, 2019

Ok, that went fast ! :)
Thanks, great overview and insights, sounds good to me too.
Let me know if you need help implementing a dropdown in the Electron GUI, I can make some time.

@hiroMTB

This comment has been minimized.

Copy link
Contributor Author

commented May 22, 2019

Thanks!
I'm preparing frontend at here.

https://github.com/hiroMTB/projectGenerator/tree/feature-add-template-dropdown-to-frontend?files=1

Gui has been done, but I need to parse template.config to make valid drop down list for each platform.

@hiroMTB hiroMTB referenced this pull request May 24, 2019

Merged

Feature add vscode template #6298

3 of 3 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.