Thrive Game Development
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Thrive Game Development

Development of the evolution game Thrive.
 
HomeHome  PortalPortal  Latest imagesLatest images  SearchSearch  RegisterRegister  Log inLog in  
Welcome new and returning members!
If you're new, read around a bit before you post: the odds are we've already covered your suggestion.
If you want to join the development team, sign up and tell us why.
ADMIN is pleased to note that this marquee has finally been updated.
ADMIN reminds you that the Devblog is REQUIRED reading.
Currently: The Microbe Stage GUI is under heavy development
Log in
Username:
Password:
Log in automatically: 
:: I forgot my password
Quick Links
Website
/r/thrive
GitHub
FAQs
Wiki
New Posts
Search
 
 

Display results as :
 
Rechercher Advanced Search
Statistics
We have 1675 registered users
The newest registered user is dejo123

Our users have posted a total of 30851 messages in 1411 subjects
Who is online?
In total there are 27 users online :: 0 Registered, 0 Hidden and 27 Guests :: 1 Bot

None

Most users ever online was 443 on Sun Mar 17, 2013 5:41 pm
Latest topics
» THIS FORUM IS NOW OBSOLETE
troubleshooting - Development troubleshooting Emptyby NickTheNick Sat Sep 26, 2015 10:26 pm

» To all the people who come here looking for thrive.
troubleshooting - Development troubleshooting Emptyby NickTheNick Sat Sep 26, 2015 10:22 pm

» Build Error Code::Blocks / CMake
troubleshooting - Development troubleshooting Emptyby crovea Tue Jul 28, 2015 5:28 pm

» Hello! I can translate in japanese
troubleshooting - Development troubleshooting Emptyby tjwhale Thu Jul 02, 2015 7:23 pm

» On Leave (Offline thread)
troubleshooting - Development troubleshooting Emptyby NickTheNick Wed Jul 01, 2015 12:20 am

» Devblog #14: A Brave New Forum
troubleshooting - Development troubleshooting Emptyby NickTheNick Mon Jun 29, 2015 4:49 am

» Application for Programmer
troubleshooting - Development troubleshooting Emptyby crovea Fri Jun 26, 2015 11:14 am

» Re-Reapplication
troubleshooting - Development troubleshooting Emptyby The Creator Thu Jun 25, 2015 10:57 pm

» Application (programming)
troubleshooting - Development troubleshooting Emptyby crovea Tue Jun 23, 2015 8:00 am

» Achieving Sapience
troubleshooting - Development troubleshooting Emptyby MitochondriaBox Sun Jun 21, 2015 7:03 pm

» Microbe Stage GDD
troubleshooting - Development troubleshooting Emptyby tjwhale Sat Jun 20, 2015 3:44 pm

» Application for Programmer/ Theorist
troubleshooting - Development troubleshooting Emptyby tjwhale Wed Jun 17, 2015 9:56 am

» Application for a 3D Modeler.
troubleshooting - Development troubleshooting Emptyby Kaiju4u Wed Jun 10, 2015 11:16 am

» Presentation
troubleshooting - Development troubleshooting Emptyby Othithu Tue Jun 02, 2015 10:38 am

» Application of Sorts
troubleshooting - Development troubleshooting Emptyby crovea Sun May 31, 2015 5:06 pm

» want to contribute
troubleshooting - Development troubleshooting Emptyby Renzope Sun May 31, 2015 12:58 pm

» Music List Thread (Post New Themes Here)
troubleshooting - Development troubleshooting Emptyby Oliveriver Thu May 28, 2015 1:06 pm

» Application: English-Spanish translator
troubleshooting - Development troubleshooting Emptyby Renzope Tue May 26, 2015 1:53 pm

» Want to be promoter or project manager
troubleshooting - Development troubleshooting Emptyby TheBudderBros Sun May 24, 2015 9:00 pm

» A new round of Forum Revamps!
troubleshooting - Development troubleshooting Emptyby Oliveriver Wed May 20, 2015 11:32 am


 

 Development troubleshooting

Go down 
+6
benjamin71113
utikawa
HariboTer
Nimbal
SuperLala
Seregon
10 posters
Go to page : 1, 2, 3, 4, 5, 6  Next
AuthorMessage
Seregon
Regular



Posts : 263
Reputation : 37
Join date : 2011-08-10
Location : UK

troubleshooting - Development troubleshooting Empty
PostSubject: Development troubleshooting   troubleshooting - Development troubleshooting EmptyThu Nov 15, 2012 11:27 am

This thread is for any errors we encounter during development (when compiling/installing/running any Thrive dependency libraries, tools, or Thrive itself). Post errors you encounter and solutions to them here, or if it's a major issue start a new thread and link to it here, so that we have a list of possible issues and fixes in one place.
Back to top Go down
SuperLala
Developer
SuperLala


Posts : 28
Reputation : 0
Join date : 2013-09-27
Age : 29
Location : United States

troubleshooting - Development troubleshooting Empty
PostSubject: Incomplete Git clone   troubleshooting - Development troubleshooting EmptySat Sep 28, 2013 10:35 pm

