Añadido macos_release al Makefile

This commit is contained in:
2022-11-11 09:43:17 +01:00
parent 9325fe9f14
commit 7d5e1aa67b
5 changed files with 75 additions and 23 deletions

17
.gitignore vendored
View File

@@ -1,16 +1,7 @@
.vscode
bin
*config.txt
dll
docs
icon
releases
resources
scripts
*.opk
*.DS_Store
jaildoctor*
*plist*
MacOS/*
Resources/*
Frameworks/*
thumbs.db
*.exe
*_macos
*_linux

View File

@@ -1,6 +1,7 @@
executable = jaildoctors_dilemma
source = source/*.cpp source/common/*.cpp
macosBundle = ../jaildoctors_dilemma_release/JailDoctor's Dilemma.app/Contents/
appName = JailDoctor's Dilemma
macosBundle = ../jaildoctors_dilemma_release
windows:
@echo off
@@ -11,13 +12,27 @@ macos:
rm -rdf data/config
mkdir -p data/config
g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -o $(executable)_macos
macos_f:
macos_release:
# Remove data
rm -rdf data/config
rm -rdf "$(macosBundle)/$(appName).app"
# Create folders
mkdir -p data/config
cp -r data "$(macosBundle)Resources"
cp -r "$(macosBundle)/Frameworks" .
clang++ $(source) -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(macosBundle)MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12
rm -rdf ./Frameworks
mkdir -p "$(macosBundle)/$(appName).app/Contents/Frameworks"
mkdir -p "$(macosBundle)/$(appName).app/Contents/MacOS"
mkdir -p "$(macosBundle)/$(appName).app/Contents/Resources"
mkdir -p Frameworks
# Copy folders
cp -R data "$(macosBundle)/$(appName).app/Contents/Resources"
cp -R /Library/Frameworks/SDL2.framework "$(macosBundle)/$(appName).app/Contents/Frameworks"
cp -R /Library/Frameworks/SDL2.framework Frameworks
# Copy files
cp release/*.icns "$(macosBundle)/$(appName).app/Contents/Resources"
cp release/Info.plist "$(macosBundle)/$(appName).app/Contents"
# Build
clang++ $(source) -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(macosBundle)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12
# Remove folders
rm -rdf Frameworks
linux:
rm -rdf data/config
mkdir -p data/config

44
release/Info.plist Normal file
View File

@@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildMachineOSBuild</key>
<string>19H2</string>
<key>CFBundleDevelopmentRegion</key>
<string>en</string>
<key>CFBundleDisplayName</key>
<string>jaildoctors_dilemma</string>
<key>CFBundleExecutable</key>
<string>jaildoctors_dilemma</string>
<key>CFBundleIconFile</key>
<string>jaildoctors_dilemma</string>
<key>CFBundleIconName</key>
<string>jaildoctors_dilemma</string>
<key>CFBundleIdentifier</key>
<string>org.jailgames.jaildoctors_dilemma</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>jaildoctors_dilemma</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.3</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0.0</string>
<key>CSResourcesFileMapped</key>
<true/>
<key>LSMinimumSystemVersion</key>
<string>10.12</string>
<key>NSHighResolutionCapable</key>
<true/>
<key>NSHumanReadableCopyright</key>
<string>Copyright 2022 JailDesigner</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>SUPublicDSAKeyFile</key>
<string>dsa_pub.pem</string>
</dict>
</plist>

Binary file not shown.

View File

@@ -7,7 +7,9 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as
// Inicia algunas variables
board.iniClock = SDL_GetTicks();
currentRoom = "03.room";
spawnPoint = {15, 96, 0, 0, 0, s_standing, SDL_FLIP_NONE};
const int x = 25;
const int y = 13;
spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL};
// Copia los punteros
this->resource = resource;
@@ -20,9 +22,9 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as
#ifndef RELEASE
currentRoom = "03.room";
const int x = 29;
const int y = 13;
spawnPoint = {x * 8, y * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL};
const int x1 = 29;
const int y1 = 13;
spawnPoint = {x1 * 8, y1 * 8, 0, 0, 0, s_standing, SDL_FLIP_HORIZONTAL};
#endif
// Crea los objetos