Script to Compile the latest github for retroarch+cores for iOS

Special for you https://yadi.sk/d/f7koEyQdptMxxw ipa with desmume fceumm beetle_psx beetle_saturn snes_(accuracy, balance, performance) and picodrive )))

1 Like

FANTASTIC!!! Does it also include a SNES emu? That would be perfect… Will give it a try this evening.

Many thanks for doing this!! :star_struck::star_struck::star_struck:

now include snes too

1 Like

FABULOUS! Tried the SNES, NES and PSX emu all 3 are doing great! The NDS ones is playable, but no full speed. We check later if I missed some options to set to gain speed. Will play with the shaders to get a nice optic on my TV. Selfsigned the app and see no problems on tvOS 13

Thanks again @xdccrlz

Okay, I updated the script. It is now in Python and is MUCH easier to modify to build things like tvOS (where you can get over 100 cores easily), other versions of iOS, and potentially even OSX and other builds.

You can now also list an arbitrary number of fallback architectures (for example, “if iOS10 building fails, try iOS9 and use those cores in the finished IPA”). It can be 0 or it can be 1000. Just edit listOfFallbacks. The fallback priority is in the order listed in descending order.

Likewise, if you just want to do one thing or another (say, just build cores or just build the IPA), you can do that very easily by commenting out a line or two at the very bottom of the file.

To compile tvOS automatically @URBANsUNITED

  1. Open RetroArch_iOS11.xcodeproj with xcode and set your team, etc. in the RetroArchTV target. You should only need to do this once - future running of the script can ignore it.
  2. Then set manualSigning to False in the script.
  3. Set finalPackage to tvos-arm64
  4. I’d recommend either listing “ios-arm64” in the fallbacks or no fallbacks at all
2 Likes

Ok, managed to compile chailove thanks to you, will be up in the buildbot and IPA iOS 10 & 11+ soon!

1 Like

hi @jet082 - how did you compile the “puae” core?

If i use the -Wno-error-Wimplicit-function-declaration i get:

In file included from sources/src/audio.c:28:
./sources/src/include/driveclick.h:33:13: error: conflicting types for 'driveclick_mix'
extern void driveclick_mix (uae_s16*, int, int);

There’s probably an easy way to get this to compile but i’m just too lazy at the moment to look at it…

It just compiles for me. I didn’t need to do anything. I even got it to compile for tvos by making the standard set of changes.

There must be something strange with your setup. I recommend deleting the directory and refetching it.

Ah my upstream was pointing to the wrong repo - I was able to build it ok, and made a PR for compiling using the tvOS SDK - thanks!

@jet082 Thanks for making this script! I set it up, but I am in general not able to build any core. Lots of missing files and I read very often

clang: warning: no such sysroot directory: ‘-c’ [-Wmissing-sysroot]

Am I missing anything? Am on Catalina and using Xcode beta

Tried also building without your script, same.

Building for macos is working :thinking:

Thanks

Can somebody please compile Mame_libretro core for IOS 6 ?

Thanks

@URBANsUNITED

Please turn debug mode on (set debug to True) and upload the file failedLog.txt in your output directory.

Hi @jet082

I did that earlier already to see if I can get any hints…

That’s the way I’ve set up the script:

libretroSuperDir = os.path.expanduser("~/Retroarch-Stuff/libretro-super")
retroarchDir = os.path.expanduser("~/Retroarch-Stuff/libretro-super/retroarch")
outputDir = os.path.expanduser("~/Retroarch-Stuff/output")
coreArchiveDir = os.path.expanduser("~/Retroarch-Stuff/core-archive")
developerName = "xxx Name exists"
profileName = "~/Retroarch-Stuff/Profile.mobileprovision"
finalPackage = "tvos-arm64"
listOfFallbacks = ["ios-arm64"]
extension = "dylib"
debug = False
manualSigning = False

I set up the dirs as stated: 17

Maybe you’ll find the reason…

Logfile

Thanks

URBANsUNITED

@URBANsUNITED

So, can you run open /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg and finish that installation. Then see if you can compile 2048 by running libretro-build-tvos-arm64 2048. If it does not succeed, can you verify you are using xcode correctly in cli via xcode-select -p. It should print out something like /Applications/Xcode-beta.app/Contents/Developer.

edit:

suggesting 2048 instead of gw since gw doesn’t build on tvos without a tweak or two (it should still build in your script though and be included in your final IPA since you have ios-arm64 as a fallback. It OUGHT to work too).

Also, a minor thing - your profile name needs to be a string - not the filename. Like mine is “Samuel.” But since you have manual signing set to false, that shouldn’t matter really.

So… Looks like I’ve found the problem. You pointed me in the right direction. Xcode Beta wasn’t installed, was in Downloads and Xcode 10 was still installed.

  1. uninstalled Xcode 10
  2. Copied XCode 11 beta into Apps
  3. sudo xcode-select -s /Applications/Xcode-beta.app
  4. xcode-select -p to see if /Applications/Xcode-beta.app/Contents/Developer shows up
  5. ibretro-build-tvos-arm64 2048
  6. Profit! :star_struck::100:

This is my current result: Attempting to build gw with tvos-arm64

Failed to build gw with tvos-arm64

Attempting to build gw with ios-arm64

Successfully built gw with ios-arm64

Attempting to build freeintv with tvos-arm64

Successfully built freeintv with tvos-arm64

Attempting to build parallel_n64 with tvos-arm64

Failed to build parallel_n64 with tvos-arm64

Attempting to build parallel_n64 with ios-arm64

Failed to build parallel_n64 with ios-arm64

Attempting to build mesen-s with tvos-arm64

Failed to build mesen-s with tvos-arm64

Attempting to build mesen-s with ios-arm64

Failed to build mesen-s with ios-arm64

Attempting to build openlara with tvos-arm64

Failed to build openlara with tvos-arm64

Attempting to build openlara with ios-arm64

Failed to build openlara with ios-arm64

Attempting to build px68k with tvos-arm64

Successfully built px68k with tvos-arm64

Attempting to build mame2010 with tvos-arm64

Failed to build mame2010 with tvos-arm64

Attempting to build mame2010 with ios-arm64

Failed to build mame2010 with ios-arm64

Attempting to build mame2015 with tvos-arm64

So, I’ve gotten pretty tired of having to build every core each time. As a result, the next update to my script will keep a small local database (using tinydb, most likely) of which revisions your last build of each core is representative of. It will also keep track of which revisions failed to build. Then, it will only build those cores that have had updates since your last build. It will therefore skip cores you have already built (and just pull those in from your archive) and also cores that won’t build. This should, rather substantially, reduce the amount of time the script takes to run. Likely by multiple hours.

I would also like to move the zipping over to python rather than pulling in the zip command.

That’s the goal, anyway.

The downside is that it will now require a module to be installed. It’s fairly easy to install pip though and install tinydb that way, so hopefully the extra step will not be too bad.

Okay, the script has been updated.

It now uses tinydb to manage which packages have been installed and with which versions. If you have tried and succeeded or failed to build a particular version of a particular package for a particular target architecture, it will not attempt to build it again. Unless the package updates, of course. This saves many, many hours.

If you would like to rebuild a package anyway, simply edit the file buildDatabase.json in your output directory. Then find the core+platform combo and set buildSuccess to -1. Or, if you want to rebuild everything, simply delete the json file entirely.

The script also now uses gitpython to manage git updating, etc. There is a new option to toss local changes, in case you want to be as close to the github as possible (and to avoid potential pull conflicts, etc). However, if you have local changes you want to keep (for example, the fixes I posted in the op), you can keep them if you set eraseLocalChanges to False.

All of this does add a new step. Before running the new script for the first time, please run sudo easy_install pip; sudo pip install tinydb; sudo pip install gitpython

(Note that the first time you run the script, it will still rebuild all packages. But this is only the first time you do so)

Hi!

I really like the new database feature, but it doesn’t work:

python /Volumes/osX_DaTa/-=Benutzer=-/Andreas/Retroarch-Stuff/Script.py

Traceback (most recent call last): File “/Volumes/osX_DaTa/-=Benutzer=-/Andreas/Retroarch-Stuff/Script.py”, line 37, in coreArchiveDatabase = tinydb.TinyDB(os.path.join(outputDir, “buildDatabase.json”)) NameError: name ‘tinydb’ is not defined

It’s installed:

Requirement already satisfied: tinydb in /Library/Python/2.7/site-packages (3.14.1)

Btw. I’ve compiled all cores, but the Retroarch files was only 8,4mb sized

All finished! Your IPA file is located at /Volumes/osX_DaTa/-=Benutzer=-/Andreas/Retroarch-Stuff/output/tvos-arm64-e1a7b82b2ee08f85b1683c7240aeb64cb8862827-2019_09_15_11_48_AM.ipa

19 ios-arm64 cores

70 tvos-arm64 cores

But all are still under libretro-super -> dist

Strange…

Can you open a python widow and just say import tinydb and see if it imports properly?

If it does, you copy/pasted the script incorrectly (I’m guessing you didn’t copy the top line or something?).

As for the IPA file - can you tell me what’s in your coreArchiveDir? Also, it makes no sense for them to be in dist, since those ought to be cleaned up whenever cleanup() is run at the start of the script. Are you modifying it?

It was the missing first line. Sorry :see_no_evil:

Corearchivedir is empty except the 5 cores dirs and ios-arm64 + tvos-arm64 s two tiny files No I didn’t modify the script. Left it original except the dev name…

With the new script is looks like that it is working. The first files poppin into their dirs within the core-archive

So, it seems to work now

Sorry again…