Skip to content

Commit c125133

Browse files
committed
Linux release components
1 parent 926f7e8 commit c125133

9 files changed

Lines changed: 117 additions & 1 deletion

File tree

DEBIAN/control

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
Package: droidcam-client
2+
Name: DroidCam
3+
Version: {VER}
4+
Architecture: amd64
5+
Maintainer: dev47apps <support@dev47apps.com>
6+
Description: Use your phone as a webcam.
7+
Depends: libcurl4 (>= 7.16.2), libgcc-s1 (>= 3.0), libqt5core5a (>= 5.12.2), libqt5gui5 (>= 5.8.0) | libqt5gui5-gles (>= 5.8.0), libqt5network5 (>= 5.0.2), libqt5svg5 (>= 5.6.0), libqt5widgets5 (>= 5.11.0), libqt5xml5 (>= 5.0.2), qtwayland5 (>= 5.8.0), libstdc++6 (>= 9), libspeexdsp1
8+
Recommends: adb, usbmuxd, v4l2loopback-dkms

DEBIAN/postinst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
ldconfig

UI/window-basic-droidcam-overrides.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,10 @@ void OBSBasicDroidCam::DroidCam_Disconnect(OBSSource source) {
7878

7979
if (!DroidCam_Cycle_Remote(source) && !obs_source_showing(source)) {
8080
blog(LOG_INFO, "DroidCam_Disconnect: CLEAR URL");
81+
#ifdef BROWSER_AVAILABLE
8182
QCefWidget *browser = (QCefWidget *)remoteDock->widget();
8283
if (browser) browser->setURL("about:blank");
84+
#endif
8385
last_remote_url = "";
8486
}
8587

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Desktop Entry]
2+
Name=DroidCam Client (New)
3+
Comment=Use your phone as a webcam
4+
Icon=/opt/droidcam-obs-client/icon.png
5+
Path=/opt/droidcam-obs-client/bin/64bit
6+
Exec=/opt/droidcam-obs-client/bin/64bit/droidcam
7+
Terminal=false
8+
Type=Application
9+
Categories=Video;AudioVideo;
10+
Version=1.0
11+
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/opt/droidcam-obs-client/bin/64bit

UI/xdg-data/droidcam.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/bin/bash
2+
( cd /opt/droidcam-obs-client/bin/64bit && ./droidcam )

droidcam.spec

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
Summary: Use your phone as a webcam
2+
Name: droidcam-client
3+
Version: {VERSION}
4+
Release: 1
5+
License: GPLv2
6+
URL: https://droidcam.app
7+
AutoReqProv: no
8+
Requires: qt5-qtbase, qt5-qtbase-gui, qt5-qtsvg
9+
Requires: speexdsp, libcurl, jansson, libwayland-egl
10+
11+
%define _buildshell /bin/bash
12+
%define _build_id_links none
13+
14+
%description
15+
Use your phone as a webcam.
16+
17+
%post
18+
ldconfig
19+
20+
%prep
21+
version={VERSION}
22+
INSTALL="/opt/droidcam-obs-client"
23+
24+
mkdir -p "$RPM_BUILD_ROOT/opt/"
25+
mv "${INSTALL}" "$RPM_BUILD_ROOT/opt/"
26+
27+
install -D "${OLDPWD}/UI/xdg-data/droidcam.sh" "$RPM_BUILD_ROOT/usr/local/bin/droidcam"
28+
install -D -t"$RPM_BUILD_ROOT/usr/share/applications/" "${OLDPWD}/UI/xdg-data/com.dev47apps.droidcam.desktop"
29+
install -D -t"$RPM_BUILD_ROOT/etc/ld.so.conf.d/" "${OLDPWD}/UI/xdg-data/com.dev47apps.droidcam.ld.conf"
30+
31+
# cut a tar file
32+
#tar -cjf /tmp/droidcam-client_${version}.tar.bz2 -C "$RPM_BUILD_ROOT" $(ls $RPM_BUILD_ROOT)
33+
34+
# cut the deb file
35+
cp -R "${OLDPWD}/DEBIAN" "$RPM_BUILD_ROOT"
36+
sed -i -e "s/{VER}/$version/" "$RPM_BUILD_ROOT/DEBIAN/control"
37+
dpkg-deb --build --root-owner-group "$RPM_BUILD_ROOT" "/tmp/droidcam_client_${version}_amd64.deb"
38+
rm -rf "$RPM_BUILD_ROOT/DEBIAN"
39+
40+
# Fedora hack (TODO build on Fedora)
41+
mkdir -p "$RPM_BUILD_ROOT/usr/lib64"
42+
ln -sf libbz2.so.1 "$RPM_BUILD_ROOT/usr/lib64/libbz2.so.1.0"
43+
44+
%files
45+
/opt/droidcam-obs-client*
46+
/etc/ld.so.conf.d/com.dev47apps*
47+
/usr/share/applications/com.dev47apps*
48+
/usr/local/bin/droidcam
49+
/usr/lib64/libbz2.so.1.0
50+
51+
%clean
52+
mv $RPM_BUILD_ROOT/opt/* /opt/
53+
rm -rf $RPM_BUILD_ROOT/*

package.sh

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
#!/bin/bash
2+
if [ -z "$version" ]; then
3+
echo please export version=7.x
4+
exit
5+
fi
6+
7+
INSTALL="/opt/droidcam-obs-client"
8+
9+
ls $INSTALL > /dev/null && \
10+
read -e -p "$INSTALL exists, continue? " choice && \
11+
[[ "$choice" != [Yy]* ]] && exit 1
12+
#
13+
#
14+
set -ex
15+
touch /opt/.test || sudo chown -R user:user /opt
16+
17+
cmake -S . -B build \
18+
-G "Unix Makefiles" -DUNIX_STRUCTURE=0 -DDepsPath=`pwd`/../deps \
19+
-DCMAKE_INSTALL_PREFIX="$INSTALL" -DMIXPANEL_TOKEN=$mixpanel \
20+
-DDROIDCAM_OVERRIDE=1 -DOBS_VERSION_OVERRIDE=$version -DENABLE_SCRIPTING=False \
21+
22+
LD_LIBRARY_PATH=`pwd`/../deps/lib make -C build -j4
23+
LD_LIBRARY_PATH=`pwd`/../deps/lib make -C build install
24+
find "$INSTALL" -type f -iname *.ini ! -iname locale.ini ! -iname en-us.ini -delete
25+
rm -rf "${INSTALL}"/{cmake*,lib*,include*}
26+
#
27+
#
28+
cp UI/forms/images/obs.png "${INSTALL}/icon.png"
29+
unzip v4l2loopback-ctl.zip -d /
30+
#unzip droidcam-obs-plugin-prebuilt.zip -d /
31+
find ${INSTALL} -type f -name droidcam-obs.so
32+
find ${INSTALL} -type f -name v4l2loopback-ctl
33+
34+
spec=/tmp/droidcam.spec
35+
sed -e "s/{VERSION}/$version/" droidcam.spec > $spec
36+
rpmbuild -bb $spec
37+
rm $spec
38+
mv ~/rpmbuild/RPMS/*/*.rpm /tmp/

plugins/linux-virtualcam/v4l2-output.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ static int loopback_module_load()
4444
static int loopback_module_add_card()
4545
{
4646
return run_command(
47-
"pkexec v4l2loopback-ctl add -n '" OBS_V4L2_CARD_LABEL
47+
"pkexec ./v4l2loopback-ctl add -n '" OBS_V4L2_CARD_LABEL
4848
"' && sleep 0.5");
4949
}
5050

0 commit comments

Comments
 (0)