I’m trying to share the same app definition between a Windows system (where the app is primarily maintained) and a Mac system (where we are trying to build an iOS version). Both systems use GitHub to sync the app definition files between them, so that settings changes made on one platform will be mirrored on the other. However, it seems that the appDef file is unable to handle relative paths to the audio files, instead using a full absolute path.
That is, on Windows, the appDef file contains paths like this:
C:\Users\Dan\Documents\Scripture App Builder\App Definitions\KM-Live\KM-Live_data\mp3\08_RUT_01.mp3
while on the Mac, it looks like this:
Even if I create the same folder path on Windows as on Mac, SAB cannot find the MP3 file with such a path.
Surely it should be possible to get SAB to use a relative path? My mp3 folder resides in the project’s data folder. It seems that if the appDef file stored the path to the MP3 file relative to the project data folder, you’d have something that could easily sync back and forth between platforms.
Is there a way to get this cross-platform syncing to work, or would this need to be a feature request?
Have you tried, removing the C: part of the windows path and seeing if that still works? It assumes that you don’t have a D: drive. I don’t have my Win machine to test. Windows should be able to handle / as folder separators.
I also note that Dan in Windows is different to dan in Mac.
Yes, I tried that. Actually, my path on Mac has a different username that I didn’t want to show here, so I created that path on Windows (I matched the Mac case, even though Windows shouldn’t care), but when I tested whether SAB could find that (beginning with /Users) by doing Export to HTML, there was no audio.
I also tried specifying a relative path, beginning with mp3/, but that didn’t work either. (It was kind of a stab in the dark, as I don’t know what the current directory is during build time.)
Ah, there’s something about the Users folder on Windows that required special confirmation of each step in creating the path to mirror the Mac path, so I started over in a non-special folder. This time I created a folder called C:\sab-mp3. Inside this, I created a new GitHub repo named km-mp3. I copied my audio files into C:\sab-mp3\km-mp3. Then I edited the .appDef file to look for the files using filenames like /sab-mp3/km-mp3/08_RUT_01.mp3. SAB could now create HTML output that contained the audio, and build the APK containing the audio. I’m pretty sure we’ll be able to get the audio files to have that same path on the Mac. So I think we have a workable solution. Thanks!
FYI. I’ve been using a git platform to bring the work I’ve done on a PC over to a Mac to build the iOS version of the app. It works great. Of course, I’m not trying to do the ‘export to html’ on the mac side. Any tweaks I need to do to the timings I do on the PC side. I have my audio in the cloud so when I build the app, it has the timing file info. and the audio file name and cloud address. So the iOS app works as expected.