Skip to content

Commit

Permalink
added emscripten support
Browse files Browse the repository at this point in the history
updated ios/macosx builds
added deprecated
renamed TextActor to TextField
improved zip file system
use glBindBuffer
improved resources
  • Loading branch information
frankinshtein committed Jul 21, 2014
1 parent a7f1a50 commit d0a624c
Show file tree
Hide file tree
Showing 198 changed files with 8,500 additions and 3,959 deletions.
4 changes: 2 additions & 2 deletions .hg_archival.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
repo: b6d71054df5712e643a0685bc3ba54b123db5729
node: 81dbbfb32b4389cc6e447e0356fc46e4d82e83e9
node: 096eec250df8a0971ef7250f3a92bceaa2f3ff63
branch: default
latesttag: oldrender
latesttagdistance: 281
latesttagdistance: 315
7 changes: 7 additions & 0 deletions .hgignore
Original file line number Diff line number Diff line change
Expand Up @@ -122,5 +122,12 @@ examples/Demo/proj.android/local.properties
proguard-project.txt
examples/Demo/proj.marmalade/build_demo_
examples/Demo/proj.marmalade/build_demo_*
examples/DemoBox2D/data/*.dll
examples/Game/part4/data/*.dll
examples/HelloWorld/data/*.dll
examples/Match3/data/*.dll
examples/TutorialResources/data/*.dll
examples/Demo/proj.win32/Win32/
data.js
syntax: regexp
^build/
23 changes: 19 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,12 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/oxygine/greenlets/src/)
set(OX_HAVE_LIBJPEG 1)
set(OX_HAVE_LIBPNG 1)

if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if (EMSCRIPTEN)
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wno-warn-absolute-paths")
set(OX_HAVE_LIBJPEG 0)
set(OX_HAVE_LIBPNG 1)
set(THIRD_PARTY ${CMAKE_CURRENT_SOURCE_DIR}/oxygine/third_party/emscripten)
elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
set(THIRD_PARTY ${CMAKE_CURRENT_SOURCE_DIR}/oxygine/third_party/linux)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
set(THIRD_PARTY ${CMAKE_CURRENT_SOURCE_DIR}/oxygine/third_party/ios)
Expand Down Expand Up @@ -89,6 +94,8 @@ if (WIN32)
${CORE_LIBS}
pthreadVCE2
)
elseif(EMSCRIPTEN)

else(WIN32)
set(CORE_LIBS
${CORE_LIBS}
Expand All @@ -106,9 +113,17 @@ if (OX_HAVE_LIBPNG)
endif(OX_HAVE_LIBPNG)

#add z library
set(CORE_LIBS
${CORE_LIBS}
${libprefix}z${libprefix})
if (EMSCRIPTEN)
set(CORE_LIBS
${CORE_LIBS}
libz
libpng16
)
else(EMSCRIPTEN)
set(CORE_LIBS
${CORE_LIBS}
${libprefix}z${libprefix})
endif(EMSCRIPTEN)

#add jpeg library
if (OX_HAVE_LIBJPEG)
Expand Down
Binary file modified examples/Demo/data/demo/logo2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion examples/Demo/data/development.icf
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ DeviceUniqueIDInt = Type=int, Default="01234567890", Value = "01234
FileTotalStorageSize = Type=int, Min=0.000000, Max=2147483648.000000, Default="67108864", Value = "67108864"
FileUseSeparateRomRam = Type=bool, Default="true", Value = "true"
FileUseTotalStorageSize = Type=bool, Default="false", Value = "false"
GLAPI = Type=string, Allowed="None" "GLES 1.0 Common-Lite Profile from Imagination POWERVR(TM)" "GLES 1.1 Common-Lite Profile from Imagination POWERVR(TM)" "GLES 1.0 Common Profile from Imagination POWERVR(TM)" "GLES 1.1 Common Profile from Imagination POWERVR(TM)" "GLES 2.0 from Imagination POWERVR(TM)" "Obey [S3E] SysGlesVersion .icf setting" "GLES 1.1 Common Profile from Qualcomm Snapdragon(TM)" "GLES 2.0 from Qualcomm Snapdragon(TM)" "GLES 2.0 ANGLE" "GLES 2.0 ANGLE DirectX 11", Default="Obey [S3E] SysGlesVersion .icf setting", Value = "Obey [S3E] SysGlesVersion .icf setting"
GLAPI = Type=string, Allowed="None" "GLES 1.0 Common-Lite Profile from Imagination POWERVR(TM)" "GLES 1.1 Common-Lite Profile from Imagination POWERVR(TM)" "GLES 1.0 Common Profile from Imagination POWERVR(TM)" "GLES 1.1 Common Profile from Imagination POWERVR(TM)" "GLES 2.0 from Imagination POWERVR(TM)" "GLES 3.0 from Imagination POWERVR(TM)" "Obey [S3E] SysGlesVersion .icf setting" "GLES 1.1 Common Profile from Qualcomm Snapdragon(TM)" "GLES 2.0 from Qualcomm Snapdragon(TM)" "GLES 2.0 ANGLE" "GLES 2.0 ANGLE DirectX 11", Default="Obey [S3E] SysGlesVersion .icf setting", Value = "Obey [S3E] SysGlesVersion .icf setting"
GLDontUseHiddenWindow = Type=bool, Default="false", Value = "false"
GLTerminateOnSuspend = Type=bool, Default="false", Value = "false"
GLUsePVRVFrame = Type=bool, Default="false", Value = "false"
Expand Down
2 changes: 1 addition & 1 deletion examples/Demo/proj.cmake/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ add_definitions(${OXYGINE_DEFINITIONS})
include_directories(${OXYGINE_INCLUDE_DIRS})
link_directories(${OXYGINE_LIBRARY_DIRS})

add_executable(Demo ../src/entry_point.cpp ../src/example.cpp ../src/test.cpp ../src/example.h ../src/test.h ../src/TestBox9Sprite.h ../src/TestClipRect.h ../src/TestDrag.h ../src/TestInputText.h ../src/TestManageRes.h ../src/TestMask.h ../src/TestPerf.h ../src/TestProgressBar.h ../src/TestRender2Texture.h ../src/TestSliding.h ../src/TestTexel2Pixel.h ../src/TestText.h ../src/TestTextureFormat.h ../src/TestTweens.h ../src/TestUserShader.h )
add_executable(Demo ../src/entry_point.cpp ../src/example.cpp ../src/test.cpp ../src/TestBox9Sprite.h ../src/TestClipRect.h ../src/TestDrag.h ../src/TestInputText.h ../src/TestManageRes.h ../src/TestMask.h ../src/TestPerf.h ../src/TestProgressBar.h ../src/TestRender2Texture.h ../src/TestSliding.h ../src/TestTexel2Pixel.h ../src/TestText.h ../src/TestTextureFormat.h ../src/TestTweens.h ../src/TestUserShader.h ../src/example.h ../src/test.h )

target_link_libraries(Demo ${OXYGINE_CORE_LIBS})
19 changes: 19 additions & 0 deletions examples/Demo/proj.emscripten/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cmake_minimum_required (VERSION 2.6)
project (Demo)

add_subdirectory(../../../ oxygine-framework)
add_definitions(${OXYGINE_DEFINITIONS})
include_directories(${OXYGINE_INCLUDE_DIRS})
link_directories(${OXYGINE_LIBRARY_DIRS})

SET(CMAKE_EXECUTABLE_SUFFIX ".html")
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wno-warn-absolute-paths")

add_executable(Demo ../src/entry_point.cpp ../src/example.cpp ../src/test.cpp ../src/TestBox9Sprite.h ../src/TestClipRect.h ../src/TestDrag.h ../src/TestInputText.h ../src/TestManageRes.h ../src/TestMask.h ../src/TestPerf.h ../src/TestProgressBar.h ../src/TestRender2Texture.h ../src/TestSliding.h ../src/TestTexel2Pixel.h ../src/TestText.h ../src/TestTextureFormat.h ../src/TestTweens.h ../src/TestUserShader.h ../src/example.h ../src/test.h )

set_target_properties(Demo
PROPERTIES
LINK_FLAGS "-s WARN_ON_UNDEFINED_SYMBOLS=1 -s -Wno-warn-absolute-paths -s TOTAL_MEMORY=64435456")

target_link_libraries(Demo ${OXYGINE_CORE_LIBS})
em_link_pre_js(Demo ${CMAKE_CURRENT_SOURCE_DIR}/data.js)
7 changes: 7 additions & 0 deletions examples/Demo/proj.emscripten/build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
python ../../..//tools/others/embed_folder_js.py -s ../data

mkdir build
cd build
cmake -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%/cmake/platform/emscripten.cmake -G"Unix Makefiles" ..
make
cd ..
7 changes: 7 additions & 0 deletions examples/Demo/proj.emscripten/build_release.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
python ../../..//tools/others/embed_folder_js.py -s ../data

mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%/cmake/platform/emscripten.cmake -G"Unix Makefiles" ..
make
cd ..
Binary file removed examples/Demo/proj.flash/AGAL.abc
Binary file not shown.
Loading

0 comments on commit d0a624c

Please sign in to comment.