What is needed for a proper Mac support
Moderator: Moderators
Re: What is needed for a proper Mac support
very likely libary and header don't match / were compiled with different flags or different versions are installed on the system and one is used as header an one as lib.
look into CMakeCache.txt which header dir / lib dir is used for it.
look into CMakeCache.txt which header dir / lib dir is used for it.
Re: What is needed for a proper Mac support
In my case i had no glew frameworks at all before installing it through macports. And now GLEW_LIBRARIES is pointing to /opt/local/lib/libGLEW.dylib
Probably adding -DGLEW_LIBRARIES=/opt/local/lib/libGLEW.a to cmake args should fix an issue.
Or can also try without macport's glew and no glew cmake args (or only with proper -DGLEW_INCLUDE_DIR, because by default it was pointing to spring's glew and had undefined symbols).
Probably adding -DGLEW_LIBRARIES=/opt/local/lib/libGLEW.a to cmake args should fix an issue.
Or can also try without macport's glew and no glew cmake args (or only with proper -DGLEW_INCLUDE_DIR, because by default it was pointing to spring's glew and had undefined symbols).
-
- Posts: 96
- Joined: 26 Jul 2014, 07:11
Re: What is needed for a proper Mac support
Halleluiah!
Thanks lamer!
adding -DGLEW_LIBRARIES=/opt/local/lib/libGLEW.a worked great.
Now I got to find a way to package all this. What a mess for mac people :) They aren't the most computer literate bunch.
Thanks lamer!
adding -DGLEW_LIBRARIES=/opt/local/lib/libGLEW.a worked great.
Now I got to find a way to package all this. What a mess for mac people :) They aren't the most computer literate bunch.
-
- Posts: 96
- Joined: 26 Jul 2014, 07:11
Re: What is needed for a proper Mac support
I'm still working my way through dependency h***, but it will work out..eventually. The other issue is getting spring to search for resources like the FreeSans font. Is there anyway I can set that at compile time in cmake to @executable_path/../Resources folder? Or unless it has to be an absolute path, which is doable. Just need to do a few tricks to maintain app portability.
Re: What is needed for a proper Mac support
does this script still work for creating a bundle? https://github.com/spring/spring/blob/d ... _bundle.sh
-
- Posts: 96
- Joined: 26 Jul 2014, 07:11
Re: What is needed for a proper Mac support
Awesome! Should have figured you guys had an old system in place.
I get
I took a look inside but I have no idea what it means by config and branch. Do you remember how it is suppose to work?
Also dylibbundler had no issues packaging the libraries, (except for a small issue where spring was linked to the wrong x11 lib from another install). So my hopes are high that this should be able to find all the libraries off the macports install. :)
I get
Code: Select all
Please run with /Users/herecomethej/spring/buildbot/slave/osx/create_Mac_bundle.sh <config> <branch>
Also dylibbundler had no issues packaging the libraries, (except for a small issue where spring was linked to the wrong x11 lib from another install). So my hopes are high that this should be able to find all the libraries off the macports install. :)
Re: What is needed for a proper Mac support
config is the buildbot config and branch is develop
not sure what cwd has to be, i guess root of spring.
i.e.:
not sure what cwd has to be, i guess root of spring.
i.e.:
cd /Users/herecomethej/spring/
buildbot/slave/osx/create_Mac_bundle.sh default develop
-
- Posts: 96
- Joined: 26 Jul 2014, 07:11
Re: What is needed for a proper Mac support
Code: Select all
buildbot/slave/osx/create_Mac_bundle.sh default develop
Code: Select all
MAKE isn't set, using 'make' as default
Installing into /tmp/spring/inst
buildbot/slave/osx/create_Mac_bundle.sh: line 12: cd: /Users/herecomethej/spring/build/default: No such file or directory
Also at the end it wants to build a .zip file from the folder.
OSX distro are typically in compressed dmg disk images
A folder can be turned into one with the command:
hdiutil create -volname WhatYouWantTheDiskToBeNamed -srcfolder /whatever/path -ov -format UDZO name.dmg
Re: What is needed for a proper Mac support
this script was/is run on a buildslave and excepts a lot of stuff. either adjust the script or fix your build so it fits to the script. can't help that much with it, it shouldn't be hard to understand...
Re: What is needed for a proper Mac support
Have you tried building SDL2? it's pretty straightforward on windows&linux, may work on your setup as well.
-
- Posts: 96
- Joined: 26 Jul 2014, 07:11
Re: What is needed for a proper Mac support
[EDIT] Figured some stuff out
I guess I follow it. It's a bit of a rube goldberg machine, but I think we can get it to live again.
in prepare.sh
The <config> is actually a folder and subdirectory of the build folder from which you ran cmake. My guess it's a form of sorting between different builds.
the make line should be
make spring (or we try to build parts of the project that don't play nicely with OSX yet)
in the main script needs a little updating as well
the make install should be
make install-spring (same issue as above)
The rest should be ok, from what I can follow. It might not install libgcc but I'll have to try it out.
Again not a fan of zip distros of apps for OSX :)
@ hokomoko
Sure, but macports doesn't allow it. Parts of the system are just too old.
I guess I follow it. It's a bit of a rube goldberg machine, but I think we can get it to live again.
in prepare.sh
The <config> is actually a folder and subdirectory of the build folder from which you ran cmake. My guess it's a form of sorting between different builds.
the make line should be
make spring (or we try to build parts of the project that don't play nicely with OSX yet)
in the main script needs a little updating as well
the make install should be
make install-spring (same issue as above)
The rest should be ok, from what I can follow. It might not install libgcc but I'll have to try it out.
Again not a fan of zip distros of apps for OSX :)
@ hokomoko
Sure, but macports doesn't allow it. Parts of the system are just too old.
Last edited by darklord42 on 18 Jan 2015, 06:14, edited 1 time in total.
-
- Posts: 96
- Joined: 26 Jul 2014, 07:11
Re: What is needed for a proper Mac support
EDIT
Now that I figured out the script, It's actually quite simple to copy what it does. So now I have a working spring.app. Time to move on to springlobby :)
Now that I figured out the script, It's actually quite simple to copy what it does. So now I have a working spring.app. Time to move on to springlobby :)
-
- Posts: 96
- Joined: 26 Jul 2014, 07:11
Re: What is needed for a proper Mac support
Well I have a working Springlobby and Spring.apps. Unfortionatly they don't work together. I don't think Springlobby can select the app package and work, and using a soft link to the macos folder to select the libunitsync.dylib doesn't work either cause it cant obtain the version string? I guess it's for official releases only?
But anyway. People are free to play with it.
http://www.mediafire.com/download/n31j8 ... esting.dmg
For OSX 10.10 only
But anyway. People are free to play with it.
http://www.mediafire.com/download/n31j8 ... esting.dmg
For OSX 10.10 only
Last edited by darklord42 on 18 Jan 2015, 17:20, edited 1 time in total.
Re: What is needed for a proper Mac support
link is 404.
maybe the code got broken which allowed to select the .app package? idk, sorry.
no clue how it worked, i didn't write the code nor do i have osx. but afaik it worked somehow. I don't think Springlobby can select the app package and work, and using a soft link to the macos folder to select the libunitsync.dylib doesn't work either cause it cant obtain the version string? I guess it's for official releases only?
maybe the code got broken which allowed to select the .app package? idk, sorry.
-
- Posts: 96
- Joined: 26 Jul 2014, 07:11
Re: What is needed for a proper Mac support
Oops somehow copied the wrong link...
Anyway, perhaps with a test bundle we can get some answers :)
Anyway, perhaps with a test bundle we can get some answers :)
Re: What is needed for a proper Mac support
Works a bit. But tests were not clean (e.g. i have installed all development libraries earlier).
Can't select Spring.app package in springlobby, it only allows to select libunitsync.dylib and file browser doesn't open Spring.app as directory.
Had to manually edit
and add there
Can't select Spring.app package in springlobby, it only allows to select libunitsync.dylib and file browser doesn't open Spring.app as directory.
Had to manually edit
Code: Select all
/Users/bob/Library/Preferences/.springlobby/springlobby.conf
Code: Select all
[Spring/Paths]
[Spring/Paths/98.0.1-284-gae0a419\ develop]
SpringBinPath=/Applications/Spring.app/Contents/MacOS/spring
UnitSyncPath=/Applications/Spring.app/Contents/MacOS/libunitsync.dylib
SpringBundlePath=/Applications/Spring.app
-
- Posts: 96
- Joined: 26 Jul 2014, 07:11
Re: What is needed for a proper Mac support
I understand putting resources in hidden folders in the home folder. That's a unix convention. (although a hoop to jump through in OSX requiring a command to the finder and reset the finder) But why put resources in a hidden folder under ~/Library/Preferences? Seems a tad silly.
Re: What is needed for a proper Mac support
Yep, don't know why its that way (i guess because there is no OS X devs). I just typed "find / -name *springlobby*" and found it there. Also spring settings are in "~/.config/spring/springsettings.cfg" :)But why put resources in a hidden folder under ~/Library/Preferences? Seems a tad silly.
-
- Posts: 96
- Joined: 26 Jul 2014, 07:11
Re: What is needed for a proper Mac support
I'll have to remember that. Spotlight ignores hidden folders. unless you start the search from within one. Thanks!
I just added the values manually, but it just complains about libunitsync.dylib not loading. Did the same happen for you?
I just added the values manually, but it just complains about libunitsync.dylib not loading. Did the same happen for you?
-
- Posts: 96
- Joined: 26 Jul 2014, 07:11
Re: What is needed for a proper Mac support
Gah, I forgot to "bundle" unitsync. and points to the macports /opt/local libraries.
Odd thing is I'm having a heck of a time bundling it. It seems no matter what I do, using dylibbundler to relink libraries to the lib folder, or same folder with @lib_path/../MacOS. Springlobby tells me it can't load. (unless I use pointing to macports) this really has me scratching my head. otool -L tells me all the decencies to libunitsync.dylib are in the right places in the bundle. But no luck..
I even tried to use the bundle builder script, using the fixes I mentioned above. (it fails when it tries to strip the libraries) and doesn't get far. But even the partial success tells me that the script had the same idea with putting depend ices of libunitsync.dylib in the same folder as itself. But still no luck. I'm going to leave this for the day, and come back to it later.
Odd thing is I'm having a heck of a time bundling it. It seems no matter what I do, using dylibbundler to relink libraries to the lib folder, or same folder with @lib_path/../MacOS. Springlobby tells me it can't load. (unless I use pointing to macports) this really has me scratching my head. otool -L tells me all the decencies to libunitsync.dylib are in the right places in the bundle. But no luck..
I even tried to use the bundle builder script, using the fixes I mentioned above. (it fails when it tries to strip the libraries) and doesn't get far. But even the partial success tells me that the script had the same idea with putting depend ices of libunitsync.dylib in the same folder as itself. But still no luck. I'm going to leave this for the day, and come back to it later.