flareteam / flare-engine

Free/Libre Action Roleplaying Engine (engine only)
http://flarerpg.org/
GNU General Public License v3.0
1.11k stars 188 forks source link

Mac OS X maintainer #1583

Closed dorkster closed 3 years ago

dorkster commented 6 years ago

Opening this thread for anyone that would like to create the .dmg files for Mac OS X. This includes both the engine and the engine+game files.

dorkster commented 6 years ago
  1. You should use the svg icon in the distribution folder.

  2. Upload them to some sort of file hosting (Google Drive, Dropbox, etc) and share the links with me. I can then upload them to Sourceforge.

On Tue, Mar 13, 2018, 2:20 AM Thomas Leavitt notifications@github.com wrote:

  1. Still no icon? My wife has graphic design fu, we can create one if needed.
  2. Where do I put the created DMG files? They're 33 (flare-engine.dmg) and 168MB (flare.dmg) respectively.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/clintbellanger/flare-engine/issues/1583#issuecomment-372559017, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3yPm7PJpqptW0BpsdMdNZ3aM9i1z41ks5td2VDgaJpZM4SRspF .

tvleavitt commented 6 years ago

Expletive deleted. It appears that on OS X 10.13 and later, your "Bundle" must have an "Asset Catalog", which then in turn is referenced in the Info.plist. You can't just simply drop an .icns file in Resources, or even just create an entry in Info.plist after doing so. So far as I can tell, the only documented way to do this is with XCode, although I think CMake can do it, but that involves altering the CMake settings. From what I'm reading, I'm thinking that CMake really should create the OS X Flare.app and Flare-engine.app bundles itself, rather than me doing so manually.

I've spent more than an hour fruitlessly fiddling with this... not sure where to go next. Who maintains the CMake config?

https://cmake.org/cmake/help/v3.11/prop_tgt/RESOURCE.html

dorkster commented 6 years ago

That's unfortunate. Some problems I see with the cmake method of doing this:

I don't know where to go from here other than resort to using XCode.

tvleavitt commented 6 years ago

