EMULAB Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

The new forum is online, hope you enjoy it!

Pages: [1]   Go Down

Author Topic: Convert ClrMAME unneeded masks to new scanner format  (Read 2929 times)

carbonide2

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 16
  • Operating System:
  • Mac OS X 10.15 Mac OS X 10.15
  • Browser:
  • Firefox 129.0 Firefox 129.0
    • View Profile

Hi,

for years I've been using the following masks with ClrMAME on macOS:



The first line is for custom icon folders. The asterisk is needed because there is an invisible character at the end of the name that I don't know and can't type. The second line is for folders that reside on servers and contains some housekeeping values for that folder (like window position and size etc.).

I've tried a lot of different formats but I can't get it right on scanner. Would somebody please be so nice and show me how it's done?
Logged


Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3414
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 128.0.0.0 Chrome 128.0.0.0
    • View Profile
Re: Convert ClrMAME unneeded masks to new scanner format
« Reply #1 on: 30 August 2024, 13:16 »

unneeded masks are now regular expressions...so the following should fit your needs:

.*(\.DS_Store|Icon.+)$

so it translates to
anything at the beginning (.*)
followed by either '.DS_Store' (\.DS_Store)
or (|)
'Icon. with one extra character' (Icon.+)
which forms the end of the text ($)

The DS Store example is showed as tooltip by the way :-)
« Last Edit: 30 August 2024, 13:17 by Roman »
Logged

carbonide2

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 16
  • Operating System:
  • Mac OS X 10.15.7 Mac OS X 10.15.7
  • Browser:
  • Safari 17.6 Safari 17.6
    • View Profile
Re: Convert ClrMAME unneeded masks to new scanner format
« Reply #2 on: 30 August 2024, 13:51 »

Is there any other forum where I can post about scanner? Anything more than a line and spam filter here gets wild.
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3414
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 128.0.0.0 Chrome 128.0.0.0
    • View Profile
Re: Convert ClrMAME unneeded masks to new scanner format
« Reply #3 on: 30 August 2024, 14:07 »

Private message should work and as mentioned: Logout, maybe clean cookies, login usually works fine....
Logged

carbonide2

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 16
  • Operating System:
  • Mac OS X 10.15.7 Mac OS X 10.15.7
  • Browser:
  • Safari 17.6 Safari 17.6
    • View Profile
Re: Convert ClrMAME unneeded masks to new scanner format
« Reply #4 on: 30 August 2024, 21:07 »

The above mentioned string still does not catch folder icon files. Maybe Apple changed the name but I can only see "Icon" in terminal. the '*' of ClrMAME seems to catch all the cases (0 or more characters).

Also, of 6 icon files only 4 are reported as unneeded:

2024-08-30 14:44:04   error   can't determine file size of \\vmware-host\Shared Folders\MAME\CHDs\Icon
2024-08-30 14:44:04   error   can't determine file size of \\vmware-host\Shared Folders\MAME\LDs\Icon
2024-08-30 14:44:04   error   can't determine file size of \\vmware-host\Shared Folders\MAME\ROMs\Icon
2024-08-30 14:44:04   error   can't calculate crc32 of \\vmware-host\Shared Folders\MAME\CHDs\Icon
2024-08-30 14:44:04   error   can't calculate crc32 of \\vmware-host\Shared Folders\MAME\LDs\Icon
2024-08-30 14:44:04   error   can't calculate crc32 of \\vmware-host\Shared Folders\MAME\ROMs\Icon
2024-08-30 14:44:04   info   scan machine
2024-08-30 14:44:05   info   update missing information
2024-08-30 14:44:07   info   scan process end, took 16 seconds
2024-08-30 14:44:07   info   fix process start
2024-08-30 14:44:07   error   can't backup \\vmware-host\Shared Folders\MAME\CHDs\Icon
2024-08-30 14:44:08   error   can't backup \\vmware-host\Shared Folders\MAME\LDs\Icon
2024-08-30 14:44:08   error   can't backup \\vmware-host\Shared Folders\MAME\ROMs\Icon
2024-08-30 14:44:08   error   can't backup \\vmware-host\Shared Folders\MAME\Extras\samples\Icon
2024-08-30 14:44:08   info   fix process end, took 1 second
2024-08-30 14:44:08   info   saving output and fixdat
2024-08-30 14:44:14   info   47098 of 47098 machines in selected filtered mode
2024-08-30 14:44:14   info   41195 complete, 5903 empty machines
2024-08-30 14:44:14   warning   4 unneeded files/folders

