What I'm adding, and what I'm planning next...

A place to discuss and plan OpenSource xTalk (not exclusively LCC based)
and Community Builds of LCC ...Ask NOT what xTalk can do for you...
Get involved you DO have something to contribute, no matter your skillset!

Forum rules
A place to discuss and plan OpenSource xTalk (not exclusively LCC based) and Community Builds of LCC
Ask NOT what xTalk can do for you... get involved you DO have something to contribute, no matter your skillset!

What would you like to see in the next version?

You may select up to 5 options

 
 
View results

User avatar
OpenXTalkPaul
Posts: 2266
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: What I'm adding, and what I'm planning next...

Post by OpenXTalkPaul »

tperry2x wrote: Fri Oct 04, 2024 11:57 am
OpenXTalkPaul wrote: Thu Oct 03, 2024 12:32 am I have LC Community built .apks built for my old, old, old phone, targeting 4.3 ICS, run quite well side-loaded to my Android 10 Sony TV! It shouldn't be hard to update the build scripts to allow newer Android SDK.
That would be nice - at the moment, the build scripts have to use v8 of the SDK as you know.

Perhaps someone can point this poor fellow (David) from here:
https://forums.livecode.com/viewtopic.php?f=122&t=39368

over to here.

And then, perhaps over to here. :lol:
:poached: Image
You mean the JAVA 8 (not the Android ADK). I was just looking at that android building tutorial, apparently even LC v10 requires some old Java and obsolete Android packages to build for some reason. That's according to LC Panos, but I could've sword at some point I was using a newer version of OpenJDK?

I don't like that the tutorial says you should delete all other JavaVM, because NO I don't want to, what if I need like JDK 11 or 17 for something else that's unrelated?

I can't recall for sure, but I thought that I added the ability to select a Java in an alternate file path, replacing the code that gets the location from Java itself via shell().

I should try to rebuild some of my Android targeted stacks I built (almost a decade ago!) so that the UI works better with horizontal widescreen 16x9 / 1080p.

It's kind of cool that you can also build .apks for Android x86, which means they should run well with Android virtualized on an Intel machine, or for using with a PC build of Android Open Source Project (https://www.android-x86.org)
User avatar
tperry2x
Posts: 2475
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: What I'm adding, and what I'm planning next...

Post by tperry2x »

That's not the case.
I'm rambling on, but skip to the last line of this post
You only need to have version 8 of the javaSDK on MacOS.
The rest, you can just unzip the folders in my mega link above. There's no need to install anything else.
You just point the SDK path in the IDE to the folders. simple.
On Linux, you just unzip the folder and point the SDK and the JDK paths to the corresponding folders.

I'll elaborate further.
The card "mobile support" in the preferences stack checks for installed versions of the JDK on MacOS and windows. The choose JDK button is hidden by script on MacOS and Windows. (Incidentally, but not required - you can unhide the button and browse to the JDK folder of your choice - that's if you have JDK 11 also installed like you mentioned). You absolutely can indeed have an isolated separate version of JDK just for OXT/LCC and you certainly don't need to uninstall anything either. As long as you have the path for a correct version 8 of the JDK environment, then it'll build and compile apks.

If you try this in my updated v1.08 oxt lite with all updates applied, this should work for you.
I say that, because I fixed the height of the 'Android' tab on the standalone builder - as it never adjusted properly. Plus I re-jigged some of the layout for cosmetic reasons.

The steps would be as follows (before we get too far into it though, it's worth mentioning that I've yet to create a pre-assembled windows SDK) - I hope to find time to do this soon. This weekend looks like it might be pretty busy for me though.

1. Download the JDK installer if you are on MacOS from here.
2. Unzip the Mac SDK folder, again from here. (No huge Android Studio involved).
3. Place them both in a subfolder. I called mine "Android" in my home folder.
4. Launch OXT Lite (hopefully OXT RCx too) - Open the prefs, Mobile Support.
5. Select the SDK first.
6. You can manually select the JDK if on Linux, but if on Win or Mac - the card tries to detect it for you:
this.png
this.png (20.92 KiB) Viewed 1693 times
Make the chooseJDK button visible with the project browser if you want to choose a JDK path manually. (This is only needed if you have multiple JDKs installed). I'll probably turn off the hiding of this button.
Anyway, I digress.
Version of the JDK should be: "1.8.0_202"

7. You can now build for Android.
done.png
done.png (48.45 KiB) Viewed 1688 times
(I even included generic Android apk icons)
android-icon.png
android-icon.png (8.67 KiB) Viewed 1691 times
I've included all JDK license agreements and SDK license agreements in recent updates of OXT Lite.

To test deployment, simply upload the apk to a ftp server and download on the target device - or use MTP data mode with a cable, whichever works for you.

At the end of Panos' tutorial, it unfortunately ends with a bug report for him. Doesn't seem like that method is particularly successful 'over there'.

(Miaaaooow - that sounds 'catty' - but I think they might have broken something in LC10 by the sound of it)

In fact, hang fire - and I'll put some demo videos of the whole thing together.
User avatar
tperry2x
Posts: 2475
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: What I'm adding, and what I'm planning next...

Post by tperry2x »

Here you go - here's the short version.
Download the JDK and the SDK for Mac from that folder.
Here's a demo video.

(you can ignore the next few posts as what follows is not relevant)
User avatar
richmond62
Posts: 3896
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: What I'm adding, and what I'm planning next...

Post by richmond62 »

Here's a demo video
Why do I have a funny feeling that is on a relatively ancient version of MacOS?

Frankly looks line MacOS 10.5 running on a PPC machine. 8-)
-
Screenshot 2024-10-05 at 10.43.26.png
Screenshot 2024-10-05 at 10.43.26.png (185.88 KiB) Viewed 1618 times
-
Erm . . .
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 2475
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: What I'm adding, and what I'm planning next...

