Page 2 of 3

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:06
by Edward_Lii
Hello ctdabomb

ctdabomb {l Wrote}:Yup, you were right.

CMake Error at CMakeLists.txt:39 (message):
LIBARCHIVE not found !

I assume you have libarchive-dev installed?
There's a problem that Ubuntu doesn't seem to have the needed cmake Module.
I'll try to find a solution for this.

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:07
by ctdabomb
installing now, (after i saw the problem)

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:11
by ctdabomb
I installed it and got the same error. :(

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:13
by Edward_Lii
Hello ctdabomb,

ctdabomb {l Wrote}:I installed it and got the same error. :(

I was afraid so, I think I got a temporary solution.
Could you replace the file CMakeLists.txt with this:
{l Code}: {l Select All Code}
PROJECT(meandmyshadow)
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)


Find_Package(SDL REQUIRED)
Find_Package(SDL_ttf REQUIRED)
Find_Package(SDL_image REQUIRED)
Find_Package(SDL_mixer REQUIRED)
Set(SDLGFX_LIBRARY SDL_gfx)
Set(SDLGFX_INCLUDE_DIR ${SDL_INCLUDE_DIR}/SDL_gfx)
Find_Package(CURL REQUIRED)
Set(LibArchive_LIBRARY archive)
Set(LibArchive_INCLUDE_DIR /usr/include/)

INCLUDE_DIRECTORIES(${SDL_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${SDLIMAGE_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${SDLMIXER_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${SDLTTF_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${SDLGFX_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${CURL_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${LibArchive_INCLUDE_DIR})

if ( NOT SDL_FOUND )
    message(FATAL_ERROR "SDL not found !")
endif ( NOT SDL_FOUND )

if ( NOT SDLTTF_FOUND )
    message(FATAL_ERROR "SDL_ttf not found !")
endif ( NOT SDLTTF_FOUND )

if ( NOT SDLMIXER_FOUND )
    message(FATAL_ERROR "SDL_mixer not found !")
endif ( NOT SDLMIXER_FOUND )

if ( NOT CURL_FOUND )
    message(FATAL_ERROR "CURL not found !")
endif ( NOT CURL_FOUND )


configure_file (
  "${PROJECT_SOURCE_DIR}/src/config.h.in"
  "${PROJECT_BINARY_DIR}/config.h"
  )

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR})
set(SRC_DIR ${PROJECT_SOURCE_DIR}/src)

include_directories(
   ${PROJECT_BINARY_DIR}
   ${SDL_INCLUDE_DIR}
   ${SDLTTF_INCLUDE_DIR}
   ${SDLMIXER_INCLUDE_DIR}
   ${SDLIMAGE_INCLUDE_DIR}
   ${SDLGFX_INCLUDE_DIR}
)

SET(CMAKE_CXX_FLAGS "-Wall -g")

# Déclaration de l'exécutable
file(GLOB Sources ${SRC_DIR}/*.cpp)
add_executable(meandmyshadow ${Sources})

target_link_libraries(
    meandmyshadow
    ${SDL_LIBRARY}
   ${SDLTTF_LIBRARY}
   ${SDLIMAGE_LIBRARY}
   ${SDLMIXER_LIBRARY}
   ${SDLGFX_LIBRARY}
    ${CURL_LIBRARY}
    ${LibArchive_LIBRARY}
)

install(DIRECTORY ${PROJECT_BINARY_DIR}/data DESTINATION share/meandmyshadow/)
install(TARGETS meandmyshadow RUNTIME DESTINATION bin)
if("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
   install(FILES meandmyshadow.desktop DESTINATION share/applications/)
   install(FILES meandmyshadow.xpm DESTINATION share/pixmaps/)
endif("${CMAKE_SYSTEM_NAME}" MATCHES "Linux")
 

It will not give you an error, but that doesn't mean it works.
You can still get errors when running the make command.

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:14
by ctdabomb
okay, so I replace the text and then try again?

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:15
by Edward_Lii
Hello ctdabomb,

ctdabomb {l Wrote}:okay, so I replace the text and then try again?

Yup, after replacing the text you run cmake . again followed by make.

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:16
by ctdabomb
error again :(
-- The CXX compiler identification is unknown
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
-- Configuring incomplete, errors occurred!

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:18
by Edward_Lii
Hello ctdabomb,

ctdabomb {l Wrote}:error again :(
-- The CXX compiler identification is unknown
CMake Error: your CXX compiler: "CMAKE_CXX_COMPILER-NOTFOUND" was not found. Please set CMAKE_CXX_COMPILER to a valid compiler path or name.
-- Configuring incomplete, errors occurred!

This message is about the compiler tools.
You can easily install them using this command:
{l Code}: {l Select All Code}
sudo apt-get install build-essential

Also make sure that g++ is installed.

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:22
by ctdabomb
cmake worked!
building make now!

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:23
by ctdabomb
make got some errors.
http://www.pasteall.org/27939

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:25
by Edward_Lii
Hello ctdabomb,

ctdabomb {l Wrote}:make got some errors.
http://www.pasteall.org/27939

Oh, that must be libsdl-gfx1.2-dev.
It can also slip through the CMakeList since some distro's don't provide a CMake module for it.

So you have to install libsdl-gfx1.2-dev and then run cmake . again.

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:26
by ctdabomb
whee! this is fun!

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:29
by Edward_Lii
Hello ctdabomb,

ctdabomb {l Wrote}:whee! this is fun!

I assume you mean it works. ;)

I'm really sorry for the problems, I'm hoping to fix them soon.
Especially the libarchive problem which will probably affect multiple distros.

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:30
by ctdabomb
yes it works... at least it make an executable, thanks so much for your help! i will test your game now and tell you what I think.

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:31
by ctdabomb
if I ever want to install anything like this again i do that same stuff, right?
thanks again for your help!

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:35
by Edward_Lii
Hello ctdabomb,

ctdabomb {l Wrote}:if I ever want to install anything like this again i do that same stuff, right?
thanks again for your help!

Generally speaking yes.
If you download the source of a project it most likely contains a README, COMPILE or INSTALL file which contains instructions on howto compile it.
It isn't always cmake . it can also be qmake or ./configure or something different.

And most of the time the first command warns you when something isn't "found" (installed).

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:39
by ctdabomb
this game is cool! really fun! the tutorial levels get a bit annoying, but i usually don't like things like that.
GOOD JOB!!!

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:41
by Edward_Lii
Hello ctdabomb,

ctdabomb {l Wrote}:this game is cool! really fun! the tutorial levels get a bit annoying, but i usually don't like things like that.

Thanks, I think that's where tutorials are for: to get bored. :p

ctdabomb {l Wrote}:GOOD JOB!!!

Thanks again. :)

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:46
by ctdabomb
level 23 (shadow swap i think) didn't work the first time. I did what the sign said, but it didn't work. either it was a bug or an id10t error

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:49
by Edward_Lii
Hello ctdabomb,

ctdabomb {l Wrote}:level 23 (shadow swap i think) didn't work the first time. I did what the sign said, but it didn't work. either it was a bug or an id10t error

I think I know what happened.
When you try the swapping while the player is in front of a shadow block it will fail.
Because if the swap would proceed the shadow would be inside a shadow block causing strange collision errors.

It should play a sound, not sure it's clear enough tough.

Thanks for testing! :)

Re: MeAndMyShadow V0.2 RC1

PostPosted: 05 Jan 2012, 23:59
by ctdabomb
AMAZING!!!!
AMAZING!!!!
AMAZING!!!!

Re: MeAndMyShadow V0.2 RC1

PostPosted: 06 Jan 2012, 00:05
by Edward_Lii
Hello ctdabomb,

ctdabomb {l Wrote}:AMAZING!!!!
AMAZING!!!!
AMAZING!!!!

I'm glad you like it! :D

If there's any feedback you like to give, feel free to do so.
One important thing that we need is content, more levels.

BTW, I'm going to split these post of the topic and give them their own topic. ;)

Re: Problem compiling V0.2rc1

PostPosted: 06 Jan 2012, 00:36
by ctdabomb
i can probably make some levels.

Re: Problem compiling V0.2rc1

PostPosted: 06 Jan 2012, 07:42
by Edward_Lii
Hello ctdabomb,

ctdabomb {l Wrote}:i can probably make some levels.

That would be great! ;)

Re: MeAndMyShadow V0.2 RC1

PostPosted: 08 Mar 2012, 21:41
by qwanom
Edward_Lii {l Wrote}:/home/ctdabomb/Downloads/meandmyshadow-0.2rc1 then what?

If you got the terminal window open you can navigate using the cd command.
So by running this command you will enter the meandmyshadow path:
{l Code}: {l Select All Code}
cd /home/ctdabomb/Downloads/meandmyshadow-0.2rc1

Followed by an enter, to let the command be executed.
Now you can continue with the other commands, write:
{l Code}: {l Select All Code}
cmake .
Followed by a enter.
{l Code}: {l Select All Code}
make
Followed by an enter

If it compiles without errors you can run:
{l Code}: {l Select All Code}
./meandmyshadow
[/quote]

Thank You very much for this Big Help and so Nice Game! You have a big patience to explain how to compile to newbies like me ;)
This was my first compiled app and thanks to this topic I made it well! My problem was next: I have a Linux based distribution called Mint 9 x64 Isadora (Gnome), wich is based on Ubuntu 10.04 Lucid Lynx. Those package you said, for example- libSDL in Ubuntu packages is called libsdl-net1.2, also I realized that libsdl-net1.2-dev need to be installed.