Skip to content

Commit

Permalink
Pd externals: Don't use std::filesystem
Browse files Browse the repository at this point in the history
... to support macos < 10.15
  • Loading branch information
mgeier committed Dec 30, 2023
1 parent 1de91a4 commit 4fd2032
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/pd-externals.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ jobs:

macos:
runs-on: macos-latest
env:
cflags: -mmacosx-version-min=10.9
steps:
- name: install macOS packages
run: |
Expand Down
2 changes: 1 addition & 1 deletion flext/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ cflags += \
-DNDEBUG \

define forDarwin
cflags += -mmacosx-version-min=10.15
cflags += -mmacosx-version-min=10.9
endef

ldlibs = -lfftw3f -lsndfile -lmysofa `$(PKG_CONFIG) --libs libxml-2.0`
Expand Down
2 changes: 1 addition & 1 deletion flext/ssr_brs~.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class SsrFlext<ssr::BrsRenderer> : public SsrFlextBase<ssr::BrsRenderer>
}
std::string file_name = _get(argc, argv);
apf::parameter_map params;
params.set("properties-file", (_canvasdir / file_name).string());
params.set("properties-file", _canvasdir + "/" + file_name);
auto id = _engine.add_source("", params);
_engine.get_source(id)->active = true;
_source_ids.push_back(id);
Expand Down
7 changes: 3 additions & 4 deletions flext/ssr_flext.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
#ifndef SSR_FLEXT_H
#define SSR_FLEXT_H

#include <filesystem>
#include <string>
#include <vector>

Expand Down Expand Up @@ -122,7 +121,7 @@ class SsrFlextBase : public flext_dsp

protected:
// NB: This has to be called before _update_params()!
std::filesystem::path _init_canvasdir()
std::string _init_canvasdir()
{
char buf[MAXPDSTRING];
this->GetCanvasDir(buf, sizeof(buf));
Expand All @@ -135,7 +134,7 @@ class SsrFlextBase : public flext_dsp
{
if (params.has_key(key))
{
params.set(key, (_canvasdir / params.get<std::string>(key)).string());
params.set(key, _canvasdir + "/" + params.get<std::string>(key));
}
}

Expand Down Expand Up @@ -554,7 +553,7 @@ class SsrFlextBase : public flext_dsp
}

protected:
std::filesystem::path _canvasdir;
std::string _canvasdir;
Renderer _engine;
std::vector<std::string> _source_ids;
};
Expand Down

0 comments on commit 4fd2032

Please sign in to comment.