Permalink
Browse files

MACOSX: Give every license file a menu item

We make a renamed copy of the three license files with non-standard
suffixes, to make them open in TextEdit by default.
  • Loading branch information...
angstsmurf authored and sev- committed Aug 21, 2018
1 parent d4eca67 commit ebedc154377b9229a8cb0389483db19afbb52891
Showing with 26 additions and 8 deletions.
  1. +23 −4 backends/platform/sdl/macosx/appmenu_osx.mm
  2. +3 −4 ports.mk
@@ -69,7 +69,10 @@ static void openFromBundle(NSString *file) {
@interface ScummVMMenuHandler : NSObject {
}
- (void) openReadme;
- (void) openLicense;
- (void) openLicenseGPL;
- (void) openLicenseLGPL;
- (void) openLicenseFreefont;
- (void) openLicenseBSD;
- (void) openNews;
- (void) openUserManual;
- (void) openCredits;
@@ -80,8 +83,20 @@ - (void)openReadme {
openFromBundle(@"README");
}

- (void)openLicense {
openFromBundle(@"COPYING-COMBINED");
- (void)openLicenseGPL {
openFromBundle(@"COPYING");
}

- (void)openLicenseLGPL {
openFromBundle(@"COPYING-LGPL");
}

- (void)openLicenseFreefont {
openFromBundle(@"COPYING-FREEFONT");
}

- (void)openLicenseBSD {
openFromBundle(@"COPYING-BSD");
}

- (void)openNews {
@@ -183,7 +198,11 @@ void replaceApplicationMenuItems() {
addMenuItem(_("What's New in ScummVM"), stringEncoding, delegate, @selector(openNews), @"", helpMenu);
[helpMenu addItem:[NSMenuItem separatorItem]];
addMenuItem(_("Credits"), stringEncoding, delegate, @selector(openCredits), @"", helpMenu);
addMenuItem(_("Licensing Information"), stringEncoding, delegate, @selector(openLicense), @"", helpMenu);
addMenuItem(_("GPL License"), stringEncoding, delegate, @selector(openLicenseGPL), @"", helpMenu);
addMenuItem(_("LGPL License"), stringEncoding, delegate, @selector(openLicenseLGPL), @"", helpMenu);
addMenuItem(_("Freefont License"), stringEncoding, delegate, @selector(openLicenseFreefont), @"", helpMenu);
addMenuItem(_("BSD License"), stringEncoding, delegate, @selector(openLicenseBSD), @"", helpMenu);


[appleMenu release];
[windowMenu release];
@@ -121,10 +121,9 @@ ifdef DIST_FILES_ENGINEDATA
endif
$(srcdir)/devtools/credits.pl --rtf > $(bundle_name)/Contents/Resources/AUTHORS.rtf
rm $(bundle_name)/Contents/Resources/AUTHORS
cp $(bundle_name)/Contents/Resources/COPYING $(bundle_name)/Contents/Resources/COPYING-COMBINED
echo "\n---\n" | cat - $(bundle_name)/Contents/Resources/COPYING.LGPL >> $(bundle_name)/Contents/Resources/COPYING-COMBINED
echo "\n---\n" | cat - $(bundle_name)/Contents/Resources/COPYING.FREEFONT >> $(bundle_name)/Contents/Resources/COPYING-COMBINED
echo "\n---\n" | cat - $(bundle_name)/Contents/Resources/COPYING.BSD >> $(bundle_name)/Contents/Resources/COPYING-COMBINED
cp $(bundle_name)/Contents/Resources/COPYING.LGPL $(bundle_name)/Contents/Resources/COPYING-LGPL
cp $(bundle_name)/Contents/Resources/COPYING.FREEFONT $(bundle_name)/Contents/Resources/COPYING-FREEFONT
cp $(bundle_name)/Contents/Resources/COPYING.BSD $(bundle_name)/Contents/Resources/COPYING-BSD
chmod 644 $(bundle_name)/Contents/Resources/*
cp scummvm-static $(bundle_name)/Contents/MacOS/scummvm
chmod 755 $(bundle_name)/Contents/MacOS/scummvm

0 comments on commit ebedc15

Please sign in to comment.