C++ Question Change Visual Studio Vars

Topper

Addon Developer
Addon Developer
Donator
Joined
Mar 28, 2008
Messages
653
Reaction score
10
Points
33
Hello I have one question regarding visual studio:
I cannot find out were those $(ConfigDir) variables are set.
How can I modify them if they are wrong?

I've searched through the project files but can't find them and even in this view they cannot be edited...

1657744777740.png
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
1,842
Reaction score
360
Points
83
Those come from Orbiters Property-Sheets (located at Orbitersdk\resources\) and should not be changed (at least not without expectig trouble ;))
Oh! When they come from the git repository, they seem to be wrong! There should never be an absolute path in there!

All those sheets "derive" somehow their base path (OrbiterDir) from Orbitersdk\resources\orbiterroot.props
In there it should read something like this:
XML:
  <PropertyGroup Label="UserMacros">
    <OrbiterDir>$(MSBuildThisFileDirectory)..\..</OrbiterDir>
  </PropertyGroup>
else it's wrong.

In Orbiter BETA the Sheets where re-located to be at Orbitersdk\VS2015\BuildRules\ and Orbitersdk\VS2015\PropertyPages\ .


The "old" Visual Studio Propertiy Sheets (Extension .vsprops) could not handle the $(MSBuildThisFileDirectory) Variable and therefore it contained the arbitrary (in your case wrong) value "c:\source\orbiter"
XML:
<VisualStudioPropertySheet
    ProjectType="Visual C++"
    Version="8.00"
    Name="orbiterroot"
    >
    <UserMacro
        Name="OrbiterDir"
        Value="c:\source\orbiter"
        PerformEnvironmentSet="true"
    />
</VisualStudioPropertySheet>

So in case you have to use the old Sheets (made for Visual Studio 2010 or lower I think), you might have to change that value in there.

Ah, I see you were using Orbitersdk\samples\CustomMFD\CustomMFD.vcproj . That's unfortunately still referencing the "old" Sheets - as it's an "old" Project file.
BTW: Almost all Projects in that sample directory should have been updated to use "more modern" Sheets a long time ago.

Long story short: Either move your Orbiter development to c:\source\orbiter, or change the value in the Orbitersdk\resources\orbiterroot.vsprops file.
 
Last edited:
Top