I need some help in setting up my programmer environment. I am new to the forum and am wishing to contribute as a programmer.


Before you read the information below, I think I may know the main source of the problem that is preventing me from running the program. It involves Git not copying the contents of the googletest and luabind directories in the contrib folder. When I look for the contents in the GitHub website, the folders are "shortcuts," or whatever the equivalent name is for Git-related stuff, and the folders link me to other repositories. I believe my main problem is that I don't know how to include the contents of the destinations of the "shortcuts" when doing a Git clone. If you know how I can do this (and whether that is actually the real problem), please tell me as soon as you can. Thanks.


Now for a verbose description of what I did in case you need more information:

I followed the "readme.txt" file verbatim, but the set up is not working properly.

When I run "setup.ps1," it seems to run fine. There are a boatload of warnings, mostly related to classes having only private methods, but I doubt that's the issue.

Then, when I proceed onto the next step, after installing Code::Blocks, and hit "Configure," the log is as follows:

Code:
Looking for OGRE...
Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
Found Ogre Byatis (1.8.1)
Found OGRE: optimized;C:/MinGW/OgreSDK/lib/release/libOgreMain.dll.a;debug;C:/MinGW/OgreSDK/lib/debug/libOgreMain_d.dll.a
Looking for OGRE_Paging...
Found OGRE_Paging: optimized;C:/MinGW/OgreSDK/lib/release/libOgrePaging.dll.a;debug;C:/MinGW/OgreSDK/lib/debug/libOgrePaging_d.dll.a
Looking for OGRE_Terrain...
Found OGRE_Terrain: optimized;C:/MinGW/OgreSDK/lib/release/libOgreTerrain.dll.a;debug;C:/MinGW/OgreSDK/lib/debug/libOgreTerrain_d.dll.a
Looking for OGRE_Property...
Found OGRE_Property: optimized;C:/MinGW/OgreSDK/lib/release/libOgreProperty.dll.a;debug;C:/MinGW/OgreSDK/lib/debug/libOgreProperty_d.dll.a
Looking for OGRE_RTShaderSystem...
Found OGRE_RTShaderSystem: optimized;C:/MinGW/OgreSDK/lib/release/libOgreRTShaderSystem.dll.a;debug;C:/MinGW/OgreSDK/lib/debug/libOgreRTShaderSystem_d.dll.a
Could NOT find PkgConfig (missing:  PKG_CONFIG_EXECUTABLE)
CMake Warning (dev) at CMakeLists.txt:94 (add_subdirectory):
  The source directory

    C:/Thrive/Thrive/contrib/googletest

  does not contain a CMakeLists.txt file.

  CMake does not support this case but it used to work accidentally and is
  being allowed for compatibility.

  Policy CMP0014 is not set: Input directories must have CMakeLists.txt.  Run
  "cmake --help-policy CMP0014" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

CMake Warning (dev) at CMakeLists.txt:156 (add_subdirectory):
  The source directory

    C:/Thrive/Thrive/contrib/luabind

  does not contain a CMakeLists.txt file.

  CMake does not support this case but it used to work accidentally and is
  being allowed for compatibility.

  Policy CMP0014 is not set: Input directories must have CMakeLists.txt.  Run
  "cmake --help-policy CMP0014" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.
This warning is for project developers.  Use -Wno-dev to suppress it.

Could NOT find Doxygen (missing:  DOXYGEN_EXECUTABLE)
Configuring done
On the list that popped up, Boost_DIR, CMAKE_CODEBLOCKS_EXECUTABLE, and OPENAL_INCLUDE_DIR were not found.

Then, after generating and opening it with Code::Blocks, trying to compile results in an error saying that the directory:

Thrive\Thrive\contrib\googletest\include does not exist. It mentions the flag [-Werror], which I believe means that it is only a warning, but warnings are strictly being treated as errors.

It then says recipe for target 'CMakeFiles/ThriveLib.dir/src/game.cpp.obj' failed
and recipe for target 'CMakeFiles/ThriveLib.dir/all' failed
and recipe for target 'all' failed.

I checked the directory Thrive\Thrive\contrib\googletest\include, and it was correct in saying that no such file or directory existed. When I checked the GIT repository, it seems like \googletest is some sort of shortcut that fails to be cloned with the rest of Thrive.

For more information, directories in my C:\MinGW folder are currently: bin, cmake, i686-w64-mingw32, include, install, lib, libexec, liscenses, OgreSDK, share, and temp.
Also, there is a file called mingw32env.cmd

If anyone knows what's going on and what is wrong, please tell me. Thanks.

I am currently stuck. I don't know the ins and outs of the project, and I cannot yet run it.

If you need more information, please tell me what you need.
Back to top Go down
Nimbal
Programming Team lead



Posts : 258
Reputation : 24
Join date : 2013-03-17
Age : 40
Location : Ratingen, Germany

troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting EmptySun Sep 29, 2013 5:59 am

