Is the compilation instructions accurate for 64-bit Windows?

Everything about ToME 4.x.x. No spoilers, please

Moderator: Moderator

Message
Author
Rectifier
Archmage
Posts: 386
Joined: Mon Aug 29, 2011 8:06 am

Re: Is the compilation instructions accurate for 64-bit Wind

#31 Post by Rectifier »

Grabbed a .dll for vorbisfile, and let me compile tengine.

Double-click on the executable and then I get an error window saying:

The program can't start because OpenAL32.dll is missing from your computer. Blah blah reinstall.

** Update, I put the .dll in the sys32/syswow64 folders, and now I get a brand new error yay!

Code: Select all

The procedure entry point alGetSource3f could not be located in the dynamic link library OpenAL32.dll
/headdesk

Dekar
Spiderkin
Posts: 559
Joined: Wed Jan 26, 2011 3:47 pm

Re: Is the compilation instructions accurate for 64-bit Wind

#32 Post by Dekar »

You have to download a released version of ToME, grab all the .dll in the folder where the .exe is and copy them to the .exe of your compiled version.

Rectifier
Archmage
Posts: 386
Joined: Mon Aug 29, 2011 8:06 am

Re: Is the compilation instructions accurate for 64-bit Wind

#33 Post by Rectifier »

Yeah I tried that, I don't even know anymore ~_~

*sleeping

#######################################################

New strategy, starting over from scratch.
I'm outlining the steps I'll take/leaving instruction-ish

This assumes you know how to use the cd command in the msys shell.
The /c/mingw/bin format translates into the C:\mingw\bin format used in Windows.


Steps:

Install mingw with all options checked
Place mingw into /c/mingw
Create /c/mingw/tengine folder
Go to /c/mingw/msys, create /local folder with folders /bin, /include, /lib and /share inside of that
Download tome svn into the folder /c/mingw/tengine
Use google to download the .zip files, sdl 1.3, sdl_ttf, sdl_image, sdl_mixer, libvorbis, libogg
Create /c/mingw/tengine/libs folder
Extract all .zip files into /c/mingw/tengine/libs
Delete the .zip files because we like being tidy!
Download premake4.exe, use google
Place premake4.exe into /c/mingw/tengine
Open premake4.lua with notepad++ in /c/mingw/tengine
Edit directory paths to represent folder names and locations
Example of edited premake4.lua:

Code: Select all

configuration "windows"
	libdirs {
		"libs/SDL130-6050/lib",
		"libs/SDL_ttf2010/lib",
		"libs/SDL_image1210/lib",
		"libs/SDL_mixer1211/lib",
		"libs/libvorbis132/.libs",
		"libs/libogg130/.libs",
		"/c/mingw/lib",
	}
	includedirs {
      "libs/SDL130-6050/include/SDL",
		"libs/SDL_ttf2010/include",
		"libs/SDL_image1210/include",
		"libs/SDL_mixer1211/include",
		"libs/libvorbis132/include",
		"libs/libogg130/include",
		"/c/mingw/include/GL",
	}
Open msys, type "cd /c/mingw/tengine"
In msys, type "premake4.exe --cc=gcc gmake"
Move to a library directory in msys:
-"cd libs/~libname~"
-substitute ~libname~ for the name of one of the folders in /c/mingw/tengine/libs
Compile this library using 3 commands:
"./configure --enable-shared"
-then "make"
-finally "make install"
-move to a new library folder and repeat
!~Snag compiling SDL_ttf, edit with solution later~!
Locate needed files in /c/mingw/msys/1.0/local
-files from compilation located in /bin, /include, /lib, /share
-should have .dll, .h, .a, and .m4 files in each folder respectively
Place files where needed
In msys type "make -e CC=gcc"
Assuming you get the error about SDL_CreateThread, proceed, otherwise troubleshoot
Possibility of needing .dll files from an already compiled version of tome
Go to /c/mingw/tengine folder with windows explorer
Find profile.c, music.c, and particles.c; open them with notepad++, apply the changes mentioned below (entirely new lines of code though duplicated to a degree).

Code: Select all

profile.c, line 210-211
        const char *name = "Profile";
        thread = SDL_CreateThread(thread_profile, name, profile);
music.c, line 278-279
        const char *name = "Sound";
        sound->loaderThread = SDL_CreateThread(streamingLoader, name, sound);
particles.c, line 893-894
        const char *name = "Particles";
        thread = SDL_CreateThread(thread_particles, name, pt);
Just to be safe, in msys type "premake4.exe --cc=gcc gmake"
Finally type "make -e CC=gcc"

#######################################################

Okay that is my process, I'm just beginning to compile the libraries...hopefully this gets me somewhere.
Last edited by Rectifier on Wed Nov 23, 2011 9:58 am, edited 1 time in total.

Rectifier
Archmage
Posts: 386
Joined: Mon Aug 29, 2011 8:06 am

Re: Is the compilation instructions accurate for 64-bit Wind

#34 Post by Rectifier »

I've run into a snag compiling SDL_ttf. It needs freetype and sdl within the mingw directory, and I placed the the freetype dll correctly but I'm not sure where I need to place the files freetype2.pc, SDL.dll and sdl-config within my mingw directory. Might have to edit sdl-config because I compiled the sdl.dll in another folder since the output from ./configure complained that the sdl-config file was wrong, and the other two files don't exist.

*Awake again, I edited sdl-config so that it wasn't pointing at usr/local for the directory prefix; unfortunately I get the same error message although it points at where sdl-config exists correctly.

Code: Select all

checking for freetype-config... /mingw/bin/freetype-config
checking for pkg-config... no
checking for SDL... no
checking for sdl-config... /mingw/bin/sdl-config
checking for SDL - version >= 1.2.4... no
*** Could not run SDL test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means SDL was incorrectly installed
*** or that you have moved SDL since it was installed. In the latter case, you
*** may want to edit the sdl-config script: /mingw/bin/sdl-config
configure: error: *** SDL version 1.2.4 not found!
Google has not helped me much in figuring out what I'm doing/did wrong.

lenocinor
Cornac
Posts: 33
Joined: Thu Jan 26, 2012 5:23 am

Re: Is the compilation instructions accurate for 64-bit Wind

#35 Post by lenocinor »

Sorry about the necromancy, but I hope this will help anyone else in my situation.

The compilation instructions provided on the website work perfectly for Windows 7 64-bit, using the source for b38 from the Git repo ( http://git.develz.org/?p=tome.git ). The SVN source should be the same as the Git source if you'd prefer to use that.

However, there is one slight wrinkle. You need to add the following line to your premake4.lua libdirs under configuration "windows" though:

"/C/MinGW2/include/vorbis",

If someone with commit privileges could fix this in source that'd be great. :)

Alternately, you can copy C:\MinGW2\include\vorbis\libvorbisfile.dll.a to C:\MinGW2\lib\libvorbisfile.dll.a since that's the only file it needs.

edge2054
Retired Ninja
Posts: 3756
Joined: Fri May 28, 2010 4:38 pm

Re: Is the compilation instructions accurate for 64-bit Wind

#36 Post by edge2054 »

I've been trying using the instructions on the wiki but get this error very early in the compilation process.

Code: Select all

Creating ../obj/Debug/physfs
physfs.c
make[1]: *** [../obj/Debug/physfs/physfs.o] Error 1
make: *** [physfs] Error 2

jenx
Sher'Tul Godslayer
Posts: 2263
Joined: Mon Feb 14, 2011 11:16 pm

Re: Is the compilation instructions accurate for 64-bit Wind

#37 Post by jenx »

I've also tried the wiki instructions and get the same error as edge2054.

this works: premake4.exe --cc=gcc gmake

but I get the same error as edge when I try:

make -e CC=gcc

any suggestions?
MADNESS rocks

Post Reply