kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #37191
Re: Using Visual Studio 2017 CE for KiCad development
-
To:
Andrew Lutsenko <anlutsenko@xxxxxxxxx>, Nick Østergaard <oe.nick@xxxxxxxxx>
-
From:
Wayne Stambaugh <stambaughw@xxxxxxxxx>
-
Date:
Tue, 21 Aug 2018 17:20:34 -0400
-
Autocrypt:
addr=stambaughw@xxxxxxxxx; prefer-encrypt=mutual; keydata= mQGiBEM0hxQRBAC2fNh3YOVLu1d5GZ0SbrTNldGiGnCJPLqzEnqFX9v6jmf33TMt6EmSLkl6 Wtfkoj0nVwKxcYmJkA8DX0QAokBkwNIzhSsBzQvthBLIk/5LnPVVKrEXOcL4mUyH1doKlkaE slgJozNa6Av+oavcvD02o1zJOloBbaHlNlyRt7fKswCgtIFlVjWggVH/15KfWk+Qo5JVPbME AIUBAQyL2OAx0n60AWec2WHnO9buHuG0ibtICgUMkE+2MRmYyKwYRdyVwGoIUemFuOyHp0AJ InX4T+vy2E7vkwODqjtMLfIoRkokW74Fi4nrvjlhOAw/vdq/twLbAmR9MOfPTpR4y7kQy1O2 /n+RkkRvh26vTzfbQmrH7cBJhk6aA/9Uwvu3E4zNJgHVZeS0HyWtmR1eOPPRbnkPgJTToX5O KMKzTJI/FX6kT7cFoCamitHrW3BJP4Dx+cMMsa47EGxqVTdbVJ4LjogsXTXxb+0Fn1u4zBdx x3Cer6O7+hqWy7zvpzeC6nSREjqDKa5CgHtv/GLm5uFPOmsjAsnHj2tlBrQmV2F5bmUgU3Rh bWJhdWdoIDxzdGFtYmF1Z2h3QGdtYWlsLmNvbT6IeAQTEQIAOBYhBOffs6CbblRzBkv33BtR cWlZ+CReBQJbFBS2AhsDBQsJCAcCBhUKCQgLAgQWAgMBAh4BAheAAAoJEBtRcWlZ+CReMI8A nRbrLkzp7+c2f0vX7sfg4ICX8LAKAJ9uClo4uJajmZa5zZrL2nKdZlUwIrkCDQRDNIcxEAgA gCru+3/aOC6RCjpvYC72wY+d5SmHphC6yeiV2/mOumyt5MLo/Ps2GznZr11JspqFk5K/Zpvp MMLqqjDZ39+50a2iKRQFJ6NlK+hJWMmj6eJygQrCwYo3Gjc6CqfrqUv+8VSnf/i5sIZmtOVA 4ZjML18MuBvMSsNdVLFJd5HNnYb1iOECpvqdPVh/21LLCEw7MUUGGnHBhCrmk2aJe5hFmcSN g4ldBcXrgMQBwf7aMVoobXBMFDb/IENByXn0llB7Gr2IFMRmNS9/p8s/II1Yl2bTqyX4FSz8 cfn7C9KEz7faZ7wzAcpwHFC/zs3JoAjJ0IEKdNUpIwAlKMzT3CzctwADBQf/cxpG28MKyrqk nNmq/8LQLy+x6FSYXBLjxQz9BiBNYeesDZQ6J5UbL1mjpJzMa5tLZypPYo4bbGyR22hrbyDF K7m6AcVaMIJKl98g4ukMutFfAJyRDaREH5Zl/X1P4u1Z/yaAIy9mKaNbaK1/5djNJ5wCTFen TUgAp9xdc30kGkFDdLJFp5uxDY4P0vaZiZdjUCvDM3Zjv5IzpNOfxVqTUBQNUP/BnnKhkk0p DTD6s3X8S+D0rOtEBQ8K0cwERI/E8EFa8nj0TNw4e2MYGR8wg+SxqJ7z5f0zPY0bO6G9DDFB wYCqzzPWGqdAh9vA5971TAbPERtdFybhkurozp2SfYhJBBgRAgAJBQJDNIcxAhsMAAoJEBtR cWlZ+CResHUAniULLCWiT26ieRTl7N2vS6vBo/DuAJ4m7Ss/gyiW6ybTn1ctDXAUgm2QVQ==
-
Cc:
KiCad developers <kicad-developers@xxxxxxxxxxxxxxxxxxx>
-
In-reply-to:
<CADn3vW3o715bL=cSYDtY8-CZQ2=yZS708jE+rLxEnZ0_kyNvoA@mail.gmail.com>
-
Openpgp:
preference=signencrypt
-
User-agent:
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1
This sounds like a workable solution.
On 08/21/2018 05:05 PM, Andrew Lutsenko wrote:
> Because these settings have to be tweaked manually for each dev I don't
> think
> committing them in root makes sense.
>
> We could just add example and some docs in Documentation/development/ide
>
> On Tue, Aug 21, 2018 at 11:52 AM Nick Østergaard <oe.nick@xxxxxxxxx
> <mailto:oe.nick@xxxxxxxxx>> wrote:
>
> Alternatively, we could provide them in a dedicated repository on the
> kicad org on github. Then they are decoupled from the normal source
> and the wild west for IDE confs are self contained. This is just a
> suggestion if you think this would be useful.
> Den tir. 21. aug. 2018 kl. 19.49 skrev Wayne Stambaugh
> <stambaughw@xxxxxxxxx <mailto:stambaughw@xxxxxxxxx>>:
> >
> > If we consider adding this, we open ourselves up to including
> > configuration files for every IDE not just VS so it's a Pandora's box.
> > If we do decide to allow this, please do not put it in the source root
> > path. Personally, I'm not a big fan but as long as it doesn't get
> in my
> > way then I'm not completely opposed to it.
> >
> > Cheers,
> >
> > Wayne
> >
> > On 8/19/2018 9:17 AM, Mark Roszko wrote:
> > > Nice. I tried using the VS Cmake support a long time ago when it was
> > > initially released but still buggy. Great you got it fully working!
> > > Honestly as nice as CLion can be, VS completely blows it away.
> > >
> > > Personally I would consider using a build and install root of
> > >
> > >
> > > "buildRoot": "${workspaceRoot}\\build\\${name}",
> > > "installRoot": "${workspaceRoot}\\install\\${name}",
> > >
> > > so it doesn't get buried in your user root and you end up wondering,
> > > months later, where all your disk space went.
> > >
> > > This should be considered for commiting into the source tree. It
> doesn't
> > > alter the source and still builds under msys.
> > >
> > >
> > > On Sun, Aug 19, 2018 at 6:05 AM Andrew Lutsenko
> <anlutsenko@xxxxxxxxx <mailto:anlutsenko@xxxxxxxxx>
> > > <mailto:anlutsenko@xxxxxxxxx <mailto:anlutsenko@xxxxxxxxx>>> wrote:
> > >
> > > Hi all,
> > >
> > > I've managed to get KiCad code base to build in VS 2017 and more
> > > importantly be parsed
> > > by intellisense. Thought I'd share the config for other
> windows devs.
> > >
> > > I've been using Atom so far with relative success but it's not
> > > great. Decided to try if KiCad can
> > > be worked on in real IDE with contextual autocomplete that
> works.
> > >
> > > MS has been investing in building support in Visual Studio
> for non
> > > ms build systems. GCC,
> > > clang, cmake, non x86 targets, all of this has been coming
> along in
> > > recent releases.
> > > Not everything works like in ms build projects, but it's
> still miles
> > > ahead of generic text editors.
> > >
> > > Prerequisite: have msys2 windows environment with working
> KiCad build.
> > >
> > > Get VS 15.8.0 or later. I've tested this on 15.8.1 community
> edition
> > > preview. (It's free).
> > >
> > > Install additional components:
> > > Linux development with C++
> > > Visual C++ tools for CMake and Linux
> > >
> > > Then open VS and go to File -> Open... -> CMake...
> > > select CMakeLists.txt in KiCad src root.
> > >
> > > Next go to CMake -> Change CMake Settings -> CMakeLists.txt
> > > In popup window choose Mingw64 Release (or Debug)
> > > A file named CMakeSettings.json will be created and you have to
> > > tweak a few things.
> > > I've attached my CMakeSettings.json for reference but the
> important
> > > bits are:
> > >
> > > configurations.environments.MINGW64_ROOT - this is path to your
> > > mingw64 folder
> > > configurations.environments.FLAVOR - mingw flavor, I use
> > > x86_64-w64-mingw32
> > > configurations.environments.TOOLSET_VERSION should be
> autodetected,
> > > if not check
> > > mingw64\lib\gcc\x86_64-w64-mingw32 folder for version. It's
> > > 7.3.0 for me
> > > configurations.environments.INCLUDE -
> > > add ${env.MINGW64_ROOT}\\include to the list
> > > configurations.generator - I set it to "MSYS Makefiles" and VS
> > > frowns on it but it works.
> > > Maybe "Unix Makefiles" work too, I didn't check.
> > > configurations.cmakeCommandArgs - this is the tricky one
> that I had
> > > to do trial and error
> > > dance with a lot and also read cmake find rules that
> don't always
> > > work. I found this
> > > combination to do the job:
> > > "-DCMAKE_PREFIX_PATH=${env.MINGW64_ROOT} -DMINGW:STRING=TRUE
> > > -DMSYS:STRING=TRUE -DCYGWIN:STRING=TRUE
> > > -DOPENGL_INCLUDE_DIR=${env.MINGW64_ROOT}\\include",
> > > configurations.buildCommandArgs - remove the "-v" that VS puts
> > > there, it just prints version
> > > for make. I put "-j6" instead to speed up the build.
> > > configurations.intelliSenseMode - VS should auto fill this to
> > > "linux-gcc-x64"
> > >
> > > Remaining configs can be left default, or you can tweak them
> to your
> > > taste.
> > >
> > > After you save the CMakeSettings.json VS will automatically
> > > regenerate CMake cache.
> > > Go to CMake menu and you can build all targets or specific
> ones from
> > > there.
> > > In my case intellisense only picked up cache after I did
> full build,
> > > so maybe it is required
> > > to do at least once.
> > >
> > > But result is so worth it:
> > >
> > > intellisense.png
> > >
> > > Hope this helps!
> > >
> > > Regards,
> > > Andrew
> > > _______________________________________________
> > > Mailing list: https://launchpad.net/~kicad-developers
> <https://launchpad.net/%7Ekicad-developers>
> > > Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> > > <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
> > > Unsubscribe : https://launchpad.net/~kicad-developers
> <https://launchpad.net/%7Ekicad-developers>
> > > More help : https://help.launchpad.net/ListHelp
> > >
> > >
> > >
> > > --
> > > Mark
> > >
> > > _______________________________________________
> > > Mailing list: https://launchpad.net/~kicad-developers
> <https://launchpad.net/%7Ekicad-developers>
> > > Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> > > Unsubscribe : https://launchpad.net/~kicad-developers
> <https://launchpad.net/%7Ekicad-developers>
> > > More help : https://help.launchpad.net/ListHelp
> > >
> >
> > _______________________________________________
> > Mailing list: https://launchpad.net/~kicad-developers
> <https://launchpad.net/%7Ekicad-developers>
> > Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> > Unsubscribe : https://launchpad.net/~kicad-developers
> <https://launchpad.net/%7Ekicad-developers>
> > More help : https://help.launchpad.net/ListHelp
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> <https://launchpad.net/%7Ekicad-developers>
> Post to : kicad-developers@xxxxxxxxxxxxxxxxxxx
> <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
> Unsubscribe : https://launchpad.net/~kicad-developers
> <https://launchpad.net/%7Ekicad-developers>
> More help : https://help.launchpad.net/ListHelp
>
References