mirror of
https://github.com/libretro/ppsspp.git
synced 2024-11-23 16:19:44 +00:00
Blackberry 10 Port
* Replace SDL with asound backend (removes the only dependency) * Remove all references to SDL in bar-descriptor.xml, blackberry_build.sh * Greatly simplify blackberry_build.sh * Modify CMakeLists.txt to account for removal of SDL * Remove redundancy in CMakeLists.txt (EGLv2) * Refactor nativeExtra's and setting targets * Remove android/CMakeLists.txt (unrelated file) * Update for latest Blackberry NDK (1088) * Handle bug with VSync in latest NDK * Update bar-descriptor.xml to version 0.4 * Fix define on iOS in FragmentShaderGenerator.cpp * Specify NDK used in Credits by target platform, add contributor, remove redundancy
This commit is contained in:
parent
952a937fe7
commit
5316f856d1
@ -68,7 +68,9 @@ if(USING_GLES2)
|
||||
else()
|
||||
include(FindOpenGL REQUIRED)
|
||||
endif()
|
||||
include(FindSDL)
|
||||
if (NOT BLACKBERRY AND NOT ANDROID)
|
||||
include(FindSDL)
|
||||
endif()
|
||||
include(FindThreads)
|
||||
if(APPLE)
|
||||
find_library(COCOA_LIBRARY Cocoa)
|
||||
@ -365,6 +367,7 @@ if(ANDROID)
|
||||
endif()
|
||||
|
||||
set(nativeExtra)
|
||||
set(nativeExtraLibs)
|
||||
if(ANDROID)
|
||||
set(nativeExtra ${nativeExtra}
|
||||
native/base/NativeApp.h
|
||||
@ -376,10 +379,25 @@ if(ANDROID)
|
||||
native/android/native-audio-so.cpp
|
||||
native/android/native-audio-so.h)
|
||||
target_link_libraries(native_audio OpenSLES)
|
||||
endif()
|
||||
if(BLACKBERRY)
|
||||
set(nativeExtra ${nativeExtra}
|
||||
native/base/BlackberryMain.cpp)
|
||||
# No target
|
||||
elseif(BLACKBERRY)
|
||||
set(nativeExtra ${nativeExtra} native/base/BlackberryMain.cpp)
|
||||
set(nativeExtraLibs ${nativeExtraLibs} asound bps screen socket EGL)
|
||||
set(TargetBin PPSSPPBlackberry)
|
||||
elseif(SDL_FOUND)
|
||||
# Require SDL
|
||||
include_directories(${SDL_INCLUDE_DIR})
|
||||
set(nativeExtra ${nativeExtra} native/base/PCMain.cpp)
|
||||
set(nativeExtraLibs ${nativeExtraLibs} ${SDL_LIBRARY})
|
||||
if(APPLE)
|
||||
set(nativeExtra ${nativeExtra} SDL/SDLMain.h SDL/SDLMain.mm)
|
||||
set(nativeExtraLibs ${nativeExtraLibs} ${COCOA_LIBRARY})
|
||||
endif()
|
||||
if(NOT IOS) # No target
|
||||
set(TargetBin PPSSPPSDL)
|
||||
endif()
|
||||
else()
|
||||
message(FATAL_ERROR "Could not find SDL. Failing.")
|
||||
endif()
|
||||
|
||||
if(X86)
|
||||
@ -409,7 +427,6 @@ add_library(native STATIC
|
||||
native/base/linked_ptr.h
|
||||
native/base/logging.h
|
||||
native/base/mutex.h
|
||||
# native/base/PCMain.cpp
|
||||
native/base/scoped_ptr.h
|
||||
native/base/stats.h
|
||||
native/base/stringutil.cpp
|
||||
@ -826,43 +843,23 @@ if(HEADLESS)
|
||||
setup_target_project(PPSSPPHeadless headless)
|
||||
endif()
|
||||
|
||||
if(SDL_FOUND)
|
||||
include_directories(${SDL_INCLUDE_DIR})
|
||||
set(NativeAppSource
|
||||
android/jni/NativeApp.cpp
|
||||
android/jni/EmuScreen.cpp
|
||||
android/jni/MenuScreens.cpp
|
||||
android/jni/GamepadEmu.cpp
|
||||
android/jni/UIShader.cpp
|
||||
android/jni/ui_atlas.cpp)
|
||||
set(AndroidAssets
|
||||
android/assets/ui_atlas.zim
|
||||
android/assets/ppge_atlas.zim)
|
||||
set(LinkCommon ${CoreLibName} ${CMAKE_THREAD_LIBS_INIT} ${nativeExtraLibs})
|
||||
|
||||
set(NativeAppSource
|
||||
android/jni/NativeApp.cpp
|
||||
android/jni/EmuScreen.cpp
|
||||
android/jni/MenuScreens.cpp
|
||||
android/jni/GamepadEmu.cpp
|
||||
android/jni/UIShader.cpp
|
||||
android/jni/ui_atlas.cpp)
|
||||
set(AndroidAssets
|
||||
android/assets/ui_atlas.zim
|
||||
android/assets/ppge_atlas.zim)
|
||||
set(LinkCommon ${CoreLibName}
|
||||
${SDL_LIBRARY} ${CMAKE_THREAD_LIBS_INIT})
|
||||
|
||||
if(BLACKBERRY)
|
||||
add_executable(PPSSPPBlackberry native/base/BlackberryMain.cpp ${NativeAppSource})
|
||||
target_link_libraries(PPSSPPBlackberry ${LinkCommon} bps screen socket EGL GLESv2)
|
||||
elseif(ANDROID)
|
||||
# no target
|
||||
elseif(IOS)
|
||||
# no target
|
||||
else()
|
||||
set(SDL_Main native/base/PCMain.cpp)
|
||||
if(APPLE)
|
||||
set(SDL_Main ${SDL_Main}
|
||||
SDL/SDLMain.h
|
||||
SDL/SDLMain.mm)
|
||||
set(LinkCommon ${LinkCommon} ${COCOA_LIBRARY})
|
||||
endif()
|
||||
|
||||
add_executable(PPSSPPSDL ${SDL_Main} ${NativeAppSource})
|
||||
target_link_libraries(PPSSPPSDL ${LinkCommon})
|
||||
endif()
|
||||
|
||||
file(INSTALL ${AndroidAssets} DESTINATION assets)
|
||||
if (TargetBin)
|
||||
add_executable(${TargetBin} ${NativeAppSource})
|
||||
target_link_libraries(${TargetBin} ${LinkCommon})
|
||||
endif()
|
||||
|
||||
file(INSTALL ${AndroidAssets} DESTINATION assets)
|
||||
|
||||
#include(CPack)
|
||||
|
@ -19,6 +19,12 @@
|
||||
#define GLSL_ES_1_0
|
||||
#else
|
||||
#define GLSL_1_3
|
||||
|
||||
// SDL 1.2 on Apple does not have support for OpenGL 3 and hence needs
|
||||
// special treatment in the shader generator.
|
||||
#if defined(__APPLE__)
|
||||
#define FORCE_OPENGL_2_0
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
@ -30,13 +36,6 @@
|
||||
// TODO: remove
|
||||
static char buffer[16384];
|
||||
|
||||
// SDL 1.2 on Apple does not have support for OpenGL 3 and hence needs
|
||||
// special treatment in the shader generator.
|
||||
#ifdef __APPLE__
|
||||
#define FORCE_OPENGL_2_0
|
||||
#endif
|
||||
|
||||
|
||||
#define WRITE p+=sprintf
|
||||
|
||||
// GL_NV_shader_framebuffer_fetch looks interesting....
|
||||
|
@ -3,7 +3,7 @@
|
||||
<id>com.Qtness.PPSSPP</id>
|
||||
<name>PPSSPP</name>
|
||||
<filename>PPSSPPBlackberry</filename>
|
||||
<versionNumber>0.31</versionNumber>
|
||||
<versionNumber>0.4</versionNumber>
|
||||
<buildId>1</buildId>
|
||||
<description>Playstation portable emulator.</description>
|
||||
|
||||
@ -20,8 +20,6 @@
|
||||
<asset path="PPSSPPBlackberry" entry="true" type="Qnx/Elf">PPSSPPBlackberry</asset>
|
||||
<asset path="icon-114.png">icon-114.png</asset>
|
||||
<asset path="../android/assets">assets</asset>
|
||||
<asset path="../../SDL12/Device-Release/libSDL12.so">lib/libSDL12.so</asset>
|
||||
<asset path="../../TouchControlOverlay/Device-Release/libTouchControlOverlay.so">lib/libTouchControlOverlay.so</asset>
|
||||
|
||||
<category>core.games</category>
|
||||
<icon>
|
||||
@ -33,6 +31,4 @@
|
||||
<action system="true">run_native</action>
|
||||
<action>access_shared</action>
|
||||
<action>play_audio</action>
|
||||
|
||||
<env var="LD_LIBRARY_PATH" value="app/native/lib"/>
|
||||
</qnx>
|
||||
|
@ -7,45 +7,8 @@ if [ -z "$BB_OS" ]; then
|
||||
fi
|
||||
echo "Building for Blackberry ${BB_OS}"
|
||||
|
||||
PPSSPP_ROOT=${PWD}/..
|
||||
if [ -z "$PROJECT_ROOT" ]; then
|
||||
PROJECT_ROOT=${PPSSPP_ROOT}/..
|
||||
fi
|
||||
if [ -z "$SDL_PROJECT" ]; then
|
||||
SDL_PROJECT="$PROJECT_ROOT/SDL"
|
||||
fi
|
||||
if [ -z "$TCO_PROJECT" ]; then
|
||||
TCO_PROJECT="$PROJECT_ROOT/TouchControlOverlay"
|
||||
fi
|
||||
|
||||
while true; do
|
||||
case "$1" in
|
||||
-h | --help )
|
||||
echo "Build script for BlackBerry"
|
||||
echo
|
||||
echo "Options: "
|
||||
echo " -h, --help Show this help message."
|
||||
echo " -p, --project-root PATH Specify the root directory containing all projects. (default is PPSSPP's parent)"
|
||||
echo "Dependency Paths (defaults are under project root): "
|
||||
echo " --sdl PATH SDL 1.2 project directory (default is SDL)"
|
||||
echo " --tco PATH TouchControlOverlay project directory (default is TouchControlOverlay)"
|
||||
exit 0
|
||||
;;
|
||||
-p | --project-root ) PROJECT_ROOT="$2"; shift 2 ;;
|
||||
--sdl ) SDL_PROJECT="$2"; shift 2 ;;
|
||||
--tco ) TCO_PROJECT="$2"; shift 2 ;;
|
||||
-- ) shift; break ;;
|
||||
* ) break ;;
|
||||
esac
|
||||
done
|
||||
|
||||
cmake \
|
||||
-DCMAKE_C_COMPILER="${QNX_HOST}/usr/bin/ntoarmv7-gcc" \
|
||||
-DCMAKE_CXX_COMPILER="${QNX_HOST}/usr/bin/ntoarmv7-g++" \
|
||||
-DSDL_INCLUDE_DIR="${SDL_PROJECT}/include" \
|
||||
-DSDL_LIBRARY="${SDL_PROJECT}/Device-Release/libSDL12.so;${TCO_PROJECT}/Device-Release/libTouchControlOverlay.so" \
|
||||
-DBLACKBERRY=${BB_OS} \
|
||||
${PPSSPP_ROOT}
|
||||
# Set up cmake with GCC 4.6.3 cross-compiler from PATH
|
||||
CC=ntoarmv7-gcc CXX=ntoarmv7-g++ cmake -DBLACKBERRY=${BB_OS} ..
|
||||
|
||||
# Compile and create unsigned PPSSPP.bar with debugtoken
|
||||
DEBUG="-devMode -debugToken ${HOME}/debugtoken.bar"
|
||||
|
@ -1,104 +0,0 @@
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
project (PPSSPP)
|
||||
|
||||
find_package(PkgConfig)
|
||||
|
||||
find_package(PNG REQUIRED)
|
||||
pkg_check_modules(SDL sdl)
|
||||
|
||||
if (APPLE)
|
||||
find_library(OGL_LIBRARY OpenGL)
|
||||
include_directories(/usr/X11/include)
|
||||
endif()
|
||||
|
||||
|
||||
include(FindOpenGL)
|
||||
include(FindSDL)
|
||||
|
||||
add_definitions(-g)
|
||||
add_definitions(-O0)
|
||||
add_definitions(-Wall)
|
||||
add_definitions(-DSDL)
|
||||
add_definitions(-Wno-multichar)
|
||||
add_definitions(-fno-strict-aliasing)
|
||||
add_definitions(-DUSE_PROFILER)
|
||||
|
||||
include_directories(jni)
|
||||
include_directories(../native)
|
||||
include_directories(../native/base)
|
||||
include_directories(../native/math/lin)
|
||||
include_directories(../native/audio)
|
||||
include_directories(../native/ext/libzip)
|
||||
include_directories(../native/ext/etcpack)
|
||||
include_directories(/usr/local/include)
|
||||
include_directories(${SDL_INCLUDE_DIR})
|
||||
include_directories(${PNG_INCLUDE_DIR})
|
||||
|
||||
link_directories(/usr/local/lib)
|
||||
link_directories(/usr/X11/lib)
|
||||
|
||||
add_subdirectory(../native/base base)
|
||||
add_subdirectory(../native/gfx gfx)
|
||||
add_subdirectory(../native/profiler profiler)
|
||||
add_subdirectory(../native/gfx_es2 gfx_es2)
|
||||
add_subdirectory(../native/file file)
|
||||
add_subdirectory(../native/image image)
|
||||
add_subdirectory(../native/ui ui)
|
||||
add_subdirectory(../native/net net)
|
||||
add_subdirectory(../native/json jsonwriter)
|
||||
add_subdirectory(../native/audio audio)
|
||||
add_subdirectory(../native/math math)
|
||||
add_subdirectory(../native/ext/libzip libzip)
|
||||
add_subdirectory(../native/ext/etcpack etcpack)
|
||||
add_subdirectory(../native/ext/vjson vjson)
|
||||
add_subdirectory(../native/ext/stb_vorbis stb_vorbis)
|
||||
add_subdirectory(../native/ext/sha1 sha1)
|
||||
|
||||
set(LIBS ${LIBS} ${SDL_LIBRARY} ${OPENGL_LIBRARIES} GLEW file lin ${PNG_LIBRARY} z gfx gfx_es2 ui etcdec image mixer net profiler timeutil file zip base lin vjson stb_vorbis sha1 jsonwriter)
|
||||
|
||||
set(FILES
|
||||
jni/ui_atlas.cpp
|
||||
jni/ray_intersections.cpp
|
||||
jni/collision.cpp
|
||||
jni/AudioManager.cpp
|
||||
jni/Campaign.cpp
|
||||
jni/CampaignEndScreen.cpp
|
||||
jni/CalibrateScreen.cpp
|
||||
jni/CreditsScreen.cpp
|
||||
jni/Curves.cpp
|
||||
jni/CollidableMesh.cpp
|
||||
jni/DrawList.cpp
|
||||
jni/Globals.cpp
|
||||
jni/Level.cpp
|
||||
jni/CampaignEndScreen.cpp
|
||||
jni/Material.cpp
|
||||
jni/MainMenuScreen.cpp
|
||||
jni/MessageBus.cpp
|
||||
jni/Mesh.cpp
|
||||
jni/MeshGenerator.cpp
|
||||
jni/NativeApp.cpp
|
||||
jni/GfxUtil.cpp
|
||||
jni/GfxWrapper.cpp
|
||||
jni/BallSimulator.cpp
|
||||
jni/Node.cpp
|
||||
jni/NormalGame.cpp
|
||||
jni/NormalGameScreen.cpp
|
||||
jni/Scene.cpp
|
||||
jni/Sky.cpp
|
||||
jni/ShaderManager.cpp
|
||||
jni/StickSim.cpp
|
||||
jni/TextureManager.cpp
|
||||
jni/Transformation.cpp)
|
||||
|
||||
if (APPLE)
|
||||
SET(FILES ${FILES} jni/SDLMain.m)
|
||||
endif (APPLE)
|
||||
|
||||
add_executable(rollerball ../native/base/PCMain.cpp ${FILES})
|
||||
|
||||
target_link_libraries(rollerball ${LIBS})
|
||||
|
||||
#add_executable(meshtool jni/Meshtool.cpp ${FILES})
|
||||
|
||||
#target_link_libraries(meshtool ${LIBS})
|
@ -376,16 +376,23 @@ static const char *credits[] =
|
||||
"ced2911",
|
||||
"soywiz",
|
||||
"kovensky",
|
||||
"xsacha",
|
||||
"",
|
||||
"Written in C++ for speed and portability",
|
||||
"",
|
||||
"",
|
||||
"Free tools used:",
|
||||
#ifdef ANDROID
|
||||
"Android SDK + NDK",
|
||||
#elif BLACKBERRY
|
||||
"Blackberry NDK",
|
||||
#else
|
||||
"SDL",
|
||||
#endif
|
||||
"CMake",
|
||||
"freetype2",
|
||||
"zlib",
|
||||
"the free PSP SDK",
|
||||
"PSP SDK",
|
||||
"",
|
||||
"",
|
||||
"Check out the website:",
|
||||
|
Loading…
Reference in New Issue
Block a user