Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 27-07-2020, 09:22   #1
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,757
Images: 2
BatchUTILS

Dan,
I see you just added a batch file to build release with debug info.
I happen to be trying to finally get set up with this new version so that I can test and debug Polar_pi.


My installation is a little different than your's for some reason. I find in System > Environment Variables > Under "System Variables" that
Quote:
%VCINSTALLDIR% =C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC

%VS141COMNTOOLS% =%C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools

I tried %vcinstalldir% and it went here
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC
where there are 3 directories Auxiliary, Redist & Tools which has me lost.

I tried %vs141comntools% which goes here

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools
Now I notice that the Visual Studio Shortcut goes to

Quote:
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Visual Studio 2017
and that Shortcut has this path in properties
Quote:
"C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe"
which starts Visual Studio up.


-----

In the batchUTILs Osetup.bat you make the following suggestions:


Osetup.bat
Quote:
rem Create symbolic link to this file in folder "%VSINSTALLDIR%\Common7\Tools\vsdevcmd\ext".
rem Be sure to use the complete path to this file as in the example below:
rem mklink "%VSINSTALLDIR%\Common7\Tools\vsdevcmd\ext\Osetup. bat" e:\storage\transmitterdan\BatchUtils\Osetup.bat
rem Note you may have to open CMD prompt as administrator to create the link.


What changes should I make?
rgleason is offline   Reply With Quote
Old 27-07-2020, 09:35   #2
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,757
Images: 2
Re: BatchUTILS

Now I find this path on my computer which is similar but different:
Quote:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd\ext
similar to Osetup.bat
Quote:
rem Create symbolic link to this file in folder "%VSINSTALLDIR%\Common7\Tools\vsdevcmd\ext".


Is this where I should put the symbolic link? and should I change any of the variables?
Like change %VCINSTALLDIR% to %VSINSTALLDIR% and change the path accordingly?
or simply make a new VSINSTALLDIR and point it appropriately?

or I could just use the other variable

Quote:
%VS141COMNTOOLS%\vsdevcmd\ext
to create symbolic link to Osetup.bat.


So from the command prompt, when in directory
Quote:
%VS141COMNTOOLS%\vsdevcmd\ext
So the to create the link, I will have to execute
Quote:
mklink %VS141COMNTOOLS%\vsdevcmd\ext\Osetup.bat C:\Users\Rick\Documents\GitHub\BatchUTILS\Osetup.b at
rgleason is offline   Reply With Quote
Old 27-07-2020, 09:54   #3
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,757
Images: 2
Re: BatchUTILS

I tried this and the syntax is incorrect. Perhaps this will work

Quote:
mklink C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd\ext\Osetup.bat C:\Users\Rick\Documents\GitHub\BatchUTILS\Osetup.b at
That syntax is wrong too. Then tried it running as admin and that syntax is wrong too.
rgleason is offline   Reply With Quote
Old 27-07-2020, 10:06   #4
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,757
Images: 2
Re: BatchUTILS

I need to use quotes here because of spaces.


Quote:
mklink "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd\ext\Osetup.bat" "C:\Users\Rick\Documents\GitHub\BatchUTILS\Osetup. bat"
rgleason is offline   Reply With Quote
Old 27-07-2020, 10:09   #5
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,757
Images: 2
Re: BatchUTILS

Using command prompt as admin,



Quote:
C:\WINDOWS\system32>cd "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd\ext"

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd\ext>m klink "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd\ext\O setup.bat" "C:\Users\Rick\Documents\GitHub\BatchUTILS\Ose tup. bat"
symbolic link created for C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\vsdevcmd\ext\O setup.bat <<===>> C:\Users\Rick\Documents\GitHub\BatchUTILS\Osetup. bat
it worked but I notice wayward spaces......
rgleason is offline   Reply With Quote
Old 27-07-2020, 10:25   #6
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,757
Images: 2
Re: BatchUTILS

Then I tried findvc.bat again



Quote:
C:\Users\Rick\Documents\GitHub\BatchUTILS>findvc
Trying to find Visual Studio version
""
"__get__ = "
Error: No compatible Visual Studio installed.
VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC
"vcgen="
"vcts="

That's not working either and I do have it installed.
I've also added the path to batchUTILS to my environment.
rgleason is offline   Reply With Quote
Old 27-07-2020, 10:34   #7
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,757
Images: 2
Re: BatchUTILS

From the command prompt:
Quote:
C:\Program Files (x86)\Microsoft Visual Studio\2017\Community>osetup
"*******************************"
"* Entering Osetup.bat...V1 *"
"*******************************"
Found OpenCPN development folder at C:\Users\Rick\Documents\GitHub\OpenCPN
Trying to find Visual Studio version
""
"__get__ = "
Error: No compatible Visual Studio installed.
VCINSTALLDIR=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC
"vcgen="
"vcts="
"vcgen="
"vcts="
Found most recent version of wxWidgets at C:\wxWidgets-3.1.2
\Windows was unexpected at this time.
It looks like I should modify the variable VCINSTALLDIR 's path, but to what?


I could modify it to

'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\devenv.exe"
which I know starts Visual studio up.
rgleason is offline   Reply With Quote
Old 27-07-2020, 10:49   #8
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,757
Images: 2
Re: BatchUTILS

I added to findvc.bat



Quote:
if /I "%VSINSTALLDIR%" == "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\VC" call :VS2017
and still get no compatible Visual Studio Installed.
rgleason is offline   Reply With Quote
Old 27-07-2020, 10:59   #9
Registered User
 
rgleason's Avatar

Join Date: Mar 2012
Location: Boston, MA
Boat: 1981 Bristol 32 Sloop
Posts: 17,757
Images: 2
Re: BatchUTILS

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\


has batch files
VsMSBuildCmd.bat
VsDevCmd.bat
vcruntime140.dll


and directory
vsdevcmd
-core
-ext
--osetup.bat link
--cmake.bat
--vcvars.bat
---vcvars folder
---vcvars140.bat
rgleason is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Advertise Here


All times are GMT -7. The time now is 10:25.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.