Skip to content

Commit

Permalink
fix windows compilation issues
Browse files Browse the repository at this point in the history
  • Loading branch information
sr99622 committed Apr 2, 2024
1 parent 50adbaa commit b21f043
Show file tree
Hide file tree
Showing 16 changed files with 84 additions and 21 deletions.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@ A client side implementation of the ONVIF specification for Linux, Mac and Windo
<summary>Description</summary>
&nbsp;

---

Onvif GUI is an integrated camera management and NVR system with an intuitive user interface that can easily manage a fleet of cameras and create high resolution recordings based on alarm conditions. A best of breed YOLO detector is included with the system to facilitate accurate alarm signals without false detections.

The system is designed to scale with available hardware and will run on simple configurations with minimal hardware requirements as well as high end multi core CPUs with NVIDIA GPU for maximum performance. The system can be configured with auto start settings and a user friendly icon so that non-technical users can feel comfortable working with the application without specialized training.
Expand Down Expand Up @@ -85,6 +83,7 @@ Here is the application running 14 cameras through the yolox detector on an RTX
```
onvif-gui
```

</details>

<details>
Expand Down Expand Up @@ -168,10 +167,10 @@ Here is the application running 14 cameras through the yolox detector on an RTX
onvif-gui
```

</details>

---

</details>

<details>
<summary>Windows</summary>

Expand Down Expand Up @@ -264,6 +263,7 @@ Here is the application running 14 cameras through the yolox detector on an RTX
```
onvif-gui
```

</details>

<details>
Expand Down Expand Up @@ -368,6 +368,8 @@ Here is the application running 14 cameras through the yolox detector on an RTX
onvif-gui
```

---

</details>

<details>
Expand Down Expand Up @@ -424,6 +426,7 @@ In order to build from source on Windows, development tools and python are requi

<details>
<summary>Linux</summary>
&nbsp;

In order to add an icon to the desktop, administrator privileges are required. The location of the virtual environment folder must also be known and is required when invoking the command to create the desktop icon. To add the icon, use the following command, substituting the local host virtual environment configuration as appropriate.

Expand All @@ -439,6 +442,7 @@ Upon completion of the command, the icon may be found in the Applications Folder

<details>
<summary>Windows</summary>
&nbsp;

To install a desktop icon on windows, please make sure the virtual environment is activated and then add the winshell python module.