Ah, yes, the git submodules are not cloned automatically, which is a real shortcoming of git. If you are using git from the command line, go into the project directory and do this:

Code:

git submodule init
git submodule update
If you are using TortoiseGit, I think the context menu inside a git clone offers a "Submodule Update". For other clients, you'll have to look for something related to submodules.
Back to top Go down
SuperLala
Developer
SuperLala


Posts : 28
Reputation : 0
Join date : 2013-09-27
Age : 29
Location : United States

troubleshooting - Development troubleshooting Empty
PostSubject: Thank you. One more issue...   troubleshooting - Development troubleshooting EmptySun Sep 29, 2013 11:21 am

Ah, submodules. That's what they're called. Anyway, no red text appeared in CMake, but there were a bunch of checkboxes. I assume I should leave them unchecked, but it might be better to make that more clear in the readme.

Anyway, I ran Code::Blocks, and built with no errors and no warnings. However when opening "Thrive.exe," a message box says "The program can't start because OgreMain_d.dll is missing from your computer. Try reinstalling the program to fix the problem."

I will look for OgreMain_d.dll and edit this post if I progress. If you have any insight, though, please tell me. Thanks.
Back to top Go down
Nimbal
Programming Team lead



Posts : 258
Reputation : 24
Join date : 2013-03-17
Age : 40
Location : Ratingen, Germany

troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting EmptySun Sep 29, 2013 11:33 am

You'll need to select the "install" target in Code::Blocks. I believe that should be selectable in a dropdown near the build button. The install target will copy all necessary files to the "dist" subdirectory of the build directory. In there, you will find the executable as "bin/Thrive.exe".
Back to top Go down
SuperLala
Developer
SuperLala


Posts : 28
Reputation : 0
Join date : 2013-09-27
Age : 29
Location : United States

troubleshooting - Development troubleshooting Empty
PostSubject: Thank you   troubleshooting - Development troubleshooting EmptySun Sep 29, 2013 11:42 am

Thanks to your help, I have managed to fully install the program. That being said, I think there is currently a bug in the program because there are a whole bunch of tiny cellular objects, and the framerate starts at about 0.3 fps and slowly lowers to 0.03 fps, and then it stops working.

However, the program runs now, so that's good. Thank you so much for your help!

EDIT: I ran it again, and the framerate improved 100-fold. I'm not sure what was up the first time.

Now that I believe the problem is solved, I'm considering deleting all my posts but editing the first post to include the problems I had and the solutions. Should I do that?

EDIT (Reply to following post):

Thanks. I was using the master branch, so I switched as you suggested. I cloned straight from the prototype branch If you want me to fork it instead, please tell me, because that is not what I'm assuming. The version I have is now more similar to the latest "release," but with some annotating meshes surrounding the cells. Thank you for all your help. I will catch up on all the progress and see where I can help.


Last edited by SuperLala on Sun Sep 29, 2013 12:33 pm; edited 2 times in total
Back to top Go down
Nimbal
Programming Team lead



Posts : 258
Reputation : 24
Join date : 2013-03-17
Age : 40
Location : Ratingen, Germany

troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting EmptySun Sep 29, 2013 12:01 pm

Great to hear that it works. By the way, which branch did you check out? The latest one is the "prototype" branch.

I've added a hint about the submodules and the install target in the mingw_setup/readme.txt file. I think you can leave your posts here for now, unless a moderator has any objections.
Back to top Go down
SuperLala
Developer
SuperLala


Posts : 28
Reputation : 0
Join date : 2013-09-27
Age : 29
Location : United States

troubleshooting - Development troubleshooting Empty
PostSubject: How do you set the position of a microbe, such as the player   troubleshooting - Development troubleshooting EmptyTue Oct 01, 2013 11:32 pm

The Entity, System, Component layout for the project seems to be a good idea, but due to a lack of a "getting started" tutorial, I am struggling with mundane things such as how to set the position of the player in setup.lua.

Can I be informed of the proper way to do that?
Back to top Go down
Nimbal
Programming Team lead



Posts : 258
Reputation : 24
Join date : 2013-03-17
Age : 40
Location : Ratingen, Germany

troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting EmptyWed Oct 02, 2013 2:13 am

A short tutorial covering the basics will hopefully be coming this week. To get you started though, have a look at the setupEmitter function, specifically the function call to "rigidBody:setDynamicProperties". The corresponding C++ function is "RigidBodyComponent::setDynamicProperties", documented in the file "bullet/rigid_body_system.h".

Note that this should usually only be used to set the initial transformation and velocity. Fiddling with those values while the physics engine is already running might lead to strange outcomes. If you want to move a rigid body, you can refer to the script in "microbe_stage/movement_organelle.lua" and look for the calls to applyCentralImpulse and applyTorque.
Back to top Go down
SuperLala
Developer
SuperLala


Posts : 28
Reputation : 0
Join date : 2013-09-27
Age : 29
Location : United States

troubleshooting - Development troubleshooting Empty
PostSubject: Thank you   troubleshooting - Development troubleshooting EmptyWed Oct 02, 2013 10:41 pm

Ah, the correct command to initialize the position of the player is:

player.rigidBody:setDynamicProperties(position, orientation, velocity, angular velocity)

In the future, how am I going to be able to find out that Microbe has a rigidBody variable? I can search through the code and find "self.rigidBody" used every so often, but a comment with a list of useable variables would be nice.

Anyway, thank you for your help.
Back to top Go down
Nimbal
Programming Team lead



Posts : 258
Reputation : 24
Join date : 2013-03-17
Age : 40
Location : Ratingen, Germany

troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting EmptyThu Oct 03, 2013 2:17 am

SuperLala wrote:

If you want me to fork it instead, please tell me, because that is not what I'm assuming.
Sorry, I didn't see the edit until just now. Yes, please fork the repository and then work in a clone of your fork. You can then make pull requests to get your changes back into the main repository.

SuperLala wrote:

In the future, how am I going to be able to find out that Microbe has a rigidBody variable?
That's the thing about Lua (or any dynamically typed language, really). There's no easy way to know. We could document the attributes a class has, but in my experience, this documentation will quickly grow outdated and useless because unlike with C++ and Doxygen, there's no automated way to find undocumented stuff.

The best advice I can give you right now is to look at the constructor (__init) and see what this function puts into the "self" table. In case of the Microbe class, that's not quite straightforward because it uses a loop for some initialization in order to avoid code duplication.
Back to top Go down
SuperLala
Developer
SuperLala


Posts : 28
Reputation : 0
Join date : 2013-09-27
Age : 29
Location : United States

troubleshooting - Development troubleshooting Empty
PostSubject: Thanks   troubleshooting - Development troubleshooting EmptyThu Oct 03, 2013 9:20 am

Thanks for letting me know. I hope I am able to get familiar with the preexisting code soon because what we're trying to achieve is difficult enough, already.
Back to top Go down
crovea
Programming Team lead
crovea


Posts : 310
Reputation : 59
Join date : 2013-10-07
Age : 34
Location : Denmark

troubleshooting - Development troubleshooting Empty
PostSubject: Minor CMake issue!   troubleshooting - Development troubleshooting EmptyMon Oct 07, 2013 1:23 pm

Hey!
I'm trying to build the codeblocks project from my cloned forked prototype repo and following the readme and overcoming some other problems i've gotten it to work.. almost!

A number of the CMakeLists files have the command add_sources which my CMake is telling me isn't a cmake command and googling gets me no wiser!

I tried replacing the commands with include_directory commands and just listing the directory the desired files were in, which resulted in the build succeeding but the resulting project doesn't seem to be set up properly.

Can anyone tell me how i get that command to work, or how i replace it?

Example of the command used:
Thrive\src\util\CMakeLists.txt
Code:

add_sources(
    ${CMAKE_CURRENT_SOURCE_DIR}/make_unique.h
    ${CMAKE_CURRENT_SOURCE_DIR}/pair_hash.h
)
Back to top Go down
Nimbal
Programming Team lead



Posts : 258
Reputation : 24
Join date : 2013-03-17
Age : 40
Location : Ratingen, Germany

troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting EmptyMon Oct 07, 2013 2:14 pm

crovea wrote:

A number of the CMakeLists files have the command add_sources which my CMake is telling me isn't a cmake command and googling gets me no wiser!
The add_sources command is not a native CMake command. It's defined in the file cmake_modules/add_to_project.cmake, which is included in the main CMakeLists.txt at line 31. What version of CMake are you using? Could you post the complete output of CMake, preferrably with a fresh, empty build directory?
Back to top Go down
crovea
Programming Team lead
crovea


Posts : 310
Reputation : 59
Join date : 2013-10-07
Age : 34
Location : Denmark

troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting EmptyMon Oct 07, 2013 4:25 pm

I should be using the newest prototype repo version, however my readme seems outdated and using rebase tells me i'm up to date (maybe im doing it wrong).
My line 31:
Code:
include(add_to_project)
so as it should be i suppose. Here's my cmake error

Code:
The C compiler identification is GNU 4.7.3
The CXX compiler identification is GNU 4.7.3
Check for working C compiler: B:/MinGW/bin/gcc.exe
Check for working C compiler: B:/MinGW/bin/gcc.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: B:/MinGW/bin/g++.exe
Check for working CXX compiler: B:/MinGW/bin/g++.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:1 (add_sources):
  Unknown CMake command "add_sources".


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 2.8)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

Configuring incomplete, errors occurred!
Back to top Go down
Nimbal
Programming Team lead



Posts : 258
Reputation : 24
Join date : 2013-03-17
Age : 40
Location : Ratingen, Germany

troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting EmptyMon Oct 07, 2013 4:29 pm

I meant the CMake version, not the version of the codebase.

Also, could you open the file cmake_modules/add_to_project.cmake and add the following line anywhere:

Code:

