CPCWiki forum

General Category => Programming => Topic started by: Paulo Garcia on 00:39, 06 June 16

Title: [CPCTelera] Error building some examples on OSX (cpct_img2tileset)
Post by: Paulo Garcia on 00:39, 06 June 16

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
Title: Re: [CPCTelera] Error building some examples on OSX (cpct_img2tileset)
Post by: Arnaud on 12:31, 06 June 16
I just rebuild the FlipSprites example without any problems on Windows.

Is always cpct_img2tileset that make errors in other examples ?
Title: Re: [CPCTelera] Error building some examples on OSX (cpct_img2tileset)
Post by: Paulo Garcia on 15:01, 06 June 16
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
Title: Re: [CPCTelera] Error building some examples on OSX (cpct_img2tileset)
Post by: ronaldo on 18:02, 06 June 16
Hi @Paulo Garcia (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1440) ,

   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 :).
Title: Re: [CPCTelera] Error building some examples on OSX (cpct_img2tileset)
Post by: Paulo Garcia on 02:43, 08 June 16
@ronaldo (http://www.cpcwiki.eu/forum/index.php?action=profile;u=1227) ,


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


Cheers



Powered by SMFPacks Menu Editor Mod