diff --git a/.cirrus.yml b/.cirrus.yml index bb2f52ec..1a5fc413 100644 --- a/.cirrus.yml +++ b/.cirrus.yml @@ -6,7 +6,7 @@ linux-x86_64-binaries_task: - apt-get update && apt-get -y install build-essential libgtk2.0-dev libpulse-dev mesa-common-dev libgtksourceview2.0-dev libcairo2-dev libsdl2-dev libxv-dev libao-dev libopenal-dev libudev-dev zip compile_script: - - make -C bsnes + - make -C bsnes local=false package_script: - mkdir bsnes-nightly @@ -15,10 +15,11 @@ linux-x86_64-binaries_task: - cp -a bsnes/out/bsnes bsnes-nightly/bsnes - cp -a bsnes/Database/* bsnes-nightly/Database - cp -a icarus/Database/* bsnes-nightly/Database - - cp -a GPLv3.txt bsnes-nightly/ + - cp -a GPLv3.txt bsnes-nightly + - zip -r bsnes-nightly.zip bsnes-nightly bsnes-nightly_artifacts: - path: "bsnes-nightly/**" + path: "bsnes-nightly.zip" freebsd-x86_64-binaries_task: freebsd_instance: @@ -28,53 +29,56 @@ freebsd-x86_64-binaries_task: - pkg install --yes gmake gdb gcc8 pkgconf sdl2 openal-soft gtksourceview2 libXv zip compile_script: - - gmake -C bsnes + - gmake -C bsnes local=false package_script: - mkdir bsnes-nightly - mkdir bsnes-nightly/Database - mkdir bsnes-nightly/Firmware - cp -a bsnes/out/bsnes bsnes-nightly/bsnes - - cp -a bsnes/Database/* bsnes-nightly/Database/ - - cp -a icarus/Database/* bsnes-nightly/Database/ - - cp -a GPLv3.txt bsnes-nightly/ + - cp -a bsnes/Database/* bsnes-nightly/Database + - cp -a icarus/Database/* bsnes-nightly/Database + - cp -a GPLv3.txt bsnes-nightly + - zip -r bsnes-nightly.zip bsnes-nightly bsnes-nightly_artifacts: - path: "bsnes-nightly/**" + path: "bsnes-nightly.zip" windows-x86_64-binaries_task: container: image: ubuntu:latest setup_script: - - apt-get update && apt-get -y install build-essential mingw-w64 + - apt-get update && apt-get -y install build-essential mingw-w64 zip compile_script: - - make -C bsnes platform=windows compiler="x86_64-w64-mingw32-g++" windres="x86_64-w64-mingw32-windres" + - make -C bsnes local=false platform=windows compiler="x86_64-w64-mingw32-g++" windres="x86_64-w64-mingw32-windres" package_script: - mkdir bsnes-nightly - mkdir bsnes-nightly/Database - mkdir bsnes-nightly/Firmware - cp -a bsnes/out/bsnes bsnes-nightly/bsnes.exe - - cp -a bsnes/Database/* bsnes-nightly/Database/ - - cp -a icarus/Database/* bsnes-nightly/Database/ - - cp -a GPLv3.txt bsnes-nightly/ + - cp -a bsnes/Database/* bsnes-nightly/Database + - cp -a icarus/Database/* bsnes-nightly/Database + - cp -a GPLv3.txt bsnes-nightly + - zip -r bsnes-nightly.zip bsnes-nightly bsnes-nightly_artifacts: - path: "bsnes-nightly/**" + path: "bsnes-nightly.zip" macOS-x86_64-binaries_task: osx_instance: image: mojave-base compile_script: - - make -C bsnes + - make -C bsnes local=false package_script: - mkdir bsnes-nightly - - cp -a bsnes/out/bsnes.app bsnes-nightly/ - - cp -a GPLv3.txt bsnes-nightly/ + - cp -a bsnes/out/bsnes.app bsnes-nightly + - cp -a GPLv3.txt bsnes-nightly + - zip -r bsnes-nightly.zip bsnes-nightly bsnes-nightly_artifacts: - path: "bsnes-nightly/**" + path: "bsnes-nightly.zip" diff --git a/bsnes/GNUmakefile b/bsnes/GNUmakefile index 5b533cc0..f017341e 100644 --- a/bsnes/GNUmakefile +++ b/bsnes/GNUmakefile @@ -2,6 +2,7 @@ target := bsnes binary := application build := performance openmp := true +local := true flags += -I. -I.. # in order for this to work, obj/lzma.o must be omitted or bsnes will hang on startup. @@ -11,6 +12,11 @@ ifeq ($(profile),true) options += -pg endif +# binaries built with this flag are faster, but are not portable to multiple machines. +ifeq ($(local),true) + flags += -march=native +endif + nall.path := ../nall include $(nall.path)/GNUmakefile @@ -30,7 +36,6 @@ else ifeq ($(platform),macos) endif else ifneq ($(filter $(platform),linux bsd),) ifeq ($(binary),application) - flags += -march=native options += -Wl,-export-dynamic options += -lX11 -lXext else ifeq ($(binary),library) diff --git a/hiro/cocoa/widget/table-view.cpp b/hiro/cocoa/widget/table-view.cpp index 783a1184..ebaca26a 100755 --- a/hiro/cocoa/widget/table-view.cpp +++ b/hiro/cocoa/widget/table-view.cpp @@ -5,7 +5,7 @@ -(id) initWith:(hiro::mTableView&)tableViewReference { if(self = [super initWithFrame:NSMakeRect(0, 0, 0, 0)]) { tableView = &tableViewReference; - content = [[CocoaTableViewContent alloc] initWithFrame:NSMakeRect(0, 0, 0, 0)]; + content = [[CocoaTableViewContent alloc] initWith:tableViewReference]; [self setDocumentView:content]; [self setBorderType:NSBezelBorder]; @@ -126,6 +126,13 @@ @implementation CocoaTableViewContent : NSTableView +-(id) initWith:(hiro::mTableView&)tableViewReference { + if(self = [super initWithFrame:NSMakeRect(0, 0, 0, 0)]) { + tableView = &tableViewReference; + } + return self; +} + -(void) keyDown:(NSEvent*)event { auto character = [[event characters] characterAtIndex:0]; if(character == NSEnterCharacter || character == NSCarriageReturnCharacter) { diff --git a/hiro/cocoa/widget/table-view.hpp b/hiro/cocoa/widget/table-view.hpp index 6c53255b..1af5a913 100755 --- a/hiro/cocoa/widget/table-view.hpp +++ b/hiro/cocoa/widget/table-view.hpp @@ -8,7 +8,7 @@ CocoaTableViewContent* content; NSFont* font; } --(id) initWith:(hiro::mTableView&)tableView; +-(id) initWith:(hiro::mTableView&)tableViewReference; -(void) dealloc; -(CocoaTableViewContent*) content; -(NSFont*) font; @@ -24,7 +24,9 @@ @end @interface CocoaTableViewContent : NSTableView { + hiro::mTableView* tableView; } +-(id) initWith:(hiro::mTableView&)tableViewReference; -(void) keyDown:(NSEvent*)event; @end