diff --git a/.gresource.xml b/.gresource.xml new file mode 100644 index 0000000..1d1d145 --- /dev/null +++ b/.gresource.xml @@ -0,0 +1,6 @@ + + + + icon2.png + + diff --git a/Makefile b/Makefile index b372b09..f45cd20 100644 --- a/Makefile +++ b/Makefile @@ -11,49 +11,55 @@ # Example: # APPINDICATOR=ayatana-appindicator3-0.1 make droidcam -APPINDICATOR ?= appindicator3-0.1 -JPEG_DIR ?= /opt/libjpeg-turbo -JPEG_INCLUDE ?= $(JPEG_DIR)/include -JPEG_LIB ?= $(JPEG_DIR)/lib`getconf LONG_BIT` +CC ?= gcc +CFLAGS ?= -Wall -O2 +APPINDICATOR ?= appindicator3-0.1 -CC = gcc -CFLAGS = -Wall -O2 GTK = `pkg-config --libs --cflags gtk+-3.0` `pkg-config --libs x11` GTK += `pkg-config --libs --cflags $(APPINDICATOR)` LIBAV = `pkg-config --libs --cflags libswscale libavutil` -LIBS = -lspeex -lasound -lpthread -lm -JPEG = -I$(JPEG_INCLUDE) $(JPEG_LIB)/libturbojpeg.a +JPEG = `pkg-config --libs --cflags libturbojpeg` +USBMUXD = `pkg-config --libs --cflags libusbmuxd` +LIBS = -lspeex -lasound -lpthread -lm SRC = src/connection.c src/settings.c src/decoder*.c src/av.c src/usb.c src/queue.c -USBMUXD = -lusbmuxd ifneq ($(findstring ayatana,$(APPINDICATOR)),) CFLAGS += -DUSE_AYATANA_APPINDICATOR endif - all: droidcam-cli droidcam -ifneq "$(RELEASE)" "" -SRC += src/libusbmuxd.a src/libxml2.a src/libplist-2.0.a +ifeq "$(RELEASE)" "" +package: + @echo "usage: RELEASE=2. make package" + +else +JPEG = +LIBAV = -L/opt/ffmpeg4/lib -lswscale -lavutil +USBMUXD = + +SRC += /opt/libimobiledevice/lib/libusbmuxd.a +SRC += /opt/libimobiledevice/lib/libplist-2.0.a +SRC += /opt/libjpeg-turbo/lib64/libturbojpeg.a + +.PHONY: package package: clean all zip "droidcam_$(RELEASE).zip" \ LICENSE README* icon2.png \ droidcam* install* uninstall* \ v4l2loopback/* - -else -LIBS += $(USBMUXD) endif -gresource: .gresource.xml icon2.png - glib-compile-resources .gresource.xml --generate-source --target=src/resources.c +#src/resources.c: .gresource.xml icon2.png +# glib-compile-resources .gresource.xml --generate-source --target=src/resources.c + +droidcam-cli: LDLIBS += $(LIBAV) $(JPEG) $(USBMUXD) $(LIBS) +droidcam: LDLIBS += $(GTK) $(LIBAV) $(JPEG) $(USBMUXD) $(LIBS) -droidcam-cli: LDLIBS += $(JPEG) $(LIBAV) $(LIBS) droidcam-cli: src/droidcam-cli.c $(SRC) $(CC) $(CPPFLAGS) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(LDLIBS) -droidcam: LDLIBS += $(GTK) $(JPEG) $(LIBAV) $(LIBS) droidcam: src/droidcam.c src/resources.c $(SRC) $(CC) $(CPPFLAGS) $(CFLAGS) $^ -o $@ $(LDFLAGS) $(LDLIBS) diff --git a/README.md b/README.md index 1fff3a3..eb036d8 100644 --- a/README.md +++ b/README.md @@ -11,24 +11,18 @@ Raspberry-PI instructions can be found here: https://github.com/dev47apps/droidc ## Building -Download and install latest libjpeg-turbo release via -https://github.com/libjpeg-turbo/libjpeg-turbo/releases - -The libjpeg-turbo package should go into `/opt/libjpeg-turbo`. -The official binaries (.deb, .rpm) will automatically install into the correct directory. - Install the dependencies ``` Debian/ubuntu: -libavutil-dev libswscale-dev libasound2-dev libspeex-dev libusbmuxd-dev libplist-dev +libavutil-dev libswscale-dev libasound2-dev libspeex-dev libusbmuxd-dev libplist-dev libturbojpeg0-dev # Only needed for GUI client libgtk-3-dev libappindicator3-dev Fedora: -libavutil-free-devel libswscale-free-devel alsa-lib-devel speex-devel libusbmuxd-devel libplist-devel +libavutil-free-devel libswscale-free-devel alsa-lib-devel speex-devel libusbmuxd-devel libplist-devel turbojpeg-devel # Only needed for GUI client gtk3-devel libappindicator-gtk3-devel diff --git a/src/common.h b/src/common.h index b101cb6..d5b4f6c 100644 --- a/src/common.h +++ b/src/common.h @@ -9,8 +9,8 @@ #ifndef _COMMON_H_ #define _COMMON_H_ -#define APP_VER_INT 190 -#define APP_VER_STR "1.9.0" +#define APP_VER_INT 200 +#define APP_VER_STR "2.0.0" #define MSG_ERROR(str) ShowError("Error",str) #define MSG_LASTERROR(str) ShowError(str,strerror(errno))