Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
60c8c1f
Compiling 100% with Types change approach - still does not build.
Cekis Oct 21, 2021
0139fd8
Added Crypto++ v8.6 - does not yet build as a whole
Cekis Oct 29, 2021
e172d41
Progress on updating Crypto++
Cekis Oct 30, 2021
7700a7c
Adjusting CMake files
Cekis Oct 31, 2021
88bdd17
Compiling 100% - Execution still broken - DataTable tool may need adj…
Cekis Nov 1, 2021
ac1f374
Datatables now compiling correctly
Cekis Nov 2, 2021
f059a84
Fixed issues loading string tables.
Cekis Nov 3, 2021
5889d7e
Fixed issue with profanity filter
Cekis Nov 4, 2021
45e474e
Fixed timeout issue with server startup.
Cekis Nov 6, 2021
05e9202
Removed native methods that no longer exist.
Cekis Nov 6, 2021
6725ce7
Fixed some incorrect sizing on network messages.
Cekis Nov 8, 2021
26b6f83
Reworked Archive package for standard data types and fixed issue with…
Cekis Nov 13, 2021
a4367ad
Fixed issue with PlayerQuestData parsing - server is RUNNING
Cekis Nov 13, 2021
62db74b
Updated readme and added recognition to Apathy
Cekis Nov 13, 2021
ebe78d3
Update README.md
Cekis Nov 13, 2021
0945252
Adjusted a few more data types to fix communication issues.
Cekis Nov 17, 2021
d49e30c
Merge branch '64-bit-types' of https://github.com/SWG-Source/src into…
Cekis Nov 17, 2021
7e13b95
Fixed size issue with ByteStream and removed some debug output
Cekis Nov 21, 2021
3fad517
Back port to 32 bit to take advantage of 64 bit adjustments
Cekis Nov 22, 2021
c87b327
Updating badly chosen replacement data type
Cekis Nov 22, 2021
8be3a30
Removed old crypto lib
Cekis Nov 22, 2021
5c88dd7
Added adjustments that allow compiling with CLang 9.0.1 or GCC 10
Cekis Nov 26, 2021
f41c6ec
Fixed compiler warnings for mixing Strings with char *
Cekis Nov 29, 2021
966c7ee
Added Oracle 21 paths and fixed issue with naming
Cekis Dec 9, 2021
a4e3f44
Fixed issues with CMake configuration
Cekis Dec 10, 2021
78959d8
Fixed issue for newer compilers and adjusted Oracle and chat for comp…
Cekis Dec 12, 2021
66fc6c4
Updated CMake build flags
Cekis Dec 14, 2021
4d7c0de
Adjusted DbBindableLong to be 64 bits if needed and adjusted timing f…
Cekis Dec 21, 2021
a638773
Refactored DbBindableLong to be more appropriately named DbBindableInt32
Cekis Jan 17, 2022
c3c081b
Updating CMake build files to be more reliable and readable.
Cekis Jan 19, 2022
7957b54
Added comments and removed setting defaults again for CMake
Cekis Jan 19, 2022
f8aaa0e
Addressed several compiler warnings from GCC
Cekis Jan 25, 2022
0689560
Merged in master branch
Cekis Jan 25, 2022
16bf8e1
Updated method as userData is actually a 32 bit integer
Cekis Jan 27, 2022
1f36461
Fixed issues found in my own review.
Cekis Feb 2, 2022
552af24
Adjustments to issues when compiling in 64 bits
Cekis Feb 5, 2022
487ddee
Backed out bad commit and added cleaner logging to mIFF.
Cekis Feb 7, 2022
97e1954
Removed extra line break on mIFF compiler
Cekis Feb 7, 2022
aea98a2
Interim commit checkpoint - starts up but failure to read data after …
Cekis Feb 16, 2022
8624c44
Merge branch 'master' into 64-bit-types
Cekis Sep 22, 2022
1cadfc2
Added static casts to BindableLongs when storing data
Cekis Aug 30, 2023
eee557e
Organized CMake file a bit better
Cekis Aug 31, 2023
73ecb88
Removed problematic compiler flags
Cekis Sep 1, 2023
8fbee78
Fixed bugs related to database inconsistencies between 32 bit and 64 …
Cekis Sep 1, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
* -crlf
169 changes: 73 additions & 96 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
cmake_minimum_required(VERSION 2.8)
include(CMakePrintHelpers)

project(stellabellum C CXX)

if (WIN32)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/win32")
elseif (UNIX)
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/linux")
endif ()
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/linux")

set(SWG_ROOT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
set(SWG_ENGINE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/engine)
Expand All @@ -16,8 +13,6 @@ set(SWG_GAME_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/game)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/bin)

include_directories(/usr/include/i386-linux-gnu)

find_package(BISON REQUIRED)
find_package(FLEX REQUIRED)
find_package(JNI REQUIRED)
Expand All @@ -28,101 +23,83 @@ find_package(Perl REQUIRED)
find_package(Threads)
find_package(ZLIB REQUIRED)
find_package(CURL REQUIRED)
find_package(Curses REQUIRED)

# c++17 yeah!
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

# shame on you cmake for auto-setting optimization flags!
set(CMAKE_CXX_FLAGS_DEBUG "")
set(CMAKE_CXX_FLAGS_RELEASE "")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "")
set(CMAKE_CXX_FLAGS_MINSIZEREL "")

# I'll be honest, win32 is probably very very broken and won't build - it will need worked on so that MSVC uses
# the vs2013+ STL instead of stlport, and probably will thus need removal/modification/addition of TONS of the ifdef blocks for WIN32
if (WIN32)
find_package(Iconv REQUIRED)

# Dont-Build-PDB RELEASE build use the following (by either commenting---uncommenting the line as needed)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:libc.lib /SAFESEH:NO")

# Do-Build-PDB RELEASE build use the following (by either commenting---uncommenting the line as needed)
#set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DWIN32 -Dwin32 -DUDP_LIBRARY -DDEBUG_LEVEL=0 \
# -DPRODUCTION=1 /Oi /Ot /Oy /O2 /GF /Gy /Zi /MT -D_USE_32BIT_TIME_T=1 -D_MBCS \
# -DPLATFORM_BASE_SINGLE_THREAD -D_CRT_SECURE_NO_WARNINGS /MP /wd4244 /wd4996 /wd4018 /wd4351 \
# /Zc:wchar_t- /Ob1 /FC")

# Dont-Build-PDB RELEASE build use the following (by either commenting---uncommenting the line as needed)
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DWIN32 -Dwin32 -DUDP_LIBRARY -DDEBUG_LEVEL=0 -DPRODUCTION=1 \
/Oi /Ot /Oy /O2 /GF /Gy /MT -D_USE_32BIT_TIME_T=1 -D_MBCS -DPLATFORM_BASE_SINGLE_THREAD -D_CRT_SECURE_NO_WARNINGS \
/MP /wd4244 /wd4996 /wd4018 /wd4351 /Zc:wchar_t- /Ob1 /FC")

# Standard DEBUG build use the following (by either commenting---uncommenting the line as needed)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DWIN32 -Dwin32 -D_DEBUG -DUDP_LIBRARY -DDEBUG_LEVEL=2 -DPRODUCTION=0 /MTd \
-D_USE_32BIT_TIME_T=1 -D_MBCS -DPLATFORM_BASE_SINGLE_THREAD -D_CRT_SECURE_NO_WARNINGS /MP /wd4244 /wd4996 /wd4018 /wd4351 \
/Zc:wchar_t- /Ob1 /FC")
elseif (UNIX)
find_package(Curses REQUIRED)

