Author Topic: Possible to compile for Mac Store?  (Read 14040 times)

Offline mrplant

  • Mr. Polyvector
  • ***
  • Posts: 232
    • View Profile
Re: Possible to compile for Mac Store?
« Reply #15 on: 2012-Feb-24 »
I agree thats what it sounds like... but its not me compiling the app - its GLBasic .. I am clicking on compile multi platform - Build for OSX_X86 in GLBasic then trying to sign that binary..

Its a bit different with Compile for iPhone where you use Xcode to compile and can change things like architecture platform etc.

If GLBasic had an option to compile for "Mac (App Store)" - where it spat out a project to be compiled later with Xcode - wouldn't that be a way to solve this? Then you could sign yourself with Xcode as you do with iOS.

MrTAToad

  • Guest
Re: Possible to compile for Mac Store?
« Reply #16 on: 2012-Feb-24 »
Unless, of course the Intel applications are using PowerPC frameworks, even when compiling just for Intel...

Offline Kitty Hello

  • code monkey
  • Administrator
  • Prof. Inline
  • *******
  • Posts: 10697
  • here on my island the sea says 'hello'
    • View Profile
    • http://www.glbasic.com
Re: Possible to compile for Mac Store?
« Reply #17 on: 2012-Feb-24 »
OSX_X86 is the right option. Does it contain ppc code!?

MrTAToad

  • Guest
Re: Possible to compile for Mac Store?
« Reply #18 on: 2012-Feb-24 »
It looks like it could!

Offline mrplant

  • Mr. Polyvector
  • ***
  • Posts: 232
    • View Profile
Re: Possible to compile for Mac Store?
« Reply #19 on: 2012-Feb-24 »
It looks like there may be some PPC code in there as this is the automated rejection response from Apple when uploading the binary..


i386 (32-bit)
x86_64 (64-bit)
Other architectures may not be included in submitted binaries. Confirm that your Xcode project's build settings include those architectures and no others.
Specifically, we found the following unsupported architectures in your binary:

ppc (in Crush.app/Contents/Frameworks/SDL.framework/Versions/A/SDL)

Though not required, we also recommend that you address the following issues:

Invalid Signature - the executable Crush.app/Contents/Frameworks/SDL.framework/Versions/A/SDL is not signed, the signature is invalid, or it is not signed with an Apple submission certificate. Refer to the Code Signing and Application Sandboxing Guide for more information.

Invalid Signature - the executable Crush.app/Contents/MacOS/SoundEngine.dylib is not signed, the signature is invalid, or it is not signed with an Apple submission certificate. Refer to the Code Signing and Application Sandboxing Guide for more information.

Once the necessary issues have been corrected, go to the Version Details page and click Ready to Upload Binary. Continue through the submission process until the app status is Waiting for Upload and then use Application Loader to upload the corrected binary.


So the signatures are not required it would seem but the main stumbling block seems to be something in:
ppc (in Crush.app/Contents/Frameworks/SDL.framework/Versions/A/SDL)

When Apple says: Confirm that your Xcode project's build settings include those architectures and no others. - does that mean a project setting for Architectures supported would fix this?
If you marked your project as Intel only - would it ignore any PPC code in there I am wondering... There is no way to do that i know of - other than adding a setting manual to the info.plist file but I don't know what that setting would be..
Its more a project wide setting when creating a new project I know you can set it there..
« Last Edit: 2012-Feb-24 by mrplant »

MrTAToad

  • Guest
Re: Possible to compile for Mac Store?
« Reply #20 on: 2012-Feb-24 »
Looks like they don't want SDL programs to be in the store...

Offline mrplant

  • Mr. Polyvector
  • ***
  • Posts: 232
    • View Profile
Re: Possible to compile for Mac Store?
« Reply #21 on: 2012-Feb-26 »
I hope thats not what it is..
They accept iOS no problem..
I had a look inside the contents of the files in the Tooyan app  - and it has the SDL library in it..
Unless this is a recent change when they scan the files after submission to the mac app store - trying to search on google for SDK apps in Mac App store but can't find a definite yes/no answer to this...

MrTAToad

  • Guest
Re: Possible to compile for Mac Store?
« Reply #22 on: 2012-Feb-26 »
Indeed - fortunately (!) it does sound as though there is PPC code in the SDL framework - is it possible for someone to check it ?

Offline fuzzy70

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 828
  • Look left, Look right, LOOK OUT!!
    • View Profile
Re: Possible to compile for Mac Store?
« Reply #23 on: 2012-Feb-26 »
There are 2 versions of the runtime on the site for 1.2, one for 10.4+ which is for PPC/Intel, the other is for 10.5+ & intel only.

regarding the 1.2/1.3/2.0 frameworks they are just source files so whatever is compiling them is the only thing that can introduce PPC code as far as I can tell. Not knowing how GLB creates it's apps I can't say if its GLB's end or the Xcode project it creates.

Lee
"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

MrTAToad

  • Guest
