Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,16 @@ concurrency:

jobs:
build-linux:
runs-on: ubuntu-18.04
# runs-on: ubuntu-latest
runs-on: ubuntu-latest
strategy:
matrix:
cfg:
- {target: linux}
env:
TARGET: ${{matrix.cfg.target}}
steps:
- name: Install libunwind
run: sudo apt-get install libunwind-dev
- uses: actions/checkout@v3
- name: Build
run:
Expand Down
8 changes: 7 additions & 1 deletion ofxProjectGenerator/src/projects/baseProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,13 @@ bool baseProject::save(){

//add the of root path
if( str.rfind("# OF_ROOT =", 0) == 0 ){
saveConfig << "OF_ROOT = " + getOFRoot() << endl;

auto path = getOFRoot();
if( projectDir.string().rfind(getOFRoot(),0) == 0 ){
path = getOFRelPath(projectDir);
}

saveConfig << "OF_ROOT = " << path << endl;
}
// replace this section with our external paths
else if( extSrcPaths.size() && str.rfind("# PROJECT_EXTERNAL_SOURCE_PATHS =", 0) == 0 ){
Expand Down
11 changes: 8 additions & 3 deletions ofxProjectGenerator/src/projects/xcodeProject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,15 @@ bool xcodeProject::createProjectFile(){

// make everything relative the right way.
string relRoot = getOFRelPathFS(projectDir).string();

projectDir = projectDir.lexically_normal();

//projectDir is always absolute at the moment
//so lets check if the projectDir is inside the OF folder - if it is not make the OF path absolute
if( projectDir.string().rfind(getOFRoot(),0) != 0 ){
relRoot = getOFRoot();
}
if (relRoot != "../../.."){

findandreplaceInTexfile(projectDir / projectName / ".xcodeproj/project.pbxproj", "../../..", relRoot);
findandreplaceInTexfile(projectDir / (projectName + ".xcodeproj/project.pbxproj"), "../../..", relRoot);
findandreplaceInTexfile(projectDir / "Project.xcconfig", "../../..", relRoot);
if( target == "osx" ){
findandreplaceInTexfile(projectDir / "Makefile", "../../..", relRoot);
Expand Down