NME : Where are my assets ? ( or : how can I easily get the path to my assets directory...)

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

NME : Where are my assets ? ( or : how can I easily get the path to my assets directory...)

François Nicaise
Hi All !
I've been a bit unfortunate when I tried to load some assets from a custom asset folder.

My nme folder looks like :
myApp/
    assets/
    my_special_assets/
    src/
    bin/cpp/OS/...

Since I want to use my assets located in my_special_assets, I have added specialAssets to my .nmml file.
Now, my problem is to get a valid path to list all my assets in this folder.
On Linux, it is easy, the path does not change and is relative to my App (I assume on windows it is the same).
On Mac... Things get a little bit different. Not working on a mac myself, I find it difficult to get the good path so I can do a cpp.Sys.readDirectory( my_special_assets_path ).

So after having looked at the code, I found the path I must use in installer/Cpp.hx :

   function getCppDest()
   {
      if (isMac())
         return mBuildDir + "/cpp/" + mOS + "/" + mDefines.get("APP_FILE") + ".app";

      return mBuildDir + "/cpp/" + mOS + "/" + mDefines.get("APP_FILE");
   }

So my question is : is it possible to get this information directly ? If so where  ?

Thanks in advance :)
++
François




--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: NME : Where are my assets ? ( or : how can I easily get the path to my assets directory...)

François Nicaise
I meant a method to get directly the absolute path for any target ( Mac being path/App.app if i understand ), as well as a method to retrieve the absolute or relative path to the assets folder (Mac being Resources if i understand ? )

Le 07/10/2011 10:22, François Nicaise a écrit :
Hi All !
I've been a bit unfortunate when I tried to load some assets from a custom asset folder.

My nme folder looks like :
myApp/
    assets/
    my_special_assets/
    src/
    bin/cpp/OS/...

Since I want to use my assets located in my_special_assets, I have added specialAssets to my .nmml file.
Now, my problem is to get a valid path to list all my assets in this folder.
On Linux, it is easy, the path does not change and is relative to my App (I assume on windows it is the same).
On Mac... Things get a little bit different. Not working on a mac myself, I find it difficult to get the good path so I can do a cpp.Sys.readDirectory( my_special_assets_path ).

So after having looked at the code, I found the path I must use in installer/Cpp.hx :

   function getCppDest()
   {
      if (isMac())
         return mBuildDir + "/cpp/" + mOS + "/" + mDefines.get("APP_FILE") + ".app";

      return mBuildDir + "/cpp/" + mOS + "/" + mDefines.get("APP_FILE");
   }

So my question is : is it possible to get this information directly ? If so where  ?

Thanks in advance :)
++
François







--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: NME : Where are my assets ? ( or : how can I easily get the path to my assets directory...)

François Nicaise
My last question is :
why is the mac target treated differently ? Is it something related to the Iphone ? Xcode ?

Also, as all paths in the mac target are prefixed with underscore and any assets subfolders are "stringified".
If I want to loop through files under any subdirectory, it will not be possible on the mac target.

So I can hack this behaviour and do the glue myself, however it seems a little bit weird .

So to summarize, what would be great would be :
- a getPath
- a getAssetsPath
- a way to handle subdirectories contents on any target.

These to get some extra 'dynamic' behaviour.
A good example would be when you have a locales subfolder in assets with localization files and want to loop dynamically  through the folder without loading everything by hand.

Of course if any of these features exists, please tell me :)

Thanks again
François

Le 07/10/2011 10:32, François Nicaise a écrit :
I meant a method to get directly the absolute path for any target ( Mac being path/App.app if i understand ), as well as a method to retrieve the absolute or relative path to the assets folder (Mac being Resources if i understand ? )

Le 07/10/2011 10:22, François Nicaise a écrit :
Hi All !
I've been a bit unfortunate when I tried to load some assets from a custom asset folder.

My nme folder looks like :
myApp/
    assets/
    my_special_assets/
    src/
    bin/cpp/OS/...

Since I want to use my assets located in my_special_assets, I have added specialAssets to my .nmml file.
Now, my problem is to get a valid path to list all my assets in this folder.
On Linux, it is easy, the path does not change and is relative to my App (I assume on windows it is the same).
On Mac... Things get a little bit different. Not working on a mac myself, I find it difficult to get the good path so I can do a cpp.Sys.readDirectory( my_special_assets_path ).

So after having looked at the code, I found the path I must use in installer/Cpp.hx :

   function getCppDest()
   {
      if (isMac())
         return mBuildDir + "/cpp/" + mOS + "/" + mDefines.get("APP_FILE") + ".app";

      return mBuildDir + "/cpp/" + mOS + "/" + mDefines.get("APP_FILE");
   }

So my question is : is it possible to get this information directly ? If so where  ?

Thanks in advance :)
++
François










--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: NME : Where are my assets ? ( or : how can I easily get the path to my assets directory...)

Cauê W.
Hello!
I think the way to remain cross-platform is not to access the assets folder yourself. If you want to get a resource at runtime, you can always access it by reflection:

ApplicationMain.getAsset(Reflect.field(Assets, "my_runtime_name"));

Cheers!

2011/10/7 François Nicaise <[hidden email]>
My last question is :
why is the mac target treated differently ? Is it something related to the Iphone ? Xcode ?

Also, as all paths in the mac target are prefixed with underscore and any assets subfolders are "stringified".
If I want to loop through files under any subdirectory, it will not be possible on the mac target.

So I can hack this behaviour and do the glue myself, however it seems a little bit weird .

So to summarize, what would be great would be :
- a getPath
- a getAssetsPath
- a way to handle subdirectories contents on any target.

These to get some extra 'dynamic' behaviour.
A good example would be when you have a locales subfolder in assets with localization files and want to loop dynamically  through the folder without loading everything by hand.

Of course if any of these features exists, please tell me :)

Thanks again
François

Le 07/10/2011 10:32, François Nicaise a écrit :
I meant a method to get directly the absolute path for any target ( Mac being path/App.app if i understand ), as well as a method to retrieve the absolute or relative path to the assets folder (Mac being Resources if i understand ? )

Le 07/10/2011 10:22, François Nicaise a écrit :
Hi All !
I've been a bit unfortunate when I tried to load some assets from a custom asset folder.

My nme folder looks like :
myApp/
    assets/
    my_special_assets/
    src/
    bin/cpp/OS/...

Since I want to use my assets located in my_special_assets, I have added specialAssets to my .nmml file.
Now, my problem is to get a valid path to list all my assets in this folder.
On Linux, it is easy, the path does not change and is relative to my App (I assume on windows it is the same).
On Mac... Things get a little bit different. Not working on a mac myself, I find it difficult to get the good path so I can do a cpp.Sys.readDirectory( my_special_assets_path ).

So after having looked at the code, I found the path I must use in installer/Cpp.hx :

   function getCppDest()
   {
      if (isMac())
         return mBuildDir + "/cpp/" + mOS + "/" + mDefines.get("APP_FILE") + ".app";

      return mBuildDir + "/cpp/" + mOS + "/" + mDefines.get("APP_FILE");
   }

So my question is : is it possible to get this information directly ? If so where  ?

Thanks in advance :)
++
François










--
haXe - an open source web programming language
http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: NME : Where are my assets ? ( or : how can I easily get the path to my assets directory...)

Gamehaxe
Hi,
Yes, this is the general idea.  There are various restrictions about
where assets are put on different platforms, so the idea is
to not care about where they actually go. ie, treat them more as
a database than a file-system.

I think the best solution here might be to add an "Assets.directory"
field for additional user-defined grouping.

Hugh

> Hello!
> I think the way to remain cross-platform is not to access the assets  
> folder
> yourself. If you want to get a resource at runtime, you can always  
> access it
> by reflection:
>
> ApplicationMain.getAsset(Reflect.field(Assets, "my_runtime_name"));
>
> Cheers!
>
> 2011/10/7 François Nicaise <[hidden email]>
>
>>  My last question is :
>> why is the mac target treated differently ? Is it something related to  
>> the
>> Iphone ? Xcode ?
>>
>> Also, as all paths in the mac target are prefixed with underscore and  
>> any
>> assets subfolders are "stringified".
>> If I want to loop through files under any subdirectory, it will not be
>> possible on the mac target.
>>
>> So I can hack this behaviour and do the glue myself, however it seems a
>> little bit weird .
>>
>> So to summarize, what would be great would be :
>> - a getPath
>> - a getAssetsPath
>> - a way to handle subdirectories contents on any target.
>>
>> These to get some extra 'dynamic' behaviour.
>> A good example would be when you have a locales subfolder in assets with
>> localization files and want to loop dynamically  through the folder  
>> without
>> loading everything by hand.
>>
>> Of course if any of these features exists, please tell me :)
>>
>> Thanks again
>> François
>>
>> Le 07/10/2011 10:32, François Nicaise a écrit :
>>
>> I meant a method to get directly the absolute path for any target ( Mac
>> being path/*App.app* if i understand ), as well as a method to retrieve
>> the absolute or relative path to the assets folder (Mac being  
>> *Resources *if
>> i understand ? )
>>
>> Le 07/10/2011 10:22, François Nicaise a écrit :
>>
>> Hi All !
>> I've been a bit unfortunate when I tried to load some assets from a  
>> custom
>> asset folder.
>>
>> My nme folder looks like :
>> myApp/
>>     assets/
>>     my_special_assets/
>>     src/
>>     bin/cpp/OS/...
>>
>> Since I want to use my assets located in my_special_assets, I have added
>> specialAssets to my .nmml file.
>> Now, my problem is to get a valid path to list all my assets in this
>> folder.
>> On Linux, it is easy, the path does not change and is relative to my  
>> App (I
>> assume on windows it is the same).
>> On Mac... Things get a little bit different. Not working on a mac  
>> myself, I
>> find it difficult to get the good path so I can do a  
>> cpp.Sys.readDirectory(
>> my_special_assets_path ).
>>
>> So after having looked at the code, I found the path I must use in
>> installer/Cpp.hx :
>>
>>     function getCppDest()   {      if (isMac())         return  
>> mBuildDir + "/cpp/" + mOS + "/" + mDefines.get("APP_FILE") +  
>> ".app";      return mBuildDir + "/cpp/" + mOS + "/" +  
>> mDefines.get("APP_FILE");   }
>>
>> So my question is : is it possible to get this information directly ?  
>> If so where  ?
>>
>> Thanks in advance :)
>> ++
>> François
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: NME : Where are my assets ? ( or : how can I easily get the path to my assets directory...)

singmajesty
In reply to this post by Cauê W.
Every file is given an ID when it is parsed by the install tool. This is  
what you use when you want to reference a file.

If you are listing files individually in your NMML project file, you can  
assign your own "id" attribute to control this value. Otherwise, the ID  
will equal the target path to your asset at the time of importing,  
according to your NMML.

If you have an asset node like this:


<assets path="assets/images" include="*" />


You can reference your files as if they were located at "assets/images".  
If you want to use a different output path, you can use the "rename"  
option:


<assets path="../../MyGame/Resources/images" rename="assets/images"  
include="*" />



Once you are ready to reference a file in your project, you can use  
ApplicationMain.getAsset in NME 3, or in SVN a strongly typed API was  
added (ApplicationMain.getAsset is still available).


Loosely typed:

var myImage:BitmapData = ApplicationMain.getAsset  
("assets/images/MyImage.jpg");



Strongly typed:

var myImage = Assets.getBitmapData ("assets/images/MyImage.jpg");



Because the paths are string-based, similar to using a standard Loader and  
URLRequest, it provides a lot of flexibility for accessing assets from  
different "directories" (even if the target platform, like Android, does  
not support true directories)



var header = Assets.getBitmapData ("assets/images/Header@" +  
Utils.screenDensity + ".png");





On Fri, 07 Oct 2011 05:19:32 -0700, Cauê Waneck <[hidden email]> wrote:

> Hello!
> I think the way to remain cross-platform is not to access the assets  
> folder
> yourself. If you want to get a resource at runtime, you can always  
> access it
> by reflection:
>
> ApplicationMain.getAsset(Reflect.field(Assets, "my_runtime_name"));
>
> Cheers!
>
> 2011/10/7 François Nicaise <[hidden email]>
>
>>  My last question is :
>> why is the mac target treated differently ? Is it something related to  
>> the
>> Iphone ? Xcode ?
>>
>> Also, as all paths in the mac target are prefixed with underscore and  
>> any
>> assets subfolders are "stringified".
>> If I want to loop through files under any subdirectory, it will not be
>> possible on the mac target.
>>
>> So I can hack this behaviour and do the glue myself, however it seems a
>> little bit weird .
>>
>> So to summarize, what would be great would be :
>> - a getPath
>> - a getAssetsPath
>> - a way to handle subdirectories contents on any target.
>>
>> These to get some extra 'dynamic' behaviour.
>> A good example would be when you have a locales subfolder in assets with
>> localization files and want to loop dynamically  through the folder  
>> without
>> loading everything by hand.
>>
>> Of course if any of these features exists, please tell me :)
>>
>> Thanks again
>> François
>>
>> Le 07/10/2011 10:32, François Nicaise a écrit :
>>
>> I meant a method to get directly the absolute path for any target ( Mac
>> being path/*App.app* if i understand ), as well as a method to retrieve
>> the absolute or relative path to the assets folder (Mac being  
>> *Resources *if
>> i understand ? )
>>
>> Le 07/10/2011 10:22, François Nicaise a écrit :
>>
>> Hi All !
>> I've been a bit unfortunate when I tried to load some assets from a  
>> custom
>> asset folder.
>>
>> My nme folder looks like :
>> myApp/
>>     assets/
>>     my_special_assets/
>>     src/
>>     bin/cpp/OS/...
>>
>> Since I want to use my assets located in my_special_assets, I have added
>> specialAssets to my .nmml file.
>> Now, my problem is to get a valid path to list all my assets in this
>> folder.
>> On Linux, it is easy, the path does not change and is relative to my  
>> App (I
>> assume on windows it is the same).
>> On Mac... Things get a little bit different. Not working on a mac  
>> myself, I
>> find it difficult to get the good path so I can do a  
>> cpp.Sys.readDirectory(
>> my_special_assets_path ).
>>
>> So after having looked at the code, I found the path I must use in
>> installer/Cpp.hx :
>>
>>     function getCppDest()   {      if (isMac())         return  
>> mBuildDir + "/cpp/" + mOS + "/" + mDefines.get("APP_FILE") +  
>> ".app";      return mBuildDir + "/cpp/" + mOS + "/" +  
>> mDefines.get("APP_FILE");   }
>>
>> So my question is : is it possible to get this information directly ?  
>> If so where  ?
>>
>> Thanks in advance :)
>> ++
>> François
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

NME - move support to forum?

Gamehaxe
In reply to this post by Gamehaxe
Hi,
Now the forum on http://www.haxenme.org/forums/ is up and running,
and gaining some momentum, it might be time to shift official support
over to there.  So we can direct future haxelist NME requests to the forum
and answer them there.
Joshua, can we subscribe to new topics?
Also, "View new posts" would be useful.

Hugh

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: NME : Where are my assets ? ( or : how can I easily get the path to my assets directory...)

François Nicaise
In reply to this post by singmajesty
Hi thanks to all for your answer !

Joshua, I think I use NME the way you describe but sometimes I need to
handle assets I don't know yet about.
Of course, eventually I will come to know all the assets. But a little
bit of dynamism is always convenient in a pre-prod mode.

So what I would need would be an Assets.directory like Hugh proposed so
I can browse dynamically the assets folder's contents :)

++
François

Le 07/10/2011 17:20, Joshua Granick a écrit :

> Every file is given an ID when it is parsed by the install tool. This
> is what you use when you want to reference a file.
>
> If you are listing files individually in your NMML project file, you
> can assign your own "id" attribute to control this value. Otherwise,
> the ID will equal the target path to your asset at the time of
> importing, according to your NMML.
>
> If you have an asset node like this:
>
>
> <assets path="assets/images" include="*" />
>
>
> You can reference your files as if they were located at
> "assets/images". If you want to use a different output path, you can
> use the "rename" option:
>
>
> <assets path="../../MyGame/Resources/images" rename="assets/images"
> include="*" />
>
>
>
> Once you are ready to reference a file in your project, you can use
> ApplicationMain.getAsset in NME 3, or in SVN a strongly typed API was
> added (ApplicationMain.getAsset is still available).
>
>
> Loosely typed:
>
> var myImage:BitmapData = ApplicationMain.getAsset
> ("assets/images/MyImage.jpg");
>
>
>
> Strongly typed:
>
> var myImage = Assets.getBitmapData ("assets/images/MyImage.jpg");
>
>
>
> Because the paths are string-based, similar to using a standard Loader
> and URLRequest, it provides a lot of flexibility for accessing assets
> from different "directories" (even if the target platform, like
> Android, does not support true directories)
>
>
>
> var header = Assets.getBitmapData ("assets/images/Header@" +
> Utils.screenDensity + ".png");
>
>
>
>
>
> On Fri, 07 Oct 2011 05:19:32 -0700, Cauê Waneck <[hidden email]> wrote:
>
>> Hello!
>> I think the way to remain cross-platform is not to access the assets
>> folder
>> yourself. If you want to get a resource at runtime, you can always
>> access it
>> by reflection:
>>
>> ApplicationMain.getAsset(Reflect.field(Assets, "my_runtime_name"));
>>
>> Cheers!
>>
>> 2011/10/7 François Nicaise <[hidden email]>
>>
>>>  My last question is :
>>> why is the mac target treated differently ? Is it something related
>>> to the
>>> Iphone ? Xcode ?
>>>
>>> Also, as all paths in the mac target are prefixed with underscore
>>> and any
>>> assets subfolders are "stringified".
>>> If I want to loop through files under any subdirectory, it will not be
>>> possible on the mac target.
>>>
>>> So I can hack this behaviour and do the glue myself, however it seems a
>>> little bit weird .
>>>
>>> So to summarize, what would be great would be :
>>> - a getPath
>>> - a getAssetsPath
>>> - a way to handle subdirectories contents on any target.
>>>
>>> These to get some extra 'dynamic' behaviour.
>>> A good example would be when you have a locales subfolder in assets
>>> with
>>> localization files and want to loop dynamically  through the folder
>>> without
>>> loading everything by hand.
>>>
>>> Of course if any of these features exists, please tell me :)
>>>
>>> Thanks again
>>> François
>>>
>>> Le 07/10/2011 10:32, François Nicaise a écrit :
>>>
>>> I meant a method to get directly the absolute path for any target ( Mac
>>> being path/*App.app* if i understand ), as well as a method to retrieve
>>> the absolute or relative path to the assets folder (Mac being
>>> *Resources *if
>>> i understand ? )
>>>
>>> Le 07/10/2011 10:22, François Nicaise a écrit :
>>>
>>> Hi All !
>>> I've been a bit unfortunate when I tried to load some assets from a
>>> custom
>>> asset folder.
>>>
>>> My nme folder looks like :
>>> myApp/
>>>     assets/
>>>     my_special_assets/
>>>     src/
>>>     bin/cpp/OS/...
>>>
>>> Since I want to use my assets located in my_special_assets, I have
>>> added
>>> specialAssets to my .nmml file.
>>> Now, my problem is to get a valid path to list all my assets in this
>>> folder.
>>> On Linux, it is easy, the path does not change and is relative to my
>>> App (I
>>> assume on windows it is the same).
>>> On Mac... Things get a little bit different. Not working on a mac
>>> myself, I
>>> find it difficult to get the good path so I can do a
>>> cpp.Sys.readDirectory(
>>> my_special_assets_path ).
>>>
>>> So after having looked at the code, I found the path I must use in
>>> installer/Cpp.hx :
>>>
>>>     function getCppDest()   {      if (isMac())         return
>>> mBuildDir + "/cpp/" + mOS + "/" + mDefines.get("APP_FILE") +
>>> ".app";      return mBuildDir + "/cpp/" + mOS + "/" +
>>> mDefines.get("APP_FILE");   }
>>>
>>> So my question is : is it possible to get this information directly
>>> ? If so where  ?
>>>
>>> Thanks in advance :)
>>> ++
>>> François
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> --
>>> haXe - an open source web programming language
>>> http://haxe.org
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: NME : Where are my assets ? ( or : how can I easily get the path to my assets directory...)

François Nicaise
I would like to mention (if it has not yet been reported ) that removing
a file from the assets folder does not remove it from the target assets
folder.
i.e. on Linux, removing a file from the assets folder does not remove it
from bin/cpp/linux/bin/assets.

François

Le 08/10/2011 07:20, François Nicaise a écrit :

> Hi thanks to all for your answer !
>
> Joshua, I think I use NME the way you describe but sometimes I need to
> handle assets I don't know yet about.
> Of course, eventually I will come to know all the assets. But a little
> bit of dynamism is always convenient in a pre-prod mode.
>
> So what I would need would be an Assets.directory like Hugh proposed
> so I can browse dynamically the assets folder's contents :)
>
> ++
> François
>
> Le 07/10/2011 17:20, Joshua Granick a écrit :
>> Every file is given an ID when it is parsed by the install tool. This
>> is what you use when you want to reference a file.
>>
>> If you are listing files individually in your NMML project file, you
>> can assign your own "id" attribute to control this value. Otherwise,
>> the ID will equal the target path to your asset at the time of
>> importing, according to your NMML.
>>
>> If you have an asset node like this:
>>
>>
>> <assets path="assets/images" include="*" />
>>
>>
>> You can reference your files as if they were located at
>> "assets/images". If you want to use a different output path, you can
>> use the "rename" option:
>>
>>
>> <assets path="../../MyGame/Resources/images" rename="assets/images"
>> include="*" />
>>
>>
>>
>> Once you are ready to reference a file in your project, you can use
>> ApplicationMain.getAsset in NME 3, or in SVN a strongly typed API was
>> added (ApplicationMain.getAsset is still available).
>>
>>
>> Loosely typed:
>>
>> var myImage:BitmapData = ApplicationMain.getAsset
>> ("assets/images/MyImage.jpg");
>>
>>
>>
>> Strongly typed:
>>
>> var myImage = Assets.getBitmapData ("assets/images/MyImage.jpg");
>>
>>
>>
>> Because the paths are string-based, similar to using a standard
>> Loader and URLRequest, it provides a lot of flexibility for accessing
>> assets from different "directories" (even if the target platform,
>> like Android, does not support true directories)
>>
>>
>>
>> var header = Assets.getBitmapData ("assets/images/Header@" +
>> Utils.screenDensity + ".png");
>>
>>
>>
>>
>>
>> On Fri, 07 Oct 2011 05:19:32 -0700, Cauê Waneck <[hidden email]>
>> wrote:
>>
>>> Hello!
>>> I think the way to remain cross-platform is not to access the assets
>>> folder
>>> yourself. If you want to get a resource at runtime, you can always
>>> access it
>>> by reflection:
>>>
>>> ApplicationMain.getAsset(Reflect.field(Assets, "my_runtime_name"));
>>>
>>> Cheers!
>>>
>>> 2011/10/7 François Nicaise <[hidden email]>
>>>
>>>>  My last question is :
>>>> why is the mac target treated differently ? Is it something related
>>>> to the
>>>> Iphone ? Xcode ?
>>>>
>>>> Also, as all paths in the mac target are prefixed with underscore
>>>> and any
>>>> assets subfolders are "stringified".
>>>> If I want to loop through files under any subdirectory, it will not be
>>>> possible on the mac target.
>>>>
>>>> So I can hack this behaviour and do the glue myself, however it
>>>> seems a
>>>> little bit weird .
>>>>
>>>> So to summarize, what would be great would be :
>>>> - a getPath
>>>> - a getAssetsPath
>>>> - a way to handle subdirectories contents on any target.
>>>>
>>>> These to get some extra 'dynamic' behaviour.
>>>> A good example would be when you have a locales subfolder in assets
>>>> with
>>>> localization files and want to loop dynamically  through the folder
>>>> without
>>>> loading everything by hand.
>>>>
>>>> Of course if any of these features exists, please tell me :)
>>>>
>>>> Thanks again
>>>> François
>>>>
>>>> Le 07/10/2011 10:32, François Nicaise a écrit :
>>>>
>>>> I meant a method to get directly the absolute path for any target (
>>>> Mac
>>>> being path/*App.app* if i understand ), as well as a method to
>>>> retrieve
>>>> the absolute or relative path to the assets folder (Mac being
>>>> *Resources *if
>>>> i understand ? )
>>>>
>>>> Le 07/10/2011 10:22, François Nicaise a écrit :
>>>>
>>>> Hi All !
>>>> I've been a bit unfortunate when I tried to load some assets from a
>>>> custom
>>>> asset folder.
>>>>
>>>> My nme folder looks like :
>>>> myApp/
>>>>     assets/
>>>>     my_special_assets/
>>>>     src/
>>>>     bin/cpp/OS/...
>>>>
>>>> Since I want to use my assets located in my_special_assets, I have
>>>> added
>>>> specialAssets to my .nmml file.
>>>> Now, my problem is to get a valid path to list all my assets in this
>>>> folder.
>>>> On Linux, it is easy, the path does not change and is relative to
>>>> my App (I
>>>> assume on windows it is the same).
>>>> On Mac... Things get a little bit different. Not working on a mac
>>>> myself, I
>>>> find it difficult to get the good path so I can do a
>>>> cpp.Sys.readDirectory(
>>>> my_special_assets_path ).
>>>>
>>>> So after having looked at the code, I found the path I must use in
>>>> installer/Cpp.hx :
>>>>
>>>>     function getCppDest()   {      if (isMac())         return
>>>> mBuildDir + "/cpp/" + mOS + "/" + mDefines.get("APP_FILE") +
>>>> ".app";      return mBuildDir + "/cpp/" + mOS + "/" +
>>>> mDefines.get("APP_FILE");   }
>>>>
>>>> So my question is : is it possible to get this information directly
>>>> ? If so where  ?
>>>>
>>>> Thanks in advance :)
>>>> ++
>>>> François
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> haXe - an open source web programming language
>>>> http://haxe.org
>>
>
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: NME : Where are my assets ? ( or : how can I easily get the path to my assets directory...)

François Nicaise
I'd like to add, I could stick with an rm -rf bin/cpp/linux/bin/assets
before I build the project.
But maybe there's some .nmml config instruction to add so it recreates
the target assets folder each time ?

Le 08/10/2011 09:38, François Nicaise a écrit :

> I would like to mention (if it has not yet been reported ) that
> removing a file from the assets folder does not remove it from the
> target assets folder.
> i.e. on Linux, removing a file from the assets folder does not remove
> it from bin/cpp/linux/bin/assets.
>
> François
>
> Le 08/10/2011 07:20, François Nicaise a écrit :
>> Hi thanks to all for your answer !
>>
>> Joshua, I think I use NME the way you describe but sometimes I need
>> to handle assets I don't know yet about.
>> Of course, eventually I will come to know all the assets. But a
>> little bit of dynamism is always convenient in a pre-prod mode.
>>
>> So what I would need would be an Assets.directory like Hugh proposed
>> so I can browse dynamically the assets folder's contents :)
>>
>> ++
>> François
>>
>> Le 07/10/2011 17:20, Joshua Granick a écrit :
>>> Every file is given an ID when it is parsed by the install tool.
>>> This is what you use when you want to reference a file.
>>>
>>> If you are listing files individually in your NMML project file, you
>>> can assign your own "id" attribute to control this value. Otherwise,
>>> the ID will equal the target path to your asset at the time of
>>> importing, according to your NMML.
>>>
>>> If you have an asset node like this:
>>>
>>>
>>> <assets path="assets/images" include="*" />
>>>
>>>
>>> You can reference your files as if they were located at
>>> "assets/images". If you want to use a different output path, you can
>>> use the "rename" option:
>>>
>>>
>>> <assets path="../../MyGame/Resources/images" rename="assets/images"
>>> include="*" />
>>>
>>>
>>>
>>> Once you are ready to reference a file in your project, you can use
>>> ApplicationMain.getAsset in NME 3, or in SVN a strongly typed API
>>> was added (ApplicationMain.getAsset is still available).
>>>
>>>
>>> Loosely typed:
>>>
>>> var myImage:BitmapData = ApplicationMain.getAsset
>>> ("assets/images/MyImage.jpg");
>>>
>>>
>>>
>>> Strongly typed:
>>>
>>> var myImage = Assets.getBitmapData ("assets/images/MyImage.jpg");
>>>
>>>
>>>
>>> Because the paths are string-based, similar to using a standard
>>> Loader and URLRequest, it provides a lot of flexibility for
>>> accessing assets from different "directories" (even if the target
>>> platform, like Android, does not support true directories)
>>>
>>>
>>>
>>> var header = Assets.getBitmapData ("assets/images/Header@" +
>>> Utils.screenDensity + ".png");
>>>
>>>
>>>
>>>
>>>
>>> On Fri, 07 Oct 2011 05:19:32 -0700, Cauê Waneck <[hidden email]>
>>> wrote:
>>>
>>>> Hello!
>>>> I think the way to remain cross-platform is not to access the
>>>> assets folder
>>>> yourself. If you want to get a resource at runtime, you can always
>>>> access it
>>>> by reflection:
>>>>
>>>> ApplicationMain.getAsset(Reflect.field(Assets, "my_runtime_name"));
>>>>
>>>> Cheers!
>>>>
>>>> 2011/10/7 François Nicaise <[hidden email]>
>>>>
>>>>>  My last question is :
>>>>> why is the mac target treated differently ? Is it something
>>>>> related to the
>>>>> Iphone ? Xcode ?
>>>>>
>>>>> Also, as all paths in the mac target are prefixed with underscore
>>>>> and any
>>>>> assets subfolders are "stringified".
>>>>> If I want to loop through files under any subdirectory, it will
>>>>> not be
>>>>> possible on the mac target.
>>>>>
>>>>> So I can hack this behaviour and do the glue myself, however it
>>>>> seems a
>>>>> little bit weird .
>>>>>
>>>>> So to summarize, what would be great would be :
>>>>> - a getPath
>>>>> - a getAssetsPath
>>>>> - a way to handle subdirectories contents on any target.
>>>>>
>>>>> These to get some extra 'dynamic' behaviour.
>>>>> A good example would be when you have a locales subfolder in
>>>>> assets with
>>>>> localization files and want to loop dynamically  through the
>>>>> folder without
>>>>> loading everything by hand.
>>>>>
>>>>> Of course if any of these features exists, please tell me :)
>>>>>
>>>>> Thanks again
>>>>> François
>>>>>
>>>>> Le 07/10/2011 10:32, François Nicaise a écrit :
>>>>>
>>>>> I meant a method to get directly the absolute path for any target
>>>>> ( Mac
>>>>> being path/*App.app* if i understand ), as well as a method to
>>>>> retrieve
>>>>> the absolute or relative path to the assets folder (Mac being
>>>>> *Resources *if
>>>>> i understand ? )
>>>>>
>>>>> Le 07/10/2011 10:22, François Nicaise a écrit :
>>>>>
>>>>> Hi All !
>>>>> I've been a bit unfortunate when I tried to load some assets from
>>>>> a custom
>>>>> asset folder.
>>>>>
>>>>> My nme folder looks like :
>>>>> myApp/
>>>>>     assets/
>>>>>     my_special_assets/
>>>>>     src/
>>>>>     bin/cpp/OS/...
>>>>>
>>>>> Since I want to use my assets located in my_special_assets, I have
>>>>> added
>>>>> specialAssets to my .nmml file.
>>>>> Now, my problem is to get a valid path to list all my assets in this
>>>>> folder.
>>>>> On Linux, it is easy, the path does not change and is relative to
>>>>> my App (I
>>>>> assume on windows it is the same).
>>>>> On Mac... Things get a little bit different. Not working on a mac
>>>>> myself, I
>>>>> find it difficult to get the good path so I can do a
>>>>> cpp.Sys.readDirectory(
>>>>> my_special_assets_path ).
>>>>>
>>>>> So after having looked at the code, I found the path I must use in
>>>>> installer/Cpp.hx :
>>>>>
>>>>>     function getCppDest()   {      if (isMac())         return
>>>>> mBuildDir + "/cpp/" + mOS + "/" + mDefines.get("APP_FILE") +
>>>>> ".app";      return mBuildDir + "/cpp/" + mOS + "/" +
>>>>> mDefines.get("APP_FILE");   }
>>>>>
>>>>> So my question is : is it possible to get this information
>>>>> directly ? If so where  ?
>>>>>
>>>>> Thanks in advance :)
>>>>> ++
>>>>> François
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> haXe - an open source web programming language
>>>>> http://haxe.org
>>>
>>
>>
>
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: NME - move support to forum?

jlm@justinfront.net
In reply to this post by Gamehaxe
Hugh

Also, any haxe forum questions related to NME I am refering to the  
haxenme forum already.

Cheers

;j

On 8 Oct 2011, at 02:52, Gamehaxe wrote:

> Hi,
> Now the forum on http://www.haxenme.org/forums/ is up and running,
> and gaining some momentum, it might be time to shift official support
> over to there.  So we can direct future haxelist NME requests to the  
> forum
> and answer them there.
> Joshua, can we subscribe to new topics?
> Also, "View new posts" would be useful.
>
> Hugh
>
> --
> haXe - an open source web programming language
> http://haxe.org


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: NME - move support to forum?

singmajesty
In reply to this post by Gamehaxe
Hi,

There are a few ways we can follow the NME forums :)

If you visit one of the forum sections ("General Discussion", "Installing  
NME", etc) when you are logged in, there should be a "Monitor" link at the  
bottom of the page. This will send you email updates each time someone  
adds a new comment to that forum. Similarly, to each thread, there also is  
a "Monitor" link (which is enabled by default when you respond to a topic,  
I believe) that will allow you to receive email updates for that topic  
only.

There also are some RSS feeds, both at the highest level, and under each  
forum section.

At the high level, you will receive updates for every comment on the  
forum. At the second level, you will receive updates whenever a new topic  
is created, but will not receive updates for subsequent responses in your  
RSS feed.

This is not perfect, but I hope this provides a number of ways to access  
the forums without checking by hand. If there is any other kind of feed or  
notification people are interested in receiving from the forums, let me  
know and it may be possible to wire it up.

Thanks!



On Fri, 07 Oct 2011 18:52:05 -0700, Gamehaxe <[hidden email]> wrote:

> Hi,
> Now the forum on http://www.haxenme.org/forums/ is up and running,
> and gaining some momentum, it might be time to shift official support
> over to there.  So we can direct future haxelist NME requests to the  
> forum
> and answer them there.
> Joshua, can we subscribe to new topics?
> Also, "View new posts" would be useful.
>
> Hugh

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: NME : Where are my assets ? ( or : how can I easily get the path to my assets directory...)

singmajesty
In reply to this post by François Nicaise
Would you need all of the assets to be removed, or file names that are not  
linked anymore?

By default, the install tool only copies files which are newer, to cut  
down compile times.



On Sat, 08 Oct 2011 00:43:36 -0700, François Nicaise  
<[hidden email]> wrote:

> I'd like to add, I could stick with an rm -rf bin/cpp/linux/bin/assets  
> before I build the project.
> But maybe there's some .nmml config instruction to add so it recreates  
> the target assets folder each time ?
>
> Le 08/10/2011 09:38, François Nicaise a écrit :
>> I would like to mention (if it has not yet been reported ) that  
>> removing a file from the assets folder does not remove it from the  
>> target assets folder.
>> i.e. on Linux, removing a file from the assets folder does not remove  
>> it from bin/cpp/linux/bin/assets.
>>
>> François
>>
>> Le 08/10/2011 07:20, François Nicaise a écrit :
>>> Hi thanks to all for your answer !
>>>
>>> Joshua, I think I use NME the way you describe but sometimes I need to  
>>> handle assets I don't know yet about.
>>> Of course, eventually I will come to know all the assets. But a little  
>>> bit of dynamism is always convenient in a pre-prod mode.
>>>
>>> So what I would need would be an Assets.directory like Hugh proposed  
>>> so I can browse dynamically the assets folder's contents :)
>>>
>>> ++
>>> François
>>>
>>> Le 07/10/2011 17:20, Joshua Granick a écrit :
>>>> Every file is given an ID when it is parsed by the install tool. This  
>>>> is what you use when you want to reference a file.
>>>>
>>>> If you are listing files individually in your NMML project file, you  
>>>> can assign your own "id" attribute to control this value. Otherwise,  
>>>> the ID will equal the target path to your asset at the time of  
>>>> importing, according to your NMML.
>>>>
>>>> If you have an asset node like this:
>>>>
>>>>
>>>> <assets path="assets/images" include="*" />
>>>>
>>>>
>>>> You can reference your files as if they were located at  
>>>> "assets/images". If you want to use a different output path, you can  
>>>> use the "rename" option:
>>>>
>>>>
>>>> <assets path="../../MyGame/Resources/images" rename="assets/images"  
>>>> include="*" />
>>>>
>>>>
>>>>
>>>> Once you are ready to reference a file in your project, you can use  
>>>> ApplicationMain.getAsset in NME 3, or in SVN a strongly typed API was  
>>>> added (ApplicationMain.getAsset is still available).
>>>>
>>>>
>>>> Loosely typed:
>>>>
>>>> var myImage:BitmapData = ApplicationMain.getAsset  
>>>> ("assets/images/MyImage.jpg");
>>>>
>>>>
>>>>
>>>> Strongly typed:
>>>>
>>>> var myImage = Assets.getBitmapData ("assets/images/MyImage.jpg");
>>>>
>>>>
>>>>
>>>> Because the paths are string-based, similar to using a standard  
>>>> Loader and URLRequest, it provides a lot of flexibility for accessing  
>>>> assets from different "directories" (even if the target platform,  
>>>> like Android, does not support true directories)
>>>>
>>>>
>>>>
>>>> var header = Assets.getBitmapData ("assets/images/Header@" +  
>>>> Utils.screenDensity + ".png");
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Fri, 07 Oct 2011 05:19:32 -0700, Cauê Waneck <[hidden email]>  
>>>> wrote:
>>>>
>>>>> Hello!
>>>>> I think the way to remain cross-platform is not to access the assets  
>>>>> folder
>>>>> yourself. If you want to get a resource at runtime, you can always  
>>>>> access it
>>>>> by reflection:
>>>>>
>>>>> ApplicationMain.getAsset(Reflect.field(Assets, "my_runtime_name"));
>>>>>
>>>>> Cheers!
>>>>>
>>>>> 2011/10/7 François Nicaise <[hidden email]>
>>>>>
>>>>>>  My last question is :
>>>>>> why is the mac target treated differently ? Is it something related  
>>>>>> to the
>>>>>> Iphone ? Xcode ?
>>>>>>
>>>>>> Also, as all paths in the mac target are prefixed with underscore  
>>>>>> and any
>>>>>> assets subfolders are "stringified".
>>>>>> If I want to loop through files under any subdirectory, it will not  
>>>>>> be
>>>>>> possible on the mac target.
>>>>>>
>>>>>> So I can hack this behaviour and do the glue myself, however it  
>>>>>> seems a
>>>>>> little bit weird .
>>>>>>
>>>>>> So to summarize, what would be great would be :
>>>>>> - a getPath
>>>>>> - a getAssetsPath
>>>>>> - a way to handle subdirectories contents on any target.
>>>>>>
>>>>>> These to get some extra 'dynamic' behaviour.
>>>>>> A good example would be when you have a locales subfolder in assets  
>>>>>> with
>>>>>> localization files and want to loop dynamically  through the folder  
>>>>>> without
>>>>>> loading everything by hand.
>>>>>>
>>>>>> Of course if any of these features exists, please tell me :)
>>>>>>
>>>>>> Thanks again
>>>>>> François
>>>>>>
>>>>>> Le 07/10/2011 10:32, François Nicaise a écrit :
>>>>>>
>>>>>> I meant a method to get directly the absolute path for any target (  
>>>>>> Mac
>>>>>> being path/*App.app* if i understand ), as well as a method to  
>>>>>> retrieve
>>>>>> the absolute or relative path to the assets folder (Mac being  
>>>>>> *Resources *if
>>>>>> i understand ? )
>>>>>>
>>>>>> Le 07/10/2011 10:22, François Nicaise a écrit :
>>>>>>
>>>>>> Hi All !
>>>>>> I've been a bit unfortunate when I tried to load some assets from a  
>>>>>> custom
>>>>>> asset folder.
>>>>>>
>>>>>> My nme folder looks like :
>>>>>> myApp/
>>>>>>     assets/
>>>>>>     my_special_assets/
>>>>>>     src/
>>>>>>     bin/cpp/OS/...
>>>>>>
>>>>>> Since I want to use my assets located in my_special_assets, I have  
>>>>>> added
>>>>>> specialAssets to my .nmml file.
>>>>>> Now, my problem is to get a valid path to list all my assets in this
>>>>>> folder.
>>>>>> On Linux, it is easy, the path does not change and is relative to  
>>>>>> my App (I
>>>>>> assume on windows it is the same).
>>>>>> On Mac... Things get a little bit different. Not working on a mac  
>>>>>> myself, I
>>>>>> find it difficult to get the good path so I can do a  
>>>>>> cpp.Sys.readDirectory(
>>>>>> my_special_assets_path ).
>>>>>>
>>>>>> So after having looked at the code, I found the path I must use in
>>>>>> installer/Cpp.hx :
>>>>>>
>>>>>>     function getCppDest()   {      if (isMac())         return  
>>>>>> mBuildDir + "/cpp/" + mOS + "/" + mDefines.get("APP_FILE") +  
>>>>>> ".app";      return mBuildDir + "/cpp/" + mOS + "/" +  
>>>>>> mDefines.get("APP_FILE");   }
>>>>>>
>>>>>> So my question is : is it possible to get this information directly  
>>>>>> ? If so where  ?
>>>>>>
>>>>>> Thanks in advance :)
>>>>>> ++
>>>>>> François
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> -- haXe - an open source web programming language
>>>>>> http://haxe.org
>>>>
>>>
>>>
>>
>>
>
>
> --
> haXe - an open source web programming language
> http://haxe.org

--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: NME : Where are my assets ? ( or : how can I easily get the path to my assets directory...)

François Nicaise
Well, the results of a "diff" on both folders ? Or all assets removed.
It's up to you.
It's just to be sure that only the relevant files are placed in the
target assets folder.

But like I said, it's not a priority :)
Thanks anyway.

François


Le 08/10/2011 18:20, Joshua Granick a écrit :

> Would you need all of the assets to be removed, or file names that are
> not linked anymore?
>
> By default, the install tool only copies files which are newer, to cut
> down compile times.
>
>
>
> On Sat, 08 Oct 2011 00:43:36 -0700, François Nicaise
> <[hidden email]> wrote:
>
>> I'd like to add, I could stick with an rm -rf
>> bin/cpp/linux/bin/assets before I build the project.
>> But maybe there's some .nmml config instruction to add so it
>> recreates the target assets folder each time ?
>>
>> Le 08/10/2011 09:38, François Nicaise a écrit :
>>> I would like to mention (if it has not yet been reported ) that
>>> removing a file from the assets folder does not remove it from the
>>> target assets folder.
>>> i.e. on Linux, removing a file from the assets folder does not
>>> remove it from bin/cpp/linux/bin/assets.
>>>
>>> François
>>>
>>> Le 08/10/2011 07:20, François Nicaise a écrit :
>>>> Hi thanks to all for your answer !
>>>>
>>>> Joshua, I think I use NME the way you describe but sometimes I need
>>>> to handle assets I don't know yet about.
>>>> Of course, eventually I will come to know all the assets. But a
>>>> little bit of dynamism is always convenient in a pre-prod mode.
>>>>
>>>> So what I would need would be an Assets.directory like Hugh
>>>> proposed so I can browse dynamically the assets folder's contents :)
>>>>
>>>> ++
>>>> François
>>>>
>>>> Le 07/10/2011 17:20, Joshua Granick a écrit :
>>>>> Every file is given an ID when it is parsed by the install tool.
>>>>> This is what you use when you want to reference a file.
>>>>>
>>>>> If you are listing files individually in your NMML project file,
>>>>> you can assign your own "id" attribute to control this value.
>>>>> Otherwise, the ID will equal the target path to your asset at the
>>>>> time of importing, according to your NMML.
>>>>>
>>>>> If you have an asset node like this:
>>>>>
>>>>>
>>>>> <assets path="assets/images" include="*" />
>>>>>
>>>>>
>>>>> You can reference your files as if they were located at
>>>>> "assets/images". If you want to use a different output path, you
>>>>> can use the "rename" option:
>>>>>
>>>>>
>>>>> <assets path="../../MyGame/Resources/images"
>>>>> rename="assets/images" include="*" />
>>>>>
>>>>>
>>>>>
>>>>> Once you are ready to reference a file in your project, you can
>>>>> use ApplicationMain.getAsset in NME 3, or in SVN a strongly typed
>>>>> API was added (ApplicationMain.getAsset is still available).
>>>>>
>>>>>
>>>>> Loosely typed:
>>>>>
>>>>> var myImage:BitmapData = ApplicationMain.getAsset
>>>>> ("assets/images/MyImage.jpg");
>>>>>
>>>>>
>>>>>
>>>>> Strongly typed:
>>>>>
>>>>> var myImage = Assets.getBitmapData ("assets/images/MyImage.jpg");
>>>>>
>>>>>
>>>>>
>>>>> Because the paths are string-based, similar to using a standard
>>>>> Loader and URLRequest, it provides a lot of flexibility for
>>>>> accessing assets from different "directories" (even if the target
>>>>> platform, like Android, does not support true directories)
>>>>>
>>>>>
>>>>>
>>>>> var header = Assets.getBitmapData ("assets/images/Header@" +
>>>>> Utils.screenDensity + ".png");
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Fri, 07 Oct 2011 05:19:32 -0700, Cauê Waneck <[hidden email]>
>>>>> wrote:
>>>>>
>>>>>> Hello!
>>>>>> I think the way to remain cross-platform is not to access the
>>>>>> assets folder
>>>>>> yourself. If you want to get a resource at runtime, you can
>>>>>> always access it
>>>>>> by reflection:
>>>>>>
>>>>>> ApplicationMain.getAsset(Reflect.field(Assets, "my_runtime_name"));
>>>>>>
>>>>>> Cheers!
>>>>>>
>>>>>> 2011/10/7 François Nicaise <[hidden email]>
>>>>>>
>>>>>>>  My last question is :
>>>>>>> why is the mac target treated differently ? Is it something
>>>>>>> related to the
>>>>>>> Iphone ? Xcode ?
>>>>>>>
>>>>>>> Also, as all paths in the mac target are prefixed with
>>>>>>> underscore and any
>>>>>>> assets subfolders are "stringified".
>>>>>>> If I want to loop through files under any subdirectory, it will
>>>>>>> not be
>>>>>>> possible on the mac target.
>>>>>>>
>>>>>>> So I can hack this behaviour and do the glue myself, however it
>>>>>>> seems a
>>>>>>> little bit weird .
>>>>>>>
>>>>>>> So to summarize, what would be great would be :
>>>>>>> - a getPath
>>>>>>> - a getAssetsPath
>>>>>>> - a way to handle subdirectories contents on any target.
>>>>>>>
>>>>>>> These to get some extra 'dynamic' behaviour.
>>>>>>> A good example would be when you have a locales subfolder in
>>>>>>> assets with
>>>>>>> localization files and want to loop dynamically  through the
>>>>>>> folder without
>>>>>>> loading everything by hand.
>>>>>>>
>>>>>>> Of course if any of these features exists, please tell me :)
>>>>>>>
>>>>>>> Thanks again
>>>>>>> François
>>>>>>>
>>>>>>> Le 07/10/2011 10:32, François Nicaise a écrit :
>>>>>>>
>>>>>>> I meant a method to get directly the absolute path for any
>>>>>>> target ( Mac
>>>>>>> being path/*App.app* if i understand ), as well as a method to
>>>>>>> retrieve
>>>>>>> the absolute or relative path to the assets folder (Mac being
>>>>>>> *Resources *if
>>>>>>> i understand ? )
>>>>>>>
>>>>>>> Le 07/10/2011 10:22, François Nicaise a écrit :
>>>>>>>
>>>>>>> Hi All !
>>>>>>> I've been a bit unfortunate when I tried to load some assets
>>>>>>> from a custom
>>>>>>> asset folder.
>>>>>>>
>>>>>>> My nme folder looks like :
>>>>>>> myApp/
>>>>>>>     assets/
>>>>>>>     my_special_assets/
>>>>>>>     src/
>>>>>>>     bin/cpp/OS/...
>>>>>>>
>>>>>>> Since I want to use my assets located in my_special_assets, I
>>>>>>> have added
>>>>>>> specialAssets to my .nmml file.
>>>>>>> Now, my problem is to get a valid path to list all my assets in
>>>>>>> this
>>>>>>> folder.
>>>>>>> On Linux, it is easy, the path does not change and is relative
>>>>>>> to my App (I
>>>>>>> assume on windows it is the same).
>>>>>>> On Mac... Things get a little bit different. Not working on a
>>>>>>> mac myself, I
>>>>>>> find it difficult to get the good path so I can do a
>>>>>>> cpp.Sys.readDirectory(
>>>>>>> my_special_assets_path ).
>>>>>>>
>>>>>>> So after having looked at the code, I found the path I must use in
>>>>>>> installer/Cpp.hx :
>>>>>>>
>>>>>>>     function getCppDest()   {      if (isMac())         return
>>>>>>> mBuildDir + "/cpp/" + mOS + "/" + mDefines.get("APP_FILE") +
>>>>>>> ".app";      return mBuildDir + "/cpp/" + mOS + "/" +
>>>>>>> mDefines.get("APP_FILE");   }
>>>>>>>
>>>>>>> So my question is : is it possible to get this information
>>>>>>> directly ? If so where  ?
>>>>>>>
>>>>>>> Thanks in advance :)
>>>>>>> ++
>>>>>>> François
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -- haXe - an open source web programming language
>>>>>>> http://haxe.org
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>> --
>> haXe - an open source web programming language
>> http://haxe.org
>


--
haXe - an open source web programming language
http://haxe.org
Reply | Threaded
Open this post in threaded view
|

Re: NME - move support to forum?

François Nicaise
In reply to this post by singmajesty
I'd like to use the forum, however, it is really much more convenient to
use a mailing list, since I can search the list from google and have any
important message directly in my box.
Moreover, I can send a message without using any form and I can follow
any thread without having to launch my browser.
So a NME list would be a great idea !

And I can see from my haxe list experience that it's by far the easiest
tool. (BTW : I admit I am not a forum fan ;) )

Francois

Le 08/10/2011 18:16, Joshua Granick a écrit :

> Hi,
>
> There are a few ways we can follow the NME forums :)
>
> If you visit one of the forum sections ("General Discussion",
> "Installing NME", etc) when you are logged in, there should be a
> "Monitor" link at the bottom of the page. This will send you email
> updates each time someone adds a new comment to that forum. Similarly,
> to each thread, there also is a "Monitor" link (which is enabled by
> default when you respond to a topic, I believe) that will allow you to
> receive email updates for that topic only.
>
> There also are some RSS feeds, both at the highest level, and under
> each forum section.
>
> At the high level, you will receive updates for every comment on the
> forum. At the second level, you will receive updates whenever a new
> topic is created, but will not receive updates for subsequent
> responses in your RSS feed.
>
> This is not perfect, but I hope this provides a number of ways to
> access the forums without checking by hand. If there is any other kind
> of feed or notification people are interested in receiving from the
> forums, let me know and it may be possible to wire it up.
>
> Thanks!
>
>
>
> On Fri, 07 Oct 2011 18:52:05 -0700, Gamehaxe <[hidden email]>
> wrote:
>
>> Hi,
>> Now the forum on http://www.haxenme.org/forums/ is up and running,
>> and gaining some momentum, it might be time to shift official support
>> over to there.  So we can direct future haxelist NME requests to the
>> forum
>> and answer them there.
>> Joshua, can we subscribe to new topics?
>> Also, "View new posts" would be useful.
>>
>> Hugh
>


--
haXe - an open source web programming language
http://haxe.org