Page 6 of 10

Re: Creating LiveCode applications that play well with git

Posted: Thu Jun 15, 2017 6:48 pm
by jim1001
Sorry - misunderstood your previous post. I connected my Android tablet to the PC & checked it was there in Development - Test Target. Then I entered levurePackageApplication "android simulator" in the Message Box. Hope those were the right steps! Saw a lot of activity then:

executing at 6:32:16 PM
Type Object: can't set object property
Object Levure Framework Application Packager
Line set the password of stack tTargetStackFilename to sPassword
Hint packagerPackageApplication

executing at 6:32:15 PM
Type Object: can't set object property
Object Levure Framework Application Packager
Line set the password of stack tTargetStackFilename to sPassword
Hint packagerPackageApplication

executing at 6:32:15 PM
Type Object: can't set object property
Object Levure Framework Application Packager
Line set the password of stack tTargetStackFilename to sPassword
Hint stack "xxx/MyLevureTest/levure/packager/packager.livecodescript"

Re: Creating LiveCode applications that play well with git

Posted: Thu Jun 15, 2017 6:59 pm
by trevordevore
Are you using Community? If so then you will need to update Levure. I fixed some Community issues earlier in the week.

https://github.com/trevordevore/levure/ ... ing-Levure

Re: Creating LiveCode applications that play well with git

Posted: Thu Jun 15, 2017 9:17 pm
by jim1001
OK, I updated Levure as you said & re-ran. This time it built & installed on the tablet. Got the Open Application button. However it did nothing when clicked. When I went back to LC IDE on Windows I saw the dialog box attached...

Re: Creating LiveCode applications that play well with git

Posted: Thu Jun 15, 2017 10:39 pm
by trevordevore
Alright, we are in business. Last night I made some changes so that errors would be displayed if you tried to use preferences without first configuring a preference file name. The version of the appp creator stack that you used, however, uses a call to the preferences API in the app.livecodescript file. You can either remove the prefsGetPref call from app.livecodescript or just start from scratch and create a new app. The new app creator no longer adds calls to the preferences API.

Re: Creating LiveCode applications that play well with git

