Comments (3)
Proposed solution:
#ifdef __APPLE__
#include <cstdlib> // std::system
#endif
...
if (fs::exists(projectDataDir)) {
// originally only on IOS
//this is needed for 0.9.3 / 0.9.4 projects which have iOS media assets in bin/data/
// TODO: Test on IOS
fs::path templateBinDir { templatePath / "bin" };
fs::path templateDataDir { templatePath / "bin" / "data" };
if (fs::exists(templateDataDir) && fs::is_directory(templateDataDir)) {
baseProject::recursiveCopyContents(templateDataDir, projectDataDir);
}
if (fs::exists(templateBinDir) && fs::is_directory(templateBinDir)) {
#ifdef __APPLE__
try {
// extended attributes on macOS
std::string command = "xattr -w com.apple.xcode.CreatedByBuildSystem true " + templateBinDir.string();
if (std::system(command.c_str()) != 0) {
std::cerr << "Failed to set extended attributes on " << templateBinDir.string() << std::endl;
} else {
std::cout << "xattr set correctly for bin" << endl;
}
} catch (const std::exception& e) {
std::cout << e.what() << std::endl;
}
#endif
}
}
```
from projectgenerator.
std::string command = "xattr -w com.apple.xcode.CreatedByBuildSystem true " + templateBinDir.string();
from projectgenerator.
One could also add to the Xcode build phases like: (in bash)
mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/bin"
xattr -w com.apple.xcode.CreatedByBuildSystem true "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/bin"
from projectgenerator.
Related Issues (20)
- Better UUID lib
- PG - Addons libs/ MAC folder not used
- PG macOS Notorization - Need some extra info HOT 1
- ProjectGenerator add-on libs pathing issue and src subfolders not linked correctly HOT 42
- Visual Studio max project name length? HOT 3
- VS missing addon lib sub folder source causing issues HOT 3
- macOS developer agreements need accepting
- ofTargetPlatform OF_TARGET_MACOS missing HOT 2
- zsh: killed if OF uses download_latest_libs.sh HOT 11
- about the new name scheme for PG-generated projects: ISO 8601 and uniqueness within a given day HOT 1
- first run in package location on osx yields can't find oF path what HOT 5
- projectGenerator - Broken things HOT 1
- Latest not working on macOS v.58 HOT 5
- PG v.61 - VS addons issue when projectGenerator not in oF dir HOT 2
- Current nightly PG broken ( on macOS at least )
- PG not detecting OF path correctly ( regression ) HOT 1
- Latest v.65 doesn't add local frameworks. ofxMidi doesn't add CoreMidi HOT 5
- macOS: nightly build PG can't add local addons started with relative path?
- macOS issue with addons in v67 HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from projectgenerator.