Re: Possible to compile for Mac Store?
« Reply #24 on: 2012-Feb-26 »
In which case the wrong XCode settings could be being used.

Offline fuzzy70

  • Community Developer
  • Prof. Inline
  • ******
  • Posts: 828
  • Look left, Look right, LOOK OUT!!
    • View Profile
Re: Possible to compile for Mac Store?
« Reply #25 on: 2012-Feb-26 »
Hmm, just thought I would compile a mac app just to look at what it produces but can't compile it. All compiles fine for windows & linux by using the options menu then build-multiplatform just both mac ones fail.

the code

Code: GLBasic [Select]
LOCAL n%,n2%, i%, j%, k%, TimeStart, TimeEnd, TimeTaken, DummyVar

n=250
n2=5000
DIM TestData3d[n][n][n]




PRINT "Writing Data to the 3d array",0,0

// Fill 3d array in Column order
TimeStart = GETTIMERALL()
FOR k=0 TO n-1
        FOR j=0 TO n-1
                FOR i=0 TO n-1
                        TestData3d[i][j][k]=0
                NEXT
        NEXT
NEXT
TimeEnd = GETTIMERALL()
TimeTaken = TimeEnd - TimeStart
PRINT "Column order took = "+TimeTaken,0,10

// Fill 3d array in Row order
TimeStart = GETTIMERALL()
FOR i=0 TO n-1
        FOR j=0 TO n-1
                FOR k=0 TO n-1
                        TestData3d[i][j][k]=0
                NEXT
        NEXT
NEXT
TimeEnd = GETTIMERALL()
TimeTaken = TimeEnd - TimeStart
PRINT "Row order took = "+TimeTaken,0,20

SHOWSCREEN

MOUSEWAIT

PRINT "Reading Data from the 3d array",0,0

// Read 3d array in Column order
TimeStart = GETTIMERALL()
FOR k=0 TO n-1
        FOR j=0 TO n-1
                FOR i=0 TO n-1
                        DummyVar=TestData3d[i][j][k]
                NEXT
        NEXT
NEXT
TimeEnd = GETTIMERALL()
TimeTaken = TimeEnd - TimeStart
PRINT "Column order took = "+TimeTaken,0,10

// Read 3d array in Row order
TimeStart = GETTIMERALL()
FOR i=0 TO n-1
        FOR j=0 TO n-1
                FOR k=0 TO n-1
                        DummyVar=TestData3d[i][j][k]
                NEXT
        NEXT
NEXT
TimeEnd = GETTIMERALL()
TimeTaken = TimeEnd - TimeStart
PRINT "Row order took = "+TimeTaken,0,20

SHOWSCREEN

MOUSEWAIT

// Clear 3d array from mem & create 2d one
DIM TestData3d[0][0][0]
DIM TestData2d[n2][n2]

PRINT "Writing Data to the 2d array",0,0

// Fill 2d array in Column order
TimeStart = GETTIMERALL()
FOR j=0 TO n2-1
        FOR i=0 TO n2-1
                TestData2d[i][j]=0
        NEXT
NEXT

TimeEnd = GETTIMERALL()
TimeTaken = TimeEnd - TimeStart
PRINT "Column order took = "+TimeTaken,0,10

// Fill 2d array IN Row order
TimeStart = GETTIMERALL()
FOR i=0 TO n2-1
        FOR j=0 TO n2-1
                TestData2d[i][j]=0
        NEXT
NEXT

TimeEnd = GETTIMERALL()
TimeTaken = TimeEnd - TimeStart
PRINT "Row order took = "+TimeTaken,0,20

SHOWSCREEN

MOUSEWAIT

PRINT "Reading Data from the 2d array",0,0

// Read 2d array in Column order
TimeStart = GETTIMERALL()
FOR j=0 TO n2-1
        FOR i=0 TO n2-1
                DummyVar=TestData2d[i][j]
        NEXT
NEXT

TimeEnd = GETTIMERALL()
TimeTaken = TimeEnd - TimeStart
PRINT "Column order took = "+TimeTaken,0,10

// Read 2d array in Row order
TimeStart = GETTIMERALL()
FOR i=0 TO n2-1
        FOR j=0 TO n2-1
                DummyVar=TestData2d[i][j]
        NEXT
NEXT

TimeEnd = GETTIMERALL()
TimeTaken = TimeEnd - TimeStart
PRINT "Row order took = "+TimeTaken,0,20

SHOWSCREEN

MOUSEWAIT


the OS-X_UNI version throw out these errors

