Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Jan-Erik Lärka

Pages: [1] 2 3
1
Programming / [Classic Rexx] Set Long File Name
« on: April 18, 2025, 07:50:14 pm »
You may have noticed that Seamonkey, Firefox or Thunderbird or another application all of a sudden (after a restart) has lost all or many settings/profiles etc.
This is not limited to those applications, but as they're a central part of what one use, more likely that you've also have seen.
Files downloaded from the internet these days usually have these long names and software ported from other systems create files with long file names, both for settings and other output.
The problem is that the file system sometimes loose the info about the long file name and revert to a short form with the length 8.3

To improve the chanse to recover files, one can set the .LONGNAME EA (Extended Attribute).
Ported software are unaware of the concept of EA, even "native" software doesn't write .LONGNAME EA to files, thus it is very strange to think that every application has to write .LONGNAME EA to files. It would be more appropiate if the IFS driver would handle something as that...

but JRescuer contain a litte script (setln.cmd) that set .LONGNAME of each file, so that one can recover and set the proper file name.

setln.cmd contain a function that call itself repeatedly (recursively) to go through files and set the .LONGNAME EA.
What the script lack, is the ability to set the file name nor output information about the process.

A rewrite would be interesting to explore that address the issue, as and update to the file system (JFS) and deeper understanding and acceptance to add the feature to the ifs driver is far away.

1. Change the recursive calls
2. Show output of what the script do
3. Rename files that has lost the name

2
Programming / [Classic REXX] Network Map
« on: March 16, 2025, 04:16:38 pm »
I'm trying to write a REXX script to list the devices available on my home LAN.

It use commands available in the OS to get the host name, ip-number and mac address.

Here I can see on the names that it has found computers, mobile phones, vacuum cleaner, routers etc. on the same subnet and indicate if they're offline or not.
I'd also like to, if possible, find out what kind of device the script has listed and set icons accordingly, and not just online/offline. How?!

That also mean that I need help to create the artwork for it.  ;)

The script in default mode without parameters determine the ip-address of the computer, ping and check for others 1 to 255.
With environment variable SET WOL=1 it also send a "wake on lan call" to each machine.
With environment variable SET NET=1 it also create a folder Network Map* in the folder Network, with a sub folder for workgroup* or domain* and individual objects (online*/offline*) for each device. If one click on a device it will refresh (run the script and update the object itself).

3
Programming / GeneologyJ
« on: January 27, 2025, 09:33:03 pm »
Previous versions of GeneologyJ run on OS/2 with OpenJDK, but the one built on sourceforge 6865 (2020-08-25) has been built for Java 1.7 and newer even though it only contain slight changes that doesn't introduce much that require java 1.7

I have now tried to build it myself and adjusted a combined try ... catch and a try ... catch for a file close procedure. The latter may cause problems and need a proper rewrite, but I'd like to ask for your help to see if this build work ok with our OpenJDK.

Perhaps something to look at from an OS/2 perspective as the project is mature and behave very well and is easy to build.

4
Hello,

Would like to see that AOO look like something found in OS/2 applications.

The current/default/available can be found as .zip-files in ...\OpenOffice\share\config
as images.zip, images_brand.zip, images_classic.zip, images_hicontrast.zip and images_industrial.zip
in png format of 16x16 and 26x26 pixels, would be nice if one could use 16x16 & 32x32 or 20x20 & 40x40 instead, but as of now one can specify small/large and a scaling factor in AOO.

Regards,
Jan-Erik

5
Applications / PMInSANE :-P
« on: December 16, 2024, 08:58:30 pm »
I've put togheter this GUI application... nothing fancy, but fun.
It just work and scan stuff on my CanoScan LiDE 25 on both my laptop and workstation with SANE 1.0.27 from Paul Smedley.

