Skip to content

Commit

Permalink
Version 2.0.0
Browse files Browse the repository at this point in the history
Update Makefile
  • Loading branch information
aramg committed Apr 13, 2023
1 parent c883c9f commit 1a68890
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 29 deletions.
6 changes: 6 additions & 0 deletions .gresource.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<gresources>
<gresource prefix="/com/dev47apps/droidcam">
<file>icon2.png</file>
</gresource>
</gresources>
44 changes: 25 additions & 19 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
10 changes: 2 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 1a68890

Please sign in to comment.