MacOS SpringRTS OSX Build - Page 5

MacOS SpringRTS OSX Build

Discuss everything related to compiling and running Spring on Mac OS X.

Moderator: Moderators

User avatar
jamerlan
Balanced Annihilation Developer
Posts: 683
Joined: 20 Oct 2009, 13:04

Re: MacOS SpringRTS OSX Build

Post by jamerlan »

Thanks! I did some quick tests and it works good! Will test more later.
MaDDoX
Posts: 77
Joined: 08 Jan 2006, 17:45

Re: MacOS SpringRTS OSX Build

Post by MaDDoX »

Gj! Have you guys got any AI working in 102?
MaDDoX
Posts: 77
Joined: 08 Jan 2006, 17:45

Re: MacOS SpringRTS OSX Build

Post by MaDDoX »

Hey Darklord, any chance you'll build the latest SpringLobby (0.244)? The latest version you've built for OSX (0.243) has an annoying bug which prevents the creation of multiple custom player boxes.
darklord42
Posts: 96
Joined: 26 Jul 2014, 07:11

Re: MacOS SpringRTS OSX Build

Post by darklord42 »

Looks to be a clang compile error. Unfortunately we need clang to compile the OSX version with wxwidgets which has some Objective C

Code: Select all

/Users/herecomethej/springlobby/src/lsl/src/lslunitsync/image.cpp:55:20: error: use of undeclared identifier 'fmemopen'; did you mean 'freopen'?
        std::FILE* file = fmemopen((void*)data, size, "rb");
                          ^~~~~~~~
                          freopen
/usr/include/stdio.h:248:7: note: 'freopen' declared here
FILE    *freopen(const char * __restrict, const char * __restrict,
         ^
/Users/herecomethej/springlobby/src/lsl/src/lslunitsync/image.cpp:55:29: error: cannot initialize a parameter of type 'const char *' with an rvalue of type 'void *'
        std::FILE* file = fmemopen((void*)data, size, "rb");
                                   ^~~~~~~~~~~
/usr/include/stdio.h:248:38: note: passing argument to parameter here
FILE    *freopen(const char * __restrict, const char * __restrict,
                                        ^
2 errors generated.
darklord42
Posts: 96
Joined: 26 Jul 2014, 07:11

Re: MacOS SpringRTS OSX Build

Post by darklord42 »

Here Is a Spring 101 cerca R2 build. Still no luck with springlobby

http://www.mediafire.com/download/f5019 ... 0.11.4.dmg
User avatar
PepeAmpere
Posts: 589
Joined: 03 Jun 2010, 01:28

Re: MacOS SpringRTS OSX Build

Post by PepeAmpere »

Darklord, can you give us some hints how to build os x build?

Instructions here https://springrts.com/wiki/Building_Spring_on_MacOSX seems to be obsolete (it does not work for us). Once we know how, we can help you
User avatar
PepeAmpere
Posts: 589
Joined: 03 Jun 2010, 01:28

Re: MacOS SpringRTS OSX Build

Post by PepeAmpere »

darklord42 wrote:Here Is a Spring 101 cerca R2 build. Still no luck with springlobby

http://www.mediafire.com/download/f5019 ... 0.11.4.dmg
I quote you to send you notification :lol:
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: MacOS SpringRTS OSX Build

Post by abma »

darklord42 wrote:Still no luck with springlobby
no issue about compile problems: https://github.com/springlobby/springlobby/issues can you please create one / whats the issue?
darklord42
Posts: 96
Joined: 26 Jul 2014, 07:11

Re: MacOS SpringRTS OSX Build

Post by darklord42 »

I see. Done. And Pepe and Madox I sent you both pms with all the info I have. Hope it helps
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: MacOS SpringRTS OSX Build

Post by abma »

would be nice when the wiki page is updated as well! :-)
darklord42
Posts: 96
Joined: 26 Jul 2014, 07:11

Re: MacOS SpringRTS OSX Build

Post by darklord42 »

Unfortunately the whole process is very convoluted, and needs a proper mac developer to clean it up so you can have easy to follow step by step instructions for a wiki. For Springlobby there is no app building process in place and I hacked together a script using proverbial ducktape. The source even lacks an icon and info.plist file. I created them myself. The Icon I converted too an svg image in inkscape so i could make the various mipmaps. looks a little cartoonish as a result, but I guess it is fine.

If you want to take a look at my scripts

Spring:
https://www.dropbox.com/s/2kivyesldssmu ... le.sh?dl=0
Springlobby:
https://www.dropbox.com/s/1ff4tu5o27lca ... y.zip?dl=0
darklord42
Posts: 96
Joined: 26 Jul 2014, 07:11

Re: MacOS SpringRTS OSX Build

Post by darklord42 »

Abma pointed out I forgot to update the submodules again...So now springlobby compiles fine


Here it is
http://www.mediafire.com/download/53tm0 ... 0.11.4.dmg
MaDDoX
Posts: 77
Joined: 08 Jan 2006, 17:45

Re: MacOS SpringRTS OSX Build

Post by MaDDoX »

Thanks Darklord42! I haven't tried building it (that's what my bud Lucasgg is working on) but the built version didn't work on my system.
It's OSX 10.11.4 btw, I got a "SpringLobby cannot be opened because of a problem." error right out of the bat. Your previous release works fine, the only problem is the damn "can't draw start boxes" bug which was fixed after its release.
darklord42
Posts: 96
Joined: 26 Jul 2014, 07:11

