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

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!

Post a reply


This question is a means of preventing automated form submissions by spambots.
Smilies
:D :) ;) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :!: :?: :idea: :arrow: :| :mrgreen: :geek: :ugeek:

BBCode is ON
[img] is ON
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: What I'm adding, and what I'm planning next...

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

by tperry2x » Mon Oct 14, 2024 5:52 pm

tperry2x wrote: Wed Aug 28, 2024 5:30 am ...which is what I did with that RC4 version of your 'Don't panic edition' I mocked up for you...
Quoting myself here, but I've also 'mocked up' an RC4 version of 'Don't panic edition' for Windows.

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

by tperry2x » Wed Oct 09, 2024 7:41 pm

richmond62 wrote: Wed Oct 09, 2024 5:37 pm Tried that twice, and baith times it didnae wark. 8-)
If it didn't work, please see where I mention here.

"that's what happens if you don't allow it. The respring won't work and you have to go into gatekeeper settings (System Preferences > Security and Privacy > "Full Disk Access") and turn the checkbox on"
[for the 'oxt-respring.app']

Of course, I expected MacOS to block the attempts at doing this at every turn. I wouldn't be surprised at all if MacOS 15 Sequoia (Redwood, Pine, MDF or whatever chintzy name it's now got) blocks that as default.
Either way, once you allow that in Gatekeeper system preferences, then it's done.

more-gatekeeper-problems.png
more-gatekeeper-problems.png (83.89 KiB) Viewed 1621 times
Apparently, this is how it looks in newer versions of ImageOS:

apparently.png
apparently.png (239.01 KiB) Viewed 1617 times

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

by richmond62 » Wed Oct 09, 2024 5:37 pm

Screenshot 2024-10-09 at 20.34.29.png
Screenshot 2024-10-09 at 20.34.29.png (199.17 KiB) Viewed 1655 times
-
MacOS 12.7

Tried that twice, and baith times it didnae wark. 8-)

Aiblins it micht wark on MacOS 15.1: I'll gae it a gang in the forenoon.

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

by OpenXTalkPaul » Mon Oct 07, 2024 10:01 pm

tperry2x wrote: Mon Oct 07, 2024 5:30 pm 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?
To be honest I can't recall exactly what I was doing when messing with 'java_home', but It was probably while messing about with OpenJDK or GraalVM. I beleive It's actually Java that needs the Java_Home environmental variable set, not so much the IDE. "revInternal_SetJAVA_HOME" seems to be the command that sets JAVA_HOME for the IDE, but I'm not sure where that code exists (I'll try to find it later).
This article here talks about setting the variable via with command lines on Linux, macOS and Windows: https://www.baeldung.com/java-home-on-w ... os-x-linux

SO post here: https://stackoverflow.com/questions/228 ... -os-x-10-9
The answer shows how to specify a specific version of Java to use on macOS (bash or zsh):
f you're using bash, all you have to do is:

echo export "JAVA_HOME=\$(/usr/libexec/java_home)" >> ~/.bash_profile
If you're using zsh (which probably means you're running macOS Catalina or newer), then it should instead be:

echo export "JAVA_HOME=\$(/usr/libexec/java_home)" >> ~/.zshrc
In either case, restart your shell.

If you have multiple JDK versions installed and you want it to be a specific one, you can use the -v flag to java_home like so:

echo export "JAVA_HOME=\$(/usr/libexec/java_home -v 1.7)" >> ~/.bash_profile
______________________________________________________________________________

I added lines that tack the ':usr/local/bin' on to the $PATH environmental variable, they weren't in the Home script originally. I'm guessing the Environmental variables are originally set by the Engine but tacking on the extra directory in the 'on start' handler works fine for me.
This shows where I added the script in the Home stack:
https://github.com/OpenXTalk-org/OpenXt ... cript#L379
The comment with that script is about a situation if you have duplicates or different versions of the same command line tool but in different directories, the operating system should search these directories in the order they're listed and stop searching once it's found a binary with the requested name in one of the directories. So you may want them in a different order if you're trying to override a version of the binary installed on the system's directory.
The reverse would be something like:

Code: Select all

put "/usr/local/bin:" before $PATH
Here's a discussion on the same issue I found:
https://forums.livecode.com/viewtopic.php?t=37042
According to 'over there' LCMark the engine inherits the $PATH variable from whatever process launched it. On macOS that's likely to be Finder.app. If this is the case then I would imagine it wasn't really an issue for Linux users, since on Linux the .desktop file probably launches the engine with shell commands it should have inherit the same Environment as Bash (or whatever alternative shell your distro may be using).

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

by tperry2x » Mon Oct 07, 2024 5:30 pm

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?

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

by OpenXTalkPaul » Mon Oct 07, 2024 4:46 pm

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

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

by tperry2x » Mon Oct 07, 2024 4:41 pm

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 1427 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 1408 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.

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

by OpenXTalkPaul » Mon Oct 07, 2024 4:30 pm

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)!

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

by richmond62 » Mon Oct 07, 2024 11:25 am

Interestingly enough, the person mostly of that ilk has been silent both 'here' and 'there' for quite some time.

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

by tperry2x » Mon Oct 07, 2024 11:08 am

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.

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

by richmond62 » Mon Oct 07, 2024 10:39 am

licenses.png
licenses.png (57.37 KiB) Viewed 1477 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 1476 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."

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

by tperry2x » Mon Oct 07, 2024 10:26 am

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 1484 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.

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

by OpenXTalkPaul » Sun Oct 06, 2024 4:49 pm

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.

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

by tperry2x » Sat Oct 05, 2024 9:19 pm

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 1545 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 1531 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.

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

by richmond62 » Sat Oct 05, 2024 8:04 am

I'm just finding things hard to understand.

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

by tperry2x » Sat Oct 05, 2024 7:50 am

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?

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

by richmond62 » Sat Oct 05, 2024 7:48 am

I'm rambling on, but skip to the last line of this post
Unlikely with those instructions . . . :)

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

by tperry2x » Sat Oct 05, 2024 7:46 am

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.

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

by richmond62 » 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 presumably to show how one could 'expose' that hidden button?

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

by tperry2x » Sat Oct 05, 2024 7:43 am

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.

Top