News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Paulo Garcia

[CPCTelera] Error building some examples on OSX (cpct_img2tileset)

Started by Paulo Garcia, 00:39, 06 June 16

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Paulo Garcia


Hi


I am playing with cpctelera and I notice that there are some examples that won't build on OSX (well, I haven't tried on another platform).


Specifically the errors seems to happen when cpct_img2tileset is called:



[flipSprites] Converting src/spirit.png into C-arrays...
cpct_img2tileset -nt -oph -m "0" -bn "g" -tw "46" -th "54" -pf {0 1 4 12 13 16 25 26}  src/spirit.png;
/Users/pgarcia/_private/dev/amstrad/cpctelera/cpctelera/tools/scripts/cpct_img2tileset: line 243: -1: substring expression < 0
[ ERROR ]: A <filename> parameter is required.

Any idea what that could be?


BTW, I am using CPCtelera cloned/pulled from github and it is up to date.


Thanks


Paulo

Arnaud

I just rebuild the FlipSprites example without any problems on Windows.

Is always cpct_img2tileset that make errors in other examples ?

Paulo Garcia

Hi Arnaud


yes, it is always the same error running the cpct_img2tiletest script. All the other examples worked.


I checked the bash script but I couldn't figure out what is wrong.


Thanks


Paulo

ronaldo

Hi @Paulo Garcia ,

   I thought that this error was solved, because I haven't seen it latest times we tested on OSX. It seems to happen on concrete versions of bash. I'll have a look at it again to see if I can guarantee that it does not happen again.   

   There is an easy workaround you can use while I look for a long-term solution. The problem happens because of "{" and "}" not being separated with spaces from the numbers. Therefore, what you have to do is edit cfg/image_conversion.mk and change this line
{0 1 4 12 13 16 25 26}
into this other one
{ 0 1 4 12 13 16 25 26 }
That will solve the issue :).

Paulo Garcia

@ronaldo ,


thanks man! that fixes the problem! All working now.


Cheers




Powered by SMFPacks Menu Editor Mod