Code: GLBasic [Select]
*** Configuration: OS-X_UNI ***
precompiling:
GPC - GLBasic Precompiler V.9.829 SN:5c64ff83 - 2D, WIN32
Wordcount:93 commands
compile+link:
powerpc-apple-darwin9-g++: installation problem, cannot exec 'cc1plus': No such file or directory
powerpc-apple-darwin9-g++: installation problem, cannot exec 'as': No such file or directory
powerpc-apple-darwin9-g++: installation problem, cannot exec 'as': No such file or directory
powerpc-apple-darwin9-g++: installation problem, cannot exec 'cc1plus': No such file or directory
Mac OSX compiler wrapper
compile for PowerPC
call:
"Q:\Compiler\platform\Mac\Bin\powerpc-apple-darwin9-g++.exe" -pipe -O3 -w -isysroot "/cygdrive/Q/Compiler/platform/Mac/SDKs/MacOSX10.4u.sdk" -I"/cygdrive/Q/Compiler/platform/Include" -I"/cygdrive/H/Programming/Projects/GLBasic/testing" -L"/cygdrive/Q/Compiler/platform/Mac/OSX/Lib" -framework OpenGL -framework Cocoa -framework QuickTime -DMACOSX -DMAC -DTARGET_OS_MAC -DNDEBUG -DWANT_SDL -DHAVE_OPENGL "/cygdrive/C/Users/LEEFUR~1/AppData/Local/Temp/glbasic/gpc_tempg.cpp" "/cygdrive/C/Users/LEEFUR~1/AppData/Local/Temp/glbasic/gpc_temp0.cpp"    -lGLBasicUni -lSDL_mixer -lSDL -lSDLmain -lpng_uni -lstdc++-static -o "/cygdrive/C/Users/LEEFUR~1/AppData/Local/Temp/glbasic/output_ppc.obj" -DOSXUNI=1
CurDir:
C:\Users\LEEFUR~1\AppData\Local\Temp\glbasic
failed (exit code 1)!
*** FATAL ERROR - Please post this output in the forum
_______________________________________
*** Finished ***
Elapsed: 2.6 sec. Time: 18:19
Build: 0 succeeded.
*** 1 FAILED ***
 


While the OS-X_X86 version produces the following errors
Code: GLBasic [Select]
_______________________________________
*** Configuration: OS-X_X86 ***
precompiling:
GPC - GLBasic Precompiler V.9.829 SN:5c64ff83 - 2D, WIN32
Wordcount:93 commands
compile+link:
i686-apple-darwin9-g++: installation problem, cannot exec 'cc1plus': No such file or directory
i686-apple-darwin9-g++: installation problem, cannot exec 'as': No such file or directory
i686-apple-darwin9-g++: installation problem, cannot exec 'cc1plus': No such file or directory
i686-apple-darwin9-g++: installation problem, cannot exec 'as': No such file or directory
*** FATAL ERROR - Please post this output in the forum
_______________________________________
*** Finished ***
Elapsed: 2.2 sec. Time: 18:21
Build: 0 succeeded.
*** 1 FAILED ***

 

Even the WinCE version compiles without a problem. So I must be doing something really dumb for it to fail or missing a step. I couldn't find any special instructions for compiling to mac in the help file

Lee

"Why don't you just make ten louder and make ten be the top number and make that a little louder?"
- "These go to eleven."

This Is Spinal Tap (1984)

Offline mrplant

  • Mr. Polyvector
  • ***
  • Posts: 232
    • View Profile
Re: Possible to compile for Mac Store?
« Reply #26 on: 2012-Feb-26 »
After many hours glad to report i've cracked it!

Just managed to upload a valid binary..

Status changed to: waiting on review!

I will type up all my notes...and post later..

Bottom line - 6 or so terminal commands to manipulate glbasics output and keep Apple happy - there doesn't seem to be a need for anything to be changed or altered as far as GLBasics output is concerned!

Bear with me a bit...

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: Possible to compile for Mac Store?
« Reply #27 on: 2012-Feb-26 »
Just Strip ppc Symbols. Described this months ago. Tooyan is First valid app Store Game.
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

Offline trucidare

  • Administrator
  • Prof. Inline
  • *******
  • Posts: 1377
  • Bachelor of Fail
    • View Profile
Re: Possible to compile for Mac Store?
« Reply #28 on: 2012-Feb-26 »
And now to describe how i did that some pictures:

Very simple and i think kitty put this in his glbasic setup

[edit]
File is located in:
"C:\...\GLBasic\Tools\MacOSX-AppStoreHelper.pkg"

[attachment deleted by admin]
« Last Edit: 2012-Feb-27 by Kitty Hello »
MacBook Pro 2,2 GHz Core 2 Duo, 4 GB RAM, 160 GB HDD, 8600M GT
Core i3 - 3,07 GHz, 8 GB Ram, 2.5 TB HDD, Geforce GTX 260+ OC

MrTAToad

  • Guest
Re: Possible to compile for Mac Store?
« Reply #29 on: 2012-Feb-26 »
Code: GLBasic [Select]
[quote author=fuzzy70 link=topic=7706.msg64146#msg64146 date=1330280879]
Hmm, just thought I would compile a mac app just to look at what it produces but can't compile it. All compiles fine for windows & linux by using the options menu then build-multiplatform just both mac ones fail.
That sounds like XCode isn't installed (or is not the correct version).