Possible parameters with examples/alternatives/info:
-DEVICE plustek:libusb:001:001   (Force the use of a certain device)
-MODE Color                 ( BW, 8G, RGB, Color, ... )
-UNIT cm                       ( mm, cm, inch )
-DPI 300                        ( 75, 150, 300, 600, ... )
-O  C:\Temp                   ( C:\Temp\MyScannedImage )
-AREA 10 10 50 50       ( Left Top X Y )
-BATCH                         (Run in batch mode and return after scan)

6
Programming / ooRexx to control GhostScript
« on: October 14, 2024, 06:37:59 pm »
Hello,

here's a "library" and the script (rename pdf.txt to pdf.cls and TestPDFLib.txt to TestPDFLib.rex ) to use it.
The script should run on win, *nix and os2, but seem to fail on the latter for some functionality.

Note that you may have to tweak ooRexx rexxsetenv.cmd to even be able to access GhostScript.
Run with:
Code: [Select]
rexx TestPDFLib
One can of course write code to do these things in classic rexx, object rexx and plain command line as well,
but the interesting part here is that it should be reusable (not possible with classic rexx).
With some adjustment it should work with Object Rexx as well.

It can be used to merge separate PDF-files, but example of that is not included.


7
Programming / Classic, Regina, Object and Open Object Rexx
« on: October 01, 2024, 06:58:57 pm »
I see that the knowledge of REXX is somewhat limited even with OS/2 users.

Classic Rexx (by IBM) is the default scripting language in OS/2, eComStation and ArcaOS and one just need a simple text editor and write in fairly plain English.
It allow you as a user to write scripts to aid you with certain tasks and it is well integrated with the system so that you don't need to specify an executable to run a script, but it also drive applications as the "engine" written with for example DrDialog, VX-REXX and even code you can write yourself and compile.
It is not possible to create reusable text libraries of code to just call, but one can write functions in the script that perform certain tasks. It's is however possible to use external compiled libraries.

Regina Rexx (by Mark Hessling) is more modern, very similar to Classic Rexx, but lack the system integration.
It is more up to date than Classic Rexx and probably also somewhat more reliable.

Object Rexx (by IBM) addressed some of the shortcomings of Classic Rexx, and one can switch to it in OS/2, eComStation and ArcaOS, while the way to write code also evolved and introduced ~ and arrays with [] but also external reusable code libraries, written in plain text Object Rexx.
Object Rexx is just as well integrated with the base OS as Classic Rexx, can run and use Classic Rexx scripts end external compiled libraries and be the engine for DrDialog, VX-REXX etc., but was never set as default due to that the OS/2 version had some flaws caused by the compiler used, if I remember correctly.

Open Object Rexx (by RexxLA)
has refined what IBM created with Object Rexx and also cleaned up some syntax and introduced a lot of useful and powerful stuff. We now have an up to date and current ooRexx back ported to OS/2 but the integration found in Classic Rexx and Object Rexx is missing so DrDialog, VX-REXX etc. can not benefit from the new features, easier and simpler way to express complicated information and relations etc. but still need to rely on those old scripting engines to be present. If we'd have the intergration Classic Rexx and Object Rexx could be phased out in favor of the new and open version. What we need is what I express as the integration part and that it can run in any command line environment, not only 4OS2.

So what can one do with REXX you wonder?
Alex Taylor has for example written some excellent software that you may have used, both command line scripts and GUI applications like Naps and ANPM to mention a few.
Glassman wrote AutoWGet that is very helpful to fetch things from the internet
and much more...

I use ooRexx to automatically create documents with maps to send to owners of land at work, drive office applications, vector drawing applications such as OpenOffice Draw, Calc etc. split/merge/extract text PDF documents with GhostScript and retrieve routes from google between places etc.

I would like to get your attention to push for an update to the wps integration stuff and enable it for ooRexx on OS/2, without reinventing the wheel from scratch.
The problem is that IBM have a cross licensing agreement with another party (Amiga)?!

8
Setup & Installation / How to? python, pip and language tool
« on: June 11, 2024, 08:28:55 pm »
i have a need to run something that can translate text and the tools provided now all seem to use python and require pip etc.