« Last Edit: 30 August 2024, 21:09 by carbonide2 »
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3414
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 128.0.0.0 Chrome 128.0.0.0
    • View Profile
Re: Convert ClrMAME unneeded masks to new scanner format
« Reply #5 on: 31 August 2024, 07:10 »

Can you send me one of such icon files (e.g. compressed in a zip, so that the full filename is intact).

The "can't determine file size of " and "can't calculate.." messages seems to be correct though since it first tries to read the file to check if it's something valid. Unneeded mask files are filtered out on a later stage...when they were detected as being unneeded.
However I might be able to filter out such masked files from error messages.....I take a note.


Maybe there are more than one printable character at the end...you can try something like this:

.*(\.DS_Store|\\Icon.*)$

The change is that it now expects Icon after a "\" and there can be anything before the end of the line....
« Last Edit: 31 August 2024, 07:27 by Roman »
Logged

carbonide2

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 16
  • Operating System:
  • Mac OS X 10.15.7 Mac OS X 10.15.7
  • Browser:
  • Safari 17.6 Safari 17.6
    • View Profile
Re: Convert ClrMAME unneeded masks to new scanner format
« Reply #6 on: 31 August 2024, 07:58 »

Here is an example:

Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3414
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 128.0.0.0 Chrome 128.0.0.0
    • View Profile
Re: Convert ClrMAME unneeded masks to new scanner format
« Reply #7 on: 31 August 2024, 09:39 »

Thanks, I will have a look on it over the weekend....
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3414
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 128.0.0.0 Chrome 128.0.0.0
    • View Profile
Re: Convert ClrMAME unneeded masks to new scanner format
« Reply #8 on: 31 August 2024, 13:42 »

Hmm....your zip contains two icon files.
One in the MAME folder, named 'Icon_" and one in the _MACOSX folder named "._Icon_" and both are matched by .*(\.DS_Store|Icon.+)$ reg ex.

You can try .*(\.DS_Store|Icon.*)$
The . after Icon refers to any possible character, and the * means none of them , one or more of them....That should actually match anything Icon related....
Logged

carbonide2

  • Member
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 16
  • Operating System:
  • Mac OS X 10.15.7 Mac OS X 10.15.7
  • Browser:
  • Safari 17.6 Safari 17.6
    • View Profile
Re: Convert ClrMAME unneeded masks to new scanner format
« Reply #9 on: 31 August 2024, 20:51 »

In pre-macOS times, Macintosh files could have a resource fork (it was an inherent part of a file). To ensure compatibility with systems that don't support that, ZIP files contain those _MACOSX folders that contain a "normal" file copy of the resource fork.
I don't know of any app who still uses them but apparently Apple's compression engine still includes them in an archive.

I tried the new exclude mask string, icon files are still flagged. Could we achieve a better result with scanner simply ignoring invisible files (which all of these special files are)?
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3414
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 128.0.0.0 Chrome 128.0.0.0
    • View Profile
Re: Convert ClrMAME unneeded masks to new scanner format
« Reply #10 on: 01 September 2024, 12:32 »

Hmm..interesting since the regular expression actually should match any possible character in there, no matter how many unprintable ones follow. I will check with some colleagues who maybe able to create me 10 folders with such files....

simply ignoring hidden files..hmm..I will do some tests....
Logged

Roman

  • Global Moderator
  • Member
  • ***
  • Karma: 120
  • Offline Offline
  • Posts: 3414
  • Operating System:
  • Windows NT 10.0 Windows NT 10.0
  • Browser:
  • Chrome 128.0.0.0 Chrome 128.0.0.0
    • View Profile
Re: Convert ClrMAME unneeded masks to new scanner format
« Reply #11 on: 01 September 2024, 19:06 »

hmm...according to the internet, MacOS creates it as "Icon" followed by a carrige return character. So just for a quick test you may try:

.*(\.DS_Store|Icon\r)$


This won't hide the "can't determine file size" or "can't calculate crc32 of" log message yet....but shouldn't list it as unneeded hopefully....
« Last Edit: 01 September 2024, 19:19 by Roman »
Logged
Pages: [1]   Go Up
 

Page created in 0.087 seconds with 21 queries.