Author Topic: "Pack this tree" on XWorkplace - ArcaOS  (Read 11347 times)

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4937
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
"Pack this tree" on XWorkplace - ArcaOS
« on: September 11, 2020, 12:32:17 am »
Hi

I have a little issue with ArcaOS 5.0.6.

I always like to install the full XWorkplace full over ArcaOS since I use the "Right click, Folder Action - Pack this tree" and some other feature like the OS/2 Kernel and WPS Classes view.

But now that I installed ArcaOS 5.0.6 I noticed it has XWorkplace 1.0.13.1 preinstalled, and I'm not sure if I should install version 1.0.13 full over it. And I'm not able to find any 1.0.13.1 installer.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

ivan

  • Hero Member
  • *****
  • Posts: 1587
  • Karma: +19/-0
    • View Profile
Re: "Pack this tree" on XWorkplace - ArcaOS
« Reply #1 on: September 11, 2020, 03:02:49 am »
Hi martin,

I just deleted the WARPIN entry for the ArcaOS install and installed the full version where I wanted it then deleted the xwp dir in sys dir. 

I might be considered an old curmudgeon by many but I have been using OS/2 since version 2.1 and now being in my 80s am rather set in my ways which is why it takes ages for me to get a new install to the way I expect it to be - this one is taking longer because I have to change the M$ flat style icons to OS/2 sloped ones, if anyone knows a quick way of doing that please let me know.

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1599
  • Karma: +4/-2
    • View Profile
Re: "Pack this tree" on XWorkplace - ArcaOS
« Reply #2 on: September 11, 2020, 03:10:52 am »
Quote
I always like to install the full XWorkplace full over ArcaOS since I use the "Right click, Folder Action - Pack this tree" and some other feature like the OS/2 Kernel and WPS Classes view.

"Right click, Folder Action - Pack this tree" works fine, but it has no icon. Put an icon into System Setup-> Extended Menu Options-> Folder actions. Then add:
Path and file name: C:\sys\apps\xwps\bin\packtree.cmd
Parameters: %*
Working directory empty

Adjust the drive letter, as required.

It is also a good idea to modify C:\sys\apps\xwps\bin\packtree.cmd to change the ZIP parameters (in the command) to -r9yS. "y" handles symlinks, and "S" handles hidden, and system, files (case is important).

Quote
But now that I installed ArcaOS 5.0.6 I noticed it has XWorkplace 1.0.13.1 preinstalled, and I'm not sure if I should install version 1.0.13 full over it. And I'm not able to find any 1.0.13.1 installer.

Personally, I don't see any reason to do that. The installer should be available, but be aware that the non Arca Noae subscription package (which is at HOBBES) is missing a couple of things (which probably won't be removed, if they already exist). In fact, it is quite likely that 1.0.13.1 only changes the Arca Noae specific parts, so no freely available version would be needed, since nothing has changed.

Mathias

  • Full Member
  • ***
  • Posts: 196
  • Karma: +2/-0
  • using ArcaOS
    • View Profile
    • IRC
Re: "Pack this tree" on XWorkplace - ArcaOS
« Reply #3 on: September 11, 2020, 10:49:18 am »
I have to change the M$ flat style icons to OS/2 sloped ones, if anyone knows a quick way of doing that please let me know.

Hmm.. I suppose you could use the eStyler to change to another "theme". These usually include icons also. This way you can "go back" to Warp4 style, Warp3, etc within seconds.

For my case, I always loved how Warp3 looked like, especially the sunken edges on select bars in menus.
Warp4 already came with flat select bars in menus, and.. for my taste.. wasn't looking as good anymore.
So.. if you perhaps know a way how to get the sunken edges back... : ]

Two examples:
Warp 3: https://www.operating-system.org/betriebssystem/bsgfx/ibm/os2-scr-08.gif
Warp4: https://www.operating-system.org/betriebssystem/bsgfx/ibm/os2warp4-scr-a5.png

Mind the difference:
The Warp3 screenshot has sunken edge (no colour) select bars (see the "Öffnen" menu entry), while Warp4 already had the blue background (XP-style) select bars already. (See the "Open as" menu entry)


So.. if anyone knows a way (or maybe thirdparty eStyler "theme") to get the sunken edge select bars in ArcaOS.. please let me know *__*


modified: Added links
« Last Edit: September 11, 2020, 10:56:26 am by Mathias »

David Graser

  • Hero Member
  • *****
  • Posts: 955
  • Karma: +104/-0
    • View Profile
Re: "Pack this tree" on XWorkplace - ArcaOS
« Reply #4 on: September 11, 2020, 02:12:16 pm »
I too have also liked the sunken selection bar.  That might be a good addition to XWP if possible.  But as always, programmers are few and funds short.

