On 2021-04-12 11:00, Raul Miller wrote:
(1) I might want to use code which depends on jqt and/or jhs.
#! /usr/bin/env jqt wd'pc hello closeok' wd'pas 200 200' wd'cc banner static; set banner text "Hello, world!"' wd'pshow' wd'ide hide' This runs as an executable script like any graphical command. It does require jqt in PATH, and a unix environment. For windows I imagine you'd have the same file in a .ijs file that the Windows shell has configured to start with jqt.exe
(2) I might want to figure out which directory my script and/or the j interpreter resides in.
currentDir =: 1!:43'' jDir =: jpath '~install' NB. check SystemFolders_j_
These things are easy when I am running code that I wrote myself. It's tougher when I hand it off to someone else to use. It's kind of easy if I can assume that they're a programmer, who can be counted on to install J, and is interested in doing so. Not so much if they're expecting something else.
RPGMaker MV/MZ and RenPy are multi-platform game engines that people distribute to non-programmers, and the distributions just include a JavaScript and Python interpreter, respectively, along with needed libraries and scripts to start them. This is about how I'd expect to distribute a J app, and it's where J really benefits from open source licensing, vs. systems where you have to take care not to accidentally give the customer a usable programming environment.
Anti-malware measures, in particular, turn this whole scene into a nightmare. Anything which is too easy eventually gets slapped down because someone somewhere took advantage of it.
My understanding is that you run more afoul of anti-malware when you try to automatically unpack assets and try to make it look like your interpreter + code + files are a single convenient binary. RPMG/RenPy do OK with .zips or common installers.
And then there's the ongoing deprecations -- where old stuff no longer works with newer J interpreters. --------------- I am not proposing any specific resolutions here. I am just outlining a situation. I have had some solutions in mind, but other people have tended to have conflicting approaches. FYI,
---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