# linker flags
if (${CMAKE_BUILD_TYPE} STREQUAL "RELWITHDEBINFO" OR ${CMAKE_BUILD_TYPE} STREQUAL "MINSIZEREL")
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-z,norelro,-O3,--sort-common,--as-needed,--relax,-z,combreloc,-z,global,--no-omagic")
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-z,norelro,-O3,--sort-common,--as-needed,--relax,-z,combreloc,-z,global,--no-omagic")
else ()
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,-z,norelro,-O3,--sort-common,--as-needed,--relax,-z,combreloc,-z,global,--no-omagic,-x,-s")
set(CMAKE_EXE_LINKER_FLAGS "-Wl,-z,norelro,-O3,--sort-common,--as-needed,--relax,-z,combreloc,-z,global,--no-omagic,-x,-s")
endif ()

# don't put anything too crazy in debug...and any common flags go into CMAKE_CXX_FLAGS
set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DDEBUG_LEVEL=2 -DPRODUCTION=0 -O0 -g3")

# release specific cflags - optimizations beyond the default for both types is mostly just -O flags
set(CMAKE_CXX_FLAGS_RELEASE "-DDEBUG_LEVEL=0 -DPRODUCTION=1")

# we use fewer, if any, crazy optimizations for profile generation, and likewise release flags for the minsizerel
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE}")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_RELEASE}")

# Ofast doesn't work with gcc builds
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Ofast \
-fno-threadsafe-statics -fslp-vectorize \
-fno-stack-protector -fstrict-enums -finline-hint-functions \
-fno-coverage-mapping -fno-spell-checking \
-mno-retpoline")

set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -ggdb")

# RELWITHDEBINFO is used for building bins that produce profdata files
# we only need the basics of our heavy optimizations here, i think - that and one of these flags
# breaks JNI when we profile
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS} -Ofast -finline-hint-functions -fprofile-instr-generate")

# MINSIZEREL is used for profiled, flto builds
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_RELEASE} -flto -fwhole-program-vtables")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
# O3 and Ofast include one or more flags that cause java to crash when using gcc6
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2 -fno-signed-zeros -freciprocal-math -fno-unroll-loops -fno-tree-loop-optimize -fno-plt")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELEASE} -Og")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -Og")
elseif ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Intel")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O3")
endif ()

# our "always on" flags - build by default for the system we're on but include all instruction sets
set(CMAKE_CXX_FLAGS "-m32 -pipe -march=native -mtune=native \
-Wformat -Wno-overloaded-virtual -Wno-missing-braces -Wno-format \
-Wno-write-strings -Wno-unknown-pragmas \
-Wno-uninitialized -Wno-reorder -Wno-tautological-constant-out-of-range-compare -Wno-stringop-overflow -Wno-address-of-packed-member")

add_definitions(-DLINUX -D_REENTRANT -Dlinux -D_USING_STL -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -U_FORTIFY_SOURCE)

# this is so some profile specific stuff is turned on in the code
if (${CMAKE_BUILD_TYPE} STREQUAL "RELWITHDEBINFO")
add_definitions(-DENABLE_PROFILING)
endif ()
# Global CMake CXX Flags
# our "always on" flags - build by default for the system we're on but include all instruction sets
set(CMAKE_CXX_FLAGS "\
${CMAKE_CXX_FLAGS} \
-pipe \
-march=native \
-maes \
-Wformat \
-Wno-overloaded-virtual \
-Wno-missing-braces \
-Wno-format \
-Wno-write-strings \
-Wno-unknown-pragmas \
-Wno-uninitialized \
-Wno-reorder \
-Wno-tautological-constant-out-of-range-compare \
-Wno-address-of-packed-member \
")

string(TOUPPER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE)

# Global Linker flags
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,norelro,-O3,--sort-common,--as-needed,--relax,-z,combreloc,-z,global,--no-omagic")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,norelro,-O3,--sort-common,--as-needed,--relax,-z,combreloc,-z,global,--no-omagic")

# Add on flags to strip debug symbols if RELEASE or MINSIZEREL
if (${CMAKE_BUILD_TYPE} STREQUAL "RELEASE" OR ${CMAKE_BUILD_TYPE} STREQUAL "MINSIZEREL")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS},-x,-s")
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS},-x,-s")
endif ()

