]> git.rkrishnan.org Git - pihpsdr.git/commitdiff
Fixes for MacOS (Semaphores etc).
authorc vw <dl1ycf@darc.de>
Wed, 17 Jul 2019 14:28:57 +0000 (16:28 +0200)
committerc vw <dl1ycf@darc.de>
Wed, 17 Jul 2019 14:28:57 +0000 (16:28 +0200)
MacOS/Info.plist
MacOS/pihpsdr.sh
Makefile.mac
README.MacOS

index 9bca9687807297a406f2d215eb41fde985350833..09c46c3ef034af0699158d9414fd4e92dbfce9bc 100644 (file)
@@ -12,5 +12,7 @@
        <string>APPL</string>
         <key>CFBundleSignature</key>
        <string>BNDL</string>
+        <key>NSMicrophoneUsageDescription</key>
+        <string>Allow for using Sound input devices</string>
 </dict>
 </plist>
index 314c7555f7bafde8d0d1b266a25d819e1e823eeb..6008ba462875b3ff86f935571018256e46c30561 100755 (executable)
@@ -8,7 +8,15 @@
 # A full-fledged wrapper here would set dozens of
 # environment variables.
 #
+#
+# Use $HOME/.pihpsdr as the working dir,
+# copy hpsdr.png to that location
+
 this=`dirname $0` 
-cd $this/../Resources
 
+cd $HOME
+mkdir .pihpsdr
+cd .pihpsdr         # if this fails, stay in $HOME
+
+cp $this/../Resources/hpsdr.png .
 exec $this/pihpsdr-bin
index ec053b989857a2b1a484e871fe0b1db5f563b2db..efff0b6a75120a3fc24bdf050cf4d37a4390c2bd 100644 (file)
@@ -456,11 +456,14 @@ release: $(PROGRAM)
 #
 #############################################################################
 
-hpsdrsim.o:     hpsdrsim.c
-       $(CC) -c -O $(PORTAUDIO_OPTIONS) hpsdrsim.c
+hpsdrsim.o:     hpsdrsim.c 
+       $(CC) -c -O -DPORTAUDIO hpsdrsim.c
         
-hpsdrsim:       hpsdrsim.o
-       $(LINK) -o hpsdrsim hpsdrsim.o $(AUDIO_LIBS) -lm -lpthread
+newhpsdrsim.o: newhpsdrsim.c
+       $(CC) -c -O newhpsdrsim.c
+
+hpsdrsim:       hpsdrsim.o newhpsdrsim.o
+       $(LINK) -o hpsdrsim hpsdrsim.o newhpsdrsim.o -lportaudio -lm -lpthread
 
 #############################################################################
 #
@@ -507,17 +510,18 @@ app:      $(OBJS) $(REMOTE_OBJS) $(USBOZY_OBJS) $(LIMESDR_OBJS) $(FREEDV_OBJS) \
          libfn="`basename $$lib`"; \
          cp "$$lib" "pihpsdr.app/Contents/Frameworks/$$libfn"; \
          chmod u+w "pihpsdr.app/Contents/Frameworks/$$libfn"; \
-         install_name_tool -id "@executable_path/../Frameworks/$libfn" "pihpsdr.app/Contents/Frameworks/$$libfn"; \
+         install_name_tool -id "@executable_path/../Frameworks/$$libfn" "pihpsdr.app/Contents/Frameworks/$$libfn"; \
          install_name_tool -change "$$lib" "@executable_path/../Frameworks/$$libfn" pihpsdr.app/Contents/MacOS/pihpsdr-bin; \
        done
-#
-# Make "app" and copy local files app bundle
-#
-localapp:      app
-       cp wdspWisdom00 pihpsdr.app/Contents/Resources
-       cp *.props      pihpsdr.app/Contents/Resources
-       cp midi.inp     pihpsdr.app/Contents/Resources
-       cp ip.addr      pihpsdr.app/Contents/Resources
-
+       @# once more to install libraries on which libs just copied depend (such as wdsp -> fftw)
+       @for file in pihpsdr.app/Contents/Frameworks/*.dylib; do \
+         for lib in `otool -L pihpsdr.app/Contents/Frameworks/*.dylib | grep -v pihpsdr.app | grep -v "executable_path" | grep dylib | sed -e "s/ (.*//" | grep -Ev "/(usr/lib|System)" | grep -Ev /libg  | grep -Ev pango | grep -Ev cairo`; do \
+           libfn="`basename $$lib`"; \
+           cp "$$lib" "pihpsdr.app/Contents/Frameworks/$$libfn"; \
+           chmod u+w "pihpsdr.app/Contents/Frameworks/$$libfn"; \
+           install_name_tool -id "@executable_path/../Frameworks/$$libfn" "pihpsdr.app/Contents/Frameworks/$$libfn"; \
+           install_name_tool -change "$$lib" "@executable_path/../Frameworks/$$libfn" $$file; \
+         done; \
+       done
 #############################################################################
 
index 08bf331a77252dcb222f6dc8eacd8249f50420df..b475c451ab29a12257666c91abe65df832a5a76c 100644 (file)
@@ -87,6 +87,20 @@ there, "make -f Makefile.mac install" will put libwdsp.dylib in /usr/local/lib.
 This is needed by piHPSDR. The pihpsdr Makefile.mac assumes that WDSP can
 be linked with simply through the "-lwdsp" linker option.
 
+The following shell scripts installs all these prerequisites. At the beginning
+you have to give the administrator password. If the MacOS keychain ask you for
+permission, just answer with "Don't allow".
+
+#!/bin/sh
+
+xcode-select --install
+/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
+brew install portaudio
+brew install fftw
+brew install gtk+3
+brew install pkg-config
+brew install git
+
 ===================
 COMPILE and INSTALL
 ===================