Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
nerrons
purr-data
Commits
0f8d90e0
Commit
0f8d90e0
authored
Sep 25, 2016
by
Jonathan Wilkes
Browse files
automate some of Matt Barber's build instructions for OSX
parent
d3621a3d
Changes
7
Hide whitespace changes
Inline
Side-by-side
externals/Makefile
View file @
0f8d90e0
...
...
@@ -140,16 +140,16 @@ ifeq ($(OS_NAME),windows)
else
ifeq
($(OS_NAME),darwin)
# on Mac OS X 10.6/Snow Leopard don't build hid since it needs Carbon
LIB_TARGETS
+=
pdp gem2pdp
iem16 apple
LIB_TARGETS
+=
iem16 apple
ifneq
($(shell uname -r | sed 's|10\.[0-9][0-9]*\.[0-9][0-9]*|10|'),10)
LIB_TARGETS
+=
hid
LIB_TARGETS
+=
endif
else
# GNU/Linux, BSD, IRIX, etc. (we use exported variable INCREMENTAL to avoid rebuilding entire Gem lib that takes a long time to compile)
ifeq
($(INCREMENTAL),yes)
LIB_TARGETS
+=
hid
pdp gem2pdp
iem16
LIB_TARGETS
+=
hid iem16
else
LIB_TARGETS
+=
gem hid
pdp gem2pdp
iem16
LIB_TARGETS
+=
gem hid iem16
endif
endif
endif
...
...
packages/darwin_app/Info.plist.in
View file @
0f8d90e0
...
...
@@ -32,7 +32,7 @@
<key>
CFBundleInfoDictionaryVersion
</key>
<string>
6.0
</string>
<key>
CFBundleName
</key>
<string>
PD_
APP
_NAME
</string>
<string>
PD_
SHORT
_NAME
</string>
<key>
CFBundlePackageType
</key>
<string>
APPL
</string>
<key>
CFBundleShortVersionString
</key>
...
...
packages/darwin_app/Makefile
View file @
0f8d90e0
...
...
@@ -6,8 +6,9 @@ export MACOSX_DEPLOYMENT_TARGET = 10.4
CWD
:=
$(
shell
pwd
)
BUILD_BASE
=
$(CWD)
/build
PD_APP_NAME
=
$(PACKAGE_NAME)
PD_SHORT_NAME
=
"Purr-Data"
PD_APP_CONTENTS
=
$(BUILD_BASE)
/
$(PD_APP_NAME)
.app/Contents
DESTDIR
=
$(PD_APP_CONTENTS)
/Resources
DESTDIR
=
$(PD_APP_CONTENTS)
/Resources
/app.nw
cvs_root_dir
:=
$(
shell
cd
$(CWD)
/../..
&&
pwd
)
BUILDLAYOUT_DIR
=
$(cvs_root_dir)
/packages
...
...
@@ -61,10 +62,12 @@ all:
install
:
darwin_app
#------------------------------------------------------------------------------#
darwin_app
:
darwin_app_core extended_install
rez_install
darwin_app_embed_libs spotlight_importer_install
darwin_app
:
darwin_app_core extended_install darwin_app_embed_libs spotlight_importer_install
@
echo
" "
@
echo
"Pd.app build succeeded!"
NWFILES
=
$(
foreach
file,
$(
wildcard
$(cvs_root_dir)
/pd/nw/
*
)
,
$(DESTDIR)
/bin/
$(
notdir
$(file)
))
extended_install
:
# on Mac OS X 10.6/Snow Leopard don't build Gem since it needs Carbon
ifeq
($(shell uname -r | sed 's|10\.[0-9][0-9]*\.[0-9][0-9]*|10|'),10)
...
...
@@ -78,6 +81,16 @@ ifeq ($(shell uname -r | sed 's|10\.[0-9][0-9]*\.[0-9][0-9]*|10|'),10)
else
$(MAKE)
-C
$(packages_src)
$(DEST_PATHS)
extended_install
endif
# Huge kludge to move all the nw.js files in $DESTDIR/bin to
# $DESTDIR. We need to do this because the nw.js app expects
# package.json to be inside $DESTDIR. So all the rest of the
# supporting GUI files must be there, too
-mv
$(NWFILES)
$(DESTDIR)
# remove the extra nw.js binary
rm
-rf
$(DESTDIR)/nw
# remove the broken pd-l2ork symlink from bin/
rm
$(DESTDIR)/bin/pd-l2ork
install
-p
$(cvs_root_dir)/pd/bin/pd-l2ork
$(DESTDIR)/bin
#------------------------------------------------------------------------------#
# this target is for when you already have a pre-built Pd.app and you
...
...
@@ -93,44 +106,47 @@ extended_app_install:
# build a standalone Wish.app from the installed Tcl/Tk Frameworks
darwin_app_wrapper
:
Info.plist
# Wish
install
-d
"$(PD_APP_CONTENTS)/MacOS"
install
-m0755
-p
\
"$(WISH_CONTENTS)/MacOS/$(WISH_NAME)"
"$(PD_APP_CONTENTS)/MacOS"
install
-d
"$(PD_APP_CONTENTS)/Resources"
install
-d
"$(BUILD_BASE)"
rsync
-ax
$(cvs_root_dir)/pd/nw/nw/nwjs.app/
$(BUILD_BASE)/$(PD_APP_NAME).app/
# install -d "$(PD_APP_CONTENTS)/MacOS"
#install -m0755 -p \
# "$(WISH_CONTENTS)/MacOS/$(WISH_NAME)" "$(PD_APP_CONTENTS)/MacOS"
#install -d "$(PD_APP_CONTENTS)/Resources"
# only embed the Tcl/Tk Frameworks if not building against the built-in ones
ifneq
(/System,$(findstring /System,$(WISH_FRAMEWORKS_SOURCE)))
install
-d
$(PD_APP_CONTENTS)/Frameworks
\
$(PD_APP_CONTENTS)/Frameworks/Tcl.framework
\
$(PD_APP_CONTENTS)/Frameworks/Tk.framework
ditto
$(WISH_FRAMEWORKS_SOURCE)/Tcl.framework
\
$(PD_APP_CONTENTS)/Frameworks/Tcl.framework/
ditto
$(WISH_FRAMEWORKS_SOURCE)/Tk.framework
\
$(PD_APP_CONTENTS)/Frameworks/Tk.framework/
rm
-rf
$(PD_APP_CONTENTS)/Frameworks/Tcl.framework/{,/Versions/8.4}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh}
&&
\
rm
-rf
$(PD_APP_CONTENTS)/Frameworks/Tk.framework/{,/Versions/8.4}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh}
chmod
-R
u+w
$(PD_APP_CONTENTS)/Frameworks
#
ifneq (/System,$(findstring /System,$(WISH_FRAMEWORKS_SOURCE)))
#
install -d $(PD_APP_CONTENTS)/Frameworks \
#
$(PD_APP_CONTENTS)/Frameworks/Tcl.framework \
#
$(PD_APP_CONTENTS)/Frameworks/Tk.framework
#
ditto $(WISH_FRAMEWORKS_SOURCE)/Tcl.framework \
#
$(PD_APP_CONTENTS)/Frameworks/Tcl.framework/
#
ditto $(WISH_FRAMEWORKS_SOURCE)/Tk.framework \
#
$(PD_APP_CONTENTS)/Frameworks/Tk.framework/
#
rm -rf $(PD_APP_CONTENTS)/Frameworks/Tcl.framework/{,/Versions/8.4}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh} && \
#
rm -rf $(PD_APP_CONTENTS)/Frameworks/Tk.framework/{,/Versions/8.4}/{Headers,PrivateHeaders,*_debug,lib*.a,*Config.sh}
#
chmod -R u+w $(PD_APP_CONTENTS)/Frameworks
# from http://tktoolkit.cvs.sourceforge.net/tktoolkit/tk/macosx/GNUmakefile
fix_install_id
(
)
{
\
chmod
-R
a+w
"$$1"
;
\
install_name_tool -id $$(otool -L "$$1" | awk "/$$2\.framework.*[^
:
]
\$
$/ {sub(
\"
^.*/Frameworks
\"
,
\"
@executable_path/../Frameworks
\"
,
\$
$1); print
\$
$1}") "$$1";
\
chmod -R a-w "$$1";
\
} &&
\
fix_install_name ( ) {
\
chmod -R a+w "$$1";
\
install_name_tool -change $$(otool -L "$$1" | awk "/$$2
\.
framework.*[^:]
\$
$/ {print
\$
$1; sub(
\"
^.*/Frameworks
\"
,
\"
@executable_path/../Frameworks
\"
,
\$
$1); print
\$
$1}") "$$1";
\
chmod -R a-w "$$1";
\
} &&
\
fix_install_id $(PD_APP_CONTENTS)/Frameworks/Tcl.framework/Tcl Tcl &&
\
fix_install_id $(PD_APP_CONTENTS)/Frameworks/Tk.framework/Tk Tk &&
\
fix_install_name "$(PD_APP_CONTENTS)/MacOS/$(WISH_NAME)" Tcl &&
\
fix_install_name "$(PD_APP_CONTENTS)/MacOS/$(WISH_NAME)" Tk
endif
# NOT /System
#
fix_install_id ( ) { \
#
chmod -R a+w "$$1"; \
#
install_name_tool -id $$(otool -L "$$1" | awk "/$$2\.framework.*[^:]\$$/ {sub(\"^.*/Frameworks\",\"@executable_path/../Frameworks\",\$$1); print \$$1}") "$$1"; \
#
chmod -R a-w "$$1"; \
#
} && \
#
fix_install_name ( ) { \
#
chmod -R a+w "$$1"; \
#
install_name_tool -change $$(otool -L "$$1" | awk "/$$2\.framework.*[^:]\$$/ {print \$$1; sub(\"^.*/Frameworks\",\"@executable_path/../Frameworks\",\$$1); print \$$1}") "$$1"; \
#
chmod -R a-w "$$1"; \
#
} && \
#
fix_install_id $(PD_APP_CONTENTS)/Frameworks/Tcl.framework/Tcl Tcl && \
#
fix_install_id $(PD_APP_CONTENTS)/Frameworks/Tk.framework/Tk Tk && \
#
fix_install_name "$(PD_APP_CONTENTS)/MacOS/$(WISH_NAME)" Tcl && \
#
fix_install_name "$(PD_APP_CONTENTS)/MacOS/$(WISH_NAME)" Tk
#
endif # NOT /System
# set up app wrapper
install
-d
"$(PD_APP_CONTENTS)/Resources"
install
-m0644
-p
Info.plist
"$(PD_APP_CONTENTS)"
install
-d
"$(PD_APP_CONTENTS)/Resources/app.nw"
# The nw.js app has its own Info.plist
#install -m0644 -p Info.plist "$(PD_APP_CONTENTS)"
install
-m0644
-p
*.icns
"$(PD_APP_CONTENTS)/Resources"
mv
"$(PD_APP_CONTENTS)/MacOS/${WISH_NAME}"
\
"$(PD_APP_CONTENTS)/MacOS/${PD_APP_NAME}"
#
mv "$(PD_APP_CONTENTS)/MacOS/${WISH_NAME}" \
#
"$(PD_APP_CONTENTS)/MacOS/${PD_APP_NAME}"
#------------------------------------------------------------------------------#
# generate Info.plist using PD_APP_NAME and PD_VERSION
...
...
@@ -138,6 +154,7 @@ Info.plist: CFBUNDLEVERSION_DATE := $(shell date +%Y.%m.%d)
Info.plist
:
Info.plist.in
cat
Info.plist.in |
\
sed
's/PD_APP_NAME/
$(PD_APP_NAME)
/'
|
\
sed
's/PD_SHORT_NAME/
$(PD_SHORT_NAME)
/'
|
\
sed
's/CFBUNDLESHORTVERSIONSTRING/
$(PD_MAJOR_VERSION)
.
$(PD_MINOR_VERSION)
.
$(PD_BUGFIX_VERSION)
/'
|
\
sed
's/CFBUNDLEVERSION/
$(CFBUNDLEVERSION_DATE)
/'
>
\
Info.plist
...
...
@@ -155,8 +172,8 @@ rez_install:
darwin_app_embed_libs
:
# embed libquicktime plugins
install
-d
$(PD_APP_CONTENTS)/lib/libquicktime1
install
-p
/sw/lib/libquicktime1/*.so
$(PD_APP_CONTENTS)/lib/libquicktime1
#
install -d $(PD_APP_CONTENTS)/lib/libquicktime1
#
install -p /sw/lib/libquicktime1/*.so $(PD_APP_CONTENTS)/lib/libquicktime1
./embed-MacOSX-dependencies.sh
$(PD_APP_CONTENTS)
# shortcut to install the readme on non-Extended builds
...
...
@@ -178,11 +195,11 @@ darwin_app_core: darwin_app_wrapper
test
-e
pdextended
||
ln
-s
pd pdextended
# support for Info Panel Plugins mgmt
cd
"$(PD_APP_CONTENTS)"
&&
ln
-s
Resources/extra
Plugins
install
-p
-m0644
org.puredata.pd
extended
.default.plist
"$(PD_APP_CONTENTS)/"
install
-p
-m0644
org.puredata.pd
-l2ork
.default.plist
"$(PD_APP_CONTENTS)/
Resources/
"
# since Pd-vanilla on Mac OS X doesn't have an 'include/pd' folder,
# Pd-extended will mimic Pd-vanilla's include/pd until Pd-vanilla gets one
ln
-s
pdextended
"$(PD_APP_CONTENTS)/Resources/include/pd"
ln
-s
pd/m_pd.h
"$(PD_APP_CONTENTS)/Resources/include/m_pd.h"
ln
-s
pdextended
"$(PD_APP_CONTENTS)/Resources/
app.nw/
include/pd"
ln
-s
pd/m_pd.h
"$(PD_APP_CONTENTS)/Resources/
app.nw/
include/m_pd.h"
#==============================================================================#
...
...
packages/darwin_app/p
d
.icns
→
packages/darwin_app/
ap
p.icns
View file @
0f8d90e0
File moved
packages/darwin_app/
pd-file
.icns
→
packages/darwin_app/
document
.icns
View file @
0f8d90e0
File moved
packages/darwin_app/embed-MacOSX-dependencies.sh
View file @
0f8d90e0
...
...
@@ -22,17 +22,17 @@ PD_APP_LIB=$PD_APP_CONTENTS/$LIB_DIR
echo
" "
for
pd_darwin
in
`
find
$PD_APP_CONTENTS
-name
'*.pd_darwin'
`
;
do
LIBS
=
`
otool
-L
$pd_darwin
|
sed
-n
's|.*/
sw
/lib/\(.*\.dylib\).*|\1|p'
`
LIBS
=
`
otool
-L
$pd_darwin
|
sed
-n
's|.*/
opt/local
/lib/\(.*\.dylib\).*|\1|p'
`
if
[
"x
$LIBS
"
!=
"x"
]
;
then
echo
"
`
echo
$pd_darwin
|
sed
's|.*/\(.*\.pd_darwin$\)|\1|'
`
is using:"
for
lib
in
$LIBS
;
do
echo
"
$lib
"
install
-d
$PD_APP_LIB
install
-p
/
sw
/lib/
$lib
$PD_APP_LIB
install
-p
/
opt/local
/lib/
$lib
$PD_APP_LIB
new_lib
=
`
echo
$lib
|
sed
's|.*/\(.*\.dylib\)|\1|'
`
# @executable_path starts from Contents/Resources/bin/pd
install_name_tool
-id
@executable_path/../../
$LIB_DIR
/
$new_lib
$PD_APP_LIB
/
$new_lib
install_name_tool
-change
/
sw
/lib/
$lib
@executable_path/../../
$LIB_DIR
/
$new_lib
$pd_darwin
install_name_tool
-change
/
opt/local
/lib/
$lib
@executable_path/../../
$LIB_DIR
/
$new_lib
$pd_darwin
done
echo
" "
fi
...
...
@@ -40,7 +40,7 @@ done
# check for .so plugins used by libquicktime and others
for
so
in
$PD_APP_LIB
/
*
/
*
.so
;
do
LIBS
=
`
otool
-L
$so
|
sed
-n
's|.*/
sw
/lib/\(.*\.dylib\).*|\1|p'
`
LIBS
=
`
otool
-L
$so
|
sed
-n
's|.*/
opt/local
/lib/\(.*\.dylib\).*|\1|p'
`
if
[
"x
$LIBS
"
!=
"x"
]
;
then
echo
"
`
echo
$so
|
sed
's|.*/\(lib.*/.*\.so\)|\1|'
`
is using:"
for
lib
in
$LIBS
;
do
...
...
@@ -49,17 +49,17 @@ for so in $PD_APP_LIB/*/*.so; do
if
[
-e
$PD_APP_LIB
/
$new_lib
]
;
then
echo
"
$PD_APP_LIB
/
$new_lib
already exists, skipping copy."
else
install
-vp
/
sw
/lib/
$lib
$PD_APP_LIB
install
-vp
/
opt/local
/lib/
$lib
$PD_APP_LIB
fi
# @executable_path starts from Contents/Resources/bin/pd
install_name_tool
-change
/
sw
/lib/
$lib
@executable_path/../../
$LIB_DIR
/
$new_lib
$so
install_name_tool
-change
/
opt/local
/lib/
$lib
@executable_path/../../
$LIB_DIR
/
$new_lib
$so
done
echo
" "
fi
done
for
dylib
in
$PD_APP_LIB
/
*
.dylib
;
do
LIBS
=
`
otool
-L
$dylib
|
sed
-n
's|.*/
sw
/lib/\(.*\.dylib\).*|\1|p'
`
LIBS
=
`
otool
-L
$dylib
|
sed
-n
's|.*/
opt/local
/lib/\(.*\.dylib\).*|\1|p'
`
if
[
"x
$LIBS
"
!=
"x"
]
;
then
echo
"
`
echo
$dylib
|
sed
's|.*/\(.*\.dylib\)|\1|'
`
is using:"
for
lib
in
$LIBS
;
do
...
...
@@ -68,11 +68,11 @@ for dylib in $PD_APP_LIB/*.dylib; do
if
[
-e
$PD_APP_LIB
/
$new_lib
]
;
then
echo
"
$PD_APP_LIB
/
$new_lib
already exists, skipping copy."
else
install
-vp
/
sw
/lib/
$lib
$PD_APP_LIB
install
-vp
/
opt/local
/lib/
$lib
$PD_APP_LIB
fi
# @executable_path starts from Contents/Resources/bin/pd
install_name_tool
-id
@executable_path/../../
$LIB_DIR
/
$new_lib
$PD_APP_LIB
/
$new_lib
install_name_tool
-change
/
sw
/lib/
$lib
@executable_path/../../
$LIB_DIR
/
$new_lib
$dylib
install_name_tool
-change
/
opt/local
/lib/
$lib
@executable_path/../../
$LIB_DIR
/
$new_lib
$dylib
done
echo
" "
fi
...
...
@@ -89,11 +89,11 @@ for dylib in $PD_APP_LIB/*.dylib; do
if
[
-e
$PD_APP_LIB
/
$new_lib
]
;
then
echo
"
$PD_APP_LIB
/
$new_lib
already exists, skipping copy."
else
install
-vp
/
sw
/lib/
$lib
$PD_APP_LIB
install
-vp
/
opt/local
/lib/
$lib
$PD_APP_LIB
fi
# @executable_path starts from Contents/Resources/bin/pd
install_name_tool
-id
@executable_path/../../
$LIB_DIR
/
$new_lib
$PD_APP_LIB
/
$new_lib
install_name_tool
-change
/
sw
/lib/
$lib
@executable_path/../../
$LIB_DIR
/
$new_lib
$dylib
install_name_tool
-change
/
opt/local
/lib/
$lib
@executable_path/../../
$LIB_DIR
/
$new_lib
$dylib
done
echo
" "
fi
...
...
packages/darwin_app/org.puredata.pd
extended
.default.plist
→
packages/darwin_app/org.puredata.pd
-l2ork
.default.plist
View file @
0f8d90e0
...
...
@@ -51,35 +51,27 @@
<key>
loadlib22
</key>
<string>
smlib
</string>
<key>
loadlib23
</key>
<string>
toxy
</string>
<key>
loadlib24
</key>
<string>
unauthorized
</string>
<key>
loadlib2
5
</key>
<key>
loadlib2
4
</key>
<string>
vbap
</string>
<key>
loadlib2
6
</key>
<key>
loadlib2
5
</key>
<string>
pan
</string>
<key>
loadlib2
7
</key>
<key>
loadlib2
6
</key>
<string>
hcs
</string>
<key>
loadlib2
8
</key>
<key>
loadlib2
7
</key>
<string>
jmmmp
</string>
<key>
loadlib2
9
</key>
<key>
loadlib2
8
</key>
<string>
ext13
</string>
<key>
loadlib
30
</key>
<key>
loadlib
29
</key>
<string>
ggee
</string>
<key>
loadlib3
1
</key>
<key>
loadlib3
0
</key>
<string>
iem_anything
</string>
<key>
loadlib32
</key>
<string>
flib
</string>
<key>
loadlib33
</key>
<key>
loadlib31
</key>
<string>
ekext
</string>
<key>
loadlib34
</key>
<string>
flatspace
</string>
<key>
loadlib35
</key>
<key>
loadlib32
</key>
<string>
pdp
</string>
<key>
loadlib36
</key>
<string>
pidip
</string>
<key>
nloadlib
</key>
<string>
3
6
</string>
<string>
3
2
</string>
<key>
path1
</key>
<string>
/System/Library/Fonts
</string>
<key>
path2
</key>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment