Author Topic: $PROGDIR variable not working on Attract Mode for MacOS  (Read 159 times)

tuxic

  • Newbie
  • *
  • Posts: 4
    • View Profile
$PROGDIR variable not working on Attract Mode for MacOS
« on: January 13, 2021, 02:26:20 PM »
Hi all! I'm a new member here, and I apologize for my first post being a support request.

I have experience working with the settings of AM and have built a multi-system cabinet with it running on windows.
However, now I want to use most of what I built on MacOS but am having problems with the $PROGDIR variable, which does not seem to work on my MacOS setup.
My wheel art and other menu-art/videos do not load when using the $PROGDIR variable, however, as soon as I change that to absolute path, it runs without a problem

The code sample below is the console output of running attract mode. I understand the emulator I selected for this representation is a windows .exe file, but for the purpose of the demonstration should suffice, where my intent is to show that the $PROGDIR variable is being replaced by an empty string

Code: [Select]
Attract-Mode v2.6.1 (OSX, SFML 2.5.1 +FontConfig +SWF +Curl)
avcodec 58.54.100 / avformat 58.29.100 / swscale 5.5.100 / avutil 56.31.100 / swresample 3.5.100

Config: /Volumes/MediaBackup/Games/emu/Attract/attract.cfg

*** Initializing display: 'Sega Genesis'
 - Loaded master romlist 'Sega Genesis' in 72 ms (733 entries kept, 0 discarded)
 - Constructed 2 filters in 0 ms (1466 comparisons)
Fontconfig error: Cannot load default config file
 ! Unexpectedly lost focus to: Unknown
Attract-Mode Version: v2.6.1
Screen aspect ratio: 16x10
Resolution: 2880x1800
Shader GLSL available: 1
OS: OSX
using settings[16x10][aspectDepend][res_x] : 1920
using settings[16x10][aspectDepend][res_y] : 1200
using settings[16x10][aspectDepend][maskFactor] : 1.9
 - Loaded layout: /Volumes/MediaBackup/Games/emu/Attract/layouts/Sega Genesis/ (layout.nut)
 - Constructed 1 filters in 0 ms (12 comparisons)
Attract-Mode Version: v2.6.1
Screen aspect ratio: 16x10
Resolution: 2880x1800
Shader GLSL available: 1
OS: OSX
using settings[16x10][aspectDepend][res_x] : 1920
using settings[16x10][aspectDepend][res_y] : 1200
using settings[16x10][aspectDepend][maskFactor] : 1.9
 - Loaded layout: /Volumes/MediaBackup/Games/emu/Attract/layouts/Favourites/ (layout.nut)

AN ERROR HAS OCCURED [the index '0' does not exist]

CALLSTACK
*FUNCTION [system_stats()] /Volumes/MediaBackup/Games/emu/Attract/layouts/Favourites/layout.nut line [1220]

LOCALS
[curr_sys] "Displays Menu"
[ttime] 0
[var] 2
[ttype] 0
[this] TABLE
Script Error in transition function: system_stats - the index '0' does not exist

*** Initializing display: 'Sega Genesis'
 - Loaded master romlist 'Sega Genesis' in 13 ms (733 entries kept, 0 discarded)
 - Constructed 2 filters in 0 ms (1466 comparisons)
Attract-Mode Version: v2.6.1
Screen aspect ratio: 16x10
Resolution: 2880x1800
Shader GLSL available: 1
OS: OSX
using settings[16x10][aspectDepend][res_x] : 1920
using settings[16x10][aspectDepend][res_y] : 1200
using settings[16x10][aspectDepend][maskFactor] : 1.9
 - Loaded layout: /Volumes/MediaBackup/Games/emu/Attract/layouts/Sega Genesis/ (layout.nut)
Warning: could not locate rom.  Best guess: /emulators/Sega Genesis/roms/Wonder Boy V - Monster World III (J).zip
 - Working directory: /emulators/Sega Genesis/
*** Running: /emulators/Sega Genesis/Fusion.exe "/emulators/Sega Genesis/roms/Wonder Boy V - Monster World III (J).zip" -gen -fullscreen
Warning, chdir(/emulators/Sega Genesis/) failed.
Error executing: /emulators/Sega Genesis/Fusion.exe "/emulators/Sega Genesis/roms/Wonder Boy V - Monster World III (J).zip" -gen -fullscreen
 - Constructed 1 filters in 0 ms (12 comparisons)

Here is my "Sega Genesis.cfg" emulator config file.

Code: [Select]
# Generated by Attract-Mode v2.6.1
#
executable           $PROGDIR/emulators/Sega Genesis/Fusion.exe
args                 "[romfilename]" -gen -fullscreen
workdir              $PROGDIR/emulators/Sega Genesis/
rompath              $PROGDIR/emulators/Sega Genesis/roms/
romext               .zip
system               Sega Genesis
info_source          thegamesdb.net
exit_hotkey          Joy0 Button9
pause_hotkey         P+RAlt
artwork    boxart          $PROGDIR/menu-art/Sega Genesis/boxart/
artwork    flyer           $PROGDIR/menu-art/Sega Genesis/flyer/
artwork    marquee         $PROGDIR/menu-art/Sega Genesis/marquee/
artwork    snap            $PROGDIR/menu-art/Sega Genesis/snap/
artwork    video           $PROGDIR/menu-art/Sega Genesis/video/
artwork    wheel           $PROGDIR/menu-art/Sega Genesis/wheel/

My question is, does the $PROGDIR variable work on AM for MacOS?

Cheers.

tuxic

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: $PROGDIR variable not working on Attract Mode for MacOS
« Reply #1 on: January 14, 2021, 07:47:25 AM »
I wonder if anybody else is trying this on MacOS. Perhaps it's something about my setup, like the long path I'd be trying to replace with $PROGDIR. I have not tried moving the directory somewhere else for a shorter path yet...

hermine.potter

  • Hero Member
  • *****
  • Posts: 623
    • View Profile
Re: $PROGDIR variable not working on Attract Mode for MacOS
« Reply #2 on: January 14, 2021, 12:52:32 PM »
I'm not using a Mac. Is your environment $PROGDIR correct?
Attractmode is case sensitive. For example windows environment for C:\Program Files :

do not work:
executable           %programfiles%\MyProgram.exe

works:
executable           %PROGRAMFILES%\MyProgram.exe

See
AM Version : 2.6.1
Input : Mad Catz Brawlstick; Mouse; Keyboard; Xbox360 Wireless
Cabinet : Yes
OS : Windows10 Pro
System : Dell Precision T3500 ; Intel X5650 ; 12GB RAM

tuxic

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: $PROGDIR variable not working on Attract Mode for MacOS
« Reply #3 on: January 14, 2021, 07:34:47 PM »
Thanks for checking in.
Well, the documentation references the variable $PROGDIR (all upper-case letters). On Windows this works fine, but when I ported my configs to MacOS, it didn't.
I tried with $progdir and $Progdir as well, but no dice...

I wish someone running AM on a Mac could try this and share their results.

Cheers.

tuxic

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: $PROGDIR variable not working on Attract Mode for MacOS
« Reply #4 on: January 20, 2021, 12:26:21 PM »
So I made a few more tests. AM on MacOS is able to replace $HOME with the correct home directory value with no problems. However, $PROGDIR is still an empty string. I've even tried setting it on the OS via command line before AND after launching AM to the same result of getting an empty string.

Any ideas?