Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fdc8d75

Browse files
committed
Include errors.rsrc in the Python.app resource file, so the error strings
are available in MacOS API exceptions.
1 parent ad134f0 commit fdc8d75

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

Mac/OSX/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pythonforbundle: $(OBJECTS)
2828
PYTHON=$(PYTHONBUILDDIR)/python.exe
2929
APPTEMPLATE=$(PYTHONBUILDDIR)/Mac/OSXResources/app
3030
APPSUBDIRS=MacOS Resources Resources/English.lproj
31-
RESOURCEFILE_ASINGLE=$(PYTHONBUILDDIR)/Mac/Resources/dialogs.rsrc
31+
RESOURCEDIR=$(PYTHONBUILDDIR)/Mac/Resources
3232
RESOURCEFILE=python.rsrc
3333
RFCONVERTER=$(PYTHONBUILDDIR)/Mac/Lib/applesingle.py
3434
install: pythonforbundle
@@ -71,7 +71,11 @@ install: pythonforbundle
7171
done
7272
$(INSTALL_PROGRAM) pythonforbundle $(APPINSTALLDIR)/Contents/MacOS/python
7373
# Create a temporary version of the resources here
74-
$(PYTHON) $(RFCONVERTER) -r $(RESOURCEFILE_ASINGLE) $(RESOURCEFILE)
74+
$(PYTHON) $(RFCONVERTER) -r $(RESOURCEDIR)/dialogs.rsrc dialogs.rsrc
75+
$(PYTHON) $(RFCONVERTER) -r $(RESOURCEDIR)/errors.rsrc errors.rsrc
76+
DeRez -useDF -skip ckid dialogs.rsrc > dialogs.r
77+
DeRez -useDF -skip ckid errors.rsrc > errors.r
78+
Rez -useDF -o $(RESOURCEFILE) dialogs.r errors.r
7579
$(INSTALL_DATA) $(RESOURCEFILE) $(APPINSTALLDIR)/Contents/Resources/$(RESOURCEFILE)
7680

7781
LIBDEST=$(INSTALLDIR)/Mac/Lib

0 commit comments

Comments
 (0)