How to compile map? - Page 2

How to compile map?

Discuss maps & map creation - from concept to execution to the ever elusive release.

Moderator: Moderators

User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: How to compile map?

Post 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.
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: How to compile map?

Post 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!
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: How to compile map?

Post by MasterBel2 »

I saw this one, but I can't understand what he instructs to enter into the terminal. Advice please?
gajop
Moderator
Posts: 3051
Joined: 05 Aug 2009, 20:42

Re: How to compile map?

Post 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.
User avatar
enetheru
Posts: 627
Joined: 11 Jun 2010, 07:32

Re: How to compile map?

Post 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.
User avatar
Silentwings
Posts: 3720
Joined: 25 Oct 2008, 00:23

Re: How to compile map?

Post by Silentwings »

If macs can run python, you might save all this trouble by using viewtopic.php?f=56&t=34378
User avatar
Forboding Angel
Evolution RTS Developer
Posts: 14673
Joined: 17 Nov 2005, 02:43

Re: How to compile map?

Post 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
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: How to compile map?

Post 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
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: How to compile map?

Post 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?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: How to compile map?

Post 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.
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: How to compile map?

Post 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)
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: How to compile map?

Post 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?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: How to compile map?

Post 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
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: How to compile map?

Post 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?
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: How to compile map?

Post 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.
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: How to compile map?

Post 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
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: How to compile map?

Post by Beherith »

Any luck? If you need live help we can schedule some time in the lobby
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: How to compile map?

Post 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.
User avatar
Beherith
Posts: 5145
Joined: 26 Oct 2007, 16:21

Re: How to compile map?

Post 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
User avatar
MasterBel2
Posts: 347
Joined: 11 Apr 2016, 12:03

Re: How to compile map?

Post 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.
Post Reply

Return to “Map Creation”