Post by tperry2x »

richmond62 wrote: Sat Oct 05, 2024 7:41 am
Here's a demo video
Why do I have a funny feeling that is on a relatively ancient version of MacOS?
Because I did it in a VM. Also MacOS 10.9 is the lowest MacOS we are supporting.
If you scroll UP, you'll see I also did the same thing in Monterey (on a real iMac).

That warning is the iOS device simulator, because I don't have xcode installed. YOU CAN IGNORE THAT!
It's not a PPC machine. This is MacOS 10.9, which as I'm sure you absolutely know already, was only available under intel. Why is it you always look for issues that aren't relevant? Just wondering.
I'm trying to give a clear walkthrough, and clear steps - however these spurious comments are only muddying the waters.
User avatar
richmond62
Posts: 3896
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: What I'm adding, and what I'm planning next...

Post by richmond62 »

I also did the same thing in Monterey
Good-O. 8-)

AND; the point of the video on the obsolete version was presumably to show how one could 'expose' that hidden button?
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 2475
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: What I'm adding, and what I'm planning next...

Post by tperry2x »

richmond62 wrote: Sat Oct 05, 2024 7:44 am
I also did the same thing in Monterey
Good-O. 8-)

AND; the point of the video on the obsolete version was?
BECAUSE IT'S A VM. Please re-read the post properly.
And the point of exposing that hidden button, is so you can select a different version of the JDK than what you might have installed. Coming back to Paul's original point. If he has JDK 11 installed, this is totally independent, but you'd need to choose it manually if that's the case.
User avatar
richmond62
Posts: 3896
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: What I'm adding, and what I'm planning next...

Post by richmond62 »

I'm rambling on, but skip to the last line of this post
Unlikely with those instructions . . . :)
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 2475
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: What I'm adding, and what I'm planning next...

Post by tperry2x »

richmond62 wrote: Sat Oct 05, 2024 7:48 am
I'm rambling on, but skip to the last line of this post
Unlikely with those instructions . . . :)
? - seriously. What's going on here. Are you trying to deliberately make this hard to follow for anyone new to it all?
User avatar
richmond62
Posts: 3896
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: What I'm adding, and what I'm planning next...

Post by richmond62 »

I'm just finding things hard to understand.
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 2475
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: What I'm adding, and what I'm planning next...

Post by tperry2x »

