]> git.sesse.net Git - pistorm/commitdiff
Maybe make A314 emulation launch Python scripts automatically
authorbeeanyew <beeanyew@gmail.com>
Thu, 20 May 2021 18:34:14 +0000 (20:34 +0200)
committerbeeanyew <beeanyew@gmail.com>
Thu, 20 May 2021 18:34:14 +0000 (20:34 +0200)
a314/a314.cc
a314/files_pi/a314d.conf [new file with mode: 0644]
a314/files_pi/a314fs.conf
a314/files_pi/a314fs.py
a314/files_pi/picmd.py
default.cfg

index a0eb9e5fda963e6c5f8a3de1119918e3d3eca98e..555396f10e05c52538728f082d5af2228e6e6e87 100644 (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;
diff --git a/a314/files_pi/a314d.conf b/a314/files_pi/a314d.conf
new file mode 100644 (file)
index 0000000..ffe60df
--- /dev/null
@@ -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
index 6361277e61f4c8840a7b8b4cb9f3ded91ef26f8b..24689893e313bb933a684aacd57319fde94ded0f 100644 (file)
@@ -2,7 +2,7 @@
   "devices": {
     "PI0": {
       "volume": "PiDisk",
-      "path": "/home/pi/a314shared"
+      "path": "./a314/files_pi/a314shared"
     }
   }
 }
index 75e0a27abe22e3945b20fccd9426e227ec3fb593..185caa0c27f7f3b6cd4098938288764a85956fcb 100755 (executable)
@@ -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:
index c0bf69e4a13a0c6df475252a7036fafabee113a7..c67ce45c5484e1948572dc8a99d608cbab228158 100755 (executable)
@@ -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 = ''
index b8f46a263dbc164dcb4433f455e8d7fe3a61f7dd..e6249229ebb3cde1eb06b1624f8cc874f3910dc7 100644 (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