# Compiler specific settings.
# GNU - These are for GCC 7.5 (the version on the 3.0.x VM)
# Clang - These are for CLang 11 (current version as of Jan-2022), but it is not installed on the 3.0.x VM
if (${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-stringop-overflow")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -DDEBUG_LEVEL=2 -DPRODUCTION=0 -pg -ggdb")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DDEBUG_LEVEL=0 -DPRODUCTION=0 -pg -ggdb -no-pie")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -DDEBUG_LEVEL=0 -DPRODUCTION=1 -no-pie -flto -fwhole-program-vtables")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DDEBUG_LEVEL=0 -DPRODUCTION=1")
elseif (${CMAKE_CXX_COMPILER_ID} STREQUAL "CLang")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -D_DEBUG -DDEBUG_LEVEL=2 -DPRODUCTION=0 -pg -ggdb -g -fprofile-instr-generate -fcoverage-mapping")
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -DDEBUG_LEVEL=0 -DPRODUCTION=0 -Ofast -pg -ggdb")
set(CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -DDEBUG_LEVEL=0 -DPRODUCTION=1 -no-pie -flto -fwhole-program-vtables")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DDEBUG_LEVEL=0 -DPRODUCTION=1 -Ofast")
endif()

# Remove whitespace from flags
string(REGEX REPLACE "[ \t\r\n]+" " " CMAKE_CXX_FLAGS_DEBUG ${CMAKE_CXX_FLAGS_DEBUG})
string(REGEX REPLACE "[ \t\r\n]+" " " CMAKE_CXX_FLAGS_RELWITHDEBINFO ${CMAKE_CXX_FLAGS_RELWITHDEBINFO})
string(REGEX REPLACE "[ \t\r\n]+" " " CMAKE_CXX_FLAGS_MINSIZEREL ${CMAKE_CXX_FLAGS_MINSIZEREL})
string(REGEX REPLACE "[ \t\r\n]+" " " CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE})

message("Using Compiler: ${CMAKE_CXX_COMPILER_ID}")

add_definitions(-DLINUX -D_REENTRANT -Dlinux -D_USING_STL -D_GNU_SOURCE -D_XOPEN_SOURCE=500 -U_FORTIFY_SOURCE)

# this is so some profile specific stuff is turned on in the code
if (${CMAKE_BUILD_TYPE} STREQUAL "RELWITHDEBINFO" OR ${CMAKE_BUILD_TYPE} STREQUAL "DEBUG")
add_definitions(-DENABLE_PROFILING)
endif ()

if (${CMAKE_BUILD_TYPE} STREQUAL "DEBUG")
cmake_print_variables(CMAKE_CXX_FLAGS_DEBUG)
elseif (${CMAKE_BUILD_TYPE} STREQUAL "RELWITHDEBINFO")
cmake_print_variables(CMAKE_CXX_FLAGS_RELWITHDEBINFO)
elseif (${CMAKE_BUILD_TYPE} STREQUAL "MINSIZEREL")
cmake_print_variables(CMAKE_CXX_FLAGS_MINSIZEREL)
elseif (${CMAKE_BUILD_TYPE} STREQUAL "RELEASE")
cmake_print_variables(CMAKE_CXX_FLAGS_RELEASE)
endif ()

add_subdirectory(external)
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,15 @@
This is the main server code for SWGSource 1.2 as originally forked from the https://bitbucket.org/stellabellumswg/ repository. Please see that repository for original publication and alteration credit.

# Works in progress
* 64-bit-types - fully 64 bit version that builds and runs completely.
* 64-bit-types - fully 64 bit version (presently in testing - 11/12/2021) (Special thanks to Apathy for his help in making a 64 bit version happen!)

# Building

For local testing, and non-live builds set MODE=Release or MODE=Debug in the build.properties file in swg-main.
## Clang Versions

**Important**: For versions of clang <= 4 you'll probably have to remove/omit a deprecated CFLAG or two from the CMakelists.txt file

Only use the Debug and Release targets unless you want to work on 64 bit (MODE=RELWITHDEBINFO). For local testing, and non-live builds set MODE=Release or MODE=debug in build_linux.sh.

For production, user facing builds, set MODE=MINSIZEREL for profile built, heavily optimized versions of the binaries.

Expand Down
26 changes: 25 additions & 1 deletion build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,13 @@
<equals arg1="${arch}" arg2="x86_64"/>
</condition>
<echo>Architecture is ${arch}</echo>
<condition property="compile.32">
<equals arg1="${bits}" arg2="32"/>
</condition>
<condition property="compile.64">
<equals arg1="${bits}" arg2="64"/>
</condition>
<echo>Compiling as ${bits}-bit application.</echo>
<condition property="is_debug_build">
<equals arg1="${src_build_type}" arg2="Debug"/>
</condition>
Expand Down Expand Up @@ -83,7 +90,11 @@
</target>

<!-- Creates the Make files for our SRC that will be used during compile stage (Intel) -->
<target name="prepare_src_x86" depends="init,get_arch,set_compiler" description="prepare server code - Intel" if="compile.x86">
<target name="prepare_src_x86" depends="prepare_src_x86_32, prepare_src_x86_64" description="prepare server code - Intel" if="compile.x86">
</target>

<!-- Creates the Make files for our SRC that will be used during compile stage (Intel) -->
<target name="prepare_src_x86_32" depends="init,get_arch,set_compiler" description="prepare server code - Intel" if="compile.x86" unless="compile.64">
<exec executable="cmake" dir="${build}" failonerror="true">
<env key="PATH" value="${env.PATH}:${tools_home}"/>
<env key="CC" value="${cc_compiler}" unless:true="${use_gcc}"/>
Expand All @@ -99,6 +110,19 @@
<arg value="${src}"/>
</exec>
</target>

<!-- Creates the Make files for our SRC that will be used during compile stage (Intel) -->
<target name="prepare_src_x86_64" depends="init,get_arch,set_compiler" description="prepare server code - Intel" if="compile.x86" unless="compile.32">
<exec executable="cmake" dir="${build}" failonerror="true">
<env key="PATH" value="${env.PATH}:${tools_home}"/>
<env key="CC" value="${cc_compiler}" unless:true="${use_gcc}"/>
<env key="CXX" value="${cxx_compiler}" unless:true="${use_gcc}"/>
<env key="LDFLAGS" value="-L/usr/lib64"/>
<env key="CMAKE_PREFIX_PATH" value="/usr/lib64:/lib64"/>
<arg value="-DCMAKE_BUILD_TYPE=${src_build_type}"/>
<arg value="${src}"/>
</exec>
</target>

<!-- Creates the Make files for our SRC that will be used during compile stage (Non-Intel) -->
<target name="prepare_src" depends="init,get_arch,set_compiler" description="compile server code - non Intel" unless="compile.x86">
Expand Down
23 changes: 5 additions & 18 deletions cmake/linux/FindOracle.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
#
###############################################################################


# If ORACLE_HOME not defined, assume Oracle libraries not available
if(DEFINED ENV{ORACLE_HOME})

Expand All @@ -31,42 +30,35 @@ if(DEFINED ENV{ORACLE_HOME})
find_path(ORACLE_INCLUDE_DIR
NAMES oci.h
PATHS
/usr/include/oracle/18.3/client
${CMAKE_ORACLE_INCLUDE_DIR}
${ORACLE_HOME}/rdbms/public
${ORACLE_HOME}/include
${ORACLE_HOME}/sdk/include # Oracle SDK
${ORACLE_HOME}/OCI/include) # Oracle XE on Windows


set(ORACLE_OCI_NAMES clntsh libclntsh oci)
set(ORACLE_NNZ_NAMES nnz18 libnnz18 ociw32)
set(ORACLE_OCCI_NAMES libocci occi)

set(ORACLE_NNZ_NAMES libnnz18 nnz18 libnnz21 nnz21 ociw32)
set(ORACLE_OCCI_NAMES libocci occi oraocci10 oraocci11)