Re: MacOS SpringRTS OSX Build

Post by darklord42 »

Sorry about that. It works now. Apparently I had a libpng.framework in my system library folder it linked against instead of the libpng.dylib in the app bundle. I just copied in the framework version for now.
MaDDoX
Posts: 77
Joined: 08 Jan 2006, 17:45

Re: MacOS SpringRTS OSX Build

Post by MaDDoX »

Thanks Darklord, it works now :) We're still fighting to get the compile process working, if we still don't get it working I'll get back to you later. TA!
User avatar
danil_kalina
Posts: 505
Joined: 08 Feb 2010, 22:21

Re: MacOS SpringRTS OSX Build

Post by danil_kalina »

When I run your script I got the following:

Code: Select all

How do you want to the app bundled?
1) None
2) OSX Bundle
3) Archive
2
Will Make OSX Bundle
mv: rename /opt/local-spring to /opt/local: No such file or directory
....Compiling Spring-101.0.1-386-gcb41545
Error in last command, check log for details
cmake .. -DCMAKE_CXX_COMPILER=/opt/local/bin/g++-mp-4.9 -DCMAKE_C_COMPILER=/opt/local/bin/gcc-mp-4.9 -DGLEW_INCLUDE_DIR=/opt/local/include/GL -DBOOST_LIBRARYDIR=/Users/danil/Desktop/spring.source/boost_1_59_0/bin/libs -DBOOST_INCLUDEDIR=/Users/danil/Desktop/spring.source/boost_1_59_0/bin/include -DBoost_USE_STATIC_LIBS=YES -DGLEW_LIBRARIES=/opt/local/lib/libGLEW.a
Do you wish to continue? y/n :n
mv: rename /opt/local to /opt/local-spring: No such file or directory
I installed MacPorts. I have a folder /opt/local
Your script makes /opt/local-normal
How to fix your script and why we need to change dir of /opt/local?

Thanks
darklord42
Posts: 96
Joined: 26 Jul 2014, 07:11

Re: MacOS SpringRTS OSX Build

Post by darklord42 »

Crap I thought I removed that before I sent it to you. Sorry. On my system I have two macports folders, so no matter what I do to the main one, I never have to mess with the one i use for spring, except update it occasionally. No just edit it so it just says /opt/local/ There is no need to switch folder to something else. just remove the
'mv /opt/local /opt/local-spring" line or whatever it is.
User avatar
danil_kalina
Posts: 505
Joined: 08 Feb 2010, 22:21

Re: MacOS SpringRTS OSX Build

Post by danil_kalina »

Code: Select all

compiler doesn't support: -fcheck-pointer-bounds
compiler doesn't support: -mmpx
compiler doesn't support: -Wchkp
CMake Warning at CMakeLists.txt:346 (Message):
  You are using ld.bfd, it's much slower than ld.gold.


Unable to find any JVMs matching version "(null)".
No Java runtime present, try --request to install.
CMake Error at /opt/local/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
  Could NOT find Java (missing: Java_JAVA_EXECUTABLE Development)
Call Stack (most recent call first):
  /opt/local/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:388 (_FPHSA_FAILURE_MESSAGE)
  /opt/local/share/cmake-3.5/Modules/FindJava.cmake:244 (find_package_handle_standard_args)
  AI/Interfaces/Java/CMakeLists.txt:245 (FIND_PACKAGE)
darklord42
Posts: 96
Joined: 26 Jul 2014, 07:11

Re: MacOS SpringRTS OSX Build

Post by darklord42 »

First of all, what compiler are you using?
I know some of the engines are in java, so you definitely need some form of java runtime installed. Sorry I didn't think of that as I almost always have it installed.
User avatar
danil_kalina
Posts: 505
Joined: 08 Feb 2010, 22:21

Re: MacOS SpringRTS OSX Build

Post by danil_kalina »

Code: Select all

GCC=$MACPORTS/bin/gcc-mp-4.9
CXX=$MACPORTS/bin/g++-mp-4.9
Post Reply

Return to “Mac OS X”