ClassiCube icon indicating copy to clipboard operation
ClassiCube copied to clipboard

Can this compile on XCode 2.5?

Open RetroSoftwareRepository opened this issue 4 years ago • 12 comments

Does the code still require XCode 3 or was that issue resolved? I plan on using XCode 2.5 under Tiger on my G3 to compile the game... I know it’s not a speed demon but it would be nice to know if I would succeed in compiling it.

RetroSoftwareRepository avatar Feb 05 '21 13:02 RetroSoftwareRepository

XCode version isn't too important, it's the target SDK that really matters. kIOPlatformUUIDKey is only available in 10.5+ SDK releases

UnknownShadow200 avatar Feb 05 '21 20:02 UnknownShadow200

I was intending on targeting 32 bit 10.4.... as the copy I have has been tweaked for G5 I think (thanks Monolingual....) I would like to have compiled it on my G3 for my G3, but it doesn’t seem feasible thanks to that function.

RetroSoftwareRepository avatar Feb 05 '21 20:02 RetroSoftwareRepository

I will make it compilable on earlier SDK versions but that will take some time

UnknownShadow200 avatar Feb 05 '21 20:02 UnknownShadow200

Thank you. ClassiCube is pretty amazing for being able to be compiled for old and new machines alike, and I appreciate your dedication to keep Minecraft Classic alive.

Sent from AT&T Yahoo Mail for iPhone

On Friday, February 5, 2021, 3:21 PM, UnknownShadow200 [email protected] wrote:

I will make it compilable on earlier SDK versions but that will take some time

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe.

RetroSoftwareRepository avatar Feb 05 '21 20:02 RetroSoftwareRepository

Should compile with earlier SDK versions now. (note that account password won't be remembered when running on systems before 10.5, though I will try to fix that at some point)

UnknownShadow200 avatar Feb 06 '21 09:02 UnknownShadow200

The system in question only supports OpenGL 1.1... it otherwise compiles fine now with your changes under Xcode 2.5

The log file says to compile the game with CC_BUILD_GL11. How would I accomplish this?

RetroSoftwareRepository avatar Feb 06 '21 20:02 RetroSoftwareRepository

Add -DCC_BUILD_GL11 to compilation flags

UnknownShadow200 avatar Feb 06 '21 22:02 UnknownShadow200

This builds and runs on Tiger. This issue can be closed.

I used:

make CC=gcc CFLAGS="-fno-math-errno -mcpu=750 -Os -I/opt/curl-7.87.0/include" LDFLAGS="-framework Carbon -framework AGL -framework OpenGL -framework IOKit -L/opt/curl-7.87.0/lib -lcurl"

cellularmitosis avatar Aug 30 '23 01:08 cellularmitosis

Performance is not too bad on an iMac G3 600MHz using the OpenGL 1.1 backend, as long as you keep the render distance set to SHORT: https://www.youtube.com/watch?v=bv9LVFClhzo

cellularmitosis avatar Aug 30 '23 01:08 cellularmitosis

make CC=gcc CFLAGS="-fno-math-errno -mcpu=750 -Os -I/opt/curl-7.87.0/include" LDFLAGS="-framework Carbon -framework AGL -framework OpenGL -framework IOKit -L/opt/curl-7.87.0/lib -lcurl"

Note that ClassiCube manually dynamically loads libcurl at runtime, and doesn't use the headers from curl at all (instead hardcoding them in Http_Worker.c)

UnknownShadow200 avatar Aug 30 '23 13:08 UnknownShadow200

Yeah I had to do a little patcheroo for that

# Use our libcurl.
# Thanks to https://github.com/UnknownShadow200/ClassiCube/issues/868#issuecomment-1575051204
sed -i '' -e 's|curlLib = String_FromConst("libcurl.4.dylib");|curlLib = String_FromConst("/opt/curl-7.87.0/lib/libcurl.4.dylib");|' src/Http_Worker.c
sed -i '' -e 's|curlLib = String_FromConst("libcurl.dylib");|curlLib = String_FromConst("/opt/curl-7.87.0/lib/libcurl.dylib");|' src/Http_Worker.c

full details at

  • https://github.com/cellularmitosis/leopard.sh/blob/main/leopardsh/scripts/install-classicube-1.3.6.sh
  • https://github.com/cellularmitosis/leopard.sh/blob/main/tigersh/scripts/install-classicube-1.3.6.sh

cellularmitosis avatar Aug 30 '23 14:08 cellularmitosis