Add Custom Package Option

170 views
Skip to first unread message

Abhijith Dominic

unread,
May 16, 2019, 7:12:05 AM5/16/19
to App Inventor Open Source Development
Hello,
I have Cloned the AppInventor Sources and Build a Version but There is no Custom Package Option in it, I want to add Custom package option If anyone Could Explain Clearly On How to do that, It would be Great.

Thanks

Abhijith Dominic

unread,
May 16, 2019, 8:35:30 AM5/16/19
to App Inventor Open Source Development
Any Documentation or Examples of Code could really help. Thanks

Evaldas Latoškinas

unread,
May 16, 2019, 3:38:34 PM5/16/19
to App Inventor Open Source Development
Hello,

Before being able to help, I am not quite sure what you mean by Custom Package? By custom package, do you mean custom components not part of the App Inventor, or custom code in general?

Cheers!

Abhijith Dominic

unread,
May 16, 2019, 3:56:56 PM5/16/19
to App Inventor Open Source Development
Sorry I should have been more clear, I meant custom package name

Evan Patton

unread,
May 16, 2019, 5:11:22 PM5/16/19
to App Inventor Open Source Development
This is a really non-trivial change. There are a lot of assumptions in different areas about what the default package name is. You might be able to skip most of the changes by doing the following:

1. Add a new designer-only property to Form to represent the custom package name
2. In MockForm, only show the new property if isScreen1() is true. Add the new package name to the ProjectSettings object
3. In the Project class in buildserver, add a method to extract the package name from the project settings
4. The mainClass property will need to be changed to reflect the new package name
5. After Compiler unpacks the source code, you'll need to move the files from the default package name to set of directories representing the new package name.

That's a rough sketch. There may be more intermediate steps.

Regards,
Evan

Abhijith Dominic

unread,
May 16, 2019, 11:27:22 PM5/16/19
to App Inventor Open Source Development
Thank You so Much. Steps 1 to 4 are clear but step 5.. Where can i find those files? Where does the compiler unpack it to?

Evan Patton

unread,
May 17, 2019, 11:44:54 AM5/17/19
to App Inventor Open Source Development
Actually, I misspoke. The project is unpacked in the ProjectBuilder class in the method extractProjectFiles. It unzips the contents of the project into a temporary directory (which is cleaned up at the end of the build). As part of the unpacking, you would want to extract the source files to the new directory structure representing the custom package instead of the App Inventor default package name.

Regards,
Evan

Abhijith Dominic

unread,
May 17, 2019, 12:57:21 PM5/17/19
to app-inventor-o...@googlegroups.com
Okay I'll give it a try

--
You received this message because you are subscribed to a topic in the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/app-inventor-open-source-dev/JgdWTb2f4AQ/unsubscribe.
To unsubscribe from this group and all its topics, 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/app-inventor-open-source-dev/ee661775-d8a5-4c89-ae7d-75e0877e5c67%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Peter Mathijssen

unread,
May 18, 2019, 4:16:30 AM5/18/19
to App Inventor Open Source Development
Maybe you can look at the AppyBuilder source code that is also open source and based upon the App Inventor sourcecode and see how they did it.

https://github.com/AppyBuilder/AppyBuilder-Source

Op vrijdag 17 mei 2019 18:57:21 UTC+2 schreef Abhijith Dominic:
Okay I'll give it a try

On Fri, 17 May, 2019, 9:14 PM Evan Patton, <ewpa...@gmail.com> wrote:
Actually, I misspoke. The project is unpacked in the ProjectBuilder class in the method extractProjectFiles. It unzips the contents of the project into a temporary directory (which is cleaned up at the end of the build). As part of the unpacking, you would want to extract the source files to the new directory structure representing the custom package instead of the App Inventor default package name.

Regards,
Evan

On Thursday, May 16, 2019 at 11:27:22 PM UTC-4, Abhijith Dominic wrote:
Thank You so Much. Steps 1 to 4 are clear but step 5.. Where can i find those files? Where does the compiler unpack it to?

--
You received this message because you are subscribed to a topic in the Google Groups "App Inventor Open Source Development" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/app-inventor-open-source-dev/JgdWTb2f4AQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to app-inventor-open-source-dev+unsub...@googlegroups.com.

Abhijith Dominic

unread,
May 18, 2019, 5:10:37 AM5/18/19
to App Inventor Open Source Development
I have looked at it but theirs is a build version of the AppInventor

Peter Mathijssen

unread,
May 18, 2019, 6:47:54 AM5/18/19
to App Inventor Open Source Development
Did you use the link i gave you? They have a personal build version and also the source code available. 

Op zaterdag 18 mei 2019 11:10:37 UTC+2 schreef Abhijith Dominic:

Abhijith Dominic

unread,
May 18, 2019, 7:49:49 AM5/18/19
to App Inventor Open Source Development
Oh yeah they do have source code. Thanks

Abhijith Dominic

unread,
May 18, 2019, 9:57:31 AM5/18/19
to App Inventor Open Source Development
Which is the MainClass Property?

Abhijith Dominic

unread,
May 18, 2019, 11:58:55 AM5/18/19
to App Inventor Open Source Development
I am Receiving this error :
notes = Browser: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/74.0.3729.157 Safari/537.36
foundIn = nls-1373-geab60e2e-dirty
faultData = java.lang.IllegalStateException: no such property: PackageName

Hossein Amerkashi

unread,
May 18, 2019, 12:55:46 PM5/18/19
to App Inventor Open Source Development
This means you aren't properly passing parameter between different classes. If your code is open, we can take a look and help, otherwise it's difficult guessing what's missing.

Hossein.


--
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.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages