AW: How do you maintain image source reference on multiple platforms?
Tiemo Hollmann TB
toolbook at kestner.de
Tue Nov 1 13:06:24 EDT 2016
As far as I see it, you can't set the filename of an image in the property inspector to a specialfolderpath(). Only by script, but since I don't have all of my tons of images linked to an external source, this would make some effort to assign the specialfolderpath() to only the wanted images, even if I would maintain a custom property.
Von: use-livecode [mailto:use-livecode-bounces at lists.runrev.com] Im Auftrag von Devin Asay
Gesendet: Dienstag, 1. November 2016 17:21
An: How to use LiveCode <use-livecode at lists.runrev.com>
Betreff: Re: How do you maintain image source reference on multiple platforms?
> On Nov 1, 2016, at 9:28 AM, Tore Nilsen <tore.nilsen at me.com> wrote:
> You should probably use the specialFolderPath(“resources”) to set the relative path to your images. This should work on all systems.
+1 In the development environment this function returns the path to the folder where your stack resides. In a standalone it should be the folder where all files copied in the Standalone Builder reside. On mobile platforms it is the same as specialFolderPath(“engine”), the place where the standalone bundle resides, and the place where resources copied at build time reside.
>> 1. nov. 2016 kl. 15.11 skrev Tiemo Hollmann TB <toolbook at kestner.de>:
>> after I got the trick on how to handle multiple image sources for
>> different screen resolutions, I began changing all images in my
>> programs from imported images to external references. I created on my
>> development platform windows a "resource" folder under my development
>> folder, referenced my images to that folder, added all image files to the standalone setting "copy files"
>> and set the destination folder for the copy files in the standalone
>> setting also to a folder "resources". So far, that works fine now.
>> On windows I only create the windows standalone. For the final tests,
>> adaptions and creating the standalone for Mac OS, I copy the source
>> stack to my Mac. Here comes my issue. All of my images have a windows
>> path as source reference, like "C:/myPath/recsources/myImage.png",
>> which obviously doesn't work on Mac. I tried to set the image source
>> path to a relative path like "/resources/myImage.png", hoping that
>> would catch the image on both platforms, but obviously relative paths are not working as image source.
>> This would be a clean solution for this issue.
>> Since the transport of the source stacks is not a one time thing, but
>> can be made quite often in the last steps of the project (to always
>> keep the master source on my main dev platform windows), it actually
>> can't be it to change manually all image paths each time after moving
>> the stack from one platform to the other. Do I oversee anything here,
>> or is the only solution to write a script, which runs thru all
>> objects and converts the image paths each time I transfer my stacks?
>> If yes, has anybody such a small tool? I fear, I am the only one, who
>> is developing on two platforms, otherwise this must have come up earlier.
>> How do you handle this? Any recommendations welcome
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
Office of Digital Humanities
Brigham Young University
use-livecode mailing list
use-livecode at lists.runrev.com
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
More information about the Use-livecode