Page 2 of 3

Re: How to compile map?

Posted: 10 May 2016, 06:10
by MasterBel2
Ok. Chances are I'm missing somethingfairly obvious here, but I still can't get cmake to find ImageMagick. OK, it does find it, but says it can't find ImageMagick_Magick++_Library.

Code: Select all

  Could NOT find ImageMagick (missing: ImageMagick_Magick++_LIBRARY) (found version "7.0.1-2")
I've googled this error, I've looked into command line use, everything I can think of and no solution seems to work. I think what I worked out is the problem is that CMake is looking in the wrong place (providing the file exists. I can't find it).

EDIT: Oh great I just found a file and it's saying that CMake can't find pretty much all the files with ImageMagick_Magick++_ as part of the name. This probably supports the idea it's looking in the wrong area, but does anyone know how to change where it's looking?

I'm wondering if I might have the wrong version of ImageMagick. Maybe springmapconvng is designed to find file that's got a new name now. Maybe not.

Re: How to compile map?

Posted: 10 May 2016, 06:30
by gajop
I'm not sure.
1) Can you give us the entire cmake log (add it as a file or use a service like http://hastebin.com/) and also detail how you installed ImageMagick?
2) Can you try manually specifying the path to it? See comments (by Eric) here: https://bugs.archlinux.org/task/35280

Hopefully abma can assist here.
abma wrote:Summon!

Re: How to compile map?

Posted: 10 May 2016, 08:55
by MasterBel2
I saw this one, but I can't understand what he instructs to enter into the terminal. Advice please?

Re: How to compile map?

Posted: 10 May 2016, 09:03
by gajop
I think it would equate to this in your case:

Code: Select all

cmake . \
-DImageMagick_Magick++_INCLUDE_DIR:PATH=/usr/include/ImageMagick-6 \
-DImageMagick_Magick++_LIBRARY:FILEPATH=/usr/lib/libMagick++-6.Q16.so \
-DImageMagick_MagickWand_INCLUDE_DIR:PATH=/usr/include/ImageMagick-6 \
-DImageMagick_MagickWand_LIBRARY:FILEPATH=/usr/lib/libMagickWand-6.Q16.so \
-DImageMagick_MagickCore_INCLUDE_DIR:PATH=/usr/include/ImageMagick-6 \
-DImageMagick_MagickCore_LIBRARY:FILEPATH=/usr/lib/libMagickCore-6.Q16.so
Where you would replace /usr/include/ImageMagick-6 and similar with appropriate file paths where ImageMagick is installed in your system.

The backslash is used to create multiline commands, you could of course write everything in a single line.
PS: You might not need all of these includes, but almost definitely the first two and also highly likely the last two.

Re: How to compile map?

Posted: 12 May 2016, 07:08
by enetheru
gajop wrote:PS: It is my opinion that making maps shouldn't require these laborious steps that are likely to dissuade users from pursuing the work.
amen to that.

Re: How to compile map?

Posted: 12 May 2016, 08:50
by Silentwings
If macs can run python, you might save all this trouble by using viewtopic.php?f=56&t=34378

Re: How to compile map?

Posted: 12 May 2016, 10:07
by Forboding Angel
I believe OSX has python preinstalled, or at the very least can easily install it afaik.

For the record, I hate the method of drape a big ass texture over a heightmap. Imo, we should have texture splatting, much like what sm3 promised but without the fail. Sm3 had a ton of problems. Scened has texture splatting of some sort.

Perhaps someone could build procedural generation of texturing based upon predefined values altitude/slope/water/underwater/etc. That would be stupidly amazing. #ihaveadream

Re: How to compile map?

Posted: 13 May 2016, 12:55
by MasterBel2
@Gajop - that would be absolutely lovely if it wasn't so difficult.
@Silentwings:
"Save trouble" = would be faster even from here? Yes macs can run python scripts; I've done it before.
@Forboding Angel:
That proposal makes me dream about the possibility of randomly generated maps that follow rules so that maps are created that would work. Oh the possibilities.

Hmm. Still working on getting CMake to identify the DevIL libraries. Not out of ideas yet. Got some more things I can try, so will work on them straight after I check out
If macs can run python, you might save all this trouble by using viewtopic.php?f=56&t=34378
Hopefully this map will be compiled before midyear! :D

Re: How to compile map?

Posted: 13 May 2016, 13:23
by MasterBel2
Unfortunately it seems that, without a windows machine on hand, it probably won't be happening with the PyMapConv. Unless nvdxt.exe isn't actually a windows self-extracting file and something that could actually work on mac? I'll go back to working on SpringMapConv.

Failing that, I could potentially put up the metal, height and texture maps and someone else convert it for me? I know it's not ideal, but would that be possible?

Re: How to compile map?

Posted: 13 May 2016, 17:27
by Beherith
In pymapconv, there is a linux option. It uses imagemagick, but for lack of a linux/mac computer, it is untested. If you are willing to give it a shot, Ill help troubleshoot and bring it up to spec.

