Author Topic: Attract Mode portable - Variable d'environnement ?  (Read 5040 times)

Sebiohazard

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Attract Mode portable - Variable d'environnement ?
« on: August 25, 2020, 03:28:43 PM »
Good evening everyone !

I would like to make Attract Mode portable. That is to say that whatever the installation folder of my Attract pack, there is no conflict in the paths of the roms, emulators, media ...

Here is an example configuration for a Dreamcast emulator:

Code: [Select]
# Generated by Attract-Mode v2.6.1
#
executable           c:\attract\emulators\demul\demul.exe
args                 -run=dc -image="[romfilename]"
rompath              c:\attract\games\dreamcast
romext               .gdi
artwork    boxart         c:\attract\menu-art\boxart\dreamcast
artwork    cartart         c:\attract\menu-art\cartart\dreamcast
artwork    flyer           c:\attract\menu-art\flyer\dreamcast
artwork    marquee         c:\attract\menu-art\marquee\
artwork    snap            c:\attract\menu-art\snap\dreamcast
artwork    wheel           c:\attract\menu-art\wheel\dreamcast

How do I replace C: with an environment variable that would allow me to install my Attract pack in any folder on my computer ?

Greetings !

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Attract Mode portable - Variable d'environnement ?
« Reply #1 on: August 25, 2020, 07:58:46 PM »
\ = root of the drive
. = this folder
.. = previous folder
..\.. = two folders back
..\..\.. = three folders back


For you, c:\attract becomes a period (.).

Code: [Select]
# Generated by Attract-Mode v2.6.1
#
executable           .\emulators\demul\demul.exe
args                 -run=dc -image="[romfilename]"
rompath              .\games\dreamcast
romext               .gdi
artwork    boxart         .\menu-art\boxart\dreamcast
artwork    cartart         .\menu-art\cartart\dreamcast
artwork    flyer           .\menu-art\flyer\dreamcast
artwork    marquee         .\menu-art\marquee\
artwork    snap            .\menu-art\snap\dreamcast
artwork    wheel           .\menu-art\wheel\dreamcast

Sebiohazard

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: Attract Mode portable - Variable d'environnement ?
« Reply #2 on: August 26, 2020, 05:54:00 AM »
Hello thank you for your reply !

Unfortunately it doesn't work... I also tried this:

Code: [Select]
# Generated by Attract-Mode v2.6.1
#
executable           $home\emulators\demul\demul.exe
args                 -run=dc -image="[romfilename]"
rompath              $home\games\dreamcast
romext               .gdi
artwork    boxart         $home\menu-art\boxart\dreamcast
artwork    cartart         $home\menu-art\cartart\dreamcast
artwork    flyer           $home\menu-art\flyer\dreamcast
artwork    marquee         $home\menu-art\marquee\
artwork    snap            $home\menu-art\snap\dreamcast
artwork    wheel           $home\menu-art\wheel\dreamcast

Do you have another solution ?

Greetings !

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Attract Mode portable - Variable d'environnement ?
« Reply #3 on: August 26, 2020, 11:11:41 AM »
Look at the last_run.log or run attract-console.exe to see what the problem is.

Sebiohazard

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: Attract Mode portable - Variable d'environnement ?
« Reply #4 on: August 26, 2020, 04:28:24 PM »
Hello here are the feedback from lastrun.log:

Code: [Select]
*** Initializing display: 'Dreamcast'
 - Loaded master romlist 'Dreamcast' in 1 ms (2 entries kept, 0 discarded)
 - Constructed 2 filters in 0 ms (4 comparisons)
Attract-Mode Version: v2.6.1
Screen aspect ratio: 16x9
Resolution: 1920x1080
Shader GLSL available: 1
OS: Windows
using settings[16x9][aspectDepend][res_x] : 1920
using settings[16x9][aspectDepend][res_y] : 1080
using settings[16x9][aspectDepend][maskFactor] : 1.9
 - Loaded layout: C:\Attract\layouts/Sega Dreamcast/ (layout.nut)
 - Working directory: .\emulators\retroarch
*** Running: .\emulators\retroarch\retroarch.exe -L cores\flycast_libretro.dll ".\games\dreamcast/Donald Duck - Quack Attack.chd"
Error executing command: '.\emulators\retroarch\retroarch.exe -L cores\flycast_libretro.dll ".\games\dreamcast/Donald Duck - Quack Attack.chd"'

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Attract Mode portable - Variable d'environnement ?
« Reply #5 on: August 26, 2020, 05:18:53 PM »
Just to be clear, you haven't actually moved the "Attract" folder yet, right?

With the example I gave above did the artwork show up properly in AM layouts?

To test where the problem is try this:
Code: [Select]
# Generated by Attract-Mode v2.6.1
#
executable           .\emulators\demul\demul.exe
args                 -run=dc -image="[romfilename]"
rompath              c:\attract\games\dreamcast
romext               .gdi
artwork    boxart         .\menu-art\boxart\dreamcast
artwork    cartart         .\menu-art\cartart\dreamcast
artwork    flyer           .\menu-art\flyer\dreamcast
artwork    marquee         .\menu-art\marquee\
artwork    snap            .\menu-art\snap\dreamcast
artwork    wheel           .\menu-art\wheel\dreamcast

Sebiohazard

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: Attract Mode portable - Variable d'environnement ?
« Reply #6 on: August 27, 2020, 07:10:40 AM »
Hello !

So indeed the problem only comes from the executable & the game path:

Code: [Select]
executable           .\emulators\demul\demul.exe
rompath              .\games\dreamcast

For the media it works... how to proceed ?

Greetings !

dmmarti

  • Sr. Member
  • ****
  • Posts: 106
    • View Profile
Re: Attract Mode portable - Variable d'environnement ?
« Reply #7 on: August 27, 2020, 08:21:21 AM »
Can you try having 2 dots at the beginning of those lines and see?

executable           ..\emulators\demul\demul.exe
rompath              ..\games\dreamcast

I'm wondering where Attract's starting directory is in relation to those two lines.  Does it start in the "attract" directory or does it start in the "attract\emulators" directory (where the various emulator config files are)?

It seems for artwork, it sets the "attract" folder as it's starting directory to find the artwork files.  I'm curious if those two lines use the "attract\emulators" directory instead (in which case you'd need to go up 1 directory to find the "games" directory").

You could also try this for the executable:

executable           .\demul\demul.exe
« Last Edit: August 27, 2020, 08:25:53 AM by dmmarti »

Sebiohazard

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: Attract Mode portable - Variable d'environnement ?
« Reply #8 on: August 27, 2020, 03:07:51 PM »
Hello !

I have tried everything:

Code: [Select]
1. executable           .\demul\demul.exe
2. executable           ..\demul\demul.exe
3. executable           ..\..\demul\demul.exe
4. executable           ..\..\..\demul\demul.exe

Nothing works...

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Attract Mode portable - Variable d'environnement ?
« Reply #9 on: August 27, 2020, 05:09:06 PM »
based on your OP it would be
Code: [Select]
executable           .\emulators\demul\demul.exe

Try these and provide the output and results for each

Code: [Select]
# Generated by Attract-Mode v2.6.1
#
executable           .\emulators\demul\demul.exe
args                 -run=dc -image="[romfilename]"
rompath              ..\..\games\dreamcast
romext               .gdi
artwork    boxart         .\menu-art\boxart\dreamcast
artwork    cartart         .\menu-art\cartart\dreamcast
artwork    flyer           .\menu-art\flyer\dreamcast
artwork    marquee         .\menu-art\marquee\
artwork    snap            .\menu-art\snap\dreamcast
artwork    wheel           .\menu-art\wheel\dreamcast

Code: [Select]
# Generated by Attract-Mode v2.6.1
#
executable           \attract\emulators\demul\demul.exe
args                 -run=dc -image="[romfilename]"
rompath              \attract\games\dreamcast
romext               .gdi
artwork    boxart         .\menu-art\boxart\dreamcast
artwork    cartart         .\menu-art\cartart\dreamcast
artwork    flyer           .\menu-art\flyer\dreamcast
artwork    marquee         .\menu-art\marquee\
artwork    snap            .\menu-art\snap\dreamcast
artwork    wheel           .\menu-art\wheel\dreamcast

Sebiohazard

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: Attract Mode portable - Variable d'environnement ?
« Reply #10 on: August 28, 2020, 06:15:02 AM »
Hello !

Unbelievable !!!

It is this command set that works:

Code: [Select]
# Generated by Attract-Mode v2.6.1
#
executable           \attract\emulators\demul\demul.exe
args                 -run=dc -image="[romfilename]"
rompath              \attract\games\dreamcast
romext               .gdi
artwork    boxart         .\menu-art\boxart\dreamcast
artwork    cartart         .\menu-art\cartart\dreamcast
artwork    flyer           .\menu-art\flyer\dreamcast
artwork    marquee         .\menu-art\marquee\
artwork    snap            .\menu-art\snap\dreamcast
artwork    wheel           .\menu-art\wheel\dreamcast

Thank you very much greetings !

manzarek

  • Sr. Member
  • ****
  • Posts: 147
    • View Profile
    • YouTube
Re: Attract Mode portable - Variable d'environnement ?
« Reply #11 on: August 28, 2020, 07:12:46 AM »
Hello !

Unbelievable !!!

It is this command set that works:

Code: [Select]
# Generated by Attract-Mode v2.6.1
#
executable           \attract\emulators\demul\demul.exe
args                 -run=dc -image="[romfilename]"
rompath              \attract\games\dreamcast
romext               .gdi
artwork    boxart         .\menu-art\boxart\dreamcast
artwork    cartart         .\menu-art\cartart\dreamcast
artwork    flyer           .\menu-art\flyer\dreamcast
artwork    marquee         .\menu-art\marquee\
artwork    snap            .\menu-art\snap\dreamcast
artwork    wheel           .\menu-art\wheel\dreamcast

Thank you very much greetings !

Thank you very much. ;)
Mame Fighting

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Attract Mode portable - Variable d'environnement ?
« Reply #12 on: August 28, 2020, 09:21:28 AM »
Don't get too excited. Two of those are absolute paths and not relative paths. They won't accomplish what you were looking for. They were meant to be tests for you to show the command line feedback.

Sebiohazard

  • Full Member
  • ***
  • Posts: 78
    • View Profile
Re: Attract Mode portable - Variable d'environnement ?
« Reply #13 on: August 28, 2020, 11:52:22 AM »
Aie aie aie !

Indeed I moved my Attract folder in c:\programs (x86) & nothing works anymore !!!

I do not know what to do ???

progets

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1271
    • View Profile
Re: Attract Mode portable - Variable d'environnement ?
« Reply #14 on: August 28, 2020, 06:16:10 PM »
- move it back
- update your emulator.cfg files with the new location using the full paths or absolute paths
- continue trying to get relative paths working

Some emulators (not AM) have issues with relative paths. I don't recall if demul is one of them. I personally use absolute paths because of this.

You might also try setting the "working directory" for that emulator. It might or might not help. You should also consider testing with another emulator to see if demul has issues with relative paths.