Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Buildsys & scripts updates, polishing

- ozCore
  * System::jniEnv, System::javaVM
  * Thread registered at JavaVM on Android
- cmake
  * install scripts don't install READMEs, licences ...
- libs -> lib, Win32 DLLs in lib/, liboz installed in lib/<platform> in a
  stadalone build
- scripts updated with comments (same as in README.md)
- run.sh: launcher for Linux, Windows (via wine) and NaCl ports; nacl-test.sh is
  merged into this script
  • Loading branch information...
commit 515ccea4c2ef34e32c21a12da8ad0f189f3b8ab9 1 parent 0fc0cc6
@ducakar authored
Showing with 535 additions and 355 deletions.
  1. +1 −1  .gitignore
  2. +18 −20 CMakeLists.txt
  3. +4 −3 ChangeLog.md
  4. +49 −38 README.md
  5. +10 −8 autogen.sh
  6. +11 −1 build.sh
  7. +8 −0 capture.sh
  8. +5 −0 clean-blanks.sh
  9. +4 −1 count.sh
  10. +5 −0 cppcheck.sh
  11. +2 −5 data-cleanup.sh
  12. +1 −1  data/openzone_missions/mission/test/main.lua
  13. 0  data/rz_base/credits/{ozbase.txt → rz_base.txt}
  14. +36 −31 data/rz_base/lingua/en/{ozbase.po → rz_base.po}
  15. +36 −31 data/rz_base/lingua/sl/{ozbase.po → rz_base.po}
  16. +12 −12 etc/PKGBUILD
  17. +6 −6 etc/PKGBUILD.aur
  18. +2 −0  etc/SDL2-CMakeLists-gen.sh
  19. +1 −1  etc/android-project/AndroidManifest.xml
  20. +1 −1  etc/android-project/src/{org/libsdl/app → com/openzone}/SDLActivity.java
  21. +15 −15 etc/data-usage.lua
  22. +1 −1  etc/launchers/openzone.en.bat
  23. +10 −7 etc/launchers/openzone.sh
  24. +1 −1  etc/launchers/openzone.sl.bat
  25. +7 −10 etc/openzone.spec
  26. +31 −0 gettext-base.sh
  27. +0 −19 gettext-ozbase.sh
  28. +20 −4 libs.sh → lib.sh
  29. 0  {libs → lib}/CMakeCache.txt
  30. +0 −42 nacl-test.sh
  31. +37 −13 package.sh
  32. +12 −0 ports.sh
  33. +9 −2 q3map2.sh
  34. +72 −0 run.sh
  35. +0 −1  src/client/BotAudio.cc
  36. +1 −1  src/common/CMakeLists.txt
  37. +0 −1  src/ozCore/Buffer.hh
  38. +7 −5 src/ozCore/CMakeLists.txt
  39. +2 −2 src/ozCore/StackTrace.cc
  40. +45 −39 src/ozCore/System.cc
  41. +10 −0 src/ozCore/System.hh
  42. +13 −1 src/ozCore/Thread.cc
  43. +3 −0  src/ozCore/Thread.hh
  44. +1 −0  src/ozCore/common.hh
  45. +2 −2 src/ozCore/ozCore.pc.in
  46. +3 −4 src/ozDynamics/CMakeLists.txt
  47. +2 −2 src/ozDynamics/ozDynamics.pc.in
  48. +4 −15 src/tools/CMakeLists.txt
  49. +11 −8 src/tools/openzone.cc
  50. +4 −0 src/txc_dxtn/CMakeLists.txt
View
2  .gitignore
@@ -7,7 +7,7 @@
/doc/doxygen*
/share
-/libs
+/lib
/ports
/build
View
38 CMakeLists.txt
@@ -37,22 +37,24 @@ else()
endif()
if( ANDROID )
- set( CMAKE_SYSTEM_NAME "Android" )
+ set( CMAKE_SYSTEM_NAME Android )
set( OZ_SDL2 ON )
elseif( NACL )
- set( CMAKE_SYSTEM_NAME "NaCl" )
+ set( CMAKE_SYSTEM_NAME NaCl )
set( OZ_SDL2 OFF )
elseif( WIN32 )
set( OZ_STANDALONE ON )
endif()
+set( OZ_PLATFORM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}" )
+
if( OZ_STANDALONE )
set( CMAKE_INSTALL_PREFIX "/OpenZone-${OZ_VERSION}" )
- set( BUILD_SHARED_LIBS OFF )
+ set( OZ_BINARY_SUBDIR "/${OZ_PLATFORM_NAME}" )
+else()
+ set( OZ_BINARY_SUBDIR "" )
endif()
-set( OZ_PLATFORM_NAME "${CMAKE_SYSTEM_NAME}-${CMAKE_SYSTEM_PROCESSOR}" )
-
if( ${CMAKE_CXX_COMPILER_ID} STREQUAL GNU )
if( ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.4 )
message( FATAL_ERROR "GCC >= 4.4 and LLVM/Clang >= 3.0 are the only supported compilers." )
@@ -133,8 +135,8 @@ endif()
find_package( OpenAL REQUIRED )
pkg_check_modules( VORBISFILE REQUIRED vorbisfile )
-# On embedded platforms everything is linked statically, libraries are mostly compiled as static,
-# so dependencies for all libraries must be linked too.
+# On embedded platforms linking is mostly static, so dependencies for all libraries must be linked
+# too.
if( PLATFORM_EMBEDDED )
pkg_check_modules( VORBIS REQUIRED vorbis ) # required by vorbisfile
pkg_check_modules( OGG REQUIRED ogg ) # required by vorbisfile
@@ -176,6 +178,8 @@ if( ${CMAKE_CXX_COMPILER_ID} STREQUAL Clang )
# set( flags "${flags} -stdlib=libc++" )
# AddressSanitizer memory checker
# set( flags "${flags} -fsanitize=address" )
+ # Analyse only.
+ # set( flags "${flags} --analyze -Qunused-arguments" )
elseif( ${CMAKE_CXX_COMPILER_VERSION} VERSION_LESS 4.5 )
set( flags "-pipe -std=gnu++0x" )
elseif( ANDROID )
@@ -242,27 +246,21 @@ add_subdirectory( doc )
# READMEs, launchers and libraries for standalone packages
if( OZ_STANDALONE )
file( GLOB readmes doc/*.html )
+ file( GLOB dataFiles share/openzone/*.zip )
+ install( FILES AUTHORS COPYING README.md ChangeLog.md TODO.md DESTINATION doc )
+ install( FILES ${dataFiles} DESTINATION share/openzone )
install( FILES ${readmes} DESTINATION . )
install( DIRECTORY doc/licences DESTINATION . )
- file( GLOB dataFiles share/openzone/*.zip )
- install( FILES ${dataFiles} DESTINATION share/openzone )
-
if( WIN32 )
- install( DIRECTORY libs/${OZ_PLATFORM_NAME}/ DESTINATION bin/${OZ_PLATFORM_NAME}
- USE_SOURCE_PERMISSIONS )
- install( PROGRAMS libs/oalinst.exe DESTINATION . )
- else()
- install( DIRECTORY libs/${OZ_PLATFORM_NAME}/ DESTINATION lib/${OZ_PLATFORM_NAME}
- USE_SOURCE_PERMISSIONS )
- endif()
+ file( GLOB winLaunchers etc/launchers/*.bat )
- if( WIN32 )
- file( GLOB launchers etc/launchers/*.bat )
- install( PROGRAMS ${launchers} DESTINATION . )
+ install( PROGRAMS ${winLaunchers} DESTINATION . )
+ install( DIRECTORY lib/${OZ_PLATFORM_NAME} DESTINATION bin USE_SOURCE_PERMISSIONS )
else()
install( PROGRAMS etc/launchers/openzone.sh DESTINATION . )
+ install( DIRECTORY lib/${OZ_PLATFORM_NAME} DESTINATION lib USE_SOURCE_PERMISSIONS )
endif()
endif()
View
7 ChangeLog.md
@@ -47,6 +47,9 @@
+ limited use of constexpr (float constants)
* (D)List renamed to (D)Chain, (S)Vector renamed to (S)List
* String class has more consistent members, parsing functions added
+ * Vec3, Vec4, Quat don't inherit from each other or Simd class
+ * AABB & Bounds moved to liboz from matrix
+ * Mutex, Semaphore and Thread classes for high-level thread management
* new Time class
* new StackTrace class (split from System class)
* System::bell()
@@ -54,11 +57,9 @@
* new BufferStream class (OutputStream with dynamic internal storage)
* File class: file type and size setting changed, added support for NaCl local filesystems
* new PFile class: version of File class to act as PhysicsFS wrapper
- * Mutex, Semaphore and Thread classes for high-level thread management
+ * Log supports operator << for printing streams
* new JSON class for manipulating JSON files
* Config class removed
- * Vec3, Vec4, Quat don't inherit from each other or Simd class
- * AABB & Bounds moved to liboz from matrix
* clearmacros.hh header to undefine liboz macros that might conflict other libraries
* can be compiled as a shared library
* additional Linux dependency: PhysicsFS, optional dependency for Linux: libpulse-simple
View
87 README.md
@@ -143,32 +143,30 @@ timestamps.
Scripts
-------
-The following scripts are located in root directory of source tree.
+The following helper scripts are located in the root directory of the source tree.
### `autogen.sh` ###
-Generate several `CMakeLists.txt` files and update OpenZone version in several files. Some
-components of OpenZone have many source files and keeping all `CMakeLists.txt` files up-to-date
-manually is not easy.
+Some targets have lots of source files and it would be hard to keep them all consistent and
+up-to-date manually. Lists of source files in corresponding `CMakeLists.txt` are thus generated by
+this script.
-### `build.sh` [clean | conf | build] ###
+Additionally this scripts also updates version numbers in various files.
-Configures and/or builds for all supported platforms (see `platforms` array is the scrip) in the
-`build` directory. The following parameters may be given (`build` is assumed if none):
+### `build.sh [clean | conf | build]` ###
-- `clean`: delete all builds
-- `conf`: delete all builds and configure (but not build) them anew
-- `build`: configure (if necessary) and build all builds.
+This script configures and/or builds OpenZone for all supported platforms in the `build` directory.
+The following commands may be given (`build` is assumed if none):
+
+- `clean`: Delete all builds.
+- `conf`: Delete all builds and configure (but not build) them anew.
+- `build`: Configure (if necessary) and build all builds.
### `capture.sh` ###
Run OpenZone with glc tool to capture video. Audio is captured from PulseAudio server and saved
into `openzone-pa.wav` file.
-### `cppcheck.sh` ###
-
-Runs cppcheck tool for static code analysis. Output is written into `cppcheck.log`.
-
### `clean-blanks.sh` ###
Cleans up trailing blanks, duplicated empty lines and missing newlines at the end of file for most
@@ -176,22 +174,25 @@ files in the source tree.
### `count.sh` ###
-Prints SLOC (source lines of code) statistics generated by SLOCCount and CLOC (if found installed on
+Prints SLOC (source lines of code) statistics generated by SLOCCount and cloc (if found installed on
the system).
-### `data-cleanup.sh` ###
+### `cppcheck.sh` ###
+
+Runs cppcheck tool for static code analysis. Output is written into `cppcheck.log`.
+
+### `data-cleanup.sh <datasrc_dir>` ###
-Cleans up temporary and backup files from source game data directories in `data/` created by various
-programs during editing those files.
+Cleans up temporary, intermediate and backup files from a source game data directory.
-### `gettext-ozbase.sh` ###
+### `gettext-base.sh <basedata_dir>` ###
-Creates `data/ozbase/lingua/ozbase.pot` template for localised messages catalogue. See `ozGettext`
-tool for more details.
+Creates `<basedata_dir>/<basename>.pot` template for localised messages catalogue. See `ozGettext`
+tool for more details. `<basename>` is package name (last directory name in `<basedata_dir>`).
-### `libs.sh` ###
+### `lib.sh [clean | build]` ###
-Copy all libraries OpenZone depends on to `libs/<platform>` directories (currently Linux-x86_64,
+Copy all libraries OpenZone depends on to `lib/<platform>` directories (currently Linux-x86_64,
Linux-i686 and Windows-i686). Those are required to create standalone build (see OZ_STANDALONE cmake
option) that can be distributed in a ZIP archive (i.e. no installation required, all dependencies
included).
@@ -200,28 +201,28 @@ This script is currently Arch Linux-specific and assumes one has all 64-bit, 32-
MinGW (`mingw32-*`) versions of all dependent libraries installed. Many of those packages must be
built from AUR.
-The following parameters may be given (`build` is assumed if none):
+The following commands may be given (`build` is assumed if none):
-- `clean`: Delete directories for all platforms
+- `clean`: Delete directories for all platforms.
- `build`: Copy libraries for selected platforms into corresponding directories.
-### `nacl-test.sh` ###
+### `package.sh {src | data | datasrc | boundle}` ###
-Prepare directory `build/NaCl-test` (creating symlinks to binaries, compiled data archives, HTML
-pages ...) for web-based, NaCl port, and launches chromium browser at `localhost:8000`. It assumes
-one has already a simple web server running at port 8000, serving `build/NaCl-test` directory (e.g.
-go to `build/NaCl-test` and run "`python -m http.server`").
+One of the following commands must be given:
-### `package.sh [src | data]` ###
+- `src`: Create source archive `openzone-src-<version>.tar.xz`.
+- `data`: Create compiled data archive `openzone-data-<version>.tar.xz`. All data packages found in
+ `share/openzone` directory are included.
+- `datasrc`: Create source data archive `openzone-data-src-<version>.tar.xz`. All source data
+ packages found in `data` directory are included.
+- `boundle`: Create a ZIP archive that includes Linux-x86_64, Linux-i686 and Windows-i686 standalone
+ builds and compiled game data packages found in `share/openzone`.
-Pack source tree into `openzone-src-<version>.tar.xz` and pack compiled game data archives from
-`share/*.zip` into `openzone-data-<version>.tar.xz`.
-
-### `ports.sh` [clean | fetch | build] ###
+### `ports.sh [clean | fetch | build]` ###
This script is used to build libraries required by OpenZone for some platforms. Currently it builds
zlib, physfs, SDL, SDL_ttf, OpenAL Soft, squish for NaCl-x86_64 and NaCl-i686.
-The following parameters may be given (`build` is assumed if none):
+The following commands may be given (`build` is assumed if none):
- `clean`: Delete all built libraries for all platforms in `ports` directory. Downloaded sources
are left intact.
@@ -230,9 +231,19 @@ The following parameters may be given (`build` is assumed if none):
### `q3map2.sh <map_file>` ###
-Proxy script for invoking `q3map2` BSP compiler from GtkRadiant in `/usr/share/gtkradiant/` with
-appropriate parameters to compile BSP structures for OpenZone.
+Proxy script for invoking `q3map2` BSP compiler from GtkRadiant in with appropriate parameters to
+compile a BSP structures for OpenZone.
+
+### `run.sh [win | nacl] [<options>]` ###
+
+Linux-x86_64-Clang client is launched by default. <options> are passed to the client command line.
+The following alternative launches are available:
+- `wine`: Installs the standalone Windows port into `build/Windows-test` and launches it via Wine.
+- `nacl`: Prepares directory `build/NaCl-test` (creating symlinks to binaries, compiled data
+ archives, HTML pages ...), starts a simple python web server in that directory at port 8000
+ (`python -m http.server`) and opens `localhost:8000` in chromium browser to test the web-based
+ NaCl port. If `strip` is passed as the second option, binaries are stripped too.
Documentation
-------------
View
18 autogen.sh
@@ -1,5 +1,7 @@
#!/bin/sh
#
+# autogen.sh
+#
# Some targets have lots of source files and it would be hard to keep them all consistent and
# up-to-date manually. Lists of source files in corresponding CMakeLists.txt are thus generated by
# this script.
@@ -15,13 +17,13 @@ for component in ${components[@]}; do
echo "Generating src/$component/CMakeLists.txt"
cd src/$component
- # sed statements remove uninstantiated *.hh, *.cc, */*.hh and */*.cc expressions.
- sources=`echo *.{hh,cc} */*.{hh,cc} | sed -r 's| (\*/)?\*\...||g'`
+ # The sed statement removes uninstantiated *.hh, *.cc, */*.hh and */*.cc expressions and makes the
+ # file list newline-separated and indented.
+ sources=`echo *.{hh,cc} */*.{hh,cc} | sed -r 's| (\*/)?\*\...||g; s| |\\\\n |g'`
- # Insert newline-separated & ' '-indented source files between `#BEGIN SOURCES` and
- # `#END SOURCES` tags in CMakeLists.txt files.
- sed -r '/^#BEGIN SOURCES$/,/^#END SOURCES$/ c\#BEGIN SOURCES\n '"`echo $sources \
- | sed -r 's| |\\\\n |g'`"'\n#END SOURCES' -i CMakeLists.txt
+ # Insert source file list between "#BEGIN SOURCES" and "#END SOURCES" tags in CMakeLists.txt.
+ sed -r '/^#BEGIN SOURCES$/,/^#END SOURCES$/ c\#BEGIN SOURCES\n '"$sources"'\n#END SOURCES' \
+ -i CMakeLists.txt
cd ../..
done
@@ -36,8 +38,8 @@ sed -r 's|^(PROJECT_NUMBER *= *).*$|\1"'"$version"'"|' -i doc/Doxyfile*
echo "Updating HTML READMEs doc/*.html"
sed -r 's|(<!--OZ_VERSION-->)[^<"]*|\1'"$version"'|' -i doc/*.html
-echo "Updating version in etc/PKGBUILD"
-sed -r 's|^(pkgver=).*$|\1'"$version"'|' -i etc/PKGBUILD
+echo "Updating version in etc/PKGBUILD*"
+sed -r 's|^(pkgver=).*$|\1'"$version"'|' -i etc/PKGBUILD*
echo "Updating version in etc/openzone.spec"
sed -r 's|^(Version: *).*$|\1'"$version"'|' -i etc/openzone.spec
View
12 build.sh
@@ -1,4 +1,14 @@
#!/bin/sh
+#
+# build.sh [clean | conf | build]
+#
+# This script configures and/or builds OpenZone for all supported platforms in the `build`
+# directory. The following commands may be given (`build` is assumed if none):
+#
+# - `clean`: Delete all builds.
+# - `conf`: Delete all builds and configure (but not build) them anew.
+# - `build`: Configure (if necessary) and build all builds.
+#
buildType=Debug
platforms=(
@@ -13,7 +23,7 @@ function clean()
for platform in ${platforms[@]}; do
rm -rf build/$platform
done
- rm -rf build/{NaCl-test,Android}
+ rm -rf build/{OpenZone-*,NaCl-test,Android}
}
function build()
View
8 capture.sh
@@ -1,3 +1,11 @@
+#!/bin/sh
+#
+# capture.sh
+#
+# Run OpenZone with glc tool to capture video. Audio is captured from PulseAudio server and saved
+# into `openzone-pa.wav` file.
+#
+
parecord -d 0 --file-format=WAVE > openzone-pa.wav &
glc-capture --pbo -s $@
kill $!
View
5 clean-blanks.sh
@@ -1,5 +1,10 @@
#!/bin/sh
#
+# clean-blanks.sh
+#
+# Cleans up trailing blanks, duplicated empty lines and missing newlines at the end of file for most
+# files in the source tree.
+#
# We want to remove duplicated blank lines and blank lines at the end of a file (in Unix means).
# The latter cannot be directly performed by sed, so we add additional two blank lines at the end of
# each file, remove duplicated blank lines and then remove one blank line at the end of each file.
View
5 count.sh
@@ -1,6 +1,9 @@
#!/bin/sh
#
-# Generate SLOC statistics with sloccount and cloc.
+# count.sh
+#
+# Prints SLOC (source lines of code) statistics generated by SLOCCount and cloc (if found installed
+# on the system).
#
which sloccount &> /dev/null && LANG=C sloccount src
View
5 cppcheck.sh
@@ -1,4 +1,9 @@
#!/bin/sh
+#
+# cppcheck.sh
+#
+# Runs cppcheck tool for static code analysis. Output is written into `cppcheck.log`.
+#
cppcheck --enable=all --force -Isrc -Ibuild/Linux-x86_64-Clang/src/ozCore \
-Ibuild/Linux-x86_64-Clang/src src &> cppcheck.log
View
7 data-cleanup.sh
@@ -1,11 +1,8 @@
#!/bin/sh
#
-# Clean-up package source directory.
-# This removes temporary, intermediate and backup files that are created by some programs while
-# editing game data.
+# data-cleanup.sh <datasrc_dir>
#
-# Usage:
-# ./clean-data.sh <datasrc_dir>
+# Cleans up temporary, intermediate and backup files from a source game data directory.
#
if [[ -z $1 ]]; then
View
2  data/openzone_missions/mission/test/main.lua
@@ -57,7 +57,7 @@ function init_sample()
--local cX, cY, cZ = 2000, 2000, 100
local lord = ozOrbisAddObj( OZ_FORCE, "bauul", cX - 5, cY - 11, cZ - 6, OZ_EAST )
- ozBotSetName( "Žan-Hlod vam Dam" )
+ ozBotSetName( "Jean-Claude van Damme" )
local memo = ozOrbisAddObj( OZ_FORCE, "datacube", cX - 9, cY - 6, cZ - 6 )
local droid = ozOrbisAddObj( OZ_FORCE, "droid.OOM-9", cX - 3, cY - 11, cZ - 6, OZ_WEST )
local cyborg = ozOrbisAddObj( OZ_FORCE, "cyborg", cX - 3, cY - 13, cZ - 6, OZ_WEST )
View
0  data/rz_base/credits/ozbase.txt → data/rz_base/credits/rz_base.txt
File renamed without changes
View
67 data/rz_base/lingua/en/ozbase.po → data/rz_base/lingua/en/rz_base.po
@@ -2,19 +2,16 @@ msgid ""
msgstr ""
"Project-Id-Version: OpenZone\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2012-07-29 15:20+0100\n"
+"PO-Revision-Date: 2012-12-06 03:09+0100\n"
"Last-Translator: Davorin Učakar <davorin.ucakar@gmail.com>\n"
"Language-Team: Davorin Učakar <davorin.ucakar@gmail.com>\n"
-"Language: \n"
+"Language: en_GB\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Poedit-Language: English\n"
"X-Poedit-SourceCharset: utf-8\n"
-"X-Poedit-Country: UNITED KINGDOM\n"
-#: src/client/ui/CreditsMenu.cc:160
-#: src/client/ui/MissionMenu.cc:178
+#: src/client/ui/CreditsMenu.cc:137 src/client/ui/MissionMenu.cc:179
msgid "Back"
msgstr "Back"
@@ -22,40 +19,47 @@ msgstr "Back"
msgid "Close"
msgstr "Close"
-#: src/client/ui/MainMenu.cc:138
+#: src/client/ui/MainMenu.cc:143
msgid "Continue"
msgstr "Continue"
-#: src/client/ui/BuildMenu.cc:64
+#: src/client/ui/BuildMenu.cc:63
msgid "Create"
msgstr "Create"
-#: src/client/ui/MainMenu.cc:142
+#: src/client/ui/MainMenu.cc:186
msgid "Credits"
msgstr "Credits"
-#: src/client/ui/DebugFrame.cc:101
+#: src/client/ui/DebugFrame.cc:102
msgid "Debug"
msgstr "Debug"
-#: src/client/ui/MainMenu.cc:143
+#: src/client/ui/MainMenu.cc:188
msgid "Exit"
msgstr "Exit"
-#: src/client/ui/MainMenu.cc:104
-msgid "Licensed under GNU GPL 3.0. Game data archives and libraries distributed with OpenZone are work of various authors and use separate licences. For more details see doc/README.html and files named README.txt and COPYING.txt inside game data archives."
-msgstr "Licensed under GNU GPL 3.0. Game data archives and libraries distributed with OpenZone are work of various authors and use separate licences. For more details see doc/README.html and files named README.txt and COPYING.txt inside game data archives."
+#: src/client/ui/MainMenu.cc:126
+msgid ""
+"Licensed under GNU GPL 3.0. Game data archives and libraries distributed "
+"with OpenZone are work of various authors and use separate licences. For "
+"more details see doc/README.html and files named README.txt and COPYING.txt "
+"inside game data archives."
+msgstr ""
+"Licensed under GNU GPL 3.0. Game data archives and libraries distributed "
+"with OpenZone are work of various authors and use separate licences. For "
+"more details see doc/README.html and files named README.txt and COPYING.txt "
+"inside game data archives."
-#: src/client/GameStage.cc:141
-#: src/client/GameStage.cc:366
+#: src/client/GameStage.cc:128 src/client/GameStage.cc:357
msgid "Loading ..."
msgstr "Loading ..."
-#: src/client/ui/MainMenu.cc:140
+#: src/client/ui/MainMenu.cc:184
msgid "Missions"
msgstr "Missions"
-#: src/client/ui/MusicPlayer.cc:183
+#: src/client/ui/MusicPlayer.cc:163
msgid "Music Player"
msgstr "Music Player"
@@ -67,45 +71,47 @@ msgstr ""
"NOT IMPLEMENTED.\n"
"You can change your settings by manually editing the following files:"
-#: src/client/ui/QuestFrame.cc:40
-#: src/client/ui/QuestFrame.cc:134
+#: src/client/ui/QuestFrame.cc:41 src/client/ui/QuestFrame.cc:135
msgid "No quest"
msgstr "No quest"
-#: src/client/Profile.cc:58
+#: src/client/Profile.cc:57
msgid "Player"
msgstr "Me"
-#: src/client/ui/MainMenu.cc:139
+#: src/client/ui/MainMenu.cc:150
msgid "Quickload"
msgstr "Quickload"
-#: src/client/ui/MainMenu.cc:141
-#: src/client/ui/SettingsFrame.cc:60
+#: src/client/ui/MainMenu.cc:185 src/client/ui/SettingsFrame.cc:60
msgid "Settings"
msgstr "Settings"
-#: src/client/GameStage.cc:464
+#: src/client/GameStage.cc:453
msgid "Shutting down ..."
msgstr "Shutting down ..."
-#: src/client/ui/CreditsMenu.cc:168
+#: src/client/ui/MainMenu.cc:187
+msgid "Web"
+msgstr "Splet"
+
+#: src/client/ui/CreditsMenu.cc:145
msgid "engine developer"
msgstr "engine developer"
-#: src/client/ui/QuestFrame.cc:62
+#: src/client/ui/QuestFrame.cc:63
msgid "failed"
msgstr "failed"
-#: src/client/ui/QuestFrame.cc:56
+#: src/client/ui/QuestFrame.cc:57
msgid "in progress"
msgstr "in progress"
-#: src/client/ui/CreditsMenu.cc:181
+#: src/client/ui/CreditsMenu.cc:158
msgid "package"
msgstr "package"
-#: src/client/ui/QuestFrame.cc:59
+#: src/client/ui/QuestFrame.cc:60
msgid "successful"
msgstr "successful"
@@ -133,4 +139,3 @@ msgstr ""
"\n"
"UI icons\n"
"Davorin Učakar\n"
-
View
67 data/rz_base/lingua/sl/ozbase.po → data/rz_base/lingua/sl/rz_base.po
@@ -2,19 +2,16 @@ msgid ""
msgstr ""
"Project-Id-Version: OpenZone\n"
"POT-Creation-Date: \n"
-"PO-Revision-Date: 2012-07-29 15:20+0100\n"
+"PO-Revision-Date: 2012-12-06 03:09+0100\n"
"Last-Translator: Davorin Učakar <davorin.ucakar@gmail.com>\n"
"Language-Team: Davorin Učakar <davorin.ucakar@gmail.com>\n"
-"Language: \n"
+"Language: sl_SI\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"X-Poedit-Language: Slovenian\n"
"X-Poedit-SourceCharset: utf-8\n"
-"X-Poedit-Country: SLOVENIA\n"
-#: src/client/ui/CreditsMenu.cc:160
-#: src/client/ui/MissionMenu.cc:178
+#: src/client/ui/CreditsMenu.cc:137 src/client/ui/MissionMenu.cc:179
msgid "Back"
msgstr "Nazaj"
@@ -22,40 +19,47 @@ msgstr "Nazaj"
msgid "Close"
msgstr "Zapri"
-#: src/client/ui/MainMenu.cc:138
+#: src/client/ui/MainMenu.cc:143
msgid "Continue"
msgstr "Nadaljevanje"
-#: src/client/ui/BuildMenu.cc:64
+#: src/client/ui/BuildMenu.cc:63
msgid "Create"
msgstr "Umesti"
-#: src/client/ui/MainMenu.cc:142
+#: src/client/ui/MainMenu.cc:186
msgid "Credits"
msgstr "Zasluge"
-#: src/client/ui/DebugFrame.cc:101
+#: src/client/ui/DebugFrame.cc:102
msgid "Debug"
msgstr "Razhroščevanje"
-#: src/client/ui/MainMenu.cc:143
+#: src/client/ui/MainMenu.cc:188
msgid "Exit"
msgstr "Izhod"
-#: src/client/ui/MainMenu.cc:104
-msgid "Licensed under GNU GPL 3.0. Game data archives and libraries distributed with OpenZone are work of various authors and use separate licences. For more details see doc/README.html and files named README.txt and COPYING.txt inside game data archives."
-msgstr "Pogon OpenZone je pod licenco GNU GPL 3.0. Podatkovni arhivi in knjižnice distribuirane skupaj z OpenZone so delo različnih avtorjev in so pod drugačnimi licencami. Za podrobnosti glej doc/PREBERI.html ter datoteke z imeni COPYING.txt in README.txt v podatkovnih arhivih."
+#: src/client/ui/MainMenu.cc:126
+msgid ""
+"Licensed under GNU GPL 3.0. Game data archives and libraries distributed "
+"with OpenZone are work of various authors and use separate licences. For "
+"more details see doc/README.html and files named README.txt and COPYING.txt "
+"inside game data archives."
+msgstr ""
+"Pogon OpenZone je pod licenco GNU GPL 3.0. Podatkovni arhivi in knjižnice "
+"distribuirane skupaj z OpenZone so delo različnih avtorjev in so pod "
+"drugačnimi licencami. Za podrobnosti glej doc/PREBERI.html ter datoteke z "
+"imeni COPYING.txt in README.txt v podatkovnih arhivih."
-#: src/client/GameStage.cc:141
-#: src/client/GameStage.cc:366
+#: src/client/GameStage.cc:128 src/client/GameStage.cc:357
msgid "Loading ..."
msgstr "Nalagam ..."
-#: src/client/ui/MainMenu.cc:140
+#: src/client/ui/MainMenu.cc:184
msgid "Missions"
msgstr "Misije"
-#: src/client/ui/MusicPlayer.cc:183
+#: src/client/ui/MusicPlayer.cc:163
msgid "Music Player"
msgstr "Predvajalnik"
@@ -67,45 +71,47 @@ msgstr ""
"NI IMPLEMENTIRANO\n"
"Nastavitve lahko spreminjaš v naslednjih datotekah:"
-#: src/client/ui/QuestFrame.cc:40
-#: src/client/ui/QuestFrame.cc:134
+#: src/client/ui/QuestFrame.cc:41 src/client/ui/QuestFrame.cc:135
msgid "No quest"
msgstr "Ni naloge"
-#: src/client/Profile.cc:58
+#: src/client/Profile.cc:57
msgid "Player"
msgstr "Jaz"
-#: src/client/ui/MainMenu.cc:139
+#: src/client/ui/MainMenu.cc:150
msgid "Quickload"
msgstr "Zadnje shranjeno"
-#: src/client/ui/MainMenu.cc:141
-#: src/client/ui/SettingsFrame.cc:60
+#: src/client/ui/MainMenu.cc:185 src/client/ui/SettingsFrame.cc:60
msgid "Settings"
msgstr "Nastavitve"
-#: src/client/GameStage.cc:464
+#: src/client/GameStage.cc:453
msgid "Shutting down ..."
msgstr "Zaustavljam ..."
-#: src/client/ui/CreditsMenu.cc:168
+#: src/client/ui/MainMenu.cc:187
+msgid "Web"
+msgstr "Web"
+
+#: src/client/ui/CreditsMenu.cc:145
msgid "engine developer"
msgstr "avtor pogona"
-#: src/client/ui/QuestFrame.cc:62
+#: src/client/ui/QuestFrame.cc:63
msgid "failed"
msgstr "spodletelo"
-#: src/client/ui/QuestFrame.cc:56
+#: src/client/ui/QuestFrame.cc:57
msgid "in progress"
msgstr "v teku"
-#: src/client/ui/CreditsMenu.cc:181
+#: src/client/ui/CreditsMenu.cc:158
msgid "package"
msgstr "paket"
-#: src/client/ui/QuestFrame.cc:59
+#: src/client/ui/QuestFrame.cc:60
msgid "successful"
msgstr "zaključeno"
@@ -133,4 +139,3 @@ msgstr ""
"\n"
"ikone uporabniškega vmesnika\n"
"Davorin Učakar\n"
-
View
24 etc/PKGBUILD
@@ -12,7 +12,7 @@ source=("https://github.com/downloads/ducakar/openzone/${pkgbase}-src-${pkgver}.
"https://github.com/downloads/ducakar/openzone/${pkgbase}-data-${pkgver}.tar.xz")
sha1sums=()
-build()
+function build()
{
cd "${srcdir}/${pkgbase}-${pkgver}/build"
@@ -28,7 +28,7 @@ build()
make
}
-package_liboz()
+function package_liboz()
{
pkgdesc='OpenZone Core and Dynamics libraries'
license=('ZLIB')
@@ -43,14 +43,13 @@ package_liboz()
install -Dm644 "src/ozCore/COPYING" "${pkgdir}/usr/share/licenses/liboz/COPYING"
}
-package_openzone()
+function package_openzone()
{
pkgdesc='Simple cross-platform FPS/RTS game engine'
- depends=('freeimage' 'libgl' 'liboz' 'luajit' 'openal' 'sdl_ttf')
- optdepends=('openzone-data: game data'
- 'espeak: speech synthesis'
- 'libmad: MP3 playing'
- 'faad2: AAC playing'
+ depends=('freeimage' 'libgl' 'liboz' 'luajit' 'openal' 'openzone-data' 'sdl_ttf')
+ optdepends=('espeak: speech synthesis'
+ 'libmad: MP3 streaming'
+ 'faad2: AAC streaming'
'zip: building ZIP game data archives'
'p7zip: building 7zip game data archives')
@@ -58,17 +57,18 @@ package_openzone()
( cd build && make install DESTDIR="${pkgdir}" )
- rm -rf "${pkgdir}/usr/"{lib,include,share/doc}
+ rm -rf "${pkgdir}/usr/"{lib,include}
install -dm755 "${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/licences"
- install -m644 doc/*.html "${pkgdir}/usr/share/doc/${pkgname}-${pkgver}"
+ install -m644 AUTHORS ChangeLog.md README.md TODO.md doc/*.html \
+ "${pkgdir}/usr/share/doc/${pkgname}-${pkgver}"
install -m644 doc/licences/* "${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/licences"
}
-package_openzone-data()
+function package_openzone-data()
{
pkgdesc='OpenZone game data'
- license=('custom')
+ license=('CCPL:by-nc-nd')
arch=('any')
cd "${srcdir}/${pkgbase}-${pkgver}"
View
12 etc/PKGBUILD.aur
@@ -5,11 +5,10 @@ pkgver=0.3.81
pkgrel=1
pkgdesc='Simple cross-platform FPS/RTS game engine'
url="http://ducakar.github.com/openzone/"
-license=('GPL3' 'ZLIB')
+license=('GPL3' 'CCPL:by-nc-nd')
arch=('i686' 'x86_64')
depends=('libpulse' 'physfs' 'freeimage' 'libgl' 'luajit' 'openal' 'sdl_ttf')
-optdepends=('openzone-data: game data'
- 'espeak: speech synthesis'
+optdepends=('espeak: speech synthesis'
'libmad: MP3 playing'
'faad2: AAC playing'
'zip: building ZIP game data archives'
@@ -19,7 +18,7 @@ source=("https://github.com/downloads/ducakar/openzone/${pkgname}-src-${pkgver}.
"https://github.com/downloads/ducakar/openzone/${pkgname}-data-${pkgver}.tar.xz")
sha1sums=()
-build()
+function build()
{
cd "${srcdir}/${pkgbase}-${pkgver}/build"
@@ -34,7 +33,7 @@ build()
make
}
-package()
+function package()
{
cd "${srcdir}/${pkgbase}-${pkgver}"
@@ -43,7 +42,8 @@ package()
install -Dm644 "src/ozCore/COPYING" "${pkgdir}/usr/share/licenses/openzone/COPYING.liboz"
install -dm755 "${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/licences"
- install -m644 doc/*.html "${pkgdir}/usr/share/doc/${pkgname}-${pkgver}"
+ install -m644 AUTHORS ChangeLog.md README.md TODO.md doc/*.html \
+ "${pkgdir}/usr/share/doc/${pkgname}-${pkgver}"
install -m644 doc/licences/* "${pkgdir}/usr/share/doc/${pkgname}-${pkgver}/licences"
install -dm755 "${pkgdir}/usr/share/openzone"
View
2  etc/SDL2-CMakeLists-gen.sh
@@ -43,3 +43,5 @@ install( TARGETS SDL2 ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
PUBLIC_HEADER DESTINATION include/SDL2 )
EOF
+
+sed -r 's|Java_org_libsdl_app_|Java_com_openzone_|g' -i src/core/android/SDL_android.cpp
View
2  etc/android-project/AndroidManifest.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
- package="org.libsdl.app"
+ package="com.openzone"
android:versionCode="1"
android:versionName="1.0">
<application android:label="@string/app_name">
View
2  ...droid-project/src/org/libsdl/app/SDLActivity.java → ...android-project/src/com/openzone/SDLActivity.java
@@ -1,4 +1,4 @@
-package org.libsdl.app;
+package com.openzone;
import javax.microedition.khronos.egl.EGL10;
import javax.microedition.khronos.egl.EGLConfig;
View
30 etc/data-usage.lua
@@ -1,24 +1,24 @@
#!/usr/bin/lua
-SIZE = 8192
-DIM = 8
-TERRA_DIM = 8
+SIZE = 8192
+DIM = 8
+TERRA_DIM = 8
-MAX_STRS = 16384
-MAX_OBJS = 65536
-MAX_FRAGS = 32768
+MAX_STRS = 16384
+MAX_OBJS = 65536
+MAX_FRAGS = 32768
-PTR_SIZE = 8
-VEC_SIZE = 12
+PTR_SIZE = 8
+VEC_SIZE = 12
-CELL_SIZE = 2 * PTR_SIZE + 6 * 2 + 4
-QUAD_SIZE = 3 * VEC_SIZE
-VECTORS = ( MAX_STRS + MAX_OBJS + MAX_FRAGS ) * PTR_SIZE + 4 + 4
+CELL_SIZE = 2 * PTR_SIZE + 6 * 2 + 4
+QUAD_SIZE = 3 * VEC_SIZE
+VECTORS = ( MAX_STRS + MAX_OBJS + MAX_FRAGS ) * PTR_SIZE + 4 + 4
-nCells1 = ( math.floor( ( SIZE - 1 ) / DIM ) + 1 )
-nQuads1 = ( math.floor( ( SIZE - 1 ) / TERRA_DIM ) + 2 )
-nCells2 = nCells1*nCells1
-nQuads2 = nQuads1*nQuads1
+nCells1 = ( math.floor( ( SIZE - 1 ) / DIM ) + 1 )
+nQuads1 = ( math.floor( ( SIZE - 1 ) / TERRA_DIM ) + 2 )
+nCells2 = nCells1*nCells1
+nQuads2 = nQuads1*nQuads1
-- size
cellsSize = nCells2 * CELL_SIZE / ( 1024.0*1024.0 )
View
2  etc/launchers/openzone.en.bat
@@ -1,4 +1,4 @@
@echo off
-bin\Windows-i686\openzone.exe -L en -p "." %1 %2 %3 %4 %5 %6 %7 %8 %9
+bin\Windows-i686\openzone.exe -p . %1 %2 %3 %4 %5 %6 %7 %8 %9
pause
View
17 etc/launchers/openzone.sh
@@ -1,13 +1,16 @@
#!/bin/sh
-if [[ `uname -m` == "x86_64" ]]; then
- arch="Linux-x86_64"
- elfInterpreter="/lib64/ld-linux-x86-64.so.2"
+# On Arch Linux x86-64 `/lib/ld-linux-x86-64.so.2` is set as ELF interpreter path instead of
+# `/lib64/ld-linux-x86-64.so.2`, that's why we need the interpreter workaround for other distros.
+if [[ `uname -m` == x86_64 ]]; then
+ arch=Linux-x86_64
+ elfInterpreter=/lib64/ld-linux-x86-64.so.2
else
- arch="Linux-i686"
- elfInterpreter="/lib/ld-linux.so.2"
+ arch=Linux-i686
+ elfInterpreter=/lib/ld-linux.so.2
fi
-baseDir=`dirname "$0"`
+baseDir=`dirname "$0"`
cd "$baseDir"
-LD_LIBRARY_PATH="./lib/$arch" exec "$elfInterpreter" "./bin/$arch/openzone" -p "." $@
+
+LD_LIBRARY_PATH=./lib/$arch exec $elfInterpreter ./bin/$arch/openzone -p . $@
View
2  etc/launchers/openzone.sl.bat
@@ -1,4 +1,4 @@
@echo off
-bin\Windows-i686\openzone.exe -L sl -p "." %1 %2 %3 %4 %5 %6 %7 %8 %9
+bin\Windows-i686\openzone.exe -L sl -p . %1 %2 %3 %4 %5 %6 %7 %8 %9
pause
View
17 etc/openzone.spec
@@ -16,8 +16,8 @@ BuildRequires: alsa-lib-devel
BuildRequires: pulseaudio-libs-devel
BuildRequires: physfs-devel
BuildRequires: lua-devel
-BuildRequires: SDL
-BuildRequires: SDL_ttf
+BuildRequires: SDL-devel
+BuildRequires: SDL_ttf-devel
BuildRequires: mesa-libGL-devel
BuildRequires: openal-soft-devel
BuildRequires: libvorbis-devel
@@ -60,7 +60,7 @@ BuildArch: noarch
Requires: %{name} = %{version}
%description data
-Game data for OpenZone. Includes tutorial, test world and cviček mission.
+Game data for OpenZone. Includes tutorial, test world and Cviček mission.
%prep
%setup -q -b 1
@@ -80,19 +80,16 @@ make %{?_smp_mflags}
%install
rm -rf "$RPM_BUILD_ROOT"
-install -dm755 "$RPM_BUILD_ROOT"%{_datadir}/openzone
-install -m644 share/openzone/*.zip "$RPM_BUILD_ROOT"%{_datadir}/openzone
-
-cd build
-
-make install DESTDIR="$RPM_BUILD_ROOT"
-rm -rf "$RPM_BUILD_ROOT"%{_defaultdocdir}
+( cd build && make install DESTDIR="$RPM_BUILD_ROOT" )
if [[ %{_libdir} != /usr/lib ]]; then
sed -ri 's|libdir=.*|libdir=%{_libdir}|' "$RPM_BUILD_ROOT"/usr/lib/pkgconfig/*
mv "$RPM_BUILD_ROOT"/usr/lib "$RPM_BUILD_ROOT"%{_libdir}
fi
+install -dm755 "$RPM_BUILD_ROOT"%{_datadir}/openzone
+install -m644 share/openzone/*.zip "$RPM_BUILD_ROOT"%{_datadir}/openzone
+
%files
%defattr(-, root, root, -)
%{_bindir}/*
View
31 gettext-base.sh
@@ -0,0 +1,31 @@
+#!/bin/sh
+#
+# gettext-base.sh <basedata_dir>
+#
+# Creates `<basedata_dir>/<basename>.pot` template for localised messages catalogue. See `ozGettext`
+# tool for more details. `<basename>` is package name (last directory name in `<basedata_dir>`).
+#
+
+if [[ -z $1 ]]; then
+ echo "Usage: $0 <basedata_dir>"
+ exit
+fi
+
+if [[ ! -d $1 ]]; then
+ echo "Directory $1 does not exist."
+ exit
+fi
+
+baseName=`basename $1`
+outFile="$1/lingua/$baseName.pot"
+
+rm -rf $outFile
+xgettext --omit-header -C -s -kOZ_GETTEXT -o $outFile \
+ src/*/*.{hh,cc} src/*/*/*.{hh,cc}
+
+cat << EOF >> $outFile
+
+msgid ""
+`cat $1/credits/$baseName.txt | sed -r 's|^(.*)$|"\1\\\\n"|'`
+msgstr ""
+EOF
View
19 gettext-ozbase.sh
@@ -1,19 +0,0 @@
-#!/bin/sh
-
-if [[ ! -d data/ozbase ]]; then
- echo "Directory ./data/ozbase does not exist."
- exit
-fi
-
-outFile=data/ozbase/lingua/ozbase.pot
-
-rm -rf $outFile
-xgettext --omit-header -C -s -kOZ_GETTEXT -o $outFile \
- src/*/*.{hh,cc} src/*/*/*.{hh,cc}
-
-cat << EOF >> $outFile
-
-msgid ""
-`cat data/ozbase/credits/ozbase.txt | sed -r 's|^(.*)$|"\1\\\\n"|'`
-msgstr ""
-EOF
View
24 libs.sh → lib.sh
@@ -1,11 +1,28 @@
#!/bin/sh
+#
+# lib.sh [clean | build]
+#
+# Copy all libraries OpenZone depends on to `lib/<platform>` directories (currently Linux-x86_64,
+# Linux-i686 and Windows-i686). Those are required to create standalone build (see OZ_STANDALONE
+# cmake option) that can be distributed in a ZIP archive (i.e. no installation required, all
+# dependencies included).
+#
+# This script is currently Arch Linux-specific and assumes one has all 64-bit, 32-bit (`lib32-*`)
+# and MinGW (`mingw32-*`) versions of all dependent libraries installed. Many of those packages must
+# be built from AUR.
+#
+# The following commands may be given (`build` is assumed if none):
+#
+# - `clean`: Delete directories for all platforms,
+# - `build`: Copy libraries for selected platforms into corresponding directories.
+#
platforms=( Linux-x86_64 Linux-i686 Windows-i686 )
function clean()
{
for platform in ${platforms[@]}; do
- rm -rf libs/$platform
+ rm -rf lib/$platform
done
}
@@ -13,7 +30,7 @@ function build()
{
for platform in ${platforms[@]}; do
if [[ $platform == Linux-x86_64 || $platform == Linux-i686 ]]; then
- outDir=libs/$platform
+ outDir=lib/$platform
prefix=/usr/lib
[[ $platform == Linux-x86_64 && ! -d /usr/lib32 ]] && prefix=/usr/lib64
@@ -33,7 +50,6 @@ function build()
"$prefix/libvorbis.so.0" \
"$prefix/libvorbisfile.so.3" \
"$prefix/libfreeimage.so.3" \
- "build/$platform/src/txc_dxtn/libtxc_dxtn.so" \
"$outDir"
chmod +x $outDir/*
@@ -41,7 +57,7 @@ function build()
fi
if [[ $platform == Windows-i686 ]]; then
- outDir=libs/Windows-i686
+ outDir=lib/$platform
prefix=/usr/i486-mingw32/bin
rm -rf $outDir
View
0  libs/CMakeCache.txt → lib/CMakeCache.txt
File renamed without changes
View
42 nacl-test.sh
@@ -1,42 +0,0 @@
-#!/bin/sh
-#
-# Create layout in build/NaCL-test directory for launching NaCl port and launch
-# Chromium browser. It assumes OpenZone client (including game data) is already
-# built. Local web server is estabilished (python -m http.server) to server web
-# page.
-# Pass "strip" as the first parameter to strip binaries.
-#
-
-# Extract path to NaCl SDK from CMake toolchain files.
-nacl64Root=`egrep '^set\( PLATFORM_PREFIX' cmake/NaCl-x86_64.Toolchain.cmake | \
- sed -r 's|^set\( PLATFORM_PREFIX *"(.*)\" \)|\1|'`
-nacl32Root=`egrep '^set\( PLATFORM_PREFIX' cmake/NaCl-i686.Toolchain.cmake | \
- sed -r 's|^set\( PLATFORM_PREFIX *"(.*)\" \)|\1|'`
-
-mkdir -p build/NaCl-test
-
-# Just create symlinks instead of copying.
-for i in share/openzone/*.{7z,zip} share/openzone/packages.ozManifest \
- build/NaCl-*/src/tools/openzone.*.nexe etc/nacl/openzone.nmf \
- etc/nacl/openzone.??.html doc
-do
- [[ -e $i ]] && ln -sf ../../$i build/NaCl-test
-done
-
-# Strip binaries if "strip" parameter given.
-if [[ $1 == strip ]]; then
- [[ -e build/NaCl-test/openzone.x86_64.nexe ]] && \
- "$nacl64Root/bin/x86_64-nacl-strip" build/NaCl-test/openzone.x86_64.nexe
- [[ -e build/NaCl-test/openzone.i686.nexe ]] && \
- "$nacl64Root/bin/i686-nacl-strip" build/NaCl-test/openzone.i686.nexe
-fi
-
-cd build/NaCl-test
-python -m http.server &
-serverPID=$!
-
-sleep 3
-chromium --user-data-dir="$HOME/.config/chromium-test" http://localhost:8000/openzone.sl.html \
- || true
-
-kill $serverPID
View
50 package.sh
@@ -1,20 +1,44 @@
#!/bin/sh
+#
+# package.sh {src | data | datasrc | boundle}
+#
+# One of the following commands must be given:
+#
+# - `src`: Create source archive `openzone-src-<version>.tar.xz`.
+# - `data`: Create compiled data archive `openzone-data-<version>.tar.xz`. All data packages found
+# in `share/openzone` directory are included.
+# - `datasrc`: Create source data archive `openzone-data-src-<version>.tar.xz`. All source data
+# packages found in `data` directory are included.
+# - `boundle`: Create a ZIP archive that includes Linux-x86_64, Linux-i686 and Windows-i686
+# standalone builds and compiled game data packages found in `share/openzone`.
+#
+
+platforms=( Linux-x86_64 Linux-i686 Windows-i686 )
eval `egrep '^version=' ./autogen.sh`
files=`git ls-files | egrep -v '^data/'`
files="$files share/applications share/pixmaps"
-if [[ $1 != data ]]; then
- echo "Packing openzone-src-$version.tar.xz"
- tar Jcf openzone-src-$version.tar.xz --xform "s|^|openzone-$version/|" $files
-fi
-
-if [[ $1 != src ]]; then
- echo "Packing openzone-data-$version.tar.xz"
- tar Jcf openzone-data-$version.tar.xz --xform "s|^|openzone-$version/|" share/openzone/*.zip
-
- echo "Packing openzone-data-src-$version.tar.xz"
- tar Jcf openzone-data-src-$version.tar.xz --xform "s|^|openzone-$version/|" --exclude=DISABLED \
- data
-fi
+case $1 in
+ src)
+ echo "Packing openzone-src-$version.tar.xz"
+ tar Jcf openzone-src-$version.tar.xz --xform "s|^|openzone-$version/|" $files
+ ;;
+ data)
+ echo "Packing openzone-data-$version.tar.xz"
+ tar Jcf openzone-data-$version.tar.xz --xform "s|^|openzone-$version/|" share/openzone/*.zip
+ ;;
+ datasrc)
+ echo "Packing openzone-data-src-$version.tar.xz"
+ tar Jcf openzone-data-src-$version.tar.xz --xform "s|^|openzone-$version/|" \
+ --exclude=DISABLED data
+ ;;
+ boundle)
+ echo "Packing multi-platform OpenZone-$version.zip boundle"
+ echo "TODO"
+ ;;
+ *)
+ echo "Usage: $0 {src | data | datasrc | boundle}"
+ ;;
+esac
View
12 ports.sh
@@ -1,4 +1,16 @@
#!/bin/sh
+#
+# ports.sh [clean | fetch | build]
+#
+# This script is used to build libraries required by OpenZone for some platforms. Currently it
+# builds zlib, physfs, SDL, SDL_ttf, OpenAL Soft, squish for NaCl-x86_64 and NaCl-i686.
+# The following commands may be given (`build` is assumed if none):
+#
+# - `clean`: Delete all built libraries for all platforms in `ports` directory. Downloaded sources
+# are left intact.
+# - `fetch`: Download sources into `ports/archives` directory.
+# - `build`: Builds all libraries for all platforms.
+#
platforms=(
NaCl-x86_64 NaCl-i686 PNaCl
View
11 q3map2.sh
@@ -1,10 +1,17 @@
#!/bin/sh
+#
+# q3map2.sh <map_file>
+#
+# Proxy script for invoking `q3map2` BSP compiler from GtkRadiant in with appropriate parameters to
+# compile a BSP structures for OpenZone.
+#
if [[ -z $1 ]]; then
echo "Usage: $0 <map_file>"
exit
fi
-basepath=`echo $1 | sed -r 's|(.*)/baseq3/maps/.*|\1|'`
+radiantHome=/usr/share/gtkradiant
+basePath=`echo $1 | sed -r 's|(.*)/baseq3/maps/.*|\1|'`
-/usr/share/gtkradiant/q3map2 -fs_basepath "$basepath" -meta -v $1
+"$radiantHome"/q3map2 -fs_basepath "$basePath" -meta -v $1
View
72 run.sh
@@ -0,0 +1,72 @@
+#!/bin/sh
+#
+# run.sh [win | nacl] [<options>]
+#
+# Linux-x86_64-Clang client is launched by default. <options> are passed to the client command line.
+# The following alternative launches are available:
+#
+# - `wine`: Installs the standalone Windows port into `build/Windows-test` and launches it via Wine.
+# - `nacl`: Prepares directory `build/NaCl-test` (creating symlinks to binaries, compiled data
+# archives, HTML pages ...), starts a simple python web server in that directory at port 8000
+# (`python -m http.server`) and opens `localhost:8000` in chromium browser to test the web-based
+# NaCl port. If `strip` is passed as the second option, binaries are stripped too.
+#
+
+defaultPlatform=Linux-x86_64-Clang
+
+function run_nacl()
+{
+ # Extract path to NaCl SDK from CMake toolchain files.
+ nacl64Root=`egrep '^set\( PLATFORM_PREFIX' cmake/NaCl-x86_64.Toolchain.cmake | \
+ sed -r 's|^set\( PLATFORM_PREFIX *"(.*)\" \)|\1|'`
+ nacl32Root=`egrep '^set\( PLATFORM_PREFIX' cmake/NaCl-i686.Toolchain.cmake | \
+ sed -r 's|^set\( PLATFORM_PREFIX *"(.*)\" \)|\1|'`
+
+ mkdir -p build/NaCl-test
+
+ # Just create symlinks instead of copying.
+ for i in share/openzone/*.{7z,zip} share/openzone/packages.ozManifest \
+ build/NaCl-*/src/tools/openzone.*.nexe etc/nacl/openzone.nmf \
+ etc/nacl/openzone.??.html doc
+ do
+ [[ -e $i ]] && ln -sf ../../$i build/NaCl-test
+ done
+
+ # Strip binaries if `strip` option is given.
+ if [[ $2 == strip ]]; then
+ if [[ -e build/NaCl-test/openzone.x86_64.nexe ]]; then
+ "$nacl64Root/bin/x86_64-nacl-strip" build/NaCl-test/openzone.x86_64.nexe
+ fi
+ if [[ -e build/NaCl-test/openzone.i686.nexe ]]; then
+ "$nacl64Root/bin/i686-nacl-strip" build/NaCl-test/openzone.i686.nexe
+ fi
+ fi
+
+ cd build/NaCl-test
+ python -m http.server &
+ serverPID=$!
+
+ sleep 3
+ chromium --user-data-dir="$HOME/.config/chromium-test" http://localhost:8000/openzone.sl.html \
+ || true
+
+ kill $serverPID
+}
+
+case $1 in
+ wine)
+ cd build
+ ( cd Windows-i686 && make -j4 install DESTDIR=.. )
+
+ cd OpenZone-*
+
+ shift
+ exec wine bin/Windows-i686/openzone.exe -p . $@
+ ;;
+ nacl)
+ run_nacl
+ ;;
+ *)
+ exec ./build/$defaultPlatform/src/tools/openzone -p . $@
+ ;;
+esac
View
1  src/client/BotAudio.cc
@@ -128,7 +128,6 @@ void BotAudio::play( const Audio* parent )
// "for into darkness fell his star\n"
// "in Mordor where the shadows are.\n",
// 1.0f, bot );
- playSpeak( "Joj prejoj, kako sem žejen!", 1.0f, bot );
}
}
View
2  src/common/CMakeLists.txt
@@ -20,4 +20,4 @@ else()
target_link_libraries( common ${LUA_LIBRARY} )
endif()
-target_link_libraries( common ozDynamics ozCore )
+target_link_libraries( common ozDynamics )
View
1  src/ozCore/Buffer.hh
@@ -28,7 +28,6 @@
#pragma once
-#include "InputStream.hh"
#include "OutputStream.hh"
namespace oz
View
12 src/ozCore/CMakeLists.txt
@@ -82,14 +82,16 @@ elseif( NACL )
target_link_libraries( ozCore ${PHYSFS_LIBRARY} ${ZLIB_LIBRARY} -lppapi_cpp -lppapi -lpthread )
elseif( WIN32 )
target_link_libraries( ozCore ${PHYSFS_LIBRARY} -lwinmm )
-elseif( CMAKE_SYSTEM_NAME STREQUAL Linux )
- target_link_libraries( ozCore ${PHYSFS_LIBRARY} -lpulse-simple -lasound -lrt -lpthread )
-else()
+elseif( NOT CMAKE_SYSTEM_NAME STREQUAL Linux )
target_link_libraries( ozCore ${PHYSFS_LIBRARY} -lpulse-simple -lrt -lpthread )
+else()
+ target_link_libraries( ozCore ${PHYSFS_LIBRARY} -lpulse-simple -lasound -lrt -lpthread )
endif()
-install( TARGETS ozCore RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib )
+install( TARGETS ozCore
+ RUNTIME DESTINATION bin${OZ_BINARY_SUBDIR}
+ LIBRARY DESTINATION lib${OZ_BINARY_SUBDIR}
+ ARCHIVE DESTINATION lib${OZ_BINARY_SUBDIR} )
install( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN *.hh )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/config.hh DESTINATION include/ozCore )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/ozCore.pc DESTINATION lib/pkgconfig )
-install( FILES COPYING DESTINATION share/doc/liboz-${OZ_VERSION} )
View
4 src/ozCore/StackTrace.cc
@@ -29,7 +29,7 @@
#include "arrays.hh"
#include "Thread.hh"
-#if defined( __GLIBC__ ) || defined( _LIBCPP_VERSION )
+#ifdef __GLIBC__
# include <cstdlib>
# include <cstring>
# include <cxxabi.h>
@@ -41,7 +41,7 @@ namespace oz
const int StackTrace::MAX_FRAMES;
-#if !defined( __GLIBC__ ) && !defined( _LIBCPP_VERSION )
+#ifndef __GLIBC__
StackTrace StackTrace::current( int )
{
View
84 src/ozCore/System.cc
@@ -364,6 +364,9 @@ static DWORD WINAPI bellMain( void* )
static void* bellMain( void* )
{
+#ifndef _GNU_SOURCE
+ const char* program_invocation_short_name = "liboz";
+#endif
const pa_sample_spec PA_SAMPLE_SPEC = { PA_SAMPLE_S16NE, BELL_PREFERRED_RATE, 2 };
pa_simple* pa = pa_simple_new( nullptr, program_invocation_short_name, PA_STREAM_PLAYBACK,
@@ -384,83 +387,83 @@ static void* bellMain( void* )
return nullptr;
}
-#ifdef __linux__
+#ifndef __linux__
- snd_pcm_t* alsa;
- if( snd_pcm_open( &alsa, "default", SND_PCM_STREAM_PLAYBACK, 0 ) != 0 ) {
+ int fd;
+ if( ( fd = open( "/dev/dsp", O_WRONLY, 0 ) ) < 0 &&
+ ( fd = open( "/dev/dsp0", O_WRONLY, 0 ) ) < 0 &&
+ ( fd = open( "/dev/dsp1", O_WRONLY, 0 ) ) < 0 )
+ {
__sync_lock_release( &isBellPlaying );
return nullptr;
}
- snd_pcm_hw_params_t* params;
- snd_pcm_hw_params_alloca( &params );
- snd_pcm_hw_params_any( alsa, params );
-
- uint rate = BELL_PREFERRED_RATE;
+# ifdef OZ_BIG_ENDIAN
+ int format = AFMT_S16_BE;
+# else
+ int format = AFMT_S16_LE;
+# endif
+ int channels = 2;
+ int rate = BELL_PREFERRED_RATE;
- if( snd_pcm_hw_params_set_access( alsa, params, SND_PCM_ACCESS_RW_INTERLEAVED ) != 0 ||
- snd_pcm_hw_params_set_format( alsa, params, SND_PCM_FORMAT_S16 ) != 0 ||
- snd_pcm_hw_params_set_channels( alsa, params, 2 ) != 0 ||
- snd_pcm_hw_params_set_rate_resample( alsa, params, 0 ) != 0 ||
- snd_pcm_hw_params_set_rate_near( alsa, params, &rate, nullptr ) != 0 ||
- snd_pcm_hw_params( alsa, params ) != 0 ||
- snd_pcm_prepare( alsa ) != 0 )
+ if( ioctl( fd, SNDCTL_DSP_SETFMT, &format ) < 0 ||
+ ioctl( fd, SNDCTL_DSP_CHANNELS, &channels ) < 0 ||
+ ioctl( fd, SNDCTL_DSP_SPEED, &rate ) < 0 )
{
- snd_pcm_close( alsa );
+ close( fd );
__sync_lock_release( &isBellPlaying );
return nullptr;
}
int nSamples = int( BELL_TIME * float( rate ) );
- size_t size = size_t( nSamples * 2 ) * sizeof( short );
+ size_t size = size_t( nSamples * channels ) * sizeof( short );
short* samples = static_cast<short*>( malloc( size ) );
genBellSamples( samples, nSamples, int( rate ), 0, nSamples );
- snd_pcm_writei( alsa, samples, snd_pcm_uframes_t( nSamples ) );
+ write( fd, samples, size );
free( samples );
- snd_pcm_drain( alsa );
- snd_pcm_close( alsa );
+ close( fd );
#else
- int fd;
- if( ( fd = open( "/dev/dsp", O_WRONLY, 0 ) ) < 0 &&
- ( fd = open( "/dev/dsp0", O_WRONLY, 0 ) ) < 0 &&
- ( fd = open( "/dev/dsp1", O_WRONLY, 0 ) ) < 0 )
- {
+ snd_pcm_t* alsa;
+ if( snd_pcm_open( &alsa, "default", SND_PCM_STREAM_PLAYBACK, 0 ) != 0 ) {
__sync_lock_release( &isBellPlaying );
return nullptr;
}
-# ifdef OZ_BIG_ENDIAN
- int format = AFMT_S16_BE;
-# else
- int format = AFMT_S16_LE;
-# endif
- int channels = 2;
- int rate = BELL_PREFERRED_RATE;
+ snd_pcm_hw_params_t* params;
+ snd_pcm_hw_params_alloca( &params );
+ snd_pcm_hw_params_any( alsa, params );
- if( ioctl( fd, SNDCTL_DSP_SETFMT, &format ) < 0 ||
- ioctl( fd, SNDCTL_DSP_CHANNELS, &channels ) < 0 ||
- ioctl( fd, SNDCTL_DSP_SPEED, &rate ) < 0 )
+ uint rate = BELL_PREFERRED_RATE;
+
+ if( snd_pcm_hw_params_set_access( alsa, params, SND_PCM_ACCESS_RW_INTERLEAVED ) != 0 ||
+ snd_pcm_hw_params_set_format( alsa, params, SND_PCM_FORMAT_S16 ) != 0 ||
+ snd_pcm_hw_params_set_channels( alsa, params, 2 ) != 0 ||
+ snd_pcm_hw_params_set_rate_resample( alsa, params, 0 ) != 0 ||
+ snd_pcm_hw_params_set_rate_near( alsa, params, &rate, nullptr ) != 0 ||
+ snd_pcm_hw_params( alsa, params ) != 0 ||
+ snd_pcm_prepare( alsa ) != 0 )
{
- close( fd );
+ snd_pcm_close( alsa );
__sync_lock_release( &isBellPlaying );
return nullptr;
}
int nSamples = int( BELL_TIME * float( rate ) );
- size_t size = size_t( nSamples * channels ) * sizeof( short );
+ size_t size = size_t( nSamples * 2 ) * sizeof( short );
short* samples = static_cast<short*>( malloc( size ) );
genBellSamples( samples, nSamples, int( rate ), 0, nSamples );
- write( fd, samples, size );
+ snd_pcm_writei( alsa, samples, snd_pcm_uframes_t( nSamples ) );
free( samples );
- close( fd );
+ snd_pcm_drain( alsa );
+ snd_pcm_close( alsa );
#endif
@@ -538,6 +541,9 @@ const int System::HANDLERS_BIT;
const int System::HALT_BIT;
const int System::LOCALE_BIT;
+JNIEnv* System::jniEnv = nullptr;
+JavaVM* System::javaVM = nullptr;
+
pp::Module* System::module = nullptr;
pp::Instance* System::instance = nullptr;
pp::Core* System::core = nullptr;
View
10 src/ozCore/System.hh
@@ -46,6 +46,13 @@
#define OZ_ERROR( ...) \
oz::System::error( __PRETTY_FUNCTION__, __FILE__, __LINE__, 0, __VA_ARGS__ )
+// Forward declarations for JNI.
+struct JNIEnv_;
+struct JavaVM_;
+
+typedef JNIEnv_ JNIEnv;
+typedef JavaVM_ JavaVM;
+
// Forward declarations for NaCl.
namespace pp
{
@@ -75,6 +82,9 @@ class System
/// %Set system locale.
static const int LOCALE_BIT = 0x04;
+ static JNIEnv* jniEnv; ///< JNI environment pointer.
+ static JavaVM* javaVM; ///< Java VM descriptor.
+
static pp::Module* module; ///< NaCl module.
static pp::Instance* instance; ///< NaCl instance.
static pp::Core* core; ///< NaCl `pp::Core` interface.
View
14 src/ozCore/Thread.cc
@@ -31,7 +31,10 @@
#include <cstdlib>
#include <cstring>
-#ifdef _WIN32
+#if defined( __ANDROID__ )
+# include <jni.h>
+# include <pthread.h>
+#elif defined( _WIN32 )
# include <windows.h>
#else
# include <pthread.h>
@@ -158,8 +161,17 @@ void* Thread::Descriptor::threadMain( void* data )
pthread_once( &nameOnce, initName );
pthread_setspecific( nameKey, descriptor->name );
+#ifdef __ANDROID__
+ void* jniEnv;
+ System::javaVM->AttachCurrentThread( &jniEnv, nullptr );
+#endif
+
System::threadInit();
+#ifdef __ANDROID__
+ System::javaVM->DetachCurrentThread();
+#endif
+
descriptor->main( descriptor->data );
if( descriptor->isDetached ) {
View
3  src/ozCore/Thread.hh
@@ -123,6 +123,9 @@ class Thread
* Detached thread is not attached to the Thread object so it can be immediately used to start
* another thread. %Thread's resources are released automatically when it finishes.
*
+ * @note
+ * On Android `System::javaVM` must be set prior to invoking this method.
+ *
* @param name thread name (copied to an internal buffer).
* @param type `JOINABLE` or `DETACHED`.
* @param main pointer to the thread's main method.
View
1  src/ozCore/common.hh
@@ -231,6 +231,7 @@ inline const Value& clamp( const Value& c, const Value& a, const Value& b )
/**
* Hash function for integers, identity.
*/
+OZ_ALWAYS_INLINE
inline int hash( int value )
{
return value;
View
4 src/ozCore/ozCore.pc.in
@@ -1,6 +1,6 @@
-prefix=/usr
+prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
+libdir=${exec_prefix}/lib@OZ_BINARY_SUBDIR@
includedir=${prefix}/include
Name: ozCore
View
7 src/ozDynamics/CMakeLists.txt
@@ -40,10 +40,9 @@ else()
endif()
install( TARGETS ozDynamics
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION lib
- ARCHIVE DESTINATION lib )
+ RUNTIME DESTINATION bin${OZ_BINARY_SUBDIR}
+ LIBRARY DESTINATION lib${OZ_BINARY_SUBDIR}
+ ARCHIVE DESTINATION lib${OZ_BINARY_SUBDIR} )
install( DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION include FILES_MATCHING PATTERN *.hh )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/config.hh DESTINATION include/ozDynamics )
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/ozDynamics.pc DESTINATION lib/pkgconfig )
-install( FILES COPYING DESTINATION share/doc/liboz-${OZ_VERSION} )
View
4 src/ozDynamics/ozDynamics.pc.in
@@ -1,6 +1,6 @@
-prefix=/usr
+prefix=@CMAKE_INSTALL_PREFIX@
exec_prefix=${prefix}
-libdir=${exec_prefix}/lib
+libdir=${exec_prefix}/lib@OZ_BINARY_SUBDIR@
includedir=${prefix}/include
Name: ozDynamics
View
19 src/tools/CMakeLists.txt
@@ -18,41 +18,30 @@ elseif( NACL )
else()
- if( OZ_STANDALONE )
- set( suffix "/${OZ_PLATFORM_NAME}" )
- else()
- set( suffix "" )
- endif()
-
add_executable( openzone openzone.cc )
use_pch( openzone pch )
target_link_libraries( openzone client modules nirvana matrix common )
- install( TARGETS openzone RUNTIME DESTINATION bin${suffix} )
+ install( TARGETS openzone RUNTIME DESTINATION bin${OZ_BINARY_SUBDIR} )
add_executable( ozBuild ozBuild.cc )
use_pch( ozBuild pch )
target_link_libraries( ozBuild builder client modules nirvana matrix common )
- install( TARGETS ozBuild RUNTIME DESTINATION bin${suffix} )
+ install( TARGETS ozBuild RUNTIME DESTINATION bin${OZ_BINARY_SUBDIR} )
add_executable( ozGettext ozGettext.cc )
target_link_libraries( ozGettext ozCore )
- install( TARGETS ozGettext RUNTIME DESTINATION bin${suffix} )
+ install( TARGETS ozGettext RUNTIME DESTINATION bin${OZ_BINARY_SUBDIR} )
add_executable( ozManifest ozManifest.cc )
target_link_libraries( ozManifest ozCore )
- install( TARGETS ozManifest RUNTIME DESTINATION bin${suffix} )
+ install( TARGETS ozManifest RUNTIME DESTINATION bin${OZ_BINARY_SUBDIR} )
install( DIRECTORY ${CMAKE_SOURCE_DIR}/share/applications
${CMAKE_SOURCE_DIR}/share/pixmaps
DESTINATION share )
- install( FILES ${CMAKE_SOURCE_DIR}/AUTHORS
- ${CMAKE_SOURCE_DIR}/COPYING
- ${CMAKE_SOURCE_DIR}/README.md
- DESTINATION share/doc/openzone-${OZ_VERSION} )
-
endif()
View
19 src/tools/openzone.cc
@@ -35,7 +35,7 @@ extern "C"
void SDL_Android_Init( JNIEnv* env, jclass clazz );
extern "C"
-void Java_org_libsdl_app_SDLActivity_nativeInit( JNIEnv* env, jclass clazz );
+void Java_com_openzone_SDLActivity_nativeInit( JNIEnv* env, jclass clazz );
#elif defined( __native_client__ )
@@ -48,13 +48,21 @@ using namespace oz::client;
#if defined( __ANDROID__ )
extern "C"
-void Java_org_libsdl_app_SDLActivity_nativeInit( JNIEnv* env, jclass clazz )
+void Java_com_openzone_SDLActivity_nativeInit( JNIEnv* env, jclass clazz )
#elif defined( __native_client__ )
-void MainInstance::mainThreadMain( void* )
+void MainInstance::mainThreadMain( void* instance )
#else
int main( int argc, char** argv )
#endif
{
+#if defined( __ANDROID__ )
+ System::jniEnv = env;
+ System::jniEnv->GetJavaVM( &System::javaVM );
+#elif defined( __native_client__ )
+ System::instance = static_cast<pp::Instance*>( instance );
+ System::module = pp::Module::Get();
+ System::core = pp::Module::Get()->core();
+#endif
System::init();
int exitCode = EXIT_FAILURE;
@@ -109,11 +117,6 @@ int main( int argc, char** argv )
MainInstance::MainInstance( PP_Instance instance_ ) :
pp::Instance( instance_ ), pp::MouseLock( this ), fullscreen( this )
{
- System::module = pp::Module::Get();
- System::instance = this;
- System::core = pp::Module::Get()->core();
- System::init();
-
NaClPlatform::init();
RequestInputEvents( PP_INPUTEVENT_CLASS_KEYBOARD | PP_INPUTEVENT_CLASS_MOUSE |
View
4 src/txc_dxtn/CMakeLists.txt
@@ -1,3 +1,7 @@
if( UNIX )
add_library( txc_dxtn SHARED txc_dxtn.hh txc_dxtn.cc )
+
+ if( OZ_STANDALONE )
+ install( TARGETS txc_dxtn LIBRARY DESTINATION lib${OZ_BINARY_SUBDIR} )
+ endif()
endif()
Please sign in to comment.
Something went wrong with that request. Please try again.