Pete

  • Hero Member
  • *****
  • Posts: 1331
  • Karma: +9/-0
    • View Profile
Re: "Pack this tree" on XWorkplace - ArcaOS
« Reply #5 on: September 12, 2020, 08:29:21 pm »
Hi ivan

Computer -> System Setup -> Appearance -> Icon Themes comes in useful although you may want to add in themes from eCS to give more choice.


Regards

Pete

ivan

  • Hero Member
  • *****
  • Posts: 1587
  • Karma: +19/-0
    • View Profile
Re: "Pack this tree" on XWorkplace - ArcaOS
« Reply #6 on: September 13, 2020, 03:52:26 pm »
Hi Pete,

It would be a good idea except there is no 'icon Themes' under 'Appearance', the nearest is 'Scheme Palette' which doesn't change the icons.

BTW are you going to update your USBCFG to include the XHCD driver?

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1599
  • Karma: +4/-2
    • View Profile
Re: "Pack this tree" on XWorkplace - ArcaOS
« Reply #7 on: September 13, 2020, 05:40:23 pm »
Quote
It would be a good idea except there is no 'icon Themes' under 'Appearance'

Well, yes there is, or there should be. It runs C:\SYS\APPS\ITHEME\ITHEME.EXE with working directory set to C:\SYS\APPS\ITHEME. Of course, if you have unexpectedly changed something, it may not exist.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: "Pack this tree" on XWorkplace - ArcaOS
« Reply #8 on: September 13, 2020, 06:46:06 pm »
I guess the 3D look for selected menu items is hard-coded in pmmerge.dll. Even the scheme palette doesn't provide that option.
« Last Edit: September 13, 2020, 09:07:33 pm by Andreas Schnellbacher »

Pete

  • Hero Member
  • *****
  • Posts: 1331
  • Karma: +9/-0
    • View Profile
Re: "Pack this tree" on XWorkplace - ArcaOS
« Reply #9 on: September 13, 2020, 07:30:38 pm »
Hi ivan

Unless you somehow managed to deselect it during installation both eCS and ArcaOS installed ithemes.exe somewhere on your, usually boot, drive. If not you should find it on the ArcaOS installation media [DVD/USB]:\CID\SERVER\ARCAPKG\ITHEME.WPI


Re: USBcfg

Yes, I am currently working on it, been having a few health issues that have prevented me doing much of anything for a while, months in fact, but am now getting back into a couple of projects slowly as health improves.


Regards

Pete
« Last Edit: September 13, 2020, 07:34:52 pm by Pete »

ivan

  • Hero Member
  • *****
  • Posts: 1587
  • Karma: +19/-0
    • View Profile
Re: "Pack this tree" on XWorkplace - ArcaOS
« Reply #10 on: September 13, 2020, 09:35:01 pm »
Hi Doug and Pete,

I couldn't find it on the hard disk so I installed it from the DVD.  I am now a happy camper with my usual icons back - thanks

Pete, take care of yourself and don't over do it too soon.

Martin Iturbide

  • OS2World NewsMaster
  • Global Moderator
  • Hero Member
  • *****
  • Posts: 4937
  • Karma: +44/-1
  • Your Friend Wil Declares...
    • View Profile
    • Martin's Personal Blog
Re: "Pack this tree" on XWorkplace - ArcaOS
« Reply #11 on: September 14, 2020, 05:05:09 pm »
Thanks for the feedback. I have the "Pack this tree" back on the WPS. Thanks Doug.

Regards
Martin Iturbide
OS2World NewsMaster
... just share the dream.

Andreas Schnellbacher

  • Hero Member
  • *****
  • Posts: 827
  • Karma: +14/-0
    • View Profile