I'm out of my office most of the day today; I'll dig into this tomorrow. Should I just upload (won't be until very late today, if at all), the app install without an icon? It looks kind of cheesy, but it is at least functional.

This must be a known problem. How does Wesnoth (for example) handle this?

dorkster commented 6 years ago

Let's do a "no icon" release for now. This may take some time to figure out.

On Tue, Mar 13, 2018 at 1:42 PM, Thomas Leavitt notifications@github.com wrote:

I'm out of my office most of the day today; I'll dig into this tomorrow. Should I just upload (won't be until very late today, if at all), the app install without an icon? It looks kind of cheesy, but it is at least functional.

This must be a known problem. How does Wesnoth (for example) handle this?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/clintbellanger/flare-engine/issues/1583#issuecomment-372754832, or mute the thread https://github.com/notifications/unsubscribe-auth/AA3yPm4PZlWFMKK0ISenjRjvEsCZR_rEks5teATygaJpZM4SRspF .

dorkster commented 6 years ago

By the way, would you be okay with increasing the minimum required cmake version? I'm not sure which version you're using, and another contributor is interested in increasing this to take advantage of some newer cmake features for MSVC stuff.

tvleavitt commented 6 years ago

O.K. I'll upload DMG files tonight.

I have no investment in any particular version of cmake, I usually upgrade OS X pretty promptly; that would apply mostly, I'd guess, to folks trying to install from source on older hardware which is EOL from Apple and thus not getting OS updates. No idea what the OS requirements of cmake are.

So, the big question is: is the goal for Flare to act like a standard OS X app, or are we o.k. with it being installed via some alternative mechanism less accessible to an average user? Also, is it possible that we could build a pkg installer, rather than an .app, and avoid this problem? That's less common, but still basically acceptable from an end user perspective, I think.

tvleavitt commented 6 years ago

Here's Wesnoth's info on how to compile with XCode. They also use SDL.

https://wiki.wesnoth.org/CompilingWesnothOnMacOSX#Build_using_XCode

dorkster commented 6 years ago

In regards to the cmake version, I just wanted to make sure all of us could make the official binaries that we provide. Other users wanting to compile from source isn't much of a concern for us. Especially on Mac OS where the number of users self-compiling is likely much less than Windows/Linux.

Do you have any examples of Mac programs that are distributed as a "pkg"? I presume that would just be an archive with the executable and game data in it. That would be similar to Flare's Windows zip bundle, which I think is acceptable. Might be weird for pre-1.0 Mac users to no longer have a fancy .app, though.

tvleavitt commented 6 years ago

Adobe Digital Editions, for example (their DRM manager for eLibrary checkouts) comes as a pkg, and that's definitely consumer facing. This isn't super unusual, in my opinion. Now, they do use a formal "installer" package (common with this method of software distribution), but their app still requires the CMD key to be held down and "Open With" installer to get around Apple's default installation security.

screen shot 2018-03-13 at 2 57 31 pm

https://www.adobe.com/solutions/ebook/digital-editions/download.html

Also, I haven't set up the DMG with any fancy background, etc. I can look at that later on, too.

tvleavitt commented 6 years ago

O.K. DMGs created, uploaded to Google Drive, link shared.

tvleavitt commented 6 years ago

I think you're misinterpreting the example included in the link to the cmake documentation above; I'm pretty sure that items placed in Resources retain their directory structure, that's defined by Apple for MacOS apps, not cmake. I think the example just doesn't include a Resource contained in a directory.

Why would including the game mods via cmake be a big deal? You can do this differently, depending on whether you're building Flare or just the Engine.

dorkster commented 6 years ago

I think you're misinterpreting the example included in the link to the cmake documentation above; I'm pretty sure that items placed in Resources retain their directory structure, that's defined by Apple for MacOS apps, not cmake. I think the example just doesn't include a Resource contained in a directory.

I'd be glad if I was misinterpreting this, but the example has a file that's in a directory, appresourcedir/appres.txt. Included as such, the output shows that this file gets placed at Resources/appres.txt, when we would expect it to be at Resources/appresourcedir/appres.txt.

Why would including the game mods via cmake be a big deal? You can do this differently, depending on whether you're building Flare or just the Engine.

You're right. As long as looking for and including the game data is done in a way that won't affect building the engine alone, there is no issue there.

dorkster commented 6 years ago

Nonetheless, the Mac version is now up on the Flare site. Thanks again for working on this.

tvleavitt commented 6 years ago

I wrote up detailed documentation, and uploaded all the files and images used to build the DMGs and the apps to the shared folder where I originally uploaded the DMGs themselves. I suggest pulling these down and dropping them into GitHub somewhere. I documented and included the scripts used to build the DMG, along with links to the create-dmg software (FLOSS), but I did not write up a script to automatically build the .app folders themselves, as it seems like we should be doing this via cmake or XCode due to the icns display issue.

dorkster commented 6 years ago

I've added your docs (and the .app background image) to distribution/macos/.

Last night, I made an itch.io page for Flare and included, among others, the Mac OS build. At least on Linux, the itch app is a nice way to download, install and run the binary version. But I'm not sure if it works with the DMG file. Could you test? If not, maybe we should have a plain ZIP file for itch. In fact, maybe installing through the itch app becomes the "user friendly" distribution method, while the ZIP itself is there for more advanced users (or users that don't like itch).

tvleavitt commented 6 years ago

Installed the Itch app, installed Flare through it. Worked fine. It installs the contents of the DMG to ~/Library/Application Support/itch/apps/Flare Empyrean Campaign, which is honestly kind of weird to me as a location where potentially a significant number of binary files and associated data could wind up.

dorkster commented 6 years ago

Cool that it works with DMGs.

It installs the contents of the DMG to ~/Library/Application Support/itch/apps/Flare Empyrean Campaign, which is honestly kind of weird to me as a location where potentially a significant number of binary files and associated data could wind up.

Yeah, that's pretty much how the itch app does things. On Linux, it uses ~/.config/itch/apps/

tvleavitt commented 6 years ago

FYI, the binary is built following the instructions in INSTALL.engine.md, specifically, installation of the dependencies.

OS X

Installing dependencies using [Homebrew]:

brew install cmake libvorbis sdl2 sdl2_image sdl2_mixer sdl2_ttf

I'm testing the install on my laptop, which doesn't have these installed. I don't think...

tvleavitt commented 6 years ago

This is what attempting to lauch via itch.io spits out on start on my laptop. Crash. Lots of noise.

[2018-03-19 @ 13:09:00.463] [configure] configuring /Users/thomasleavitt/Library/Application Support/itch/apps/Flare Empyrean Campaign [2018-03-19 @ 13:09:00.831] [configure/osx] path elements: ["Applications","Adobe Acrobat Reader DC.app",""] [...skip evaluation of every app directory in Applications as above...] [2018-03-19 @ 13:09:01.097] [configure/osx] path elements: ["Flare.app",""] [2018-03-19 @ 13:09:01.100] [configure/osx] Flare.app/: Looks like the real thing! [2018-03-19 @ 13:09:02.129] [configure/common] Contents/Resources/mods/fantasycore/languages/xgettext.py: is macExecutable, already executable [2018-03-19 @ 13:09:02.133] [configure/common] Contents/Resources/mods/fantasycore/languages/regenerate_po.sh: is macExecutable, already executable [2018-03-19 @ 13:09:02.137] [configure/common] Contents/Resources/mods/fantasycore/languages/readme.txt: is macExecutable, already executable [2018-03-19 @ 13:09:04.887] [configure/common] Contents/Resources/mods/empyrean_campaign/languages/xgettext.py: is macExecutable, already executable [2018-03-19 @ 13:09:04.888] [configure/common] Contents/Resources/mods/empyrean_campaign/languages/regenerate_po.sh: is macExecutable, already executable [2018-03-19 @ 13:09:04.892] [configure/common] Contents/Resources/mods/empyrean_campaign/languages/readme.txt: is macExecutable, chmod +x [2018-03-19 @ 13:09:05.580] [configure/common] Contents/Resources/mods/default/languages/regenerate_po.sh: is macExecutable, already executable [2018-03-19 @ 13:09:05.580] [configure/common] Contents/Resources/mods/default/languages/xgettext.py: is macExecutable, already executable [2018-03-19 @ 13:09:05.788] [configure/common] Contents/MacOS/Flare: is macExecutable, already executable [2018-03-19 @ 13:09:05.795] [configure/common] Contents/Frameworks/SDL2.framework/Versions/A/SDL2: is macExecutable, chmod +x [2018-03-19 @ 13:09:05.968] [configure/common] Contents/Frameworks/SDL2_ttf.framework/Versions/A/SDL2_ttf: is macExecutable, chmod +x [2018-03-19 @ 13:09:06.121] [configure/common] Contents/Frameworks/SDL2_ttf.framework/Versions/A/Frameworks/FreeType.framework/Versions/A/FreeType: is macExecutable, chmod +x [2018-03-19 @ 13:09:06.158] [configure/common] Contents/Frameworks/SDL2_mixer.framework/Versions/A/SDL2_mixer: is macExecutable, chmod +x [2018-03-19 @ 13:09:06.173] [configure/common] Contents/Frameworks/SDL2_mixer.framework/Versions/A/Frameworks/Vorbis.framework/Versions/A/Vorbis: is macExecutable, chmod +x [2018-03-19 @ 13:09:06.214] [configure/common] Contents/Frameworks/SDL2_mixer.framework/Versions/A/Frameworks/Ogg.framework/Versions/A/Ogg: is macExecutable, chmod +x [2018-03-19 @ 13:09:06.238] [configure/common] Contents/Frameworks/SDL2_mixer.framework/Versions/A/Frameworks/mpg123.framework/Versions/A/mpg123: is macExecutable, chmod +x [2018-03-19 @ 13:09:06.266] [configure/common] Contents/Frameworks/SDL2_mixer.framework/Versions/A/Frameworks/modplug.framework/Versions/A/modplug: is macExecutable, chmod +x [2018-03-19 @ 13:09:06.318] [configure/common] Contents/Frameworks/SDL2_mixer.framework/Versions/A/Frameworks/FLAC.framework/Versions/A/FLAC: is macExecutable, chmod +x [2018-03-19 @ 13:09:06.355] [configure/common] Contents/Frameworks/SDL2_image.framework/Versions/A/SDL2_image: is macExecutable, chmod +x [2018-03-19 @ 13:09:06.370] [configure/common] Contents/Frameworks/SDL2_image.framework/Versions/A/Frameworks/webp.framework/Versions/A/webp: is macExecutable, chmod +x [2018-03-19 @ 13:09:06.404] [configure/common] 12 executables/libraries were missing the executable bit [2018-03-19 @ 13:09:06.407] [configure] native-configure yielded execs: [ "Flare.app//" ] [2018-03-19 @ 13:09:06.410] [configure/compute-size] computing size of /Users/thomasleavitt/Library/Application Support/itch/apps/Flare Empyrean Campaign [2018-03-19 @ 13:09:06.479] [configure] total size of /Users/thomasleavitt/Library/Application Support/itch/apps/Flare Empyrean Campaign: 153.92 MB (161394032 bytes) [2018-03-19 @ 13:09:21.581] [launch] itch 23.6.1 launching game 235218: Flare: Empyrean Campaign [2018-03-19 @ 13:09:21.581] [launch] looking for manifest @ "/Users/thomasleavitt/Library/Application Support/itch/apps/Flare Empyrean Campaign/.itch.toml" [2018-03-19 @ 13:09:21.582] [launch] No manifest found (no '.itch.toml' file in top-level directory). Proceeding with heuristics. [2018-03-19 @ 13:09:21.582] [launch] launching prepare for native [2018-03-19 @ 13:09:21.583] [prepare/native] not on windows, nothing to do [2018-03-19 @ 13:09:21.587] [launch/native] cave location: "appdata/Flare Empyrean Campaign" [2018-03-19 @ 13:09:21.589] [launch/native] no manifest action picked [2018-03-19 @ 13:09:21.592] [launch/poker] initial candidate set: [ { "path": "Flare.app//", "weight": 0, "depth": 0, "score": 0 } ] [2018-03-19 @ 13:09:21.606] [launch/poker] candidates after poking: [ { "path": "Flare.app//", "weight": 96, "depth": 2, "score": 100 } ] [2018-03-19 @ 13:09:21.606] [launch/poker] candidates after sorting: [ { "path": "Flare.app//", "weight": 96, "depth": 2, "score": 100 } ] [2018-03-19 @ 13:09:21.606] [launch/native] executing '/Users/thomasleavitt/Library/Application Support/itch/apps/Flare Empyrean Campaign/Flare.app/' on 'osx' with args '' [2018-03-19 @ 13:09:21.607] [spawn] spawning activate with args --print-bundle-executable-path /Users/thomasleavitt/Library/Application Support/itch/apps/Flare Empyrean Campaign/Flare.app/ [2018-03-19 @ 13:09:21.659] [launch/native] no app isolation [2018-03-19 @ 13:09:21.661] [launch/native] spawn command: open -W "/Users/thomasleavitt/Library/Application Support/itch/apps/Flare Empyrean Campaign/Flare.app/" --args [2018-03-19 @ 13:09:21.661] [launch/native] working directory: /Users/thomasleavitt/Library/Application Support/itch/apps/Flare Empyrean Campaign/Flare.app/Contents/MacOS [2018-03-19 @ 13:09:21.663] [launch/native] command: open [2018-03-19 @ 13:09:21.663] [launch/native] args: [ "-W", "/Users/thomasleavitt/Library/Application Support/itch/apps/Flare Empyrean Campaign/Flare.app/", "--args" ] [2018-03-19 @ 13:09:21.663] [launch/native] env keys: [ "TMP", "TEMP" ] [2018-03-19 @ 13:09:21.960] [launch/native] err: LSOpenURLsWithRole() failed with error -10810 for the file /Users/thomasleavitt/Library/Application Support/itch/apps/Flare Empyrean Campaign/Flare.app. [2018-03-19 @ 13:09:22.011] [launch] error while launching 2954af2a-d64d-445f-99d4-31d144511bb2: application crashed. process exited with code 1 [2018-03-19 @ 13:09:22.014] [launch] crashed with [2018-03-19 @ 13:09:22.014] [launch] application crashed. process exited with code 1 [2018-03-19 @ 13:09:22.015] [diego] diego here, looking around Darwin 880-IT-MBA.private 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64 ProductName: Mac OS X ProductVersion: 10.13.3 BuildVersion: 17D102 Hardware:

Hardware Overview:

  Model Name: MacBook Air
  Model Identifier: MacBookAir7,2
  Processor Name: Intel Core i7
  Processor Speed: 2.2 GHz
  Number of Processors: 1
  Total Number of Cores: 2
  L2 Cache (per Core): 256 KB
  L3 Cache: 4 MB
  Memory: 8 GB
  Boot ROM Version: MBA71.0171.B00
  SMC Version (system): 2.27f2
  Serial Number (system): C1MQN7HFG944
  Hardware UUID: 7B27242D-6D28-59A8-91DB-E3E53D323325

Graphics/Displays:

Intel HD Graphics 6000:

  Chipset Model: Intel HD Graphics 6000
  Type: GPU
  Bus: Built-In
  VRAM (Dynamic, Max): 1536 MB
  Vendor: Intel
  Device ID: 0x1626
  Revision ID: 0x0009
  Metal: Supported, feature set macOS GPUFamily1 v3
  Displays:
    Color LCD:
      Display Type: LCD
      Resolution: 1440 x 900
      Framebuffer Depth: 24-Bit Color (ARGB8888)
      Main Display: Yes
      Mirror: Off
      Online: Yes
      Rotation: Supported
      Automatically Adjust Brightness: No
      Connection Type: DisplayPort

diego out

tvleavitt commented 6 years ago

OS X produces something more useful:

Process: Flare [9661] Path: /Users/USER/Library/Application Support/itch/*/Flare.app/Contents/MacOS/Flare Identifier: com.flarerpg.Flare Version: Flare version 1.0 (1.0) Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: Flare [9661] User ID: 503

Date/Time: 2018-03-19 13:09:22.211 -0700 OS Version: Mac OS X 10.13.3 (17D102) Report Version: 12 Anonymous UUID: F3B1D815-C1D4-913F-4DB4-40E7470FD004

Sleep/Wake UUID: 993B1500-A62C-4970-B71B-E0EF4AEB884E

Time Awake Since Boot: 13000 seconds Time Since Wake: 550 seconds

System Integrity Protection: enabled

Crashed Thread: 0

Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Exception Note: EXC_CORPSE_NOTIFY

Termination Reason: DYLD, [0x1] Library missing

Application Specific Information: dyld: launch, loading dependent libraries

Dyld Error Message: Library not loaded: /usr/local/opt/sdl2/lib/libSDL2-2.0.0.dylib Referenced from: /Users/USER/Library/Application Support/itch/*/Flare.app/Contents/MacOS/Flare Reason: image not found

Binary Images: 0x10ac59000 - 0x10b033ff7 +com.flarerpg.Flare (Flare version 1.0 - 1.0) /Users/USER/Library/Application Support/itch/*/Flare.app/Contents/MacOS/Flare 0x114bd8000 - 0x114c2298f dyld (519.2.2) <6695F30B-4E88-3C0B-9867-7D738C44A3E6> /usr/lib/dyld

Model: MacBookAir7,2, BootROM MBA71.0171.B00, 2 processors, Intel Core i7, 2.2 GHz, 8 GB, SMC 2.27f2 Graphics: Intel HD Graphics 6000, Intel HD Graphics 6000, Built-In Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1600 MHz, 0x02FE, - Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1600 MHz, 0x02FE, - AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0x117), Broadcom BCM43xx 1.0 (7.77.37.5.1a3) Bluetooth: Version 6.0.2f2, 3 services, 27 devices, 1 incoming serial ports Network Service: Wi-Fi, AirPort, en0 Serial ATA Device: APPLE SSD SM0512G, 500.28 GB USB Device: USB 3.0 Bus USB Device: BRCM20702 Hub USB Device: Bluetooth USB Host Controller Thunderbolt Bus: MacBook Air, Apple Inc., 27.2

Looks like I have to figure out how to tell it to link against the frameworks in the .app folder? Suggestions?

Note to self: don't "test" on dev machine. Doh.

tvleavitt commented 6 years ago

I think what we need to do is "embed" the frameworks (as they're packaged with the app)... I think this needs to be done in CMAKE? But, the cmake wiki has references that imply this was last looked at in 2006(!). Looking at this further, it looks like CMAKE needs to be told to use XCode, and then the project has to actually be built with XCode? Thoughts?

https://cmake.org/Wiki/CMake:Bundles_And_Frameworks

Chromium uses cmake and embeds frameworks, but it appears to be dependent on XCode to do so:

https://github.com/svn2github/chromium-embedded-framework/blob/master/cef3/CMakeLists.txt.in

OGRE3d also uses cmake, and also has an XCode dependency:

https://wiki.ogre3d.org/CMake+Quick+Start+Guide?tikiversion=Mac+OS+X

Trigger cmake, specify Xcode generation and pass path to Ogre source directory:

cmake -GXcode .. See the Extensive CMake page for a list of compilation options which can be passed to CMake at this stage, and Getting Started With CMake for even more background material. Build via Xcode

xcodebuild -configuration RelWithDebInfo (or open OGRE.xcodeproj and build within Xcode)

But, Apple says here:

Note: If you are not using Xcode to build your project, you must use the -framework option of GCC and ld to build and link against the specified framework. See the gcc and ld man pages for more information.

https://developer.apple.com/library/content/technotes/tn2435/_index.html#//apple_ref/doc/uid/DTS40017543-CH1-EMBED_IN_APP_SECTION

tvleavitt commented 6 years ago

Would this be useful to help alleviate the build issues with cmake (like the ones encountered here)?

This is what the freeablo guy says:

"Hunter is a cmake library that acts as a package manager for c/c++. This is amazing because the most awkward thing about working with these languages is the immense pain involved in getting your code to build and link (especially getting it to build and link on other people’s computers). Hunter solves this problem by downloading the source of the library, building it as a static library and linking it in, all from within a few lines of CMake."

https://github.com/ruslo/hunter

dorkster commented 6 years ago

Just a heads-up: We're planning on releasing 1.01 this weekend. I'll tag 1.01 Friday night, so will you be good to get the Mac version done by Sunday night? You can package it however you feel is appropriate (I'm assuming DMG again, as the work was already done for that).

Also, LICENSE.txt from the flare-game repo should be included now as well.

tvleavitt commented 6 years ago

@dorkster My apologies if it was not clear from my last sequence of postings, but the OS X build is broken at this point, because the cmake script compiles against the homebrew version of the binaries (unless you've installed them).

I'm not familiar enough with cmake to determine how to modify it appropriately to change what it builds against, and I'm not entirely clear that this doesn't need to be a source level modification (or a modification to both cmake and the source) to get the application binary itself to look for the framework files in the app package. I'm more than willing to try and work through this, but doing so is going to take substantial time if I have to do it entirely on my own. If someone more familiar with cmake could look through the comments I posted and provide feedback, that would be helpful. In particular the second to last comment, that begins with: I think what we need to do is "embed" the frameworks...

dorkster commented 6 years ago

Sorry, I hadn't been following this issue too closely.

Would it make sense to do something similar to the Linux binary release where we ship the libraries (like libSDL2-2.0.0.dylib) and use a wrapper script to set the library path and launch the executable? I think several Mac games were shipped with that script, so that seems like a way things could be done.

You could also try static-linking SDL, as that's allowed with SDL2.

dorkster commented 6 years ago

From the SDL wiki:

The SDL-devel package contains the SDL libraries in the form of a Framework. That is perfectly fine as long as you want to develop using Xcode. However, applications which use a configure script almost always require SDL to be installed Unix-style.

I suspect that we shouldn't be using the frameworks to begin with.

elosha commented 6 years ago

How did you package during the beta phase (release 0.18 for example)? Because that worked very well for users :)

dorkster commented 6 years ago

@elosha The pre-1.0 versions were built with Xcode. We're trying to get a non-Xcode solution working. This would be easier to put into a script for use by future Mac packagers.

apocarteres commented 6 years ago

btw why you want to build DMG? I created in the past for some guy tar.gz file with working flare for OSX with no issues.

apocarteres commented 6 years ago

fresh build in case someone interested in: http://files.ruads.org/flare-osx-09.05.2018.tar.gz

use run-osx.sh script to start

dorkster commented 6 years ago

Sorry for being late on the response. I would be fine at this point with shipping a tarball with libs like we do on Linux. @apocarteres, yours looks good. Would you be willing to make tarballs for Flare releases going forward? I've restored the Darwin branch to the *nix launcher script (which is symlinked in distribution/macos/), so you can copy that file instead of making run-osx.sh.

apocarteres commented 6 years ago

@dorkster is it still relevant? i can take look in a while

for now just please feel free to use fresh flare build: http://files.ruads.org/flare-osx-20.10.2018.tar.gz

dorkster commented 6 years ago

@apocarteres Yes, it's still relevant. We want to have two tarballs, one engine+game and one engine-only. Ideally, we'd have scripts to create these so that any Mac contributor can replicate them for us.

Your tarball looks good, but like the other platforms, it should contain:

(from flare-engine)
RELEASE_NOTES.txt
README.engine.md
CREDITS.engine.txt
COPYING

(from flare-game, not required for the engine-only tarball)
CREDITS.txt
LICENSE.txt
igorko commented 6 years ago

Hello. @dorkster when do you plan to release 1.09? I am currently working on translations update, it would be nice to include updated version into release.

dorkster commented 6 years ago

@igorko There's no set date for 1.09, so don't worry about having to rush.

elosha commented 6 years ago

@apocarteres Thanks again for the build!

I have an iprovement idea for your 'run_osx.sh' launcher script. If you change it like that, the script may be doubleclicked right from Finder (i.e. without firing up Terminal and cd-ing to FLARE's path):

#!/bin/sh
cd "$(dirname "${BASH_SOURCE[0]}")"
DYLD_LIBRARY_PATH=./lib ./flare
apocarteres commented 6 years ago

@elosha makes sense, i'm going to add that, thx.

@dorkster for now, let me just create a simple packaging script which uses pre-built dependencies for OSX (so i can publish tar bar with ones using my servers). I guess it simplest way for most the OSX users to build a delivery package.

apocarteres commented 6 years ago

please review https://github.com/flareteam/flare-engine/pull/1679/files

hexstr1p commented 5 years ago

With that latest merge, is there a stable macOS build above 1.0 now?

apocarteres commented 5 years ago

@panpanick i guess if nobody did that so far, then answer is no. I can build it for you in a while

apocarteres commented 5 years ago

@panpanick pls check it out here (latest master build): http://files.ruads.org/flare-osx-04.02.2019.tar.gz

apocarteres commented 5 years ago

hey folks. the latest build is here: http://files.ruads.org/flare-osx-26.05.2019.tar.gz

ludoza commented 5 years ago

Trying to package flare on my machine I get:

./package_osx.sh flare
...
http://files.ruads.org/flare_osx_dependencies.tar.gz
Resolving files.ruads.org (files.ruads.org)... failed: nodename nor servname provided, or not known.
wget: unable to resolve host address ‘files.ruads.org’

Anybody know what was the layout and content of flare_osx_dependencies.tar.gz?

edit: I'm having a look at Flare DMG Build Documentation.pdf now, but would still like to know the content of the tar.gz file.

apocarteres commented 5 years ago

@ludoza hi, yeah seems machine hosted that file was reconfigured recently, let me try to restore the access. I will put my update here

apocarteres commented 5 years ago

@ludoza i've fixed it. please try again

ludoza commented 5 years ago

@apocarteres thanks for your effort, it works.

I'm trying to copy the dependancies from homebrew as seen in pull/1732.

The files in the flare_osx_dependencies.tar.gz seem to be:

libSDL2-2.0.0.dylib
libSDL2.a
libSDL2.dylib -> libSDL2-2.0.0.dylib
libSDL2.la
libSDL2_image-2.0.0.dylib
libSDL2_image.a
libSDL2_image.dylib -> libSDL2_image-2.0.0.dylib
libSDL2_image.la
libSDL2_mixer-2.0.0.dylib
libSDL2_mixer.a
libSDL2_mixer.dylib -> libSDL2_mixer-2.0.0.dylib
libSDL2_mixer.la
libSDL2_test.a
libSDL2_ttf-2.0.0.dylib
libSDL2_ttf.a
libSDL2_ttf.dylib -> libSDL2_ttf-2.0.0.dylib
libSDL2_ttf.la
libSDL2main.a
libfreetype.6.dylib
libfreetype.a
libfreetype.dylib -> libfreetype.6.dylib
libfreetype.la
libogg.0.dylib
libogg.a
libogg.dylib -> libogg.0.dylib
libvorbis.0.dylib
libvorbis.a
libvorbis.dylib -> libvorbis.0.dylib
libvorbisenc.2.dylib
libvorbisenc.a
libvorbisenc.dylib -> libvorbisenc.2.dylib
libvorbisfile.3.dylib
libvorbisfile.a
libvorbisfile.dylib -> libvorbisfile.3.dylib

But if I copy it from homebrew I seem to only need:

OGG-COPYING
SDL2-COPYING.txt
SDL2-README.txt
VORBIS-COPYING
libSDL2-2.0.0.dylib
libSDL2_image-2.0.0.dylib
libSDL2_mixer-2.0.0.dylib
libSDL2_ttf-2.0.0.dylib
libogg.0.dylib
libvorbis.0.dylib
libvorbisenc.2.dylib
libvorbisfile.3.dylib

Why libfreetype the *.a files and symlinks?

I uploaded the packages here(sorry for using a free service, hope it works):

Finally a bit off-topic question were does save files get stored on macOS. I did rm -rf ~/.config/flare/ before testing the package but I see my two saves slot was still available?

ludoza commented 5 years ago

So after extending package_osx.sh I read the Flare DMG Build Documentation.pdf.

I downloaded the current flare.dmg from the website and removed the Content/Flare binary and replaced it with a simple shell script.

I then created a create-flare-dmg.sh script based on @tvleavitt efforts.

The difference is I dropped Frameworks/* and moved out English.lproj to be able to destroy Resources/ and recreate by unpacking flare_osx-engine.tar.gz and then moving English.lproj back before building flare.dmg.

My first proof of concept attempt can be downloaded here:

Everything I used to build the dmg can be found at https://github.com/ludoza/flare-dmg and might want to move it to flare-engine/distribution/macos/ if the poc is working for other people.

ps. To answer my own question the save files is found in ~/.local/share/flare/.

apocarteres commented 5 years ago

@apocarteres thanks for your effort, it works.

I'm trying to copy the dependancies from homebrew as seen in pull/1732.

The files in the flare_osx_dependencies.tar.gz seem to be:

libSDL2-2.0.0.dylib
libSDL2.a
libSDL2.dylib -> libSDL2-2.0.0.dylib
libSDL2.la
libSDL2_image-2.0.0.dylib
libSDL2_image.a
libSDL2_image.dylib -> libSDL2_image-2.0.0.dylib
libSDL2_image.la
libSDL2_mixer-2.0.0.dylib
libSDL2_mixer.a
libSDL2_mixer.dylib -> libSDL2_mixer-2.0.0.dylib
libSDL2_mixer.la
libSDL2_test.a
libSDL2_ttf-2.0.0.dylib
libSDL2_ttf.a
libSDL2_ttf.dylib -> libSDL2_ttf-2.0.0.dylib
libSDL2_ttf.la
libSDL2main.a
libfreetype.6.dylib
libfreetype.a
libfreetype.dylib -> libfreetype.6.dylib
libfreetype.la
libogg.0.dylib
libogg.a
libogg.dylib -> libogg.0.dylib
libvorbis.0.dylib
libvorbis.a
libvorbis.dylib -> libvorbis.0.dylib
libvorbisenc.2.dylib
libvorbisenc.a
libvorbisenc.dylib -> libvorbisenc.2.dylib
libvorbisfile.3.dylib
libvorbisfile.a
libvorbisfile.dylib -> libvorbisfile.3.dylib

But if I copy it from homebrew I seem to only need:

OGG-COPYING
SDL2-COPYING.txt
SDL2-README.txt
VORBIS-COPYING
libSDL2-2.0.0.dylib
libSDL2_image-2.0.0.dylib
libSDL2_mixer-2.0.0.dylib
libSDL2_ttf-2.0.0.dylib
libogg.0.dylib
libvorbis.0.dylib
libvorbisenc.2.dylib
libvorbisfile.3.dylib

Why libfreetype the *.a files and symlinks?

I uploaded the packages here(sorry for using a free service, hope it works):

Finally a bit off-topic question were does save files get stored on macOS. I did rm -rf ~/.config/flare/ before testing the package but I see my two saves slot was still available?

as far as i remember "freetype" ones and probably some other were required by OSX Sierra / High Sierra . It might be ok to run with out them on the latest OSX releases

elosha commented 5 years ago

@ludoza That doesn't work:

dyld: Library not loaded: /usr/local/opt/libpng/lib/libpng16.16.dylib
  Referenced from: /Applications/Spiele/Flare.app/Contents/Resources/lib/libSDL2_image-2.0.0.dylib
  Reason: image not found
../MacOS/Flare: line 4: 25859 Trace/BPT trap: 5       DYLD_LIBRARY_PATH=./lib ./flare

It excpects the libSDL2's dependencies to be there, too. I wonder if one could just link them against system libraries.

It at least used my /opt/local/lib (MacPorts libpath) but the libSDL2 you linked expects ./libpng/lib/libpng16.16.dylib as part of the relative path for libpng and doesn't find my /opt/local/lib/libpng16.16.dylib that MacPorts put there.

The same for your other image from the other thread.