Expand Down
12 changes: 12 additions & 0 deletions assets/scripts/build_pkgs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
pip install build
cd libonvif
python -m build
cd ../libavio
python -m build
cd ../onvif-gui
python -m build
cd ..
for FILE in libonvif/dist/*.whl; do pip install $FILE; done
for FILE in libavio/dist/*.whl; do pip install $FILE; done
for FILE in onvif-gui/dist/*.whl; do pip install $FILE; done
17 changes: 17 additions & 0 deletions assets/scripts/build_pkgs.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
pip install build
cd libonvif
set CMAKE_CURRENT_SOURCE_DIR=%CD%
python -m build
cd ..
cd libavio
set CMAKE_CURRENT_SOURCE_DIR=%CD%
set FFMPEG_INSTALL_DIR=%CD%/ffmpeg
set SDL2_INSTALL_DIR=%CD%/sdl
python -m build
cd ..
cd onvif-gui
python -m build
cd ..
for /R libonvif\dist %%F in (*.whl) do pip install %%F
for /R libavio\dist %%F in (*.whl) do pip install %%F
for /R onvif-gui\dist %%F in (*.whl) do pip install %%F
5 changes: 5 additions & 0 deletions assets/scripts/clean
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
#!/bin/bash
cd libonvif
rm -R build
rm -R libonvif.egg-info
rm -R dist
cd ../libavio
rm -R build
rm -R avio.egg-info
rm -R dist
cd ../onvif-gui
rm -R build
rm -R onvif_gui.egg-info
rm -R dist
cd ..
13 changes: 13 additions & 0 deletions assets/scripts/clean.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
cd libonvif
rmdir /q /s build
rmdir /q /s libonvif.egg-info
rmdir /q /s dist
cd ../libavio
rmdir /q /s build
rmdir /q /s avio.egg-info
rmdir /q /s dist
cd ../onvif-gui
rmdir /q /s build
rmdir /q /s onvif_gui.egg-info
rmdir /q /s dist
cd ..
2 changes: 2 additions & 0 deletions assets/scripts/compile
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/bash
cd libonvif
rm -R build
rm -R libonvif.egg-info
Expand All @@ -10,3 +11,4 @@ cd ../onvif-gui
rm -R build
rm -R onvif_gui.egg-info
pip install .
cd ..
1 change: 1 addition & 0 deletions assets/scripts/compile.bat
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,4 @@ cd ../onvif-gui
rmdir /s /q build
rmdir /s /q onvif_gui.egg-info
pip install .
cd ..
2 changes: 2 additions & 0 deletions assets/scripts/make_env.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python -m venv myenv
myenv\Scripts\activate
2 changes: 1 addition & 1 deletion libavio
Submodule libavio updated 3 files
+10 −3 CMakeLists.txt
+1 −1 pyproject.toml
+1 −1 setup.py
18 changes: 13 additions & 5 deletions libonvif/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,16 +21,23 @@

cmake_minimum_required(VERSION 3.17)

project(libonvif VERSION 3.1.0)
project(libonvif VERSION 3.1.1)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED True)

add_definitions(-w)

# pass current dir in from host when building in virtual env
set (MY_CURRENT_DIR ${CMAKE_CURRENT_SOURCE_DIR})
if (DEFINED ENV{CMAKE_CURRENT_SOURCE_DIR})
set(MY_CURRENT_DIR $ENV{CMAKE_CURRENT_SOURCE_DIR})
endif()
file(TO_CMAKE_PATH "${MY_CURRENT_DIR}" MY_DIR_VAR)

if (WIN32)
set(LIBXML2_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/libxml2/include/libxml2)
set(LIBXML2_LIBRARIES ${CMAKE_CURRENT_SOURCE_DIR}/libxml2/lib/libxml2.lib)
set(LIBXML2_INCLUDE_DIRS ${MY_DIR_VAR}/libxml2/include/libxml2)
set(LIBXML2_LIBRARIES ${MY_DIR_VAR}/libxml2/lib/libxml2.lib)
else()
find_package(LibXml2 REQUIRED)
endif()
Expand All @@ -56,7 +63,6 @@ if (NOT WITHOUT_LIBS)

target_include_directories(libonvif PUBLIC
include
${Iconv_INCLUDE_DIRS}
${LIBXML2_INCLUDE_DIRS}
)

Expand All @@ -81,9 +87,11 @@ IF (NOT WITHOUT_PYTHON)
${LIBXML2_LIBRARIES}
)

message("-- LIBXML2_INCLUDE_DIRS: "${LIBXML2_INCLUDE_DIRS})
message("-- LIBXML2_LIBRARIES: "${LIBXML2_LIBRARIES})

target_include_directories(pyonvif PUBLIC
include
${Iconv_INCLUDE_DIRS}
${LIBXML2_INCLUDE_DIRS}
)

Expand Down
2 changes: 1 addition & 1 deletion libonvif/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "libonvif"
version = "3.1.0"
version = "3.1.1"
authors = [
{ name="Stephen Rhodes", email="[email protected]" },
]
Expand Down
2 changes: 1 addition & 1 deletion libonvif/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
from setuptools.command.build_ext import build_ext

PKG_NAME = "libonvif"
VERSION = "3.1.0"
VERSION = "3.1.1"

class CMakeExtension(Extension):
def __init__(self, name, sourcedir=""):
Expand Down
1 change: 0 additions & 1 deletion onvif-gui/MANIFEST.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
include README.md LICENSE
recursive-include gui/resources *

2 changes: 1 addition & 1 deletion onvif-gui/gui/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import shutil
import avio

VERSION = "2.0.5"
VERSION = "2.0.9"

class PipeManager():
def __init__(self, mw, uri):
Expand Down
12 changes: 6 additions & 6 deletions onvif-gui/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@

[project]
name = "onvif-gui"
version = "2.0.5"
version = "2.0.9"
dynamic = ["gui-scripts"]
description = "A client gui for Onvif"
readme = "README.md"
description = "A client gui for Onvif"
readme = "README.md"
requires-python = ">=3.10"
license = {file = "LICENSE.txt"}
keywords = ["sample", "setuptools", "development"]
keywords = ["sample", "setuptools", "development"]
authors = [
{name = "Stephen Rhodes", email = "[email protected]" }
{name = "Stephen Rhodes", email = "[email protected]" }
]
classifiers = [
"Development Status :: 5 - Production/Stable",
Expand All @@ -38,7 +38,7 @@ classifiers = [
]

dependencies = [
"libonvif==3.1.0", "avio==3.1.1", "PyQt6-Qt6==6.6.1", "pyqt6==6.6.1", "numpy", "loguru", "opencv-python"
"libonvif==3.1.1", "avio==3.1.2", "PyQt6-Qt6==6.6.1", "pyqt6==6.6.1", "numpy", "loguru", "opencv-python"
]

[project.urls]
Expand Down
2 changes: 1 addition & 1 deletion onvif-gui/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

setup(
name="onvif-gui",
version="2.0.5",
version="2.0.9",
author="Stephen Rhodes",
author_email="[email protected]",
description="GUI program for onvif",
Expand Down

0 comments on commit b21f043

Please sign in to comment.