message("Including add_to_project")
Then rerun CMake and see if you see the "Including add_to_project" line somewhere in the output.
Back to top Go down
crovea
Programming Team lead
crovea


Posts : 310
Reputation : 59
Join date : 2013-10-07
Age : 34
Location : Denmark

troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting EmptyMon Oct 07, 2013 4:33 pm

I should be using the newest prototype repo version, however my readme seems outdated and using rebase tells me i'm up to date (maybe im doing it wrong).
My line 31:
Code:
include(add_to_project)
so as it should be i suppose. Here's my cmake error

Code:
The C compiler identification is GNU 4.7.3
The CXX compiler identification is GNU 4.7.3
Check for working C compiler: B:/MinGW/bin/gcc.exe
Check for working C compiler: B:/MinGW/bin/gcc.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: B:/MinGW/bin/g++.exe
Check for working CXX compiler: B:/MinGW/bin/g++.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
CMake Error at CMakeLists.txt:1 (add_sources):
  Unknown CMake command "add_sources".


CMake Warning (dev) in CMakeLists.txt:
  No cmake_minimum_required command is present.  A line of code such as

    cmake_minimum_required(VERSION 2.8)

  should be added at the top of the file.  The version specified may be lower
  if you wish to support older CMake versions for this project.  For more
  information run "cmake --help-policy CMP0000".
This warning is for project developers.  Use -Wno-dev to suppress it.

Configuring incomplete, errors occurred!
EDIT: Ah i managed to update with a rebase now, but didn't help my problem
Back to top Go down
crovea
Programming Team lead
crovea


Posts : 310
Reputation : 59
Join date : 2013-10-07
Age : 34
Location : Denmark

troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting EmptyMon Oct 07, 2013 4:36 pm

Cmake version 2.8.11.2


I added
Code:
message("Including add_to_project")
to the end of add_to_project_cmake cleared the cache and rerun and the message did NOT appear in the debug window.


EDIT: here's my entire cmakelist:
Code:
# Based on a file from the Ogre Wiki Tutorial Framework
#    
#
# Modified as part of the Thrive project
#-----------------------------------------------------------------------------

cmake_minimum_required(VERSION 2.6)

project(Thrive)

###################
# Cache Variables #
###################

# Ogre SDK
SET(OGRE_SDK ""
    CACHE STRING "Path to the Ogre SDK"
)


###############
# CMake Setup #
###############

# Configure search path for cmake modules
list(APPEND CMAKE_MODULE_PATH
    ${CMAKE_SOURCE_DIR}/cmake_modules
)

# Import utility functions
include(add_to_project)
include(utils)

# Search path for dynamic libraries at runtime. Only relevant for Linux.
set(CMAKE_INSTALL_RPATH ".")

# Assure a proper build type
if (NOT CMAKE_BUILD_TYPE)
  set(CMAKE_BUILD_TYPE
      "Debug"
      CACHE STRING "Choose the type of build, options are: None (CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release."
      FORCE
    )
endif ()

# Install into dist subdirectory
set(CMAKE_INSTALL_PREFIX
    "${CMAKE_CURRENT_BINARY_DIR}/dist"
    CACHE STRING "Install path" FORCE
)


#############
# Find OGRE #
#############

find_package(OGRE REQUIRED)

# OGRE Plugins used
set(OGRE_PLUGINS
    Plugin_BSPSceneManager
    Plugin_OctreeSceneManager
    Plugin_OctreeZone
    Plugin_ParticleFX
    Plugin_PCZSceneManager
    RenderSystem_GL
)

#######
# OIS #
#######

find_package(OIS REQUIRED QUIET)


##############
# Find Boost #
##############

set(BOOST_COMPONENTS
    chrono
    date_time
    filesystem
    thread
    system
)

find_package(Boost COMPONENTS ${BOOST_COMPONENTS} REQUIRED QUIET)

###############
# Google Test #
###############

add_subdirectory(
    ${CMAKE_CURRENT_SOURCE_DIR}/contrib/googletest
)

include_directories(
    SYSTEM
    ${CMAKE_CURRENT_SOURCE_DIR}/contrib/googletest/include
)

##########
# Bullet #
##########

find_package(Bullet REQUIRED QUIET)

include_directories(SYSTEM ${BULLET_INCLUDE_DIRS})

############
# irrKlang #
############

#No longer used

#find_package(irrKlang REQUIRED QUIET)

#include_directories(SYSTEM ${IRRKLANG_INCLUDE_DIRS})

##########
# OpenAL #
##########

find_package(OpenAL REQUIRED QUIET)

include_directories(SYSTEM ${IRRKLANG_INCLUDE_DIR})


#######
# Lua #
#######

include_directories(
    SYSTEM
    ${CMAKE_CURRENT_SOURCE_DIR}/contrib/lua/lua/src
    ${CMAKE_CURRENT_SOURCE_DIR}/contrib/luabind/
)

if(WIN32)
    add_definitions(-DLUA_BUILD_AS_DLL)
endif()

add_subdirectory(
    ${CMAKE_CURRENT_SOURCE_DIR}/contrib/lua/
)

set(LUA_FOUND TRUE)
set(LUA_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/contrib/lua/lua/src)
set(LUA_LIBRARIES lua)
#set(BUILD_SHARED_LUABIND ON)
#set(INSTALL_LUABIND ON)
set(LIB_DIR bin)
add_definitions(-DLUABIND_CPLUSPLUS_LUA)

add_subdirectory(
    ${CMAKE_CURRENT_SOURCE_DIR}/contrib/luabind/
)

######################
# Configure Compiler #
######################

include_directories(SYSTEM
    ${Boost_INCLUDE_DIRS}
    ${OIS_INCLUDE_DIRS}
    ${OGRE_INCLUDE_DIRS}
)

include_directories(
    ${CMAKE_CURRENT_SOURCE_DIR}/src
)

# Compile using c++11
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=gnu++0x")


find_package(Threads)

##################
# Compile Thrive #
##################

# Collect sources from sub directories
add_subdirectory(src)
get_property(SOURCE_FILES GLOBAL PROPERTY SOURCE_FILES)

# Set extensive warning flags
include(compiler_flags)
set_source_files_properties(
    ${SOURCE_FILES}
    PROPERTIES COMPILE_FLAGS ${WARNING_FLAGS}
)

# Compile library
add_library(ThriveLib STATIC ${SOURCE_FILES})

target_link_libraries(ThriveLib
    ${Boost_LIBRARIES}
    ${OGRE_LIBRARIES}
    ${OIS_LIBRARIES}
    ${CMAKE_THREAD_LIBS_INIT}
    ${BULLET_DYNAMICS_LIBRARY}
    ${BULLET_COLLISION_LIBRARY}
    ${BULLET_MATH_LIBRARY}
    ${BULLET_SOFTBODY_LIBRARY}
    ${IRRKLANG_LIBRARIES}
    luabind
)


set_target_properties(ThriveLib PROPERTIES
    OUTPUT_NAME Thrive
)

# Compile executable
add_executable(Thrive
#WIN32
 ${CMAKE_CURRENT_SOURCE_DIR}/src/Main.cpp)

target_link_libraries(Thrive ThriveLib)

#################
# Compile tests #
#################

# Collect sources from sub directories
get_property(TEST_SOURCE_FILES GLOBAL PROPERTY TEST_SOURCE_FILES)

set_source_files_properties(
    ${TEST_SOURCE_FILES}
    PROPERTIES COMPILE_FLAGS ${WARNING_FLAGS}
)

add_executable(RunTests ${TEST_SOURCE_FILES})
target_link_libraries(RunTests ThriveLib gtest_main)

#################
# Documentation #
#################

set(DOC_OUTPUT_DIR ${CMAKE_CURRENT_BINARY_DIR}/doc CACHE PATH "Documentation output directory.")
set(DOC_INPUT "${CMAKE_CURRENT_SOURCE_DIR}/src ${CMAKE_CURRENT_SOURCE_DIR}/doc")

set( DOXYGEN_CONFIG_FILE
    ${CMAKE_CURRENT_SOURCE_DIR}/doc/doxygen.cfg.in
)

find_package(Doxygen)