set(ORACLE_LIB_DIR
${ORACLE_HOME}/lib
${ORACLE_HOME}/sdk/lib # Oracle SDK
${ORACLE_HOME}/sdk/lib/msvc
${ORACLE_HOME}/OCI/lib/msvc) # Oracle XE on Windows


find_library(ORACLE_OCI_LIBRARY NAMES ${ORACLE_OCI_NAMES} PATHS ${ORACLE_LIB_DIR})
find_library(ORACLE_OCCI_LIBRARY NAMES ${ORACLE_OCCI_NAMES} PATHS ${ORACLE_LIB_DIR})
find_library(ORACLE_NNZ_LIBRARY NAMES ${ORACLE_NNZ_NAMES} PATHS ${ORACLE_LIB_DIR})


set(ORACLE_LIBRARY ${ORACLE_OCI_LIBRARY} ${ORACLE_OCCI_LIBRARY} ${ORACLE_NNZ_LIBRARY})


if(APPLE)
set(ORACLE_OCIEI_NAMES libociei ociei)


find_library(ORACLE_OCIEI_LIBRARY
NAMES libociei ociei
PATHS ${ORACLE_LIB_DIR})


if(ORACLE_OCIEI_LIBRARY)
set(ORACLE_LIBRARY ${ORACLE_LIBRARY} ${ORACLE_OCIEI_LIBRARY})
else(ORACLE_OCIEI_LIBRARY)
Expand All @@ -75,18 +67,13 @@ if(DEFINED ENV{ORACLE_HOME})
endif()
endif()


set(ORACLE_LIBRARIES ${ORACLE_LIBRARY})


endif(DEFINED ENV{ORACLE_HOME})


# Handle the QUIETLY and REQUIRED arguments and set ORACLE_FOUND to TRUE
# if all listed variables are TRUE
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(ORACLE DEFAULT_MSG ORACLE_LIBRARY ORACLE_INCLUDE_DIR)


mark_as_advanced(ORACLE_INCLUDE_DIR ORACLE_LIBRARY)
find_package_handle_standard_args(Oracle DEFAULT_MSG ORACLE_LIBRARY ORACLE_INCLUDE_DIR)

mark_as_advanced(ORACLE_INCLUDE_DIR ORACLE_LIBRARY)
8 changes: 4 additions & 4 deletions engine/client/application/Miff/src/lex_yy.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ typedef int32_t flex_int32_t;
typedef uint32_t flex_uint32_t;
#else
typedef signed char flex_int8_t;
typedef short int flex_int16_t;
typedef int flex_int32_t;
typedef short short int flex_int16_t;
typedef short int flex_int32_t;
typedef unsigned char flex_uint8_t;
typedef unsigned short int flex_uint16_t;
typedef unsigned int flex_uint32_t;
typedef unsigned short short int flex_uint16_t;
typedef unsigned short int flex_uint32_t;

/* Limits of integral types. */
#ifndef INT8_MIN
Expand Down
2 changes: 1 addition & 1 deletion engine/client/application/Miff/src/linux/miff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ static void callbackFunction(void)
{
if (!outfileHandler->writeBuffer())
{
fprintf(stderr, "MIFF: failed to write output file \"%s\"\n", local_outFileName);
fprintf(stderr, "FAILURE: failed to write output file \"%s\"\n", local_outFileName);
local_errorFlag = ERR_WRITEERROR;
}
}
Expand Down
7 changes: 5 additions & 2 deletions engine/client/application/Miff/src/linux/parser.lex
Original file line number Diff line number Diff line change
Expand Up @@ -326,8 +326,11 @@ EXP (e|E)(\+|-)?
/* do a count on bracket matching... */
if (0 == count_brace())
{
if (!initialCompile && !globalErrorFlag)
MIFFMessage("mIFF successfully compiled!\n", 0);
if (!initialCompile && !globalErrorFlag) {
char myString[256];
sprintf(myString, "mIFF (SUCCESS): compiled \"%s\"", inFileName);
MIFFMessage(myString, 0);
}
}

yyterminate(); /* tell yyparse() it's time to quit! DO NOT comment or delete this line! */
Expand Down
Loading