Hot Door CORE Forum
errors loading icons (PNG) - Printable Version

+- Hot Door CORE Forum (http://hotdoorcore.com/forum)
+-- Forum: All forums (http://hotdoorcore.com/forum/forumdisplay.php?fid=1)
+--- Forum: Getting started (http://hotdoorcore.com/forum/forumdisplay.php?fid=6)
+--- Thread: errors loading icons (PNG) (/showthread.php?tid=66)



errors loading icons (PNG) - Rick Johnson - 04-03-2016

When I build the sample gear tool project, it builds and runs fine, but Xcode gives me errors for each of the resources it reads, with no meaningful clue as to what the error is (just "read ____"). I'm compiling for only AI CS6 on a MacBook Pro running OS X 10.6, SDK 10.6, GCC 4.2, with Xcode 3.2.6.

Can someone explain what may be going wrong? I'm starting a project that adds tool icons and cursors and want to implement it correctly.

Also, what's the role of the files ToolSample.r, ToolSample.rc, and IDToFile.txt? Thanks!


RE: errors loading icons (PNG) - Rick Johnson - 04-07-2016

(04-03-2016, 05:22 PM)Rick Johnson Wrote: Also, what's the role of the files ToolSample.r, ToolSample.rc, and IDToFile.txt? Thanks!

I think I've found my answers on the files:

// Resource declarations go here [in the .r file] for Illustrator 18 and below, otherwise they go in IDToFile.txt

And the .rc file is for Windows.

Still can't load my PNGs, though...


RE: errors loading icons (PNG) - garrett - 04-21-2016

Yes, the *.r file is for Mac, and the *.rc file is for Windows. Follow the examples in the sample projects to see the syntax for defining a PNGI resource.

In Illustrator 19, use of IDToFile.txt is required by Adobe, and is mostly separate from the *.r and *.rc files (though they are still required for other purposes, but PNGI resources declared therein will be ignored by Illustrator). Again, see the sample projects.

As to your error code, the underlying Rez tool gives pretty ambiguous feedback, so I can't tell you exactly what's happening. I would guess that you have not told the Xcode project where to find your resource files (this is NOT the same as simply dragging them into the project). You have to set the "Rez Search Paths" build setting to include the directory where you're storing the files.

If you want to see more information about what Rez is doing under the hood, you can expand the log for the Rez build step in the build log UI in Xcode.