- Ja compila el release en mac
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -1,6 +1,9 @@
|
|||||||
|
.DS_Store
|
||||||
.vscode/*
|
.vscode/*
|
||||||
*.exe
|
*.exe
|
||||||
arounders
|
arounders
|
||||||
arounders_debug
|
arounders_debug
|
||||||
./*.dll
|
./*.dll
|
||||||
release/*
|
release/*
|
||||||
|
respak2
|
||||||
|
*.dSYM/*
|
||||||
10
Makefile
10
Makefile
@@ -69,7 +69,7 @@ macos_release:
|
|||||||
mkdir -p Frameworks
|
mkdir -p Frameworks
|
||||||
|
|
||||||
# Fem el paquetet
|
# Fem el paquetet
|
||||||
respak2 -p
|
./respak2 -p
|
||||||
|
|
||||||
# Copy folders
|
# Copy folders
|
||||||
cp data.jf2 "$(releaseFolder)/$(appName).app/Contents/Resources"
|
cp data.jf2 "$(releaseFolder)/$(appName).app/Contents/Resources"
|
||||||
@@ -94,12 +94,12 @@ macos_release:
|
|||||||
rm -f tmp.dmg
|
rm -f tmp.dmg
|
||||||
|
|
||||||
# Build APPLE SILICON
|
# Build APPLE SILICON
|
||||||
clang++ $(source) -D MACOS_BUNDLE -D VERSION=\"$(version)\" -std=c++11 -Wall -Os -framework SDL2 -framework SDL2_mixer -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target arm64-apple-macos11
|
#clang++ $(source) -D MACOS_BUNDLE -D VERSION=\"$(version)\" -std=c++11 -Wall -Os -framework SDL2 -framework SDL2_mixer -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target arm64-apple-macos11
|
||||||
|
|
||||||
# Build APPLE SILICON DMG
|
# Build APPLE SILICON DMG
|
||||||
hdiutil create tmp.dmg -ov -volname "$(appName)" -fs HFS+ -srcfolder "$(releaseFolder)"
|
#hdiutil create tmp.dmg -ov -volname "$(appName)" -fs HFS+ -srcfolder "$(releaseFolder)"
|
||||||
hdiutil convert tmp.dmg -format UDZO -o "$(macosAppleSiliconRelease)"
|
#hdiutil convert tmp.dmg -format UDZO -o "$(macosAppleSiliconRelease)"
|
||||||
rm -f tmp.dmg
|
#rm -f tmp.dmg
|
||||||
|
|
||||||
# Remove data
|
# Remove data
|
||||||
rm -rdf Frameworks
|
rm -rdf Frameworks
|
||||||
|
|||||||
@@ -4,6 +4,10 @@
|
|||||||
#include <SDL2/SDL.h>
|
#include <SDL2/SDL.h>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
|
||||||
|
#ifdef MACOS_BUNDLE
|
||||||
|
#include <libgen.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace game
|
namespace game
|
||||||
{
|
{
|
||||||
bool windowHasFocus = true;
|
bool windowHasFocus = true;
|
||||||
@@ -41,6 +45,13 @@ namespace game
|
|||||||
|
|
||||||
int main(int argc, char *argv[])
|
int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
|
#ifdef MACOS_BUNDLE
|
||||||
|
char res_file[255] = "";
|
||||||
|
strcpy(res_file, dirname(argv[0]));
|
||||||
|
strcat(res_file, "/../Resources/data.jf2");
|
||||||
|
file::setResourceFilename(res_file);
|
||||||
|
#endif
|
||||||
|
|
||||||
game::windowHasFocus = true;
|
game::windowHasFocus = true;
|
||||||
game::init();
|
game::init();
|
||||||
input::init(draw::getZoom());
|
input::init(draw::getZoom());
|
||||||
|
|||||||
Reference in New Issue
Block a user