One can use a standard OS/2 command prompt an run the command as Python 3.7 and onward comes with an ensurepip module.
python -m ensurepip --upgrade
it seem to install version 23, but another run, upgrade it to version 24.

Am aware that it may not know how to handle ArcaOS and OS/2, but it may be possible to iron out some things.

How can one install a downloadable AI tool, translation tool etc. ?
I wouldn't mind a tool to just select what to install.

Example of google translator, but the others seem to have similar issues as seen below.

[C:\usr\lib\python3.9\site-packages]python pip install googletrans
WARNING: The directory 'd:/home/.cache/pip' or its parent directory is not owned
 or is not writable by the current user. The cache has been disabled. Check the
permissions and owner of that directory. If executing pip with sudo, you should
use sudo's -H flag.

Collecting googletrans
  Downloading googletrans-3.0.0.tar.gz (17 kB)
  Installing build dependencies ... error
  error: subprocess-exited-with-error

  pip subprocess to install build dependencies did not run successfully.
  exit code: 2

  [1 lines of output]
  C:\USR\BIN/python.exe: can't open file 'C:/usr/lib/python3.9/site-packages/C:/
usr/lib/python3.9/site-packages/pip': [Errno 2] No such file or directory
  [end of output]

 note: This error originates from a subprocess, and is likely not a problem wit
h pip.
error: subprocess-exited-with-error

pip subprocess to install build dependencies did not run successfully.
exit code: 2

See above for output.

note: This error originates from a subprocess, and is likely not a problem with
pip.

//Jan-Erik

9
Applications / A thought remote 2 local
« on: May 26, 2024, 09:37:41 am »
I would like to discuss something I've thought about for some time.
Do try to keep an open mind as you read it, with portions/combinations of virutal machine, rdp, citrix, odin, compiler, pathremapper etc.

Imagine that we have an OS but yet no current major applications for it.

If we could get one application that run "remotely" or in a virtual environment on another os, that would in the initial release send over bitmaps of the applicaiton window.
On the client side (on our OS) we would have an application that draw the application window on our desktop.
The client handle clipboard, send mouse and keyboard input to the server that start and run the application.
Nothing fancy, this is basiclly VNC today, but without a fully visible desktop.

The next release of the server would send over the resources (dialogs, bitmaps/images etc.)
The next release of the local client use local look and feel for those resources when applicable.

The server should then in small steps take over and act as sandbox to the application on the server.
Send drawing commands through the server instead of capturing images of the window. The server need to return that the drawing operation as "completed successfully" right away to not stall execution, while transferring the information to the client, thus use some asyncronious mechanism.
The client should take over drawing as much as possible.

The server determine portions of the execution that doesn't rely on external libraries (dll:s and system calls) as those should be possible to hand over to the client to store as executable code.

The server determine portions of the execution that rely on system calls and hand those over to the client to call versions available on our OS, compile locally and store as executable code.

I guess that the trickier parts emerge at this point, as the server handle external libraries that depend on each other and recreate/interpret (a 64-bit like odin) send it over to compile locally to our client OS and save as library.

Depending on the server OS, hard coded system paths and delimiters ( / instead of our \ ) may need special attention or subsystem support to not cause headache.

This is also the point when simple applications should be able to run on their on, locally on our until now "client" OS, without server and thus no longar as "client". The more libraries that can be translated the more applications will run, but the hateful exact version numbering problem that seem to be in fashion instead of "improve what you got" may be difficult to overcome.

Someone may have to buy portions of tech from IBM or ... to be able to accelerate hardware graphics.

10
Programming / Rexx dll for UniAud
« on: December 27, 2023, 12:09:49 pm »
Hello,

Here's a library to be used with rexx, designed to have the functionality of unimix.exe
The included script demonstrate what it can do, read it to see what it does.
The script doesn't contain an interactive mode as later versions of unimix do, but instead use a stem array to list and set values that you should find useful.

Use and test the script and library at your own risk, it is provided "AS IS". It is your own fault if you break something with it!

