Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update iOS Xcode project #1182

Merged
merged 14 commits into from
Jul 20, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bin/env-osx.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ fi
fi

#--config
NDK_PATH=${NDK_PATH:-/Users/david/Downloads/android-ndk-r9d}
EMSDK_PATH=${EMSDK_PATH:-/Users/david/moai/emsdk_portable}
DOXYGEN_PATH=${DOXYGEN_PATH:-/Applications/Doxygen.app/Contents/Resources}
NDK_PATH=$HOME/Applications/android-ndk-r10e
EMSDK_PATH=$HOME/Applications/emsdk_portable
DOXYGEN_PATH=$HOME/Applications/Doxygen.app/Contents/Resources


#--check for reqs
Expand Down
20 changes: 20 additions & 0 deletions samples/camera-fitter-3d/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
#--------------------------------------------------------------------------------------
# Copyright (c) 2010-2013 Zipline Games, Inc.
# All Rights Reserved.
# http://getmoai.com
#--------------------------------------------------------------------------------------

cd `dirname $0`

# Verify paths
if [ ! -f "$MOAI_BIN/moai" ]; then
echo "---------------------------------------------------------------------------"
echo "Error: The MOAI_BIN environment variable doesn't exist or its pointing to an"
echo "invalid path. Please point it at a folder containing moai executable"
echo "---------------------------------------------------------------------------"
exit 1
fi

# Run moai
$MOAI_BIN/moai main.lua
20 changes: 20 additions & 0 deletions samples/deck-item-sdf/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
#--------------------------------------------------------------------------------------
# Copyright (c) 2010-2013 Zipline Games, Inc.
# All Rights Reserved.
# http://getmoai.com
#--------------------------------------------------------------------------------------

cd `dirname $0`

# Verify paths
if [ ! -f "$MOAI_BIN/moai" ]; then
echo "---------------------------------------------------------------------------"
echo "Error: The MOAI_BIN environment variable doesn't exist or its pointing to an"
echo "invalid path. Please point it at a folder containing moai executable"
echo "---------------------------------------------------------------------------"
exit 1
fi

# Run moai
$MOAI_BIN/moai main.lua
20 changes: 20 additions & 0 deletions samples/gfxQuadDeck2D-materials/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
#--------------------------------------------------------------------------------------
# Copyright (c) 2010-2013 Zipline Games, Inc.
# All Rights Reserved.
# http://getmoai.com
#--------------------------------------------------------------------------------------

cd `dirname $0`

# Verify paths
if [ ! -f "$MOAI_BIN/moai" ]; then
echo "---------------------------------------------------------------------------"
echo "Error: The MOAI_BIN environment variable doesn't exist or its pointing to an"
echo "invalid path. Please point it at a folder containing moai executable"
echo "---------------------------------------------------------------------------"
exit 1
fi

# Run moai
$MOAI_BIN/moai main.lua
20 changes: 20 additions & 0 deletions samples/image-sdf/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
#--------------------------------------------------------------------------------------
# Copyright (c) 2010-2013 Zipline Games, Inc.
# All Rights Reserved.
# http://getmoai.com
#--------------------------------------------------------------------------------------

cd `dirname $0`

# Verify paths
if [ ! -f "$MOAI_BIN/moai" ]; then
echo "---------------------------------------------------------------------------"
echo "Error: The MOAI_BIN environment variable doesn't exist or its pointing to an"
echo "invalid path. Please point it at a folder containing moai executable"
echo "---------------------------------------------------------------------------"
exit 1
fi

# Run moai
$MOAI_BIN/moai main.lua
87 changes: 87 additions & 0 deletions samples/priority/main.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
--[[

@copyright (c) 2017 Upstart Illustration LLC. All rights reserved.
]]

local priorityOn = false

MOAISim.openWindow ( "test", 320, 480 )

viewport = MOAIViewport.new ()
viewport:setSize ( 320, 480 )
viewport:setScale ( 320, 480 )

mainLayer = MOAILayer2D.new ()
mainLayer:setViewport ( viewport )
if priorityOn then
mainLayer:setSortMode(MOAILayer2D.SORT_PRIORITY_ASCENDING)
end
MOAISim.pushRenderPass ( mainLayer )

-- Ground
ground = MOAIGrid.new ()
ground:setSize(2, 2, 32, 32)
ground:setRow(1, 2, 2)
ground:setRow(2, 2, 2)
ground:setRepeat(false, false)

bridge = MOAIGrid.new ()
bridge:setSize(2, 2, 32, 32)
bridge:setRow(1, 3, 0)
bridge:setRow(2, 0, 0)
bridge:setRepeat(false, false)

sky = MOAIGrid.new ()
sky:setSize(2, 2, 32, 32)
sky:setRow(1, 0, 10)
sky:setRow(2, 0, 0)
sky:setRepeat(false, false)

deck = MOAITileDeck2D:new ()
deck:setTexture("numbers.png")
deck:setSize(8, 8)
deck:setRect(-0.5, -0.5, 0.5, 0.5)

function addGrid(grid, priority)
local prop = MOAIProp2D.new ()
prop:setDeck ( deck )
prop:setGrid ( grid )
prop:addLoc ( -32, -32 )
if priorityOn then
prop:setPriority( priority )
end
mainLayer:insertProp( prop )
end

addGrid(ground, 1)
addGrid(bridge, 3)

-- Props
layer = MOAILayer2D.new ()
layer:setViewport(viewport)
layer:setSortMode(MOAILayer2D.SORT_Y_ASCENDING)
if priorityOn then
layer:setPriority(2)
end

deck2 = MOAITileDeck2D:new ()
deck2:setTexture ( "numbers.png" )
deck2:setSize ( 8, 8 )
deck2:setRect ( -16, -16, 16, 16 )

function addProp(x, y, index)
local prop = MOAIProp2D.new ()
prop:setDeck ( deck2 )
prop:setIndex(index)
prop:addLoc(x, y)
layer:insertProp ( prop )
end

addProp(0, 0, 4)
addProp(0, -10, 5)
addProp(0, -20, 6)
addProp(0, -30, 7)

addGrid(sky, 4)
mainLayer:insertProp ( layer )

Binary file added samples/priority/numbers.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions samples/priority/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
#--------------------------------------------------------------------------------------
# Copyright (c) 2010-2013 Zipline Games, Inc.
# All Rights Reserved.
# http://getmoai.com
#--------------------------------------------------------------------------------------

cd `dirname $0`

# Verify paths
if [ ! -f "$MOAI_BIN/moai" ]; then
echo "---------------------------------------------------------------------------"
echo "Error: The MOAI_BIN environment variable doesn't exist or its pointing to an"
echo "invalid path. Please point it at a folder containing moai executable"
echo "---------------------------------------------------------------------------"
exit 1
fi

# Run moai
$MOAI_BIN/moai main.lua
20 changes: 20 additions & 0 deletions samples/vector-region/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
#--------------------------------------------------------------------------------------
# Copyright (c) 2010-2013 Zipline Games, Inc.
# All Rights Reserved.
# http://getmoai.com
#--------------------------------------------------------------------------------------

cd `dirname $0`

# Verify paths
if [ ! -f "$MOAI_BIN/moai" ]; then
echo "---------------------------------------------------------------------------"
echo "Error: The MOAI_BIN environment variable doesn't exist or its pointing to an"
echo "invalid path. Please point it at a folder containing moai executable"
echo "---------------------------------------------------------------------------"
exit 1
fi

# Run moai
$MOAI_BIN/moai main.lua
20 changes: 20 additions & 0 deletions samples/vector-shapes/run.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh
#--------------------------------------------------------------------------------------
# Copyright (c) 2010-2013 Zipline Games, Inc.
# All Rights Reserved.
# http://getmoai.com
#--------------------------------------------------------------------------------------

cd `dirname $0`

# Verify paths
if [ ! -f "$MOAI_BIN/moai" ]; then
echo "---------------------------------------------------------------------------"
echo "Error: The MOAI_BIN environment variable doesn't exist or its pointing to an"
echo "invalid path. Please point it at a folder containing moai executable"
echo "---------------------------------------------------------------------------"
exit 1
fi

# Run moai
$MOAI_BIN/moai main.lua
2 changes: 1 addition & 1 deletion util/pito.lua
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,6 @@ MOAIFileSystem.setWorkingDirectory ( SCRIPT_DIR )
if MOAIFileSystem.checkFileExists('main.lua') then
dofile ( 'main.lua' )
else
usage()
usage(MOAI_CMD)
end

10 changes: 10 additions & 0 deletions xcode/ccache-clang
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
if type -p ccache >/dev/null 2>&1; then
export CCACHE_MAXSIZE=10G
export CCACHE_CPP2=true
export CCACHE_HARDLINK=true
export CCACHE_SLOPPINESS=file_macro,time_macros,include_file_mtime,include_file_ctime,file_stat_matches
exec ccache /usr/bin/clang "$@"
else
exec clang "$@"
fi
10 changes: 10 additions & 0 deletions xcode/ccache-clang++
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/sh
if type -p ccache >/dev/null 2>&1; then
export CCACHE_MAXSIZE=10G
export CCACHE_CPP2=true
export CCACHE_HARDLINK=true
export CCACHE_SLOPPINESS=file_macro,time_macros,include_file_mtime,include_file_ctime,file_stat_matches
exec ccache /usr/bin/clang++ "$@"
else
exec clang++ "$@"
fi
23 changes: 12 additions & 11 deletions xcode/ios-static/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,8 @@
<string>${PRODUCT_NAME}</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFiles</key>
<array>
<string>Icon.png</string>
<string>[email protected]</string>
<string>Icon-72.png</string>
<string>Icon-Small-50.png</string>
<string>Icon-Small.png</string>
<string>[email protected]</string>
</array>
<key>CFBundleIdentifier</key>
<string>com.getmoai.samples</string>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
Expand All @@ -33,9 +24,19 @@
<string>1</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
<key>UIPrerenderedIcon</key>
<true/>
<key>UIRequiresFullScreen</key>
<true/>
<key>UIStatusBarHidden</key>
<true/>
<key>UISupportedInterfaceOrientations</key>
<array/>
<array>
<string>UIInterfaceOrientationPortrait</string>
<string>UIInterfaceOrientationLandscapeLeft</string>
<string>UIInterfaceOrientationLandscapeRight</string>
</array>
</dict>
</plist>
Loading