Skip to content

Instantly share code, notes, and snippets.

@Wingysam
Last active March 5, 2021 15:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Wingysam/d7f74813a272ea622bdc048b9ff2dc17 to your computer and use it in GitHub Desktop.
Save Wingysam/d7f74813a272ea622bdc048b9ff2dc17 to your computer and use it in GitHub Desktop.
Build GTKAtlantic on macOS

Build GTKAtlantic on macOS

This assumes that you have brew and git already.

# If you want all as one command:
brew install pkg-config gtk+3 libxml2 autoconf libtool automake && git clone git://git.tuxfamily.org/gitroot/gtkatlantic/gtkatlantic.git/ gtkatlantic && cd gtkatlantic && sed -i '' 's/libtool/glibtool/g' autogen.sh && ./autogen.sh && make && make install

First, install all of the things that we need to build it:

brew install pkg-config gtk+3 libxml2 autoconf libtool automake

Then we clone the repository and cd into the directory

git clone git://git.tuxfamily.org/gitroot/gtkatlantic/gtkatlantic.git/ gtkatlantic && cd gtkatlantic

Now we edit the autogen.sh file. Replace all instances of libtool with glibtool.

sed -i '' 's/libtool/glibtool/g' autogen.sh

Then we build and install GTKAtlantic:

./autogen.sh && make && make install

Now you can run gtkatlantic in a terminal and it will open :D

@iandees
Copy link

iandees commented Mar 4, 2021

Thanks for sharing this. I was able to compile successfully, but when I try to run it the game crashes any time it tries to load image assets.

@Wingysam
Copy link
Author

Wingysam commented Mar 5, 2021 via email

@iandees
Copy link

iandees commented Mar 5, 2021