Posted: Fri Jun 16, 2017 12:25 pm
by jim1001
Created a new application by using the Levure project creator as per wiki.
Loaded it in the IDE (didn't make any changes to the sample application)
Configured the Android standalone settings for LevureStandalone.
Ran levurePackageApplication "android simulator" via Message Box.

The app appeared on my connected Android tablet. No error messages anywhere up to now. However clicking the Open Application button gave the message "LevureStandalone has stopped".

I was convinced it was going to work too :(

Any more ideas Trevor? Thanks.

Re: Creating LiveCode applications that play well with git

Posted: Fri Jun 16, 2017 2:07 pm
by trevordevore
We could be running into a LiveCode bug at this point. Which version of LC are you testing with? If you aren't using 8.1.5 RC-1 can you try it?

You could also try removing the answer commands that you have in preopenstack and openstack to see if that affects anything.

Does android generate logs anywhere that would record the cause of the crash?

Re: Creating LiveCode applications that play well with git

Posted: Fri Jun 16, 2017 5:44 pm
by jim1001
Tried with 8.1.5 RC-1.

App installs on target tablet but get same when Open Application button pressed. However now I get the warning dialog in the LC IDE attached - no idea why. This is after restarting LC and immediately loading standalone.livecode of the sample app.
You could also try removing the answer commands that you have in preopenstack and openstack to see if that affects anything.
I'm now using the unchanged sample app provided by the project creator
Does android generate logs anywhere that would record the cause of the crash?
Am looking into that.

Thanks.

Re: Creating LiveCode applications that play well with git

Posted: Fri Jun 16, 2017 5:49 pm
by trevordevore
Regarding error dialog, if you open Preferences and go to the Files & Memory section what is the setting for "If destroyStack is false, when closing last stack in file:"? If it is "ask" can you try changing it to "Don't close the file"?

If you can find some sort of log that reports the error let me know. I tried building a default Levure app for iOS again and it works so the issue isn't something obvious, at least not to me.

Re: Creating LiveCode applications that play well with git

Posted: Fri Jun 16, 2017 5:55 pm
by jim1001
Regarding error dialog, if you open Preferences and go to the Files & Memory section what is the setting for "If destroyStack is false, when closing last stack in file:"? If it is "ask" can you try changing it to "Don't close the file"?
Meant to say that. I have it already set to "Don't close the file" (also have destroyStack true for new stacks)
If you can find some sort of log that reports the error let me know.
OK - will do. Ta.

Re: Creating LiveCode applications that play well with git

Posted: Fri Jun 16, 2017 6:01 pm
by trevordevore
Okay. You might avoid the error dialog by only opening the standalone.livecode file and trying to build without loading the entire application. Some changes need to be made to the LiveCode standalone building process. Right now there is a lot of loading/unloading of stacks and it can sometimes lead to problems.

Re: Creating LiveCode applications that play well with git

Posted: Fri Jun 16, 2017 11:15 pm
by jim1001
You might avoid the error dialog by only opening the standalone.livecode file and trying to build without loading the entire application.
Error dialog doesn't appear in Community 8.1.4 after build whether entire app is loaded or not.

Error dialog appears in Community 8.1.5 RC-1 after build and only opening standalone.livecode (not entire application).

I have an Android error log & will post in a private message.

Thanks.

Re: Creating LiveCode applications that play well with git

Posted: Tue Jun 20, 2017 2:40 pm
by jim1001
Hi Trevor,

Until testing is working for Android I thought as a stopgap I'd have a look at building a full Levure Android app.

I’ve looked at the pages
https://github.com/trevordevore/levure/wiki/packager and
https://github.com/trevordevore/levure/ ... lds-Folder

I assume I need to configure Standalone Application settings for the UI stack, i.e. LevureSampleWindow for the sample app? LevureStandalone doesn't figure in the final build - is that right?

Where do you set the version & build properties mentioned in wiki/packager - Version information and where / how do I set up a build profile?

Thanks.

Re: Creating LiveCode applications that play well with git

Posted: Tue Jun 20, 2017 3:14 pm
by trevordevore
I've updated the https://github.com/trevordevore/levure/wiki/packager page with more information about what you need to do before packaging the application. You use the File > Standalone Application Settings menu in LiveCode to configure the standalone settings for the standalone.livecode stack file (LevureStandalone in memory).

All application settings configuration is done in the app.yml file. The app.yml file that was created when you created your app already has a build profiles entry in it. It also has version and build settings. See this page for details on app.yml file: https://github.com/trevordevore/levure/wiki/app.yml

I fixed a broken link to the FAQ on the copy files section on the packager page. Here is the link: https://github.com/trevordevore/levure/ ... -builds%3F

Though not directly related to your question, I will mention that I added two new screencasts to my YouTube channel. One talks about creating a new app in Levure and the other shows how to add UI stacks to your application.

https://www.youtube.com/channel/UCluXVD ... JmCMssc0fw

Re: Creating LiveCode applications that play well with git

Posted: Thu Jun 22, 2017 7:11 pm
by jim1001
Thanks Trevor - much clearer now.

I added a development line in app.yml (there wasn't one there) and tried a build of the sample app for android. I didn't add anything to the profile.

Got the attached error.

Does name set in app.yml have anything to do with Standalone Application Settings - General - Standalone name or Standalone Application Settings - Android -Label?
Does version set in app.yml have anything to do with Standalone Application Settings - Android - Version Name?

Best,
Jim

Re: Creating LiveCode applications that play well with git

Posted: Thu Jun 22, 2017 7:34 pm
by trevordevore
I ran into that same error the other day. The rename command doesn't work with network folders. Try moving your Levure project to the local drive on Windows and try again. It should work.

The name and version in app.yml will be used to create the standalone name and version. It is possible that it will need to be applied to the android specific build settings as well.