After much futzing around with Windows - I also managed to create the necessary files for deploying Android apks there too.
(here's the link again, in case anyone missed it) - although you can also get to it in a round-about-way through the download page for OXT lite > Mega links).

I was trying to think how to make this clearer.
This screenshot contains everything on one screen, and I'll explain because initially it might be clear as mud.
windows screenshot.png
windows screenshot.png (326.32 KiB) Viewed 1537 times
Lets start with the folder (bottom right) in the screenshot:
Here, I've unzipped the Android.7z file from my link above, for Windows. I get an uncompressed 'Android' folder with two subfolders (the JDK and the SDK).
Move that Android folder to somewhere that won't change. Perhaps your documents folder, or your home folder.

Open the IDE (I say 'the IDE' as this will work in LCC 9.6.3 too).
Now go to "Edit" menu > Preferences > Mobile Support.

If on Linux,
The 'Choose JDK' button will be visible. Browse to & select the SDK folder first from the "Android" folder you uncompressed earlier.
Next, click the 'Choose JDK' button and browse to & select the JDK folder from the "Android" folder you uncompressed earlier.

I'm on a Mac or on Windows though...

edit: commented this out, no longer valid as I've shown the button to choose the JDK all the time. Just make sure you have my most recent updates applied.

/*
This is where it gets a bit more complicated - we need to show a button that the IDE supresses. Open the "Preferences" > Mobile Support
Now from the "View Menu", make sure "Show IDE Stacks in Lists" is ticked.
Now from the "Development" menu > "Plugins" and choose "App Browser"
This is the window on the right of that screenshot.
Scroll to find the "revPreferencesGUI" stack, expand it so you can see the cards, and click the 'Mobile Support" card.
Look for the button "ChooseJDK" and set it's visible checkbox to true. The button will appear - as per the red line and box in that screenshot.
Now that's visible,
*/


choose the SDK folder you downloaded and uncompressed.
Next, do the same with the JDK folder you also downloaded and uncompressed.

Back on track now, this now applies to all platforms:

You'll note that nothing has had to be 'installed' here. The SDK and JDK folders are 'portable' for want of a better term. This way, if your OS relies on a higher version of JDK for something else, then this won't interfere with it.

You can now close the App browser if it's open, and also the Preferences if it's open. This is now set and you won't need to set it again unless you reset your preferences *or unless they get trashed by an update, or unless you move that "Android" folder somewhere else.

Make a new stack, or choose an existing stack you want to make an Android apk app from.

When it's open and you are ready, choose File > Standalone Settings.
This is the window bottom-left of that screenshot.
Turn off all the build options for Mac, Windows, Linux etc.
Go to the Android tab and pick a build for the right Android processor (4 choices).
(Sorry LCC9.6.3 users - this tab doesn't resize properly - it's something that's fixed already in OXT Lite - you'll have to mess about with the window size in the inspector temporarily.)
Under "Signing", choose "Sign for development only" (unless you have a signing key).
Under minimum android version, you should be able to choose anything (if I remembered to include them all inside that "Android" folder) - if in doubt, choose 7.1

The rest of those options you can leave as default if you like.
(By the way, if you mess about with Version name and version code - this can't be a negative number). Best to leave it, or change it sticking to the same format shown.

Close the standalone settings window and choose File > "Save as Standalone Application..." - if you'd not picked where to output it, it'll ask you.

Should then proceed to build you an apk with the options you specified. That's the success alert shown in the screenshot in the middle.

You then have your apk and you just have to get it onto a test device. You can do that by uploading it to a web host and downloading it on the target device through a browser - which will ask if you want to install it.
Or, you can transfer it by MTP mode via a device to USB cable - then open a file browser utility app, and install from there.

I hope that makes sense. This turned into an entire Android dev post, rather than just the bit I added - but I hope it's now clear.

Oh, almost forgot. Licenses.
I've added the relevant Android and Oracle JDK licenses to the IDE > "Help menu" > "IDE Information". I'm probably supposed to tell you here that you must have read and agree to both licenses to 'technically' start developing Android apks.
licenses.png
licenses.png (57.37 KiB) Viewed 1523 times
Removal
If you want to remove all this, just delete the Android folder you uncompressed. The IDE will no longer be able to find the SDK and the JDK and Android building will then be unavailable again.
User avatar
OpenXTalkPaul
Posts: 2266
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: What I'm adding, and what I'm planning next...

Post by OpenXTalkPaul »

tperry2x wrote: Fri Oct 04, 2024 9:14 pm The card "mobile support" in the preferences stack checks for installed versions of the JDK on MacOS and windows. The choose JDK button is hidden by script on MacOS and Windows. (Incidentally, but not required - you can unhide the button and browse to the JDK folder of your choice - that's if you have JDK 11 also installed like you mentioned). You absolutely can indeed have an isolated separate version of JDK just for OXT/LCC and you certainly don't need to uninstall anything either. As long as you have the path for a correct version 8 of the JDK environment, then it'll build and compile apks.

If you try this in my updated v1.08 oxt lite with all updates applied, this should work for you.
I say that, because I fixed the height of the 'Android' tab on the standalone builder - as it never adjusted properly. Plus I re-jigged some of the layout for cosmetic reasons.

The steps would be as follows (before we get too far into it though, it's worth mentioning that I've yet to create a pre-assembled windows SDK) - I hope to find time to do this soon. This weekend looks like it might be pretty busy for me though.
Awesome! Ah yes now I recall we've discussed this hidden (except for on Linux) button before.
I think what I actually did was change which one to use as "Java Home" in an environmental variable, in order to use the JDK that I wanted to use, but I'd much rather be able to change it (and the Android ADK too) directly from within the IDE.

Is there anything preventing the JDK and the ADK from being packaged into an extension bundle? That way it can be downloaded and installed optionally, so getting these dependencies and configuring Android building would be as simple as selecting the extension in OXT's own package manager.

BTW, I don't know if oXT Lite picked this up, but at some point I also added the 'local' install path to the command line paths environmental variable via the Home stack startup, which enables package manager installed tools and libraries to be accessed from the IDE on MacOS and Linux.
User avatar
tperry2x
Posts: 2475
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: What I'm adding, and what I'm planning next...

Post by tperry2x »

OpenXTalkPaul wrote: Sun Oct 06, 2024 4:49 pm Awesome! Ah yes now I recall we've discussed this hidden (except for on Linux) button before.
I don't think we did, although if it was a while ago, I may well have forgotten . That's quite possible too :D
OpenXTalkPaul wrote: Sun Oct 06, 2024 4:49 pm I think what I actually did was change which one to use as "Java Home" in an environmental variable, in order to use the JDK that I wanted to use, but I'd much rather be able to change it (and the Android ADK too) directly from within the IDE.
I've made the button always visible in my next update... more on this further down.
OpenXTalkPaul wrote: Sun Oct 06, 2024 4:49 pm Is there anything preventing the JDK and the ADK from being packaged into an extension bundle? That way it can be downloaded and installed optionally, so getting these dependencies and configuring Android building would be as simple as selecting the extension in OXT's own package manager.
I suppose not, although it's a big download. It's technically already an optional download, in as much as you have to go off and download the Android SDK and the JDK and unzip them in a folder of your choice.
OpenXTalkPaul wrote: Sun Oct 06, 2024 4:49 pm BTW, I don't know if oXT Lite picked this up, but at some point I also added the 'local' install path to the command line paths environmental variable via the Home stack startup, which enables package manager installed tools and libraries to be accessed from the IDE on MacOS and Linux.
No, I didn't add this as of yet - mainly because I wasn't really using the package manager at all yet. I do want to re-enable the plugins on my revised tool palette - as I'd mentioned when I rejigged it that it would make a return. This was a job for when we have a nicer-looking automated OXT repository browser. Perhaps a bit like "synaptic package manager", or "Ubuntu software centre" - so people can browse and add package manager, tools and libraries with a nice UI.

On the next update, I made some modifications. These are:
Modifies the "Mobile Support" to always show the "Choose JDK" button, simplified automatic update checking. Also modifies the updater to relaunch the IDE after quitting.
The simplified update checking means that it'll just tell you when an update is available, rather than you keep having to check it. This is still an option though as I don't want to force that on anyone. This silent background check can be turned off or on in the preferences > Automatic updates:
simples.png
simples.png (2.75 KiB) Viewed 1476 times
There's now no longer any of the "daily, weekly, monthly" dropdowns. I've simplified it to just tell you when one is available.

This is coming soon, I just want to test it first on a few more computers and assorted platforms, just to be sure.
User avatar
richmond62
Posts: 3896
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: What I'm adding, and what I'm planning next...

Post by richmond62 »

licenses.png
licenses.png (57.37 KiB) Viewed 1469 times
-
Permission to have a grand mal epileptic fit . . . 8-)

Who, ever, agrees to anything except as a knee-jerk reflex, rather than by reading through the endlessly tedious and obscure wording?

Can't wait to start developing:
-
SShot 2024-10-07 at 13.40.44.png
SShot 2024-10-07 at 13.40.44.png (469.03 KiB) Viewed 1468 times
-
Suffering serious vipralambha right now as accidently left my mobile phone at home:

"The ecstatic emotion arising due to not being able to embrace and kiss each other as desired is called vipralambha."
https://richmondmathewson.owlstown.net/
User avatar
tperry2x
Posts: 2475
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: What I'm adding, and what I'm planning next...

Post by tperry2x »

richmond62 wrote: Mon Oct 07, 2024 10:39 am Who, ever, agrees to anything except as a knee-jerk reflex, rather than by reading through the endlessly tedious and obscure wording?
Yes, I know.
I feel the same. It's all BS a lot of the time, and only there to keep legal-eagles in a job. However, we'd better include all that before we get shouted at by someone of that ilk. To be clear, all I did was split up the file "Open Source Licenses.txt" into individual buttons, so it was easier to reference.

Then I thought I'd better put a human readable version of GPLv3 in too.
User avatar
richmond62
Posts: 3896
Joined: Sun Sep 12, 2021 11:03 am
Location: Bulgaria
Contact:

Re: What I'm adding, and what I'm planning next...

Post by richmond62 »

Interestingly enough, the person mostly of that ilk has been silent both 'here' and 'there' for quite some time.
https://richmondmathewson.owlstown.net/
User avatar
OpenXTalkPaul
Posts: 2266
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: What I'm adding, and what I'm planning next...

Post by OpenXTalkPaul »

tperry2x wrote: Mon Oct 07, 2024 10:26 am
OpenXTalkPaul wrote: Sun Oct 06, 2024 4:49 pm BTW, I don't know if oXT Lite picked this up, but at some point I also added the 'local' install path to the command line paths environmental variable via the Home stack startup, which enables package manager installed tools and libraries to be accessed from the IDE on MacOS and Linux.
No, I didn't add this as of yet - mainly because I wasn't really using the package manager at all yet. I do want to re-enable the plugins on my revised tool palette - as I'd mentioned when I rejigged it that it would make a return. This was a job for when we have a nicer-looking automated OXT repository browser. Perhaps a bit like "synaptic package manager", or "Ubuntu software centre" - so people can browse and add package manager, tools and libraries with a nice UI.
Oh you've misunderstood, I wasn't talking about any package management that's built into the IDE. I was talking about a operating system level packages, the ones installed by the user via a package manager such as Synaptic or Homebrew. The problem is that by default the $PATH for OXT does not include the '/usr/local/bin' path, So for example when you install a new command line tool via Synaptic, lets say you install 'ffmpeg', from terminal you can call it without using the full path to ffmpeg binary, because the system looks in paths in that environmental variable first and finds it. If you want to access that binary from OXT shell() however, you need to use the full path to the binary because '/usr/local/bin/' is not included anywhere in the $PATH variable. Also if you try to use shell("command -v ffmpeg") the shell() function will not find the ffmpeg binary. Once that directory path is added to the $PATH variable, it will find it and you can then call ffmpeg by name rather than the full path to binary, shell(ffmpeg)!
User avatar
tperry2x
Posts: 2475
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: What I'm adding, and what I'm planning next...

Post by tperry2x »

I've just been testing the latest updates (which ironically) are changes to the updates stack. It now resprings (reopens) the IDE on all platforms when the updates are done.

Of course, you'll not see any changes until the next update (or unless you have updated as far as you can, then choose 're-download last available update again').

I almost got it to work 100% as I'd like, however there's nothing I can do about this warning on MacOS. Sorry Mac users. Agree to it once and it's done.
respring.png
respring.png (57.18 KiB) Viewed 1419 times
You'll see a slightly more presentable (but larger, more annoying) alert on newer MacOS versions - but the end result is the same. Please allow it.

Edit: retracted my update: MacOS has thrown another spanner in the works.
Screenshot 2024-10-07 at 17.51.23.png
Screenshot 2024-10-07 at 17.51.23.png (38.42 KiB) Viewed 1400 times
Ah, that's what happens if you don't allow it. Then the respring won't work anymore, and you have to go into gatekeeper settings (System Preferences > Security and Privacy > "Full Disk Access") and turn the checkbox on again.

Sorry MacOS users. Your OS is what it is.
I can't do anything about how locked down it might be.
(biting my own tongue: "if you can't say anything nice, don't say anything at all" - rather than going off on a tirade about Apple and how they've ruined the OS...)

Edit 2: Re-enabled update again.
User avatar
OpenXTalkPaul
Posts: 2266
Joined: Sat Sep 11, 2021 4:19 pm
Contact:

Re: What I'm adding, and what I'm planning next...

Post by OpenXTalkPaul »

Oh, okay - I understand. No - I'd added that yet, but can do.
Might want to check for it first, I made that change long ago so it may be in the a Home stack script already.

I think it was a different person (AndyP) that I discussed the hidden JDK button with (way back in 2021!)
https://openxtalk.org/forum/viewtopic.php?p=313#p313
User avatar
tperry2x
Posts: 2475
Joined: Tue Dec 21, 2021 9:10 pm
Location: Somewhere in deepest darkest Norfolk, England
Contact:

Re: What I'm adding, and what I'm planning next...

Post by tperry2x »

OpenXTalkPaul wrote: Mon Oct 07, 2024 4:46 pm I think it was a different person (AndyP) that I discussed the hidden JDK button with (way back in 2021!)
https://openxtalk.org/forum/viewtopic.php?p=313#p313
I'm glad we came to the same conclusion anyway, which validates my findings somewhat.

If you select the Android SDK first, then select the JDK (with the button I just made always-visible), then does that mean you don't need anything on local path variable?

I can't see where that's mentioned in the posts though.
I'm also not sure where it's set in the home stack. Do you recall where it's mentioned?
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest