Skip to content

Commit

Permalink
Merge pull request #2786 from diederich/feature/merge-iOS-and-OSX-xco…
Browse files Browse the repository at this point in the history
…deprojects

merge iOS and OSX xcodeprojects
  • Loading branch information
davilla committed May 31, 2013
2 parents 3fcde70 + 287e4d3 commit e5a5264
Show file tree
Hide file tree
Showing 23 changed files with 5,888 additions and 16,463 deletions.
8,126 changes: 0 additions & 8,126 deletions XBMC-ATV2.xcodeproj/project.pbxproj

This file was deleted.

8,204 changes: 0 additions & 8,204 deletions XBMC-IOS.xcodeproj/project.pbxproj

This file was deleted.

5,174 changes: 5,050 additions & 124 deletions XBMC.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions docs/README.ios
Expand Up @@ -114,11 +114,11 @@ from the step 3.1.
-----------------------------------------------------------------------------
4.1 Using Xcode
-----------------------------------------------------------------------------
Start XCode and open the XBMC project (XBMC-IOS.xcodeproj or XBMC-ATV2.xcodeproj)
Start XCode and open the XBMC project (XBMC.xcodeproj)
located in $HOME/XBMC.

There are two relevant build targets : Release and Debug. Compile always for device
end not simulator.
There are two relevant build configurations : Release and Debug. Compile always for device
end not simulator and select the wanted target (either XBMC-iOS or XBMC-ATV2)

If you have selected a specific iOS SDK Version in step 3.1 then you might need
to adapt the active target to use the same iOS SDK version. Else build will fail
Expand All @@ -129,14 +129,14 @@ to adapt the active target to use the same iOS SDK version. Else build will fail
-----------------------------------------------------------------------------

$ cd $HOME/XBMC
$ xcodebuild -project XBMC-IOS.xcodeproj -target XBMC -configuration Release build \
ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.1 \
$ xcodebuild -project XBMC.xcodeproj -target XBMC-iOS -configuration Release build \
ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.2 \
SDKROOT=iphoneos4.2

or

$ xcodebuild -project XBMC-ATV2.xcodeproj -target XBMC -configuration Release build \
ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.1 \
$ xcodebuild -project XBMC.xcodeproj -target XBMC-ATV2 -configuration Release build \
ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.2 \
SDKROOT=iphoneos4.2

Make sure to set SDKROOT to the iOS SDK you want to use. This should be the same
Expand Down
2 changes: 1 addition & 1 deletion tools/buildsteps/atv2/make-xbmc
Expand Up @@ -3,6 +3,6 @@ XBMC_PLATFORM_DIR=atv2
. $WORKSPACE/tools/buildsteps/defaultenv

cd $WORKSPACE;make -j$BUILDTHREADS xcode_depends
cd $WORKSPACE;xcodebuild -project XBMC-ATV2.xcodeproj -target XBMC -configuration $Configuration build \
cd $WORKSPACE;xcodebuild -project XBMC.xcodeproj -target XBMC-ATV2 -configuration $Configuration build \
ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.2 \
SDKROOT=iphoneos$SDK_VERSION XBMC_DEPENDS_ROOT=$XBMC_DEPENDS_ROOT
2 changes: 1 addition & 1 deletion tools/buildsteps/ios/make-xbmc
Expand Up @@ -3,7 +3,7 @@ XBMC_PLATFORM_DIR=ios
. $WORKSPACE/tools/buildsteps/defaultenv

cd $WORKSPACE;make -j$BUILDTHREADS xcode_depends
cd $WORKSPACE;xcodebuild -project XBMC-IOS.xcodeproj -target XBMC -configuration $Configuration build \
cd $WORKSPACE;xcodebuild -project XBMC.xcodeproj -target XBMC-iOS -configuration $Configuration build \
ONLY_ACTIVE_ARCH=YES ARCHS=armv7 VALID_ARCHS=armv7 IPHONEOS_DEPLOYMENT_TARGET=4.2 \
SDKROOT=iphoneos$SDK_VERSION XBMC_DEPENDS_ROOT=$XBMC_DEPENDS_ROOT