No further documentation, information or source code about the library is included in this package.

I do invite you to improve it! :)

Regards,
//Jan-Erik

11
Applications / 3D solid modelling in OS/2 with Irit and GuiIrit
« on: August 07, 2023, 08:48:05 am »
The only 3D solid modelling tool I've found for OS/2 is Irit V7.0, but I've actually never seen it in action and can't figure out how to make it show something. Input seem text based and I'm used to the point and click of Solid Edge v7 (ca. 1999) to design things.

Did however look at it at the Irit home page this weekend and the documentation mention OS/2 in various places for the current version (v12).

There's also a GUI for it (GUIrit) that use wxWindows. The installer for the win binary specifically mention OS/2!
Anyone got a built copy for OS/2 to spare?

Ohh, btw Sweet Home 3D version 7.1 can be used in 2D mode with OS/2 java 1.6 even though the web page mention that it need newer versions of java.

12
Applications / Apache OpenOffice Base
« on: April 16, 2023, 07:45:06 am »
Hi,

I have a need to use OpenOffice Base on ArcaOS-OS/2 and have now tried it over and over again in several versions over the years...
One can create a new connection, jdbc with OpenJDK 1.6 as well, add tables, use the wizards, create reports with Oracle Report Builder as well.
The problem start as one reopen the saved .odb file, I guess from all retries with different database engines* I've done, that it may skip over some initialiation routine and thus fail (bail out/abort) as it behave ok at first.

What can one do to overcome this?

PostgreSQL
MySQL
hsqldb (both emedded with OpenOffice and as stand alone server)
Derby
dbf
spreadsheet
etc.

Code: [Select]
   EBP     Address    Module     Obj:Offset    Nearest Public Symbol
 --------  ---------  --------  -------------  -----------------------
 Trap  ->  1F47D03E   LIBCN0    0001:000FD03E

 0012FA58  1F47D80A   LIBCN0    0001:000FD80A

 0012FA78  1F3DAC85   LIBCN0    0001:0005AC85

13
Multimedia / Mic/Line in with UniAud (3.0.1)
« on: January 16, 2022, 09:26:02 pm »
Hi,

The new build(s) of UniAud show more and more of the built in sound card (ATI HDA, ALC888) functionality with unimix.
I'd like to use the now enabled/recognized Mic in and/or Line in, but "Digital Audio" recorder and the os2tk45 "Audio Recorder Sample" and "Direct Audio" samples either stall the computer or the application. VoiceType therefore can't enable input.

Are there something to do?

Regards,
//Jan-Erik

14
Programming / redirect stdout, stderr and stdin
« on: July 28, 2021, 09:31:41 pm »
Hello,

would like to run one vio application at the time in a separate thread and redirect stdout, stderr and stdin to control it. Tried variations to the example found in "IBM Developers Toolkit version 4.5", "Control Program Programming Giude and Reference", "Redirecting Standard I/O for Child Processes".

The example only describe how to do it for stdout, but I've found examples that include stderr or stdin, but not quite the way intended here.

sqlite3.exe would be a great example.
One can start it and enter a command, wait for the output and then enter a new command (sql query) and continue, and not just a command at startup.

One would be able to write the support library required for oosqlite and Open Object Rexx 5.0.0 on OS/2-ArcaOS.  ;)

See attachment... Please do tell how it should be written instead.

//Jan-Erik

15
Setup & Installation / JRUN - Looking for Guinea pig(s)
« on: January 11, 2021, 03:12:28 pm »
Hello,

I'd like to ask you for help to test a rather advanced script I've created to aid launch of java applications.
The goal is to make it as easy to install a java app as click on a .jar/.class file.

The script can use OpenJDK 6 and Java 4 in parallel. (See README)

Please do tell me what alterations/adjustments and additions you make to the script as well as faults and problems.

Regards,
//Jan-Erik

Remember: If something goes wrong, it's your fault!

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 'AS IS' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Pages: [1] 2 3