Skip to content

Commit

Permalink
dmg ok under mac
Browse files Browse the repository at this point in the history
  • Loading branch information
gbaruffa committed Jan 17, 2016
1 parent 5eda41c commit 90c9296
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
15 changes: 13 additions & 2 deletions extras/APPLE/pyuvplayer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
10 changes: 8 additions & 2 deletions src/playuvFrame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ along with PYUV. If not, see <http://www.gnu.org/licenses/>.
#include <wx/spinbutt.h>
#include <wx/spinctrl.h>
#include <wx/textfile.h>
#include <wx/stdpaths.h>

#include <stdint.h>

Expand Down Expand Up @@ -389,14 +390,19 @@ 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 {
helpMenu->Append(Menu_Help_Contents, wxT("&Contents\tCtrl+H"), wxT(HELP_FILENAME) wxT(" not found!!!"));
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"));
Expand Down Expand Up @@ -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);
}
Expand Down

0 comments on commit 90c9296

Please sign in to comment.