Skip to content

Commit

Permalink
Update paths to reflect new project structure
Browse files Browse the repository at this point in the history
  • Loading branch information
simongeilfus committed Feb 7, 2017
1 parent e7ba8b5 commit 7e62387
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 15 deletions.
6 changes: 1 addition & 5 deletions include/runtime/Memory.h
Expand Up @@ -180,11 +180,7 @@ namespace details {
{
auto appPath = ci::app::getAppPath();
auto appPathStr = appPath.string();
#ifdef _WIN64
auto projectPath = appPath.parent_path().parent_path().parent_path().parent_path();
#else
auto projectPath = appPath.parent_path().parent_path().parent_path();
#endif
auto projectPath = appPath.parent_path().parent_path().parent_path().parent_path().parent_path();
if( ci::fs::is_directory( projectPath ) ) {
ci::fs::recursive_directory_iterator dir( projectPath ), endDir;
for( ; dir != endDir; ++dir ) {
Expand Down
11 changes: 3 additions & 8 deletions src/runtime/Compiler.cpp
Expand Up @@ -587,13 +587,9 @@ Compiler::Compiler()
{
// get the application name and directory
mAppPath = app::getAppPath().parent_path();
#ifdef _WIN64
mProjectPath = mAppPath.parent_path().parent_path().parent_path();
#else
mProjectPath = mAppPath.parent_path().parent_path();
#endif
mProjectPath = mAppPath.parent_path().parent_path().parent_path().parent_path();
mProjectName = mProjectPath.stem().string();

// find the compiler/linker arguments and start the process
// with visual studio env vars and paths
findAppBuildArguments();
Expand Down Expand Up @@ -935,11 +931,10 @@ void Compiler::initializeProcess()
{
if( fs::exists( "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat" ) ) {
// create a cmd process with the right environment variables and paths
mProcess = make_unique<Process>( "cmd /k prompt 1$g\n", mAppPath.parent_path().parent_path().parent_path().string(), true, true );
#ifdef _WIN64
mProcess = make_unique<Process>( "cmd /k prompt 1$g\n", mAppPath.parent_path().parent_path().string(), true, true );
mProcess << quote( "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat" ) + " x64" << endl;
#else
mProcess = make_unique<Process>( "cmd /k prompt 1$g\n", mAppPath.parent_path().string(), true, true );
mProcess << quote( "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat" ) + " x86" << endl;
#endif
}
Expand Down
4 changes: 2 additions & 2 deletions src/runtime/Module.cpp
Expand Up @@ -178,8 +178,8 @@ Timer timer;
ModuleRef ModuleManager::add( const ci::fs::path &path )
{
// make sure temp folders exist
// create parent "RTTemp" folder
auto tempFolder = ci::app::getAppPath() / "RTTemp" / path.stem();
// create parent "intermediate/runtime" folder
auto tempFolder = ci::app::getAppPath() / "intermediate" / "runtime" / path.stem();
if( ! ci::fs::exists( tempFolder.parent_path() ) ) {
ci::fs::create_directory( tempFolder.parent_path() );
}
Expand Down

0 comments on commit 7e62387

Please sign in to comment.