diff --git a/external/remdebug-1.0/src/controller.lua b/external/remdebug-1.0/src/controller.lua
index f25991749..0e13d5f84 100644
--- a/external/remdebug-1.0/src/controller.lua
+++ b/external/remdebug-1.0/src/controller.lua
@@ -482,7 +482,7 @@ while true do
print("")
print("Corona Debugger")
print("version 1.1")
- print("Copyright © 2008-2021 Solar2D. All rights reserved.")
+ print("Copyright © 2008-2023 Solar2D. All rights reserved.")
print("")
print("Portions contain:")
print(" Lua, Copyright © 1994-2008 Lua.org, PUC-Rio.")
diff --git a/platform/apple/CoronaResources-Info.plist b/platform/apple/CoronaResources-Info.plist
index c6d17d4cf..f45f8e20c 100644
--- a/platform/apple/CoronaResources-Info.plist
+++ b/platform/apple/CoronaResources-Info.plist
@@ -39,6 +39,6 @@
CFPlugInUnloadFunction
NSHumanReadableCopyright
- Copyright © 2020-2021 Solar2D. All rights reserved.
+ Copyright © 2020-2023 Solar2D. All rights reserved.
diff --git a/platform/mac/AppDelegate.mm b/platform/mac/AppDelegate.mm
index 4a124ff09..bf40010ba 100755
--- a/platform/mac/AppDelegate.mm
+++ b/platform/mac/AppDelegate.mm
@@ -138,6 +138,7 @@ @interface ExtensionParams : NSObject
@property (nonatomic, readonly) bool showWindowTitle;
@property (nonatomic, readwrite, retain) CoronaWindowController *view;
+
- (id) initParams:(NSString *)title path:(NSString *)path width:(int)w height:(int)h resizable:(bool) resizable showWindowTitle:(bool) showWindowTitle;
@end
@@ -1073,6 +1074,7 @@ -(void)applicationDidFinishLaunching:(NSNotification*)aNotification
}
}
+
// Calling this makes the Welcome window fail to appear (the subsequent call seems to work without it)
//[[NSProcessInfo processInfo] setAutomaticTerminationSupportEnabled:YES];
[[NSProcessInfo processInfo] disableSuddenTermination];
@@ -1277,6 +1279,10 @@ - (void) loadExtension:(ExtensionParams *) extParams
if ([extParams.path hasSuffix:[builtinExtDirectory stringByAppendingPathComponent:@"welcome"]])
{
fHomeScreen = extView;
+ //Allow for Dragging Main.lua file on Sim
+ if (@available(macOS 10.13, *)) {
+ [[fHomeScreen window] registerForDraggedTypes:@[NSPasteboardTypeFileURL]];
+ }
}
// Save the fact that this extension is running in the user's defaults
@@ -1322,7 +1328,6 @@ - (void) runExtension:(NSString *) extName
NSMenuItem *windowMenuItem = [appMenu itemWithTitle:kWindowMenuItemName];
NSMenu *windowMenu = [windowMenuItem submenu];
long welcomeItemIdx = [windowMenu indexOfItemWithTitle:@"Welcome to Solar2D"];
-
if (welcomeItemIdx == -1)
{
// for some reason we can't find the Welcome menuitem, bail
@@ -1393,6 +1398,8 @@ -(void)applicationWillFinishLaunching:(NSNotification*)aNotification
#endif
}
+
+
- (void) startDebugAndOpenPanel
{
using namespace Rtt;
@@ -1646,7 +1653,6 @@ -(BOOL)isRelaunchable
-(BOOL) isRunning
{
NSWindow *mainWindow = [NSApp mainWindow];
-
if (nil != mainWindow)
{
if (mainWindow == [fHomeScreen window])
@@ -3879,10 +3885,15 @@ - (void)applicationWillBecomeActive:(NSNotification *)aNotification
[self consoleMenuitem:nil];
}
+
// -----------------------------------------------------------------------------
// END: Simulator UI
// -----------------------------------------------------------------------------
+
+
+
+
@end
//
diff --git a/platform/mac/CoronaConsole/CoronaConsole/Info.plist b/platform/mac/CoronaConsole/CoronaConsole/Info.plist
index 3bd194b7f..3f167acbf 100644
--- a/platform/mac/CoronaConsole/CoronaConsole/Info.plist
+++ b/platform/mac/CoronaConsole/CoronaConsole/Info.plist
@@ -27,7 +27,7 @@
LSUIElement
NSHumanReadableCopyright
- Copyright © 2020-2021 Solar2D. All rights reserved.
+ Copyright © 2020-2023 Solar2D. All rights reserved.
NSMainNibFile
MainMenu
NSPrincipalClass
diff --git a/platform/mac/CoronaWindowController.h b/platform/mac/CoronaWindowController.h
index 4bd448cd1..ac4c74d66 100644
--- a/platform/mac/CoronaWindowController.h
+++ b/platform/mac/CoronaWindowController.h
@@ -28,7 +28,7 @@ namespace Rtt
//typedef void (^windowCloseCompletionBlock)(void);
-@interface CoronaWindowController : NSWindowController< CoronaViewControllerDelegate
+@interface CoronaWindowController : NSWindowController< NSDraggingDestination,CoronaViewControllerDelegate
#if __MAC_OS_X_VERSION_MAX_ALLOWED >= 101200
, CAAnimationDelegate
#endif
diff --git a/platform/mac/CoronaWindowController.mm b/platform/mac/CoronaWindowController.mm
index 5012f8b71..f0c78c8b7 100644
--- a/platform/mac/CoronaWindowController.mm
+++ b/platform/mac/CoronaWindowController.mm
@@ -26,8 +26,10 @@
#include "Rtt_LuaContext.h"
#include "Rtt_Runtime.h"
#include "Rtt_RuntimeDelegate.h"
+#include "Rtt_MacSimulatorServices.h"
#include "HomeScreenRuntimeDelegate.h"
+
// ----------------------------------------------------------------------------
#define ENABLE_WINDOW_FADE_ANIMATIONS 1
@@ -780,6 +782,43 @@ - (void)windowDidChangeOcclusionState:(NSNotification *)notification
}
}
+
+//Support Dragging main.lua for Sim Only projects only at the moment
+#if Rtt_AUTHORING_SIMULATOR
+- (NSDragOperation)draggingEntered:(id )sender {
+ NSPasteboard *pboard;
+ pboard = [sender draggingPasteboard];
+ if (@available(macOS 10.13, *)) {
+ if ( [[pboard types] containsObject:NSPasteboardTypeFileURL] ) {
+ NSString *fileURL = [[NSURL URLFromPasteboard:pboard] path];
+ NSArray *splitPath = [fileURL componentsSeparatedByString:@"/"];
+ if([splitPath.lastObject isEqualToString:@"main.lua"] ){
+ return NSDragOperationLink;
+ }
+
+ }
+ }
+ return NSDragOperationNone;
+}
+//Support for Drag a main.lua on to Welcome Screen
+- (BOOL)performDragOperation:(id )sender {
+ NSPasteboard *pboard;
+ pboard = [sender draggingPasteboard];
+ if (@available(macOS 10.13, *)) {
+ if ( [[pboard types] containsObject:NSPasteboardTypeFileURL] ) {
+ NSString *fileURL = [[NSURL URLFromPasteboard:pboard] path];
+ NSArray *splitPath = [fileURL componentsSeparatedByString:@"/"];
+
+ if([splitPath.lastObject isEqualToString:@"main.lua"] ){
+ AppDelegate * appDelegate = (AppDelegate*)[NSApp delegate];
+ Rtt::MacSimulatorServices * simulatorServices = new Rtt::MacSimulatorServices(appDelegate, (CoronaWindowController *)self, nil);
+ simulatorServices->OpenProject( [[fileURL stringByReplacingOccurrencesOfString:@"main.lua" withString:@""] UTF8String] );
+ }
+ }
+ }
+ return YES;
+}
+#endif
@end
// ----------------------------------------------------------------------------
diff --git a/platform/mac/Credits.rtfd/TXT.rtf b/platform/mac/Credits.rtfd/TXT.rtf
index c61f4e999..748dfeab7 100644
--- a/platform/mac/Credits.rtfd/TXT.rtf
+++ b/platform/mac/Credits.rtfd/TXT.rtf
@@ -1,8 +1,9 @@
-{\rtf1\ansi\ansicpg1252\cocoartf1404\cocoasubrtf470
-{\fonttbl\f0\fnil\fcharset0 HelveticaNeue;}
+{\rtf1\ansi\ansicpg1252\cocoartf2708
+\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fnil\fcharset0 HelveticaNeue-Bold;}
{\colortbl;\red255\green255\blue255;}
+{\*\expandedcolortbl;;}
\margl1440\margr1440\vieww12600\viewh10200\viewkind0
\pard\tx720\tx1440\tx2160\tx2880\tx3600\tx4320\tx5040\tx5760\tx6480\tx7200\tx7920\tx8640\pardirnatural\qc\partightenfactor0
-\f0\b\fs24 \cf0 Copyright \'a9 2020-2021 Solar2D.\
-All rights reserved.}
+\f0\b\fs24 \cf0 Copyright \'a9 2020-2023 Solar2D.\
+All rights reserved.}
\ No newline at end of file
diff --git a/platform/mac/Info.plist b/platform/mac/Info.plist
index 1d768859b..ae63d2d58 100644
--- a/platform/mac/Info.plist
+++ b/platform/mac/Info.plist
@@ -76,7 +76,7 @@
NSHighResolutionCapable
NSHumanReadableCopyright
- Copyright © 2020-2021 Solar2D. All rights reserved.
+ Copyright © 2020-2023 Solar2D. All rights reserved.
NSMainNibFile
MainMenu
NSPrincipalClass
diff --git a/platform/mac/Rtt_MacSimulator.mm b/platform/mac/Rtt_MacSimulator.mm
index 102be7f8c..15299e453 100644
--- a/platform/mac/Rtt_MacSimulator.mm
+++ b/platform/mac/Rtt_MacSimulator.mm
@@ -345,6 +345,7 @@
NSWindowController *windowController = [[NSWindowController alloc] initWithWindow:instanceWindow];
[instanceWindow setDelegate:(id )windowController];
+
fWindow = instanceWindow;
fWindowController = windowController;