Skip to content

Commit 496ffd4

Browse files
committed
Configuration - Issue to start Draw debugging in VS #465
Fixed path for DRAWEXE project configuration in CMakeLists.txt Updated plugin file search path to use CSF_OCCTResourcePath
1 parent fd7a989 commit 496ffd4

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1240,7 +1240,7 @@ if (MSVC AND 3RDPARTY_DLL_DIRS)
12401240
set (X_COMPILER_BITNESS "Win32")
12411241
endif()
12421242

1243-
OCCT_CONFIGURE ("adm/templates/DRAWEXE.vcxproj.user.in" "${CMAKE_BINARY_DIR}/src/DRAWEXE/DRAWEXE.vcxproj.user")
1243+
OCCT_CONFIGURE ("adm/templates/DRAWEXE.vcxproj.user.in" "${CMAKE_BINARY_DIR}/src/Draw/DRAWEXE/DRAWEXE.vcxproj.user")
12441244
endif()
12451245
endif()
12461246

adm/templates/DRAWEXE.vcxproj.user.in

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
55
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
66
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/resources
7+
DRAWHOME=@CMAKE_SOURCE_DIR@/resources/DrawResources
78
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
89
CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples
910
CSF_OCCTTestsPath=@CMAKE_SOURCE_DIR@/tests
@@ -29,6 +30,7 @@ PATH=@3RDPARTY_DLL_DIRS_FOR_PATH@;%PATH%
2930
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|@X_COMPILER_BITNESS@'">
3031
<LocalDebuggerEnvironment>CASROOT=@CMAKE_SOURCE_DIR@
3132
CSF_FPE=@BUILD_ENABLE_FPE_SIGNAL_HANDLER@
33+
DRAWHOME=@CMAKE_SOURCE_DIR@/resources/DrawResources
3234
CSF_OCCTResourcePath=@CMAKE_SOURCE_DIR@/resources
3335
CSF_OCCTDataPath=@CMAKE_SOURCE_DIR@/data
3436
CSF_OCCTSamplesPath=@CMAKE_SOURCE_DIR@/samples

src/Draw/TKDraw/Draw/Draw.cxx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,10 +452,10 @@ void Draw_Appli(int argc, char** argv, const FDraw_InitAppli Draw_InitAppli)
452452
else
453453
{
454454
TCollection_AsciiString aDrawHome;
455-
TCollection_AsciiString aCasRoot(OSD_Environment("CASROOT").Value());
455+
TCollection_AsciiString aCasRoot(OSD_Environment("CSF_OCCTResourcePath").Value());
456456
if (!aCasRoot.IsEmpty())
457457
{
458-
aDrawHome = aCasRoot + "/src/DrawResources";
458+
aDrawHome = aCasRoot + "/DrawResources";
459459
}
460460
else
461461
{

src/Draw/TKDraw/Draw/Draw_PloadCommands.cxx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,17 @@ static Standard_Boolean findPluginFile(TCollection_AsciiString& thePluginName,
6060
}
6161
else
6262
{
63-
// now try by CASROOT
64-
thePluginDir = OSD_Environment("CASROOT").Value();
63+
// now try by CSF_OCCTResourcePath
64+
thePluginDir = OSD_Environment("CSF_OCCTResourcePath").Value();
6565
if (!thePluginDir.IsEmpty())
6666
{
67-
thePluginDir += "/src/DrawResources";
67+
thePluginDir += "/DrawResources";
6868
aToSetCSFVariable = Standard_True; // CSF variable to be set later
6969
}
7070
else
7171
{
7272
Message::SendFail() << "Failed to load plugin: Neither " << aCSFVariable
73-
<< ", nor CASROOT variables have been set";
73+
<< ", nor CSF_OCCTResourcePath variables have been set";
7474
return Standard_False;
7575
}
7676
}

0 commit comments

Comments
 (0)