Skip to content

Commit

Permalink
Fix SDL2 references, remove hardcoded paths, update XCode project
Browse files Browse the repository at this point in the history
  • Loading branch information
lazd committed Oct 17, 2018
1 parent a6a4fa6 commit 82ee70f
Show file tree
Hide file tree
Showing 13 changed files with 47 additions and 20 deletions.
4 changes: 2 additions & 2 deletions GP2X/gp2x.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef GP2X_H
#define GP2X_H

#include <SDL/SDL.h>
#include <SDL2/SDL.h>
#include <sys/ioctl.h>
#include <sys/soundcard.h>
#include <fcntl.h>
Expand All @@ -10,7 +10,7 @@
#include "../wl_def.h"
#if defined(GP2X_940)
#include "fmopl.h"
#include <SDL_gp2x.h>
#include <SDL2/SDL_gp2x.h>
#endif

#define GP2X_BUTTON_UP (0)
Expand Down
2 changes: 1 addition & 1 deletion dc/dc_maple.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

#if defined(_arch_dreamcast)

#include <SDL.h>
#include <SDL2/SDL.h>
#include "dc/maple.h"
#include "dc/maple/controller.h"
#include "dc/maple/vmu.h"
Expand Down
2 changes: 1 addition & 1 deletion dosbox/dbopl.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#elif !defined(_WIN32)
# include <stdint.h>
#endif
#include <SDL.h>
#include <SDL2/SDL.h>

//typedef uintptr_t Bitu;
//typedef intptr_t Bits;
Expand Down
2 changes: 1 addition & 1 deletion gp2x.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef GP2X_H
#define GP2X_H

#include <SDL/SDL.h>
#include <SDL2/SDL.h>
#include <sys/ioctl.h>
#include <sys/soundcard.h>
#include <fcntl.h>
Expand Down
2 changes: 1 addition & 1 deletion id_sd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
//

#include "wl_def.h"
#include <SDL_mixer.h>
#include <SDL2/SDL_mixer.h>
#if defined(GP2X_940)
#include "gp2x/fmopl.h"
#else
Expand Down
2 changes: 1 addition & 1 deletion macosx/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
<key>CFBundleIconFile</key>
<string>wolf4sdl.icns</string>
<key>CFBundleIdentifier</key>
<string>com.chrisballinger.wolf4sdl</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand Down
4 changes: 2 additions & 2 deletions macosx/SDLMain.m
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
Feel free to customize this file to suit your needs
*/

#include "SDL.h"
#include "SDLMain.h"
#include "SDL2/SDL.h"
#include "SDL2/SDLMain.h"
#include <sys/param.h> /* for MAXPATHLEN */
#include <unistd.h>

Expand Down
32 changes: 26 additions & 6 deletions macosx/Wolf4SDL.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
attributes = {
LastUpgradeCheck = 0640;
LastUpgradeCheck = 0920;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Wolf4SDL" */;
compatibilityVersion = "Xcode 3.2";
Expand Down Expand Up @@ -365,7 +365,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "mkdir -p ../build/dep/lib\nmkdir -p ../build/dep/include\nmkdir -p ../build/tmp\nif [ ! -f ../build/dep/lib/libSDL2.a ]; then\n /usr/bin/curl -L -o ../build/tmp/tmp.tar.gz https://dl.dropboxusercontent.com/u/5103936/build-prereqs/wolf4sdl-osx/sdl2.tar.gz\n pushd ../build/tmp\n tar -zxf tmp.tar.gz\n popd\n mv ../build/tmp/*.a ../build/dep/lib\n mv ../build/tmp/*.h ../build/dep/include\n rm ../build/tmp/*\nfi";
shellScript = "rm -rf build\nmkdir -p build/dep/lib\n mkdir -p build/dep/include\n ln -s /usr/local/include/SDL2 build/dep/include\n ln -s /usr/local/lib/SDL2 build/dep/lib";
};
/* End PBXShellScriptBuildPhase section */

Expand Down Expand Up @@ -433,8 +433,8 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
../build/dep/lib,
/Users/ioan/dezvoltare/cross/wolf4sdl/build/dep/lib,
);
PRODUCT_BUNDLE_IDENTIFIER = com.chrisballinger.wolf4sdl;
PRODUCT_NAME = Wolf4SDL;
WRAPPER_EXTENSION = app;
ZERO_LINK = YES;
Expand All @@ -454,10 +454,10 @@
LIBRARY_SEARCH_PATHS = (
"$(inherited)",
../build/dep/lib,
/Users/ioan/dezvoltare/cross/wolf4sdl/build/dep/lib,
);
OTHER_CFLAGS = "-fast";
OTHER_CPLUSPLUSFLAGS = "-fast";
PRODUCT_BUNDLE_IDENTIFIER = com.chrisballinger.wolf4sdl;
PRODUCT_NAME = Wolf4SDL;
WRAPPER_EXTENSION = app;
};
Expand All @@ -466,14 +466,24 @@
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
GCC_NO_COMMON_BLOCKS = YES;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
Expand All @@ -487,7 +497,7 @@
../build/dep/include,
);
LIBRARY_SEARCH_PATHS = ../build/dep/lib;
MACOSX_DEPLOYMENT_TARGET = 10.6;
MACOSX_DEPLOYMENT_TARGET = 10.13;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
};
Expand All @@ -496,11 +506,20 @@
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
Expand All @@ -521,8 +540,9 @@
../build/dep/include,
);
LIBRARY_SEARCH_PATHS = ../build/dep/lib;
"LIBRARY_SEARCH_PATHS[arch=*]" = /usr/local/include/;
LLVM_LTO = YES;
MACOSX_DEPLOYMENT_TARGET = 10.6;
MACOSX_DEPLOYMENT_TARGET = 10.13;
PREBINDING = NO;
};
name = Release;
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions sdl_winmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#endif

/* Include the SDL main definition header */
#include "SDL.h"
#include "SDL_main.h"
#include "SDL2/SDL.h"
#include "SDL2/SDL_main.h"

#ifdef main
# ifndef _WIN32_WCE_EMULATION
Expand Down
2 changes: 1 addition & 1 deletion wl_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# include <string.h>
# include <stdarg.h>
#endif
#include <SDL.h>
#include <SDL2/SDL.h>

#if !defined O_BINARY
# define O_BINARY 0
Expand Down
2 changes: 1 addition & 1 deletion wl_game.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <math.h>
#include "wl_def.h"
#include <SDL_mixer.h>
#include <SDL2/SDL_mixer.h>
#pragma hdrstop

#ifdef MYPROFILE
Expand Down
2 changes: 1 addition & 1 deletion wl_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#include "wl_def.h"
#pragma hdrstop
#include "wl_atmos.h"
#include <SDL_syswm.h>
#include <SDL2/SDL_syswm.h>


/*
Expand Down

0 comments on commit 82ee70f

Please sign in to comment.