diff --git a/Makefile b/Makefile index f2047b1..5d25298 100644 --- a/Makefile +++ b/Makefile @@ -130,16 +130,20 @@ macos_release: $(RMFILE) "$(MACOS_APPLE_SILICON_RELEASE)" # Crea la carpeta temporal para hacer el trabajo y las carpetas obligatorias para crear una app de macos + $(MKDIR) "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Frameworks" $(MKDIR) "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/MacOS" $(MKDIR) "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources" # Copia carpetas y ficheros cp -R shaders "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources" + cp -R release/frameworks/SDL3.xcframework "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Frameworks" + cp release/icon.icns "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/Resources" + cp release/Info.plist "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents" cp LICENSE "$(RELEASE_FOLDER)" cp README.md "$(RELEASE_FOLDER)" # Compila la versión para procesadores Apple Silicon - $(CXX) $(APP_SOURCES) $(INCLUDES) -DMACOS_BUNDLE -DRELEASE_BUILD $(CXXFLAGS) $(LDFLAGS) -o "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/MacOS/$(TARGET_NAME)" -target arm64-apple-macos11 + $(CXX) $(APP_SOURCES) $(INCLUDES) -DMACOS_BUNDLE -DRELEASE_BUILD $(CXXFLAGS) $(LDFLAGS) -o "$(RELEASE_FOLDER)/$(APP_NAME).app/Contents/MacOS/$(TARGET_NAME)" -rpath @executable_path/../Frameworks/ -target arm64-apple-macos11 # Firma la aplicación codesign --deep --force --sign - --timestamp=none "$(RELEASE_FOLDER)/$(APP_NAME).app" diff --git a/release/Info.plist b/release/Info.plist index f2a9f8e..6b1e71e 100644 --- a/release/Info.plist +++ b/release/Info.plist @@ -5,27 +5,27 @@ CFBundleDevelopmentRegion es CFBundleDisplayName - ViBe3 Physics + Shadertoy CFBundleExecutable - vibe3_physics + shadertoy CFBundleIconFile icon CFBundleIconName icon CFBundleIdentifier - net.jailgames.vibe3_physics + net.jailgames.shadertoy CFBundleInfoDictionaryVersion 6.0 CFBundleName - vibe3_physics + shadertoy CFBundlePackageType APPL CFBundleShortVersionString - 1.0 + 1.00 CFBundleSignature ???? CFBundleVersion - 1.0 + 1.00 CSResourcesFileMapped LSMinimumSystemVersion diff --git a/release/temp.png b/release/temp.png deleted file mode 100644 index 0eee7c2..0000000 Binary files a/release/temp.png and /dev/null differ diff --git a/src/defines.hpp b/src/defines.hpp index f31b3f7..6cfda60 100644 --- a/src/defines.hpp +++ b/src/defines.hpp @@ -8,5 +8,10 @@ constexpr int WINDOW_WIDTH = 800; constexpr int WINDOW_HEIGHT = 800; // Rutas -constexpr const char* SHADERS_FOLDER = "shaders"; -constexpr const char* DEFAULT_SHADER = "shaders/test.frag.glsl"; +#ifdef MACOS_BUNDLE + constexpr const char* SHADERS_FOLDER = "../Resources/shaders"; + constexpr const char* DEFAULT_SHADER = "../Resources/shaders/test.frag.glsl"; +#else + constexpr const char* SHADERS_FOLDER = "shaders"; + constexpr const char* DEFAULT_SHADER = "shaders/test.frag.glsl"; +#endif