Cambiados los ifndef RELEASE por ifdef DEBUG

This commit is contained in:
2022-11-14 22:35:05 +01:00
parent 6cac55a54f
commit e2846023da
3 changed files with 10 additions and 10 deletions

View File

@@ -14,7 +14,7 @@ windows:
@echo off
powershell if (Test-Path data\config) {Remove-Item data\config -Recurse -Force}
powershell if (-not (Test-Path data\config)) {New-Item data\config -ItemType Directory}
g++ $(source) -std=c++11 -Wall -Os -lmingw32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o $(executable).exe
g++ $(source) -D DEBUG -std=c++11 -Wall -Os -lmingw32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o $(executable).exe
strip -s -R .comment -R .gnu.version $(executable).exe --strip-unneeded
windows_release:
@@ -39,7 +39,7 @@ windows_release:
powershell if (Test-Path "$(releaseFolder)\data\room\standard.tsx") {Remove-Item "$(releaseFolder)\data\room\standard.tsx" -Recurse -Force}
# Build
g++ $(source) -D RELEASE -std=c++11 -Wall -Os -lmingw32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(releaseFolder)/$(executable).exe"
g++ $(source) -std=c++11 -Wall -Os -lmingw32 -lSDL2main -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -static-libstdc++ -Wl,-subsystem,windows -o "$(releaseFolder)/$(executable).exe"
strip -s -R .comment -R .gnu.version "$(releaseFolder)/$(executable).exe" --strip-unneeded
# Create ZIP
@@ -52,7 +52,7 @@ windows_release:
macos:
rm -rdf data/config
mkdir -p data/config
clang++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -o $(executable)_macos
clang++ $(source) -D DEBUG -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -o $(executable)_macos
macos_release:
# Remove data
@@ -80,7 +80,7 @@ macos_release:
cp release/Info.plist "$(releaseFolder)/$(appName).app/Contents"
# Build INTEL
clang++ $(source) -D RELEASE -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12
clang++ $(source) -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -F ./Frameworks -ffunction-sections -fdata-sections -o "$(releaseFolder)/$(appName).app/Contents/MacOS/$(executable)" -rpath @executable_path/../Frameworks/ -target x86_64-apple-macos10.12
# Build INTEL DMG
rm -f "$(macosIntelRelease)"
@@ -89,7 +89,7 @@ macos_release:
rm -f tmp.dmg
# Build APPLE SILICON
clang++ $(source) -D RELEASE -D MACOS_BUNDLE -std=c++11 -Wall -Os -framework SDL2 -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 -std=c++11 -Wall -Os -framework SDL2 -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
rm -f "$(macosAppleSiliconRelease)"
@@ -104,7 +104,7 @@ macos_release:
linux:
rm -rdf data/config
mkdir -p data/config
g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o $(executable)_linux
g++ $(source) -D DEBUG -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o $(executable)_linux
strip -s -R .comment -R .gnu.version $(executable)_linux --strip-unneeded
linux_release:
@@ -126,7 +126,7 @@ linux_release:
rm -f "$(releaseFolder)/data/room/standard.tsx"
# Build
g++ $(source) -D RELEASE -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o $(releaseFolder)/$(executable)
g++ $(source) -std=c++11 -Wall -Os -lSDL2 -ffunction-sections -fdata-sections -Wl,--gc-sections -o $(releaseFolder)/$(executable)
strip -s -R .comment -R .gnu.version $(releaseFolder)/$(executable) --strip-unneeded
# Pack files

View File

@@ -9,7 +9,7 @@ Director::Director(int argc, char *argv[])
section.name = SECTION_PROG_LOGO;
section.subsection = SUBSECTION_LOGO_TO_INTRO;
#ifndef RELEASE
#ifdef DEBUG
section.name = SECTION_PROG_GAME;
#endif

View File

@@ -20,7 +20,7 @@ Game::Game(SDL_Renderer *renderer, Screen *screen, Resource *resource, Asset *as
this->debug = debug;
this->options = options;
#ifndef RELEASE
#ifdef DEBUG
currentRoom = "14.room";
const int x1 = 1;
const int y1 = 13;
@@ -96,7 +96,7 @@ void Game::checkEventHandler()
case SDL_SCANCODE_ESCAPE:
section.name = SECTION_PROG_TITLE;
break;
#ifndef RELEASE
#ifdef DEBUG
case SDL_SCANCODE_G:
debug->switchEnabled();
options->cheat.invincible = debug->getEnabled();