23 changes: 23 additions & 0 deletions tools/darwin/Configurations/App-ATV2.xcconfig
@@ -0,0 +1,23 @@
//
// Copyright (C) 2012-2013 Team XBMC
// http://www.xbmc.org
//
// This Program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
//
// This Program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with XBMC; see the file COPYING. If not, see
// <http://www.gnu.org/licenses/>.
//
//

#include "App-iOS.xcconfig"

GCC_PREPROCESSOR_DEFINITIONS = TARGET_DARWIN_IOS TARGET_DARWIN_IOS_ATV2 $(XBMC_GCC_PREPROCESSOR_DEFINITIONS_COMMON)
33 changes: 33 additions & 0 deletions tools/darwin/Configurations/App-OSX.xcconfig
@@ -0,0 +1,33 @@
//
// Copyright (C) 2012-2013 Team XBMC
// http://www.xbmc.org
//
// This Program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
//
// This Program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with XBMC; see the file COPYING. If not, see
// <http://www.gnu.org/licenses/>.
//
//

#include "App.xcconfig"

ARCHS = i386 x86_64
ONLY_ACTIVE_ARCH = YES

SDKROOT = macosx
MACOSX_DEPLOYMENT_TARGET = 10.6



OTHER_LDFLAGS = $(XBMC_OTHER_LDFLAGS_COMMON)

GCC_PREPROCESSOR_DEFINITIONS = TARGET_DARWIN_OSX $(XBMC_GCC_PREPROCESSOR_DEFINITIONS_COMMON)
45 changes: 45 additions & 0 deletions tools/darwin/Configurations/App-iOS.xcconfig
@@ -0,0 +1,45 @@
//
// Copyright (C) 2012-2013 Team XBMC
// http://www.xbmc.org
//
// This Program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
//
// This Program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with XBMC; see the file COPYING. If not, see
// <http://www.gnu.org/licenses/>.
//
//

#include "App.xcconfig"

PRODUCT_NAME = XBMC
//build against latest
SDKROOT = iphoneos
IPHONEOS_DEPLOYMENT_TARGET = 4.2

ARCHS = armv7
VALID_ARCHS = armv7

EXECUTABLE_SUFFIX = .bin
XBMC_DEPENDS = $(XBMC_DEPENDS_ROOT)/$(SDK_NAME)_$(CURRENT_ARCH)-target
INSTALL_PATH = $(HOME)/Library/Bundles

USER_HEADER_SEARCH_PATHS = $(inherited) $XBMC_DEPENDS/include $XBMC_DEPENDS/include/libcec $XBMC_DEPENDS/include/mysql $XBMC_DEPENDS/include/freetype2 $XBMC_DEPENDS/include/python2.6

GCC_INLINES_ARE_PRIVATE_EXTERN = NO
GCC_SYMBOLS_PRIVATE_EXTERN = NO
COPY_PHASE_STRIP = NO
DEAD_CODE_STRIPPING = NO
OTHER_CPLUSPLUSFLAGS = $(inherited) $(OTHER_CFLAGS) -Wreorder

OTHER_LDFLAGS = $(XBMC_OTHER_LDFLAGS_COMMON) -weak_framework VideoToolbox

GCC_PREPROCESSOR_DEFINITIONS = TARGET_DARWIN_IOS $(XBMC_GCC_PREPROCESSOR_DEFINITIONS_COMMON)
30 changes: 30 additions & 0 deletions tools/darwin/Configurations/App.xcconfig
@@ -0,0 +1,30 @@
//
// Copyright (C) 2012-2013 Team XBMC
// http://www.xbmc.org
//
// This Program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
//
// This Program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with XBMC; see the file COPYING. If not, see
// <http://www.gnu.org/licenses/>.
//
//

XBMC_DEPENDS_ROOT = /Users/Shared/xbmc-depends

HEADER_SEARCH_PATHS = $(inherited) $SRCROOT xbmc xbmc/linux xbmc/osx xbmc/cores/dvdplayer lib lib/ffmpeg $XBMC_DEPENDS/include $XBMC_DEPENDS/include/libcec $XBMC_DEPENDS/include/mysql $XBMC_DEPENDS/include/freetype2 $XBMC_DEPENDS/include/python2.6

