UsesAssets annotation

43 views
Skip to first unread message

Hossein Amerkashi

unread,
Jun 5, 2018, 8:02:02 AM6/5/18
to App Inventor Open Source Development
Hello, 

If updating a core component (e.g. Form) and using @UsesAssets annotation to copy an asset, where should the asset be placed at? Same folder as ya.png? Any other code change required? 

Thanks

Evan W. Patton

unread,
Jun 5, 2018, 8:12:56 AM6/5/18
to app-inventor-o...@googlegroups.com
Hi Hossein,

It should be sufficient to place it in the buildserver's resources directory alongside ya.png and runtime.scm. You might also want to verify those files aren't copied elsewhere in buildserver/build.xml.

I can double check that once I'm in the office.

Evan
--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-so...@googlegroups.com.
To post to this group, send email to app-inventor-o...@googlegroups.com.
Visit this group at https://groups.google.com/group/app-inventor-open-source-dev.
For more options, visit https://groups.google.com/d/optout.

Hossein Amerkashi

unread,
Jun 5, 2018, 8:28:37 AM6/5/18
to app-inventor-o...@googlegroups.com
Evan

Thanks for your reply.
I tried about an hour ago, rebuild for companion. No compiler error, but asset wasn't copied.

Thanks

Evan W. Patton

unread,
Jun 5, 2018, 8:46:20 AM6/5/18
to app-inventor-o...@googlegroups.com
Have you merged PR 1234? I don't think assets work at all on master as implemented. With PR 1234 you should place them into an assets folder in com/google/appinventor/components/runtime per the change in buildserver/build.xml.

Regards,
Evan

Sent from my iPhone

Hossein Amerkashi

unread,
Jun 5, 2018, 8:58:22 AM6/5/18
to app-inventor-o...@googlegroups.com
@Evan,

After clean build for companion, it put it in folder: assets\component\    
However, I wanted it to be placed into root assets folder

Are you saying that I should create assets folder below and place it into that:

Thanks


On Tue, Jun 5, 2018 at 8:46 AM, Evan W. Patton <ewpa...@gmail.com> wrote:
Have you merged PR 1234? I don't think assets work at all on master as implemented. With PR 1234 you should place them into an assets folder in com/google/appinventor/components/runtime per the change in buildserver/build.xml.

Regards,
Evan

Sent from my iPhone

On Jun 5, 2018, at 08:28, Hossein Amerkashi <kkas...@gmail.com> wrote:

Evan

Thanks for your reply.
I tried about an hour ago, rebuild for companion. No compiler error, but asset wasn't copied.

Thanks

On Tue, Jun 5, 2018, 8:12 AM Evan W. Patton <ewpa...@gmail.com> wrote:
Hi Hossein,

It should be sufficient to place it in the buildserver's resources directory alongside ya.png and runtime.scm. You might also want to verify those files aren't copied elsewhere in buildserver/build.xml.

I can double check that once I'm in the office.

Evan

On Jun 5, 2018, at 08:02, Hossein Amerkashi <kkas...@gmail.com> wrote:

Hello, 

If updating a core component (e.g. Form) and using @UsesAssets annotation to copy an asset, where should the asset be placed at? Same folder as ya.png? Any other code change required? 

Thanks

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsub...@googlegroups.com.
To post to this group, send email to app-inventor-open-source-dev@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsub...@googlegroups.com.
To post to this group, send email to app-inventor-open-source-dev@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsub...@googlegroups.com.
To post to this group, send email to app-inventor-open-source-dev@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsub...@googlegroups.com.
To post to this group, send email to app-inventor-open-source-dev@googlegroups.com.

Hossein Amerkashi

unread,
Jun 5, 2018, 9:10:14 AM6/5/18
to app-inventor-o...@googlegroups.com
...also how is Marker.java working? 
@UsesAssets(fileNames = "marker.svg")

Above asset is only in below folder (beside tests):
lib\leaflet\assets

To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsubs...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsubs...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsubs...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsubs...@googlegroups.com.

Evan Patton

unread,
Jun 5, 2018, 9:42:23 AM6/5/18
to App Inventor Open Source Development
Hi Hossein,

That is a hard coded case. Since you are talking about a change to a core component I guess it would be an acceptable solution. Specifically, that asset is copied in buildserver/build.xml on line 70.

Evan
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsub...@googlegroups.com.
To post to this group, send email to app-inventor-o...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsub...@googlegroups.com.
To post to this group, send email to app-inventor-o...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsub...@googlegroups.com.
To post to this group, send email to app-inventor-o...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to app-inventor-open-source-dev+unsub...@googlegroups.com.
To post to this group, send email to app-inventor-o...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages