Author Topic: DEVELOPERS HELP REQUIRED Change directory name of an application  (Read 655 times)

ace9094 (OP)

  • Posts: 764
DEVELOPERS HELP REQUIRED Change directory name of an application
« on: November 28, 2019, 12:39:23 am »
Hi all,

Can anyone help me to change the name of a directory where Application / Game or Emulator lives?

I want to use multiple version of the same emulator and keep the settings and configs for each version seperate

For example: /media/data/local/home where the "PlayStation" emulator lives in the ".PCSX4ALL" folder and all the settings, configs Memory cards etc are in that folder.

PicoDrive emulates Megadrive, MasterSystem, SG1000 and GameGear etc... So with PicoDrive I have managed to change the icon and display name of the emulator for MegaDRive and then created another for MasterSystem etc..

I would them to all have there own directory in the Local folder for settings etc instead of sharing the .PicoDrive folder.

I hope this makes sense, can any Devs out there help me achieve this or advise how it is done ? I would really appreciate it :)

This is what I have so far...





I am trying to achieve something like the below which is a basic EARLY "Mock Up"



Thanks
ace
« Last Edit: November 28, 2019, 02:07:33 am by ace9094 »
Dingoo A320, GCW0, RS-97 x2, Revo-K101, RS-90, PSP, GameGadget, New 3DS 128GB, PS Vita 200GB, RS-45, Gamebox Advance and a few other obscure devices

ace9094 (OP)

  • Posts: 764
Re: DEVELOPERS HELP REQUIRED Change directory name of an application
« Reply #1 on: November 29, 2019, 01:38:44 am »
Would it be possible to run a command like this to multiple times redirect Picodrive Emulator to different folders called Megadrive, MasterSystem, Gamegear etc ? Or could it only be used to redirect once ?

ln -sf /media/data/local/home/Megadrive/config2.cfg /media/data/local/home/.picodrive/config2.cfg

If so any idea how ?

Thanks
Dingoo A320, GCW0, RS-97 x2, Revo-K101, RS-90, PSP, GameGadget, New 3DS 128GB, PS Vita 200GB, RS-45, Gamebox Advance and a few other obscure devices

ace9094 (OP)

  • Posts: 764
Re: DEVELOPERS HELP REQUIRED Change directory name of an application
« Reply #2 on: November 30, 2019, 02:07:13 am »
I have been looking at the source for PCSX4ALL but have not idea what I am looking for or what I am doing. I have just been opening all the files one by one in note pad and reading through in case I get lucky...

I found the following sting of text in file within the source files zip. source/port/sdl/port.c

Quote
#ifndef __WIN32__
   snprintf(homedir, sizeof(homedir), "%s/.pcsx4all", getenv("HOME"));
#else
   char buf[PATH_MAX];
   snprintf(homedir, sizeof(homedir), "%s/.pcsx4all", getcwd(buf, PATH_MAX));

Would I just change the text highlighted above to something like the text highlighted below to change the name of the pcsx4all home folder name, then recompile it using toolchain?

Quote
#ifndef __WIN32__
   snprintf(homedir, sizeof(homedir), "%s/.PSX", getenv("HOME"));
#else
   char buf[PATH_MAX];
   snprintf(homedir, sizeof(homedir), "%s/.PSX", getcwd(buf, PATH_MAX));

I have no idea what I am doing... Would I also need to edit a bunch of other files that may need that line of text to work. 

I have no idea how to compile stuff, change source code or what to change it to :( I have no clue what I am doing or where to start to be honest  :o Can anyone help?

Thanks
ace
« Last Edit: November 30, 2019, 02:09:20 am by ace9094 »
Dingoo A320, GCW0, RS-97 x2, Revo-K101, RS-90, PSP, GameGadget, New 3DS 128GB, PS Vita 200GB, RS-45, Gamebox Advance and a few other obscure devices

gameblabla

  • Posts: 1364
Re: DEVELOPERS HELP REQUIRED Change directory name of an application
« Reply #3 on: November 30, 2019, 09:23:24 pm »
I have been looking at the source for PCSX4ALL but have not idea what I am looking for or what I am doing. I have just been opening all the files one by one in note pad and reading through in case I get lucky...

I found the following sting of text in file within the source files zip. source/port/sdl/port.c

Quote
#ifndef __WIN32__
   snprintf(homedir, sizeof(homedir), "%s/.pcsx4all", getenv("HOME"));
#else
   char buf[PATH_MAX];
   snprintf(homedir, sizeof(homedir), "%s/.pcsx4all", getcwd(buf, PATH_MAX));

Would I just change the text highlighted above to something like the text highlighted below to change the name of the pcsx4all home folder name, then recompile it using toolchain?

Quote
#ifndef __WIN32__
   snprintf(homedir, sizeof(homedir), "%s/.PSX", getenv("HOME"));
#else
   char buf[PATH_MAX];
   snprintf(homedir, sizeof(homedir), "%s/.PSX", getcwd(buf, PATH_MAX));

I have no idea what I am doing... Would I also need to edit a bunch of other files that may need that line of text to work. 

I have no idea how to compile stuff, change source code or what to change it to :( I have no clue what I am doing or where to start to be honest  :o Can anyone help?

Thanks
ace
Or you know, you can just create a symlink to .pcsx4all for .PSX. Dingoo Commander can't do that but you can connect to your console over telnet via usb and use ln -s to create a symlink.
I could change but honestly, why do you want to go through this trouble ?

ace9094 (OP)

  • Posts: 764
Re: DEVELOPERS HELP REQUIRED Change directory name of an application
« Reply #4 on: December 01, 2019, 12:43:50 am »
I could change but honestly, why do you want to go through this trouble ?

I would like to achieve a few things... What I wanted to do was create a menu that looks a certain way with the games I like for each system.
 
No one ever plays "Full ROM Sets" - I had an idea to create sections and rename them to the correct console names... But then I thought what if each section was a console with the emulator renamed to a specific title that when clicked had all the correct settings for that game, and booted the when clicked instead of a menu then choosing a game from a list

128GB Micro SD is cheap, so why not have the same emulator with different icons and named to the game title.

Saves keep changing setting every time, just click and off you go... I will create a quick "mock up" menu

For example I want to have PCSX4ALL 50 times with the best 50 games

Kind of like this rough mock up below



I hope this makes sense
« Last Edit: December 01, 2019, 01:43:14 am by ace9094 »
Dingoo A320, GCW0, RS-97 x2, Revo-K101, RS-90, PSP, GameGadget, New 3DS 128GB, PS Vita 200GB, RS-45, Gamebox Advance and a few other obscure devices