Re: "Pack this tree" on XWorkplace - ArcaOS
« Reply #12 on: September 14, 2020, 10:10:05 pm »
Hi all, I've finally ported my GetRealCase function to REXX and have created a replacement for XWP's packtree.cmd. I always found it annoying that the original script always creates uppercased zip filenames. (I guess it's an XWP bug when the Configuration folder feature is used.)

Here's a replacement/extension. It also adds the zip option 'S' (include system and hidden files):
  • Create a new file. Give it the name e.g. PackTreeRealCase.cmd.
  • Copy the contents of the following code into it.
  • Then open the properties of the program object System Setup ->  XWorkplace Configuration Folder -> Folder actions -> Pack tree.
  • Under "Path and filename" replace the entry with: <path>PackTreeRealCase.cmd, where <path> is the path where you placed the .cmd file. Let the other fileds empty.
  • To restore the original behavior, just restore the entry, e.g. C:\sys\apps\xwps\bin\packtree.cmd

Code: [Select]
/* REXX ------------------------------------------------------------------ */
/* This is a replacement for XWP's packtree.cmd.                           */
/* It works around the XWP flaw to always return the filename of a folder  */
/* in uppercase.                                                           */
/* Therefore it uses the GetRealCase function. That uses SysFileTree,      */
/* which uses DosFind* to query the real case of a file spec.              */
/* Unfortunately DosFind* returns only the last segment in the correct     */
/* case, so it must be processed segment-wise.                             */
/* Additionally, several ZipOptions are specified and the default value    */
/* (the last one) was changed.                                             */

'@ECHO OFF'

CALL RxFuncAdd 'SysLoadFuncs', 'REXXUTIL', 'SysLoadFuncs'
CALL SysLoadFuncs

/* The last one is the active one */
ZipOptions = '-r9'     /* original XWP */
ZipOptions = '-rSX9'   /* with system attributes, without EAs */
ZipOptions = '-rS9'    /* with system attributes */

Dirname = DIRECTORY()
Dirname = GetRealCase( Dirname)

Foldername = FILESPEC( 'NAME', Dirname)

SAY 'Packing 'Dirname' into file 'Foldername'.zip...'
'zip 'ZipOptions' ..\'Foldername'.zip *'

EXIT

/* ----------------------------------------------------------------------- */
/* Gets the real case of a file system object. Returns the input if it     */
/* doesn't exist.                                                          */
/* DosFind* for a filename or dirname returns the correct case, but only   */
/* for the last segment. To get the correct case for the entire string, it */
/* must be processed segment-wise.                                         */
GetRealCase:

DO 1
   PARSE ARG FileMask

   fFile = 0
   fDir  = 0
   rc = 0

   /* Process only full file specs */
   IF SUBSTR( FileMask, 2, 1) <> ':' THEN
      LEAVE

   /* Check if dir or file to call the correct proc for the last segment */
   SELECT
      WHEN FileExist( FileMask) THEN
         fFile = 1
      WHEN DirExist( FileMask) THEN
         fDir  = 1
      /* Handle drive only */
      WHEN RIGHT( FileMask, 1) = ':' THEN
      DO
         FileMask = TRANSLATE( FileMask)
         LEAVE
      END
   OTHERWISE
      /* Process only existing file specs */
      LEAVE
   END

   Rest = FileMask
   NewFileMask = ''
   DO WHILE Rest <> ''
      PARSE VALUE Rest WITH Next'\'Rest
      IF Next = '' THEN
         ITERATE

      /* Drive */
      IF RIGHT( next, 1) = ':' THEN
      DO
         NewFileMask = NewFileMask''TRANSLATE( Next)
         /* For root dir: append '\' here, because no more segemnt exists */
         IF RIGHT( FileMask, 2) = ':\' THEN
            NewFileMask = NewFileMask'\'
         ITERATE
      END

      IF Rest = '' THEN
      DO
         /* Last segment */
         SELECT
            WHEN fFile THEN
            DO
               NewFileMask = NewFileMask'\'Next
               Found. = ''
               Found.0 = 0
               rcx = SysFileTree( NewFileMask, 'Found.', 'FO')
               IF Found.0 > 0 THEN
                  NewFileMask = Found.1
            END
            WHEN fDir THEN
            DO
               NewFileMask = NewFileMask'\'Next
               Found. = ''
               Found.0 = 0
               rcx = SysFileTree( NewFileMask, 'Found.', 'DO')
               IF Found.0 > 0 THEN
                  NewFileMask = Found.1
            END
         END
      END
      ELSE
      DO
         /* Other segments */
         NewFileMask = NewFileMask'\'Next
         Found. = ''
         Found.0 = 0
         rcx = SysFileTree( NewFileMask, 'Found.', 'DO')
         IF Found.0 > 0 THEN
            NewFileMask = Found.1
      END

   END  /* DO WHILE Rest <> '' */

   SAY 'FileMask = 'FileMask', NewFileMask = 'NewFileMask
   FileMask = NewFileMask

END

RETURN FileMask

/* ----------------------------------------------------------------------- */
FileExist: PROCEDURE EXPOSE (GlobalVars)
   rc = ERROR.NO_ERROR

   PARSE ARG Filename

   IF FileName = '' THEN
      RETURN( 0)
   ELSE
      RETURN( STREAM( Filename, 'C', 'QUERY EXISTS') <> '')

/* ------------------------------------------------------------------------- */
DirExist: PROCEDURE EXPOSE (GlobalVars)
   rc = ERROR.NO_ERROR

   PARSE ARG Dirname

   Found.0 = 0
   rcx = SysFileTree( Dirname, 'Found.', 'DO')

   RETURN( Found.0 > 0)