LIBRARY_SEARCH_PATHS = $(inherited) $(SRCROOT) $(SRCROOT)/lib/libRTV $(SRCROOT)/lib/libXDAAP $(SRCROOT)/lib/cmyth/libcmyth $(SRCROOT)/lib/cmyth/librefmem $(SRCROOT)/lib/libsquish $(SRCROOT)/lib/SlingboxLib $(SRCROOT)/xbmc/interfaces/json-rpc "$(SRCROOT)/lib/ffmpeg/libavcodec" "$(SRCROOT)/lib/ffmpeg/libavutil" "$(SRCROOT)/lib/ffmpeg/libavformat" "$(SRCROOT)/lib/ffmpeg/libavfilter" "$(SRCROOT)/lib/ffmpeg/libavdevice" "$(SRCROOT)/lib/ffmpeg/libswresample" "$(SRCROOT)/lib/ffmpeg/libpostproc" "$(SRCROOT)/lib/ffmpeg/libswscale" "$(SRCROOT)/xbmc/interfaces/python" "$(SRCROOT)/xbmc/interfaces/legacy"
FRAMEWORK_SEARCH_PATHS = $(inherited) "$(SDKROOT)/System/Library/PrivateFrameworks/" "$(SDKROOT)/System/Library/Frameworks/"

XBMC_OTHER_LDFLAGS_COMMON = $(inherited) -Wl,-headerpad_max_install_names -Wl,-all_load -L$XBMC_DEPENDS/lib -lbz2 -lintl -lexpat -lssl -lgpg-error -lresolv -lffi -lssh -llzo2 -lpcre -lpcrecpp -lfribidi -lfreetype -lfontconfig -lsqlite3 -lsamplerate -ltinyxml -lmicrohttpd -lsmbclient -lpython2.6 -lyajl -ljpeg -lcrypto -lgcrypt -lavdevice -lavfilter -lavcodec -lavformat -lpostproc -lavutil -lswresample -lswscale -ltag -L$XBMC_DEPENDS/lib/mysql -lmysqlclient


23 changes: 23 additions & 0 deletions tools/darwin/Configurations/Common.xcconfig
@@ -0,0 +1,23 @@
//
// Copyright (C) 2012-2013 Team XBMC
// http://www.xbmc.org
//
// This Program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
//
// This Program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with XBMC; see the file COPYING. If not, see
// <http://www.gnu.org/licenses/>.
//
//

XBMC_GCC_PREPROCESSOR_DEFINITIONS_COMMON = TARGET_POSIX TARGET_DARWIN _LINUX _REENTRANT _FILE_DEFINED _FILE_OFFSET_BITS=64 _LARGEFILE64_SOURCE __STDC_CONSTANT_MACROS HAVE_CONFIG_H HAS_SPC_CODEC

DEBUG_INFORMATION_FORMAT = dwarf-with-dsym
24 changes: 24 additions & 0 deletions tools/darwin/Configurations/Debug.xcconfig
@@ -0,0 +1,24 @@
//
// Copyright (C) 2012-2013 Team XBMC
// http://www.xbmc.org
//
// This Program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
//
// This Program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with XBMC; see the file COPYING. If not, see
// <http://www.gnu.org/licenses/>.
//
//

#include "Common.xcconfig"

GCC_PREPROCESSOR_DEFINITIONS = _DEBUG $(XBMC_GCC_PREPROCESSOR_DEFINITIONS_COMMON)
GCC_OPTIMIZATION_LEVEL = 0
24 changes: 24 additions & 0 deletions tools/darwin/Configurations/Release.xcconfig
@@ -0,0 +1,24 @@
//
// Copyright (C) 2012-2013 Team XBMC
// http://www.xbmc.org
//
// This Program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2, or (at your option)
// any later version.
//
// This Program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with XBMC; see the file COPYING. If not, see
// <http://www.gnu.org/licenses/>.
//
//

#include "Common.xcconfig"

GCC_PREPROCESSOR_DEFINITIONS = NDEBUG $(XBMC_GCC_PREPROCESSOR_DEFINITIONS_COMMON)
GCC_OPTIMIZATION_LEVEL = 3
19 changes: 19 additions & 0 deletions tools/darwin/Support/Codesign.command
@@ -0,0 +1,19 @@
#!/bin/bash

export CODESIGN_ALLOCATE=`xcodebuild -find codesign_allocate`

GEN_ENTITLEMENTS="/Developer/iphoneentitlements401/gen_entitlements.py"

if [ ! -f ${GEN_ENTITLEMENTS} ]; then
echo "error: $GEN_ENTITLEMENTS not found. Codesign won't work."
exit -1
fi


if [ "${PLATFORM_NAME}" == "iphoneos" ]; then
if [ -f "/Users/Shared/buildslave/keychain_unlock.sh" ]; then
/Users/Shared/buildslave/keychain_unlock.sh
fi
${GEN_ENTITLEMENTS} "org.xbmc.xbmc-ios" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent";
codesign -v -f -s "iPhone Developer" --entitlements "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/${PROJECT_NAME}.xcent" "${BUILT_PRODUCTS_DIR}/${WRAPPER_NAME}/"
fi
56 changes: 56 additions & 0 deletions tools/darwin/Support/CopyRootFiles-atv2.command
@@ -0,0 +1,56 @@
#!/bin/bash

echo "copy root files"

if [ "$ACTION" = build ] ; then

# for external testing
TARGET_NAME=$PRODUCT_NAME.$WRAPPER_EXTENSION
#SRCROOT=/Users/Shared/xbmc_svn/XBMC
#TARGET_BUILD_DIR=/Users/Shared/xbmc_svn/XBMC/build/Debug

# rsync command with exclusions for items we don't want in the app package
SYNC="rsync -aq --exclude .git* --exclude .DS_Store* --exclude *.dll --exclude *.DLL --exclude *linux.* --exclude *x86-osx.* --exclude *.zlib --exclude *.a --exclude *.pyd --exclude *x86-osx.so --exclude *powerpc-osx.so"

# rsync command for skins. jpg, png exclusion is handled during sync
# if a Textures.xbt file is found
SKINSYNC="rsync -aq --exclude .git* --exclude CVS* --exclude .svn* --exclude .cvsignore* --exclude .cvspass* --exclude .DS_Store* --exclude *.dll --exclude *.DLL --exclude *linux.* --exclude *.bat"

# rsync command for including everything but the skins
ADDONSYNC="rsync -aq --exclude .git* --exclude CVS* --exclude .svn* --exclude .cvsignore* --exclude .cvspass* --exclude .DS_Store* --exclude skin.confluence --exclude skin.touched --exclude screensaver.rsxs* --exclude visualization.*"

# binary name is XBMC but we build XBMC.bin so to get a clean binary each time
mv $TARGET_BUILD_DIR/$TARGET_NAME/XBMC.bin $TARGET_BUILD_DIR/$TARGET_NAME/XBMC

mkdir -p "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome"
mkdir -p "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/addons"
mkdir -p "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/language"
mkdir -p "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/media"
mkdir -p "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/sounds"
mkdir -p "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/system"
mkdir -p "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/userdata"
mkdir -p "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/media"
mkdir -p "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/tools/darwin/runtime"

${SYNC} "$SRCROOT/LICENSE.GPL" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/"
${SYNC} "$SRCROOT/xbmc/osx/Credits.html" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/"
${ADDONSYNC} "$SRCROOT/addons" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome"
${SYNC} "$SRCROOT/addons/visualization.glspectrum" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/addons"
${SYNC} "$SRCROOT/addons/visualization.waveform" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/addons"
${SYNC} "$SRCROOT/language" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome"
${SYNC} "$SRCROOT/media" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome"

SYNCSKIN_A=${SKINSYNC}
if [ -f "$SRCROOT/addons/skin.confluence/media/Textures.xbt" ]; then
SYNCSKIN_A="${SKINSYNC} --exclude *.png --exclude *.jpg"
fi
${SYNCSKIN_A} "$SRCROOT/addons/skin.confluence" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/addons"
${SYNC} "$SRCROOT/addons/skin.confluence/backgrounds" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/addons/skin.confluence"
${SYNC} "$SRCROOT/addons/skin.confluence/icon.png" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome/addons/skin.confluence"

${SYNC} "$SRCROOT/sounds" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome"
${SYNC} "$SRCROOT/system" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome"
${SYNC} "$SRCROOT/userdata" "$TARGET_BUILD_DIR/$TARGET_NAME/XBMCData/XBMCHome"

fi

0 comments on commit e5a5264

Please sign in to comment.