Maybe make A314 emulation launch Python scripts automatically

This commit is contained in:
beeanyew
2021-05-20 20:34:14 +02:00
parent 1f0fbd0947
commit 8395ac42d0
6 changed files with 17 additions and 9 deletions

View File

@@ -221,14 +221,15 @@ struct OnDemandStart
std::vector<OnDemandStart> on_demand_services;
std::string a314_config_file = "/etc/opt/a314/a314d.conf";
std::string home_env = "HOME=/home/pi";
std::string a314_config_file = "./a314/files_pi/a314d.conf";
std::string home_env = "HOME=./";
static void load_config_file(const char *filename)
{
FILE *f = fopen(filename, "rt");
if (f == nullptr)
if (f == nullptr) {
return;
}
char line[256];
std::vector<char *> parts;

7
a314/files_pi/a314d.conf Normal file
View File

@@ -0,0 +1,7 @@
a314fs python3 ./a314/files_pi/a314fs.py
picmd python3 ./a314/files_pi/picmd.py
piaudio python3 ./a314/files_pi/piaudio.py
remotewb python3 ./a314/files_pi/remotewb.py
remote-mouse python3 ./a314/files_pi/remote-mouse.py
videoplayer python3 ./a314/files_pi/videoplayer.py
ethernet python3 ./a314/files_pi/ethernet.py

View File

@@ -2,7 +2,7 @@
"devices": {
"PI0": {
"volume": "PiDisk",
"path": "/home/pi/a314shared"
"path": "./a314/files_pi/a314shared"
}
}
}

View File

@@ -17,9 +17,9 @@ logging.basicConfig(format = '%(levelname)s, %(asctime)s, %(name)s, line %(linen
logger = logging.getLogger(__name__)
logger.setLevel(logging.INFO)
CONFIG_FILE_PATH = './a314fs.conf'
CONFIG_FILE_PATH = 'a314_files_pi/a314fs.conf'
SHARED_DIRECTORY = '/home/pi/a314shared'
SHARED_DIRECTORY = 'data/a314shared'
METAFILE_EXTENSION = ':a314'
with open(CONFIG_FILE_PATH, encoding='utf-8') as f:

View File

@@ -21,8 +21,8 @@ logging.basicConfig(format = '%(levelname)s, %(asctime)s, %(name)s, line %(linen
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
FS_CFG_FILE = './files_pi/a314fs.conf'
PICMD_CFG_FILE = './files_pi/picmd.conf'
FS_CFG_FILE = 'a314/files_pi/a314fs.conf'
PICMD_CFG_FILE = 'a314/files_pi/picmd.conf'
volume_paths = {}
search_path = ''

View File

@@ -46,7 +46,7 @@ setvar piscsi6 platforms/amiga/pistorm.hdf
#setvar pi-net
# Uncomment and edit to set a custom config filename for the A314 emulation
#setvar a314_conf /etc/opt/a314/a314d.conf
#setvar a314_conf ./a314/files_pi/a314d.conf
# Uncomment to enable A314 emulation
#setvar a314