if(DOXYGEN_FOUND)
    configure_file(${DOXYGEN_CONFIG_FILE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg @ONLY)
    add_custom_target(doc
        ${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/doxygen.cfg
        WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/doc
        COMMENT "Generating API documentation with Doxygen" VERBATIM
        SOURCES ${DOXYGEN_CONFIG_FILE}
    )
endif()


###########
# Install #
###########

# Executable
install(TARGETS Thrive
    RUNTIME DESTINATION bin
    LIBRARY DESTINATION bin
)

install(EXPORT lua
    DESTINATION bin
)

# OGRE config and media

install(FILES
    ${CMAKE_SOURCE_DIR}/res/ogre_cfg/resources.cfg
    DESTINATION bin
)

install(FILES
    ${CMAKE_SOURCE_DIR}/res/ogre_cfg/plugins.cfg
    DESTINATION bin
    CONFIGURATIONS Release
)

install(FILES
    ${CMAKE_SOURCE_DIR}/res/ogre_cfg/plugins_d.cfg
    DESTINATION bin
    CONFIGURATIONS Debug
    RENAME plugins.cfg
)

install(DIRECTORY ${CMAKE_SOURCE_DIR}/res/models
    DESTINATION ./
    CONFIGURATIONS Release  Debug
)

install(DIRECTORY ${CMAKE_SOURCE_DIR}/res/materials
    DESTINATION ./
    CONFIGURATIONS Release  Debug
)

install(DIRECTORY
    ${CMAKE_SOURCE_DIR}/res/fonts
    DESTINATION ./
    CONFIGURATIONS Release  Debug
)

install(DIRECTORY
    ${CMAKE_SOURCE_DIR}/res/scripts
    DESTINATION ./
    CONFIGURATIONS Release  Debug
)

# Install Runtime Libraries
if(WIN32)

    if (SYSTEM_DLLS)
        INSTALL(FILES
            ${SYSTEM_DLLS}
            DESTINATION bin
        )
    endif()

    INSTALL(FILES
        ${Boost_LIBRARIES}
        DESTINATION bin
    )

#    INSTALL(FILES
#        ${IRRKLANG_LIBRARIES_DLL}
#        DESTINATION bin
#    )

    foreach(OGRE_PLUGIN ${OGRE_PLUGINS})
        # Release
        install(FILES
            ${OGRE_PLUGIN_DIR_REL}/${OGRE_PLUGIN}.dll
            DESTINATION bin/plugins
            CONFIGURATIONS Release
        )
        # Debug
        install(FILES
            ${OGRE_PLUGIN_DIR_DBG}/${OGRE_PLUGIN}_d.dll
            DESTINATION bin/plugins
            CONFIGURATIONS Debug
        )
    endforeach()

    install(FILES
        ${OGRE_PLUGIN_DIR_REL}/OgreMain.dll
 ${OGRE_PLUGIN_DIR_REL}/RenderSystem_GL.dll
 ${OGRE_PLUGIN_DIR_REL}/OIS.dll
        #${OGRE_PLUGIN_DIR_REL}/cg.dll
 DESTINATION bin
 CONFIGURATIONS Release
 )

 install(FILES
        ${OGRE_PLUGIN_DIR_DBG}/OgreMain_d.dll
 ${OGRE_PLUGIN_DIR_DBG}/RenderSystem_GL_d.dll
 ${OGRE_PLUGIN_DIR_DBG}/OIS_d.dll
        #${OGRE_PLUGIN_DIR_DBG}/cg.dll
 DESTINATION bin
 CONFIGURATIONS Debug
 )

elseif(UNIX)

    SeparateLibrariesByBuildType(
        "${OGRE_LIBRARIES}"
        OGRE_MAIN_DBG
        OGRE_MAIN_REL
    )
    InstallFollowingSymlink(
        ${OGRE_MAIN_REL}
        bin
        Release
        False
    )
    InstallFollowingSymlink(
        ${OGRE_MAIN_DBG}
        bin
        Debug
        False
    )

    foreach(OGRE_PLUGIN ${OGRE_PLUGINS})
        SeparateLibrariesByBuildType(
            "${OGRE_${OGRE_PLUGIN}_LIBRARIES}"
            OGRE_PLUGIN_LIB_DBG
            OGRE_PLUGIN_LIB_REL
        )
        # Release
        InstallFollowingSymlink(
            ${OGRE_PLUGIN_LIB_REL}
            bin/plugins
            Release
            True
        )
        # Debug
        InstallFollowingSymlink(
            ${OGRE_PLUGIN_LIB_DBG}
            bin/plugins
            Debug
            True
        )
    endforeach()

endif()

###############################################################################
# CPack
###############################################################################

configure_file(${CMAKE_SOURCE_DIR}/cpack/zip.cmake.in
  "${CMAKE_CURRENT_BINARY_DIR}/cpack/zip.cmake" @ONLY
)

add_custom_target(zip
    COMMAND cpack --config "${CMAKE_CURRENT_BINARY_DIR}/cpack/zip.cmake"
    DEPENDS Thrive
)

Back to top Go down
Nimbal
Programming Team lead



Posts : 258
Reputation : 24
Join date : 2013-03-17
Age : 40
Location : Ratingen, Germany

troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting EmptyMon Oct 07, 2013 4:38 pm

Oh, wait a second. I might have an idea where the problem is. What do you give CMake as source directory? My guess is that you give it the "src" subdirectory of your repository clone, but it should actually be the root directory (the parent directory of src).
Back to top Go down
crovea
Programming Team lead
crovea


Posts : 310
Reputation : 59
Join date : 2013-10-07
Age : 34
Location : Denmark

troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting EmptyMon Oct 07, 2013 4:41 pm

Ah yes of course thank you! why didn't i think of changing that! i get a different error now tho with missing ogre library.

I didn't get any errors in the powershell script when it installed ogre so thats a bit odd. I'll try and install the SDK manually..

Code:
The C compiler identification is GNU 4.7.3
The CXX compiler identification is GNU 4.7.3
Check for working C compiler: B:/MinGW/bin/gcc.exe
Check for working C compiler: B:/MinGW/bin/gcc.exe -- works
Detecting C compiler ABI info
Detecting C compiler ABI info - done
Check for working CXX compiler: B:/MinGW/bin/g++.exe
Check for working CXX compiler: B:/MinGW/bin/g++.exe -- works
Detecting CXX compiler ABI info
Detecting CXX compiler ABI info - done
Looking for OGRE...
OGRE_PREFIX_WATCH changed.
Found PkgConfig: D:/Users/Crovea/Downloads/pkg-config/bin/pkg-config.exe (found version "0.26")
checking for module 'OGRE'
  package 'OGRE' not found
Could not locate OGRE
CMake Error at cmake_modules/FindPkgMacros.cmake:112 (message):
  Required library OGRE not found! Install the library (including dev
  packages) and try again.  If the library is already installed, set the
  missing variables manually in cmake.
Call Stack (most recent call first):
  cmake_modules/FindOGRE.cmake:219 (findpkg_finish)
  CMakeLists.txt:63 (find_package)


Configuring incomplete, errors occurred!
EDIT: Not as simple as i hoped; how do i point cmake to my sdk correctly?
EDIT2: I managed to install pkg-config (which involved a lot of random dll files and adding it to path and isn't that mostly a unix thing?) reducing my error to only the ogre part as the posted error now suggest
EDIT3: I downloaded complete ogre library with source and added
Code:
add_subdirectory(
    ${CMAKE_CURRENT_SOURCE_DIR}/ogre_src_v1-8-1
)
to CMakeList which resolved the ogre problem. Now it's complaining freetype
Code:
CMake Error at ogre_src_v1-8-1/CMake/Utils/MacroLogFeature.cmake:100 (MESSAGE):

  
  -----------------------------------------------------------------------------


  -- The following REQUIRED packages could NOT be located on your system.

  -- Please install them before continuing this software installation.

  -- If you are in Windows, try passing -DOGRE_DEPENDENCIES_DIR=<path to
  dependencies>

  
  -----------------------------------------------------------------------------


  + freetype: Portable font engine <ILLEGAL LINK>

  
  -----------------------------------------------------------------------------
Call Stack (most recent call first):
  ogre_src_v1-8-1/CMake/Dependencies.cmake:234 (MACRO_DISPLAY_FEATURE_LOG)
  ogre_src_v1-8-1/CMakeLists.txt:194 (include)
My initial attempts to add it didn't work (it doesn't have a cmake file included) and i'm heading to bed. Thanks for the help so far, and if you know how i can resolve the new issue, i'd appriciate it
Back to top Go down
Nimbal
Programming Team lead



Posts : 258
Reputation : 24
Join date : 2013-03-17
Age : 40
Location : Ratingen, Germany

troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting EmptyTue Oct 08, 2013 2:34 am

This sounds very much like something went wrong with setting up the build environment, as you really shouldn't need to install Ogre manually. Could you try running the setup script once more and upload the output to something like pastebin.com so I can have a look?
Back to top Go down
crovea
Programming Team lead
crovea


Posts : 310
Reputation : 59
Join date : 2013-10-07
Age : 34
Location : Denmark

troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting EmptyTue Oct 08, 2013 4:23 am

I added some transcript code to setup.ps1 ogre_dependencies/install.ps1 and ogre/install.ps1
which resulted in this output, which doesn't seem to print all that it should but there is errors with
Code:
param(
    [string]$MINGW_ENV
)
which must be the problem as it seems to be the thing linking to mingw which is where ogre is put
pastebin.com/RtcdTMSP
Back to top Go down
Nimbal
Programming Team lead



Posts : 258
Reputation : 24
Join date : 2013-03-17
Age : 40
Location : Ratingen, Germany

troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting EmptyTue Oct 08, 2013 4:28 am

The error with "param" might be caused by the transcript code you inserted. Make sure that the "param" line is the very first of the script, otherwise PowerShell will not recognize it properly.
Back to top Go down
crovea
Programming Team lead
crovea


Posts : 310
Reputation : 59
Join date : 2013-10-07
Age : 34
Location : Denmark

troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting EmptyTue Oct 08, 2013 4:41 am

It's still giving the same error of param, here's how i structured the start of the install.ps1's.
However there was a whitespace in front of one of them so i'm running the script again now, maybe that was the error

Code:
param(
    [string]$MINGW_ENV
)

$ErrorActionPreference="SilentlyContinue"
Stop-Transcript | out-null
$ErrorActionPreference = "Continue"
Start-Transcript -path B:\output.txt -append
EDIT: Whitespace was not the problem
Back to top Go down
Nimbal
Programming Team lead



Posts : 258
Reputation : 24
Join date : 2013-03-17
Age : 40
Location : Ratingen, Germany

troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting EmptyTue Oct 08, 2013 5:12 am

That's strange, because param is a built-in of PowerShell so either there's still something off about the script formatting, or your PowerShell version is really old. Could you maybe commit the changes you made (best in a separate branch) and push them to your GitHub fork so I can take a look?
Back to top Go down
Sponsored content





troubleshooting - Development troubleshooting Empty
PostSubject: Re: Development troubleshooting   troubleshooting - Development troubleshooting Empty

Back to top Go down
 
Development troubleshooting
Back to top 
Page 1 of 6Go to page : 1, 2, 3, 4, 5, 6  Next
 Similar topics
-
» I would like to help development.
» Microbe Stage Development
» Hello development team
» Microbe Stage Progress Report
» Two Questions Concerning Thrive's Development

Permissions in this forum:You cannot reply to topics in this forum
Thrive Game Development :: Development :: Programming-
Jump to: