mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Developing Cocoa
git-svn-id: svn://ultimatepp.org/upp/trunk@12591 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
3608334fbb
commit
60244e3729
3 changed files with 22 additions and 16 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -562,24 +562,28 @@ bool GccBuilder::Link(const Vector<String>& 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
|
||||
<< "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||
<< "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
|
||||
<< "<plist version=\"1.0\">\n"
|
||||
<< "<dict>\n"
|
||||
<< " <key>CFBundleExecutable</key>\n"
|
||||
<< " <string>" << GetFileName(target) << "</string>\n"
|
||||
<< " <key>NSHighResolutionCapable</key>\n"
|
||||
<< " <string>True</string>\n"
|
||||
<< "</dict>\n"
|
||||
<< "</plist>\n"
|
||||
<< "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
|
||||
<< "<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/PropertyList-1.0.dtd\">\n"
|
||||
<< "<plist version=\"1.0\">\n"
|
||||
<< "<dict>\n"
|
||||
<< " <key>CFBundleExecutable</key>\n"
|
||||
<< " <string>Test" << GetFileName(target) << "</string>\n"
|
||||
<< " <key>NSHighResolutionCapable</key>\n"
|
||||
<< " <string>True</string>\n"
|
||||
<< " <key>LSMinimumSystemVersion</key>\n"
|
||||
<< " <string>10.13</string>\n"
|
||||
<< "</dict>\n"
|
||||
<< "</plist>\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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue