diff --git a/uppsrc/Core/Value.cpp b/uppsrc/Core/Value.cpp index ce7de47bf..efa156849 100644 --- a/uppsrc/Core/Value.cpp +++ b/uppsrc/Core/Value.cpp @@ -343,7 +343,7 @@ void Value::Serialize(Stream& s) { if(st == STRING) s % data; else - if(st < 255 && svo[st]) { + if(st >= 0 && st < 255 && svo[st]) { data.SetSpecial((byte)type); svo[st]->Serialize(&data, s); } diff --git a/uppsrc/CtrlCore/CocoProc.mm b/uppsrc/CtrlCore/CocoProc.mm index 67a6fb409..6296217d0 100644 --- a/uppsrc/CtrlCore/CocoProc.mm +++ b/uppsrc/CtrlCore/CocoProc.mm @@ -180,12 +180,14 @@ struct MMImp { } Upp::Ctrl::SyncAppIcon(); Upp::TopWindow::SyncMainMenu(false); + Upp::Ctrl::ReleaseCtrlCapture(); } static void ResignKey(Upp::Ctrl *ctrl) { LLOG("Resign key " << Upp::Name(ctrl)); ctrl->KillFocusWnd(); + Upp::Ctrl::ReleaseCtrlCapture(); } static void DoClose(Upp::Ctrl *ctrl) diff --git a/uppsrc/ide/Builders/GccBuilder.cpp b/uppsrc/ide/Builders/GccBuilder.cpp index 101205ca6..d60a52853 100644 --- a/uppsrc/ide/Builders/GccBuilder.cpp +++ b/uppsrc/ide/Builders/GccBuilder.cpp @@ -562,24 +562,28 @@ bool GccBuilder::Link(const Vector& linkfile, const String& linkoptions, CustomStep(".pre-link", Null, error); if(!error && Execute(lnk) == 0) { if(HasFlag("OSX") && HasFlag("GUI")) { - if(IsNull(Info_plist)) { + if(IsNull(Info_plist)) Info_plist - << "\n" - << "\n" - << "\n" - << "\n" - << " CFBundleExecutable\n" - << " " << GetFileName(target) << "\n" - << " NSHighResolutionCapable\n" - << " True\n" - << "\n" - << "\n" + << "\n" + << "\n" + << "\n" + << "\n" + << " CFBundleExecutable\n" + << " Test" << GetFileName(target) << "\n" + << " NSHighResolutionCapable\n" + << " True\n" + << " LSMinimumSystemVersion\n" + << " 10.13\n" + << "\n" + << "\n" ; - } String Info_plist_path = GetFileFolder(GetFileFolder(target)) + "/Info.plist"; - PutConsole("Saving " << Info_plist_path); - if(SaveChangedFile(Info_plist_path, Info_plist)) - Execute("defaults read " + Info_plist_path); // Force MacOS to reload plist + if(LoadFile(Info_plist_path) != Info_plist) { + if(FileExists(Info_plist_path)) + Execute("defaults delete " + Info_plist_path); // Force MacOS to reload plist + SaveFile(Info_plist_path, Info_plist); + PutConsole("Saving " << Info_plist_path); + } } CustomStep(".post-link", Null, error); PutConsole(String().Cat() << GetHostPath(target) << " (" << GetFileInfo(target).length