diff --git a/extras/APPLE/pyuvplayer.sh b/extras/APPLE/pyuvplayer.sh index 4386f7c..422a4bc 100755 --- a/extras/APPLE/pyuvplayer.sh +++ b/extras/APPLE/pyuvplayer.sh @@ -6,13 +6,24 @@ rm -R pyuv.app dmg_tmp pyuv_install.dmg mkdir -p pyuv.app/Contents mkdir -p pyuv.app/Contents/MacOS mkdir -p pyuv.app/Contents/Resources +mkdir -p pyuv.app/Contents/Frameworks cp Info.plist pyuv.app/Contents/Info.plist echo -n "APPL????" >pyuv.app/Contents/PkgInfo -ln -f ../../src/pyuv pyuv.app/Contents/MacOS/pyuv +cp -f ../../src/pyuv pyuv.app/Contents/MacOS/pyuv cp -f playuv.icns pyuv.app/Contents/Resources/playuv.icns -cp -f ../../doc/doc.htb pyuv.app/Contents/Resources/doc.htb +cp -f ../../doc/doc.htb pyuv.app/Contents/MacOS/doc.htb +./dylibbundler -od -b -x ./pyuv.app/Contents/MacOS/pyuv -d ./pyuv.app/Contents/Frameworks + +#cp /usr/local/lib/libwx_osx_cocoau_xrc-3.0.dylib pyuv.app/Contents/Frameworks +#install_name_tool -id @executable_path/../Frameworks/libwx_osx_cocoau_xrc-3.0.dylib pyuv.app/Contents/Frameworks/libwx_osx_cocoau_xrc-3.0.dylib +#install_name_tool -change /usr/local/lib/libwx_osx_cocoau_xrc-3.0.dylib @executable_path/../Frameworks/libwx_osx_cocoau_xrc-3.0.dylib pyuv.app/Contents/MacOS/pyuv + +otool -L ./pyuv.app/Contents/MacOS/pyuv + rm -rf dmg_tmp mkdir dmg_tmp cp -R pyuv.app dmg_tmp +ln -s /Applications dmg_tmp +touch dmg_tmp/"Drag and drop pyuv over the Applications folder" hdiutil create -srcfolder dmg_tmp -volname "Pyuv for Mac" -format UDZO -ov pyuv_062_install.dmg rm -R dmg_tmp \ No newline at end of file diff --git a/src/playuvFrame.cpp b/src/playuvFrame.cpp index 2e03742..1ab7ebc 100644 --- a/src/playuvFrame.cpp +++ b/src/playuvFrame.cpp @@ -64,6 +64,7 @@ along with PYUV. If not, see . #include #include #include +#include #include @@ -389,7 +390,9 @@ pyuvFrame::pyuvFrame(const wxString& title) : wxFrame(NULL, wxID_ANY, title, wxP wxFileSystem::AddHandler(new wxZipFSHandler); wxImage::AddHandler(new wxJPEGHandler); wxImage::AddHandler(new wxPNGHandler); - if (help.AddBook(wxFileName(wxT(HELP_FILENAME), wxPATH_UNIX)) || help.AddBook(wxFileName(wxT("/usr/share/doc/pyuv/doc.htb"), wxPATH_UNIX))) { + if (help.AddBook(wxFileName(wxT(HELP_FILENAME), wxPATH_UNIX)) + || help.AddBook(wxFileName(wxT("/Applications/pyuv.app/Contents/MacOS/doc.htb"), wxPATH_UNIX)) + || help.AddBook(wxFileName(wxT("/usr/share/doc/pyuv/doc.htb"), wxPATH_UNIX))) { helpMenu->Append(Menu_Help_Contents, wxT("&Contents\tCtrl+H"), wxT("Show program help")); pyuvHelpsystem = true; } else { @@ -397,6 +400,9 @@ pyuvFrame::pyuvFrame(const wxString& title) : wxFrame(NULL, wxID_ANY, title, wxP helpMenu->Enable(Menu_Help_Contents, false); pyuvHelpsystem = false; } + /*wxStandardPaths sp = wxStandardPaths::Get(); + wxString cwd = wxFileName(sp.GetExecutablePath(), wxPATH_UNIX); + printf("%s\n", (const char*)cwd.mb_str());*/ // The "About" item should be in the help menu helpMenu->Append(wxID_ABOUT, wxT("&About...\tF1"), wxT("Show about dialog")); @@ -1588,7 +1594,7 @@ void pyuvFrame::OnAbout(wxCommandEvent& event) wxT(PYUV_WEBSITE), wxT(PYUV_GITHUB), wxVERSION_STRING); - + // Display a message box with the info wxMessageBox(msg, wxT("About PYUV"), wxOK | wxICON_INFORMATION, this); }