It's core-dumping. It looks like the main thread is crashing while trying to display an image. I imagine this is a GTK bug and likely not related to gtkatlantic, but here's what the Crash Report says:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   libcairo.2.dylib              	0x000000010cac3290 _cairo_surface_release_source_image + 23
1   com.apple.CoreGraphics        	0x00007fff250567cd data_release_info + 31
2   com.apple.CoreGraphics        	0x00007fff25007ca1 data_provider_finalize + 64
3   com.apple.CoreGraphics        	0x00007fff24fcdcad data_provider_retain_count + 74
4   com.apple.CoreFoundation      	0x00007fff205a6dd8 _CFRelease + 474
5   com.apple.CoreGraphics        	0x00007fff25033a3f image_finalize + 103
6   com.apple.CoreFoundation      	0x00007fff205a6cf2 _CFRelease + 244
7   com.apple.CoreGraphics        	0x00007fff2507f92f CG::DisplayListResourceImage::~DisplayListResourceImage() + 23
8   com.apple.CoreGraphics        	0x00007fff2507f902 CG::DisplayListResourceImage::~DisplayListResourceImage() + 14
9   com.apple.CoreGraphics        	0x00007fff2507f8cf std::__1::shared_ptr<CG::DisplayListResourceImage>::~shared_ptr() + 49
10  com.apple.CoreGraphics        	0x00007fff25405547 std::__1::__tree<std::__1::shared_ptr<CG::DisplayListResourceImage>, CG::CompareResourceImage, std::__1::allocator<std::__1::shared_ptr<CG::DisplayListResourceImage> > >::destroy(std::__1::__tree_node<std::__1::shared_ptr<CG::DisplayListResourceImage>, void*>*) + 47
11  com.apple.CoreGraphics        	0x00007fff2540553e std::__1::__tree<std::__1::shared_ptr<CG::DisplayListResourceImage>, CG::CompareResourceImage, std::__1::allocator<std::__1::shared_ptr<CG::DisplayListResourceImage> > >::destroy(std::__1::__tree_node<std::__1::shared_ptr<CG::DisplayListResourceImage>, void*>*) + 38
12  com.apple.CoreGraphics        	0x00007fff25405532 std::__1::__tree<std::__1::shared_ptr<CG::DisplayListResourceImage>, CG::CompareResourceImage, std::__1::allocator<std::__1::shared_ptr<CG::DisplayListResourceImage> > >::destroy(std::__1::__tree_node<std::__1::shared_ptr<CG::DisplayListResourceImage>, void*>*) + 26
13  com.apple.CoreGraphics        	0x00007fff25405532 std::__1::__tree<std::__1::shared_ptr<CG::DisplayListResourceImage>, CG::CompareResourceImage, std::__1::allocator<std::__1::shared_ptr<CG::DisplayListResourceImage> > >::destroy(std::__1::__tree_node<std::__1::shared_ptr<CG::DisplayListResourceImage>, void*>*) + 26
14  com.apple.CoreGraphics        	0x00007fff25405532 std::__1::__tree<std::__1::shared_ptr<CG::DisplayListResourceImage>, CG::CompareResourceImage, std::__1::allocator<std::__1::shared_ptr<CG::DisplayListResourceImage> > >::destroy(std::__1::__tree_node<std::__1::shared_ptr<CG::DisplayListResourceImage>, void*>*) + 26
15  com.apple.CoreGraphics        	0x00007fff2507f4c4 CG::DisplayList::~DisplayList() + 316
16  com.apple.CoreGraphics        	0x00007fff2507f36d destroyDisplayList2Impl + 26
17  com.apple.CoreGraphics        	0x00007fff2507f33f dl2_Finalize + 23
18  com.apple.CoreFoundation      	0x00007fff205a6cf2 _CFRelease + 244
19  com.apple.QuartzCore          	0x00007fff26c99260 CABackingStoreUpdate_ + 925
20  com.apple.QuartzCore          	0x00007fff26cfe141 invocation function for block in CA::Layer::display_() + 53
21  com.apple.QuartzCore          	0x00007fff26c984c4 -[CALayer _display] + 2183
22  com.apple.AppKit              	0x00007fff22e69bb1 -[_NSBackingLayer display] + 475
23  com.apple.AppKit              	0x00007fff22dd50f5 -[_NSViewBackingLayer display] + 555
24  com.apple.QuartzCore          	0x00007fff26c974c8 CA::Layer::display_if_needed(CA::Transaction*) + 874
25  com.apple.QuartzCore          	0x00007fff26dd75fb CA::Context::commit_transaction(CA::Transaction*, double, double*) + 517
26  com.apple.QuartzCore          	0x00007fff26c78e95 CA::Transaction::commit() + 783
27  com.apple.AppKit              	0x00007fff22e7ee22 __62+[CATransaction(NSCATransaction) NS_setFlushesWithDisplayLink]_block_invoke + 285
28  com.apple.AppKit              	0x00007fff235cdec2 ___NSRunLoopObserverCreateWithHandler_block_invoke + 41
29  com.apple.CoreFoundation      	0x00007fff204dbdad __CFRUNLOOP_IS_CALLING_OUT_TO_AN_OBSERVER_CALLBACK_FUNCTION__ + 23
30  com.apple.CoreFoundation      	0x00007fff204dbc3d __CFRunLoopDoObservers + 549
31  com.apple.CoreFoundation      	0x00007fff204db0ed __CFRunLoopRun + 838
32  com.apple.CoreFoundation      	0x00007fff204da6ce CFRunLoopRunSpecific + 563
33  com.apple.HIToolbox           	0x00007fff28762630 RunCurrentEventLoopInMode + 292
34  com.apple.HIToolbox           	0x00007fff28762282 ReceiveNextEventCommon + 283
35  com.apple.HIToolbox           	0x00007fff2876214f _BlockUntilNextEventMatchingListInModeWithFilter + 64
36  com.apple.AppKit              	0x00007fff22cfa9b1 _DPSNextEvent + 883
37  com.apple.AppKit              	0x00007fff22cf9177 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1366
38  libgdk-3.0.dylib              	0x000000010c8328fc poll_func + 172
39  libglib-2.0.0.dylib           	0x000000010cbecff1 g_main_context_iterate + 433
40  libglib-2.0.0.dylib           	0x000000010cbed37f g_main_loop_run + 239
41  libgtk-3.0.dylib              	0x000000010bfee14a gtk_main + 74
42  gtkatlantic                   	0x000000010be4fffc main + 140 (main.c:77)
43  libdyld.dylib                 	0x00007fff203ff621 start + 1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment