XCode OSX + Steam SDK + MOAI 1.7.5

iPhone / iPad / OSX / xcode

Moderators: ezraanderson, nosheet

XCode OSX + Steam SDK + MOAI 1.7.5

Postby naturally » Mon Feb 27, 2017 6:58 pm

Some notes on my WORKING attempts to build OSX+Steam. Note I cannot share the Steam SDK code here, but they are straightforward .h files with added precompiled libraries. This is done in two parts: building libmoai and building a host.

STEP A: LIBMOAI

1) Install moai feature 1.7.5 branch and moai-community, submodule init and update, then add any custom code to moai now

2) Add MOAISteam plugin and Steam SDK files into Moai directory however you want, or for example in "src/moai-steam"
[see attached file]

3) Edit host-modules/aku_modules.h and add #include <moai-steam/host.h> (you'd think to skip this step, but the changes won't take in the host)

4) Open libmoai xcode project in the /xcode/ directory

5) Set top target to libmoai-osx-all->My Mac, and optionally remove all 46 ios TARGETS (takes a while)

6) Set Product -> Scheme -> Edit Scheme -> Run -> Build Configuration -> Release

6) Universal Architecture in Build Settings, set Base SDK to MacOS10.12 or whatever u are using

7) Find TARGETS > libmoai-osx-http-server, right-click on it, and Duplicate. Rename to libmoai-osx-steam by double-clicking it

8) Click Build Settings -> Packaging -> Product Name and rename to 'moai-osx-steam'

9) Click on libmoai-osx-steam Build Phases and remove the files from http-server, then add the new files from the ZIP as appropriate. This step seems broken since it also adds all the files to the top of the project, not sure why that happens. Add all the steam SDK header files here too.

10) Add libsdkencryptedappticket.dylib to libmoai-osx-steam Link Binary With Libraries (not sure if this is needed)

11) Click on TARGET libmoai-osx-all, Build Phases, add Target Dependency, select libmoai-osx-steam to add

12) Build

13) Click on libmoai-osx-steam.a in the left side of the project under Products, right click and Show in Finder (for next step)

STEP B: OSX HOST

1) Use pito to create a new project and a new host

2) Use Finder to navigate to osx/lib directory, then copy all *.a files from step 12 above

3) Set project to Release

4) Project -> Info -> macOS Deplyoment Target -> 10.8 (will throw warnings, but need to go back for wider compatibility)

5) Drag libmoai-osx-steam.a into lib project folder

6) Add files to project -> libsteam_api.dylib

7) Add MOAISteamAppInitialize (); to AKUModulesContextInitialize in aku_modules.cpp, plus the 2 other functions

8) Build, then navigate to project folder and copy api and appid.txt to there Contents->MacOS

9) Build + Run, with and without Steam to test

10) Upload via SteamContentPipe, but dont upload the DYSM file

11) Make sure you follow the Mac launch syntax on Steam page

Thanks to ezra, halfnelson, patrick, sshukul, and anyone else I forgot who helped with this.
Attachments
host-modules-175steam.zip
(13.34 KiB) Downloaded 97 times
Last edited by naturally on Wed Mar 01, 2017 2:12 pm, edited 4 times in total.
Image - Don't Be Patchman - a sneak-and-grow adventure!
User avatar
naturally
 
Posts: 713
Joined: Thu Aug 29, 2013 8:05 pm
Location: Canada

Re: XCode OSX + Steam SDK + MOAI 1.7.5

Postby naturally » Tue Feb 28, 2017 6:03 am

NOTE: Have updated the last image, sorry, was out-of-date.
Image - Don't Be Patchman - a sneak-and-grow adventure!
User avatar
naturally
 
Posts: 713
Joined: Thu Aug 29, 2013 8:05 pm
Location: Canada

Re: XCode OSX + Steam SDK + MOAI 1.7.5

Postby naturally » Tue Feb 28, 2017 6:51 am

UPDATE: Even though it seems like the OSX support in Steam is only 32 bit (the directory is named that in the SDK), I stumbled upon a notice from Valve that it's actually 32/64 universal architecture. So I can scratch that off the list if/when I figure out the build.

So the errors aren't from 32/64 bit issues, but it can't find the SDK files. I'm pretty sure I've included them in the wrong way. I added them to the libmoai-osx-steam target, BUT they also appear as added to the project root, even though they are in a folder normally in the file list, EXCEPT that folder is a blue color. None of the other source files are added to the project root, so it looks messy+wrong. What does that mean?
Image - Don't Be Patchman - a sneak-and-grow adventure!
User avatar
naturally
 
Posts: 713
Joined: Thu Aug 29, 2013 8:05 pm
Location: Canada

Re: XCode OSX + Steam SDK + MOAI 1.7.5

Postby naturally » Tue Feb 28, 2017 9:00 am

There is also the question of the underscore _ placed in front of SteamAPI_Init, for example. There are no functions in the Steam SDK that have those, so xcode might be adding them somewhere, from SteamAPI_Init to _SteamAPI_Init, is that normal? Or is that a sign maybe it's being duplicated?
Image - Don't Be Patchman - a sneak-and-grow adventure!
User avatar
naturally
 
Posts: 713
Joined: Thu Aug 29, 2013 8:05 pm
Location: Canada

Re: XCode OSX + Steam SDK + MOAI 1.7.5

Postby naturally » Tue Feb 28, 2017 9:35 am

Ok looks like I have finally got it working. Will redo this post with updated info later today.
Image - Don't Be Patchman - a sneak-and-grow adventure!
User avatar
naturally
 
Posts: 713
Joined: Thu Aug 29, 2013 8:05 pm
Location: Canada


Return to Apple

Who is online

Users browsing this forum: No registered users and 0 guests

x