Re: How to compile map?

Posted: 13 May 2016, 23:46
by MasterBel2
I'd be glad to do that. PyMapConv looks like a great program, and from what I saw, others think it'll be way easier to use than others. Once set up, of course. Sure, I'd be happy to try it. What do I need to do?

(Meanwhile I'm still gonna look into the compilation of SpringMapConvNG, just so I can say I did it :D)

Re: How to compile map?

Posted: 14 May 2016, 00:06
by MasterBel2
Ok, Ok, I found something. In FindDevIL.cmake:

Code: Select all

set(IL_FIND_LIB_STD_ARGS
	PATH_SUFFIXES
		lib64
		lib
		libs64
		libs
		libs/Win32
		libs/Win64
	PATHS
		${PROJECT_BINARY_DIR}
		${PROJECT_SOURCE_DIR}
		$ENV{LD_LIBRARY_PATH}
		$ENV{LIBRARY_PATH}
		/usr
		/usr/local
		/usr/bin
	)
AND

Code: Select all

set(IL_FIND_HEADER_STD_ARGS
	PATHS
		${PROJECT_BINARY_DIR}/include
		${PROJECT_SOURCE_DIR}/include
		${IL_LIBRARY_SUPER_DIR}/include
		$ENV{CPATH}
		/usr/local/include
		/usr/include
	NO_DEFAULT_PATH
	)
I think this is what I've been looking to change! So, what exactly do I need to change here? What Files/Folders do I need to link it to so that the compile will work?

Re: How to compile map?

Posted: 14 May 2016, 14:04
by Beherith
MasterBel2 wrote:I'd be glad to do that. PyMapConv looks like a great program, and from what I saw, others think it'll be way easier to use than others. Once set up, of course. Sure, I'd be happy to try it. What do I need to do?

(Meanwhile I'm still gonna look into the compilation of SpringMapConvNG, just so I can say I did it :D)
Install imagemagick for mac, make sure you can access its "convert" utility from the terminal. It also needs python(2.7) and PIL (Python imaging library)

http://cactuslab.com/imagemagick/

https://www.python.org/downloads/release/python-2710/

PIL install seems to not be as simple as the above, but i'm not familiar with OSX

https://www.google.com/search?q=PIL+for+mac

Re: How to compile map?

Posted: 15 May 2016, 08:32
by MasterBel2
ImageMagick is installed

Python comes with mac

I think the lib is linked.

How do I check the 'convert' utility works?

What next?

Re: How to compile map?

Posted: 15 May 2016, 15:07
by Beherith
You just type convert into a terminal, and imagemagick should report that it indeed exists. Then you can type python pymapconv.py into the terminal whereever pymapconv is, and it should run.

Re: How to compile map?

Posted: 17 May 2016, 01:53
by MasterBel2
Turns out that PIL is not linked - looking into that now. Will report back when the problem is solved. Hopefully then everything wil work :D

Re: How to compile map?

Posted: 18 May 2016, 09:14
by Beherith
Any luck? If you need live help we can schedule some time in the lobby

Re: How to compile map?

Posted: 23 May 2016, 04:10
by MasterBel2
No luck of yet. What I'm trying to do is set the path for Python to find Python Image Library (Pillow). If you know a method for that for the command-line tool, that's all I need. However, I'm fairly happy to continue searching on my own. I need to get better at web searches anyhow.

Re: How to compile map?

Posted: 23 May 2016, 12:38
by Beherith
Does python throw an exception for not finding PIL?

Have you tried:
Install Xcode from the App Store.
Open Xcode and open Xcode Preferences.
Click on the Downloads tab, and you'll see Command Line Tools. ...
Now open the Terminal app, and run the following commands: sudo easy_install pip sudo pip install PIL

Re: How to compile map?

Posted: 24 May 2016, 00:59
by MasterBel2
Error messages. Why do I always forget them?

Code: Select all

  File "pymapconv.py", line 6, in <module>
    from PIL import Image
ImportError: No module named PIL
My-MacBook-Pro:springrts_smf_compiler-master myname$ from PIL import Image
from: can't read /var/mail/PIL
I've been using homebrew to install pillow. I'll try what you suggested and see if Pip works better.

EDIT: Using the said procedure throws the error:

Code: Select all

Searching for pip
Reading https://pypi.python.org/simple/pip/
Download error on https://pypi.python.org/simple/pip/: timed out -- Some packages may not be found!
Couldn't find index page for 'pip' (maybe misspelled?)
Scanning index of all packages (this may take a while)
Reading https://pypi.python.org/simple/
Download error on https://pypi.python.org/simple/: timed out -- Some packages may not be found!
No local packages or download links found for pip
error: Could not find suitable distribution for Requirement.parse('pip')
Aha - just thinking - I installed Pillow because PIL no longer functions (allegedy). But Pillow is supposed to be detected when searching for PIL. Maybe not? Maybe this has something to do with it.