Compare commits

...

No commits in common. "gh-pages" and "1.36.12_hevc" have entirely different histories.

5694 changed files with 963064 additions and 777 deletions

26
.cirrus.yml Normal file
View File

@ -0,0 +1,26 @@
task:
name: freebsd-build
freebsd_instance:
image_family: freebsd-12-2
prepare_script:
- pkg install -yq git cmake jpeg-turbo mysql80-client ffmpeg libvncserver libjwt catch p5-DBI p5-DBD-mysql p5-Date-Manip p5-Test-LWP-UserAgent p5-Sys-Mmap
configure_script:
- git submodule update --init --recursive
- mkdir build
- cd build
- cmake --version
- cmake ../ -DBUILD_MAN=0 -DBUILD_TEST_SUITE=1 -DENABLE_WERROR=1
build_script:
- cd build
- make -j3
install_script:
- cd build
- make install
test_script:
- cd build/tests
- ./tests "~[notCI]"

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
.git

19
.eslintignore Normal file
View File

@ -0,0 +1,19 @@
*.min.js
# libraries
web/api/lib
web/includes/csrf/
web/js/videojs.zoomrotate.js
web/skins/classic/js/bootstrap.js
web/skins/classic/js/chosen
web/skins/classic/js/dateTimePicker
web/skins/classic/js/jquery-*.js
web/skins/classic/js/jquery-ui-*
web/skins/classic/js/jquery.js
web/skins/classic/js/moment.js
web/skins/classic/js/video.js
web/tools/mootools
# Cannot be parsed as JS
web/skins/classic/includes/export_functions.php
web/skins/classic/views/events.php

51
.eslintrc.js Normal file
View File

@ -0,0 +1,51 @@
"use strict";
module.exports = {
"env": {
"browser": true,
"es6": true,
},
"extends": ["google"],
"overrides": [{
// eslint-plugin-html handles eol-last slightly different - it applies to
// each set of script tags, so we turn it off here.
"files": "**/*.*php",
"rules": {
"eol-last": "off",
"indent": "off",
},
}],
"plugins": [
"html",
"php-markup",
],
"rules": {
"camelcase": "off",
"comma-dangle": "off",
"guard-for-in": "off",
"max-len": "off",
"new-cap": ["error", {
capIsNewExceptions: ["Error", "Warning", "Debug", "Polygon_calcArea", "Play", "Stop"],
newIsCapExceptionPattern: "^Asset\.."
}],
"no-array-constructor": "off",
"no-unused-vars": ["error", {
"vars": "local",
"args": "none",
"ignoreRestSiblings": false
}],
"no-var": "off",
"prefer-rest-params": "off",
"quotes": "off",
"require-jsdoc": "off",
"spaced-comment": "off",
},
"settings": {
"php/php-extensions": [".php"],
"php/markup-replacement": {"php": "", "=": "0"},
"php/keep-eol": false,
"php/remove-whitespace": false,
"php/remove-empty-line": false,
"php/remove-php-lint": false
},
};

2
.git-blame-ignore-revs Normal file
View File

@ -0,0 +1,2 @@
# Reindent CMakeLists
6c9983155c65848a3e67976445cd20fb4fbfe108

12
.github/FUNDING.yml vendored Normal file
View File

@ -0,0 +1,12 @@
# These are supported funding model platforms
github: [connortechnology,pliablepixels] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: zoneminder # Replace with a single Patreon username
open_collective: zoneminder # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']

59
.github/ISSUE_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,59 @@
<!--
**THIS FORUM IS FOR BUG REPORTS ONLY**
Do not post feature or enhancement requests, general discussions, or support questions here.
Feature and enhancement requests, general discussions, and support questions should occur in one of the following areas:
- The [ZoneMinder-Chat Slack channel](https://zoneminder-chat.herokuapp.com/)
- The [ZoneMinder Forum](https://forums.zoneminder.com/)
Docker related issues should be posted here: https://github.com/ZoneMinder/zmdockerfiles
In order to submit a bug report, please populate the fields below this line. This is required.
----------------------------------------------------------------------------------------------------
-->
**Describe Your Environment**
<!--
- Version of ZoneMinder [release version, development version, or commit]
- How you installed ZoneMinder [e.g. PPA, RPMFusion, from-source, etc]
- Full name and version of OS
- Browser name and version (if this is an issue with the web interface)
-->
**If the issue concerns a camera**
<!--
- Make and Model
- Frame rate
- Resolution
- ZoneMinder Source Type:
-->
**Describe the bug**
<!--
A clear and concise description of what the bug is.
-->
**To Reproduce**
<!--
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
-->
**Expected behavior**
<!--
A clear and concise description of what you expected to happen.
-->
**Debug Logs**
```
<!--
<insert debug logs here, please make sure they are within the ``` quotes so they are formatted properly>
-->
```

40
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,40 @@
---
name: Bug report
about: Issues that do not follow the template will be closed
title: ''
labels: ''
assignees: ''
---
**Describe Your Environment**
- Version of ZoneMinder [release version, development version, or commit]
- How you installed ZoneMinder [e.g. PPA, RPMFusion, from-source, etc]
- Full name and version of OS
- Browser name and version (if this is an issue with the web interface)
**If the issue concerns a camera**
- Make and Model
- frame rate
- resolution
- ZoneMinder Source Type:
**Describe the bug**
A clear and concise description of what the bug is.
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Debug Logs**
```
<insert debug logs here, please make sure they are within the ``` quotes so they are formatted properly>
```

2
.github/codeql/codeql-config.yml vendored Normal file
View File

@ -0,0 +1,2 @@
paths-ignore:
- dep/

21
.github/config.yml vendored Normal file
View File

@ -0,0 +1,21 @@
# Configuration for welcome - https://github.com/behaviorbot/welcome
# Configuration for new-issue-welcome - https://github.com/behaviorbot/new-issue-welcome
# Comment to be posted to on first time issues
newIssueWelcomeComment: >
Thanks for opening your first issue here! Just a reminder, this forum is for Bug Reports only. Be sure to follow the issue template!
# Configuration for new-pr-welcome - https://github.com/behaviorbot/new-pr-welcome
# Comment to be posted to on PRs from first time contributors in your repository
#newPRWelcomeComment: >
# Thanks for opening this pull request! Please check out our contributing guidelines.
# Configuration for first-pr-merge - https://github.com/behaviorbot/first-pr-merge
# Comment to be posted to on pull requests merged by a first time user
#firstPRMergeComment: >
# Congrats on merging your first pull request! We here at behaviorbot are proud of you!
# It is recommend to include as many gifs and emojis as possible

16
.github/issue-close-app.yml vendored Normal file
View File

@ -0,0 +1,16 @@
# Comment that will be sent if an issue is judged to be closed
comment: "This issue is closed because it does not meet our bug report issue template. Please read it."
issueConfigs:
# There can be several configs for different kind of issues.
- content:
# Example 1: bug report
- "Describe Your Environment"
- "Describe the bug"
- "Expected behavior"
# Optional configuration:
#
# whether the keywords are case-insensitive
# default value is false, which means keywords are case-sensitive
caseInsensitive: true
# The issue is judged to be legal if it includes all keywords from any of these two configs.
# Or it will be closed by the app.

13
.github/no-response.yml vendored Normal file
View File

@ -0,0 +1,13 @@
# Configuration for probot-no-response - https://github.com/probot/no-response
# Number of days of inactivity before an Issue is closed for lack of response
daysUntilClose: 7
# Label requiring a response
responseRequiredLabel: more-information-needed
# Comment to post when closing an Issue for lack of response. Set to `false` to disable
closeComment: >
This issue has been automatically closed because there has been no response
to our request for more information from the original author. With only the
information that is currently in the issue, we don't have enough information
to take action. Please reach out if you have or find the answers we need so
that we can investigate further.

29
.github/stale.yml vendored Normal file
View File

@ -0,0 +1,29 @@
# Configuration for probot-stale - https://github.com/probot/stale
# Number of days of inactivity before an issue becomes stale
daysUntilStale: 180
# Number of days of inactivity before a stale issue is closed
daysUntilClose: 30
# Issues with these labels will never be considered stale
exemptLabels:
- "Under Review"
- "Bounty"
- "bug"
- "Feature"
# Set to true to ignore issues in a milestone (defaults to false)
exemptMilestones: true
# Label to use when marking an issue as stale
staleLabel: stale
# Comment to post when marking an issue as stale. Set to `false` to disable
markComment: >
This issue has been automatically marked as stale because it has not had
recent activity. It will be closed if no further activity occurs. Thank you
for your contributions.
# Comment to post when closing a stale issue. Set to `false` to disable
closeComment: false

29
.github/support.yml vendored Normal file
View File

@ -0,0 +1,29 @@
# Configuration for support-requests - https://github.com/dessant/support-requests
# Label used to mark issues as support requests
supportLabel: support
# Comment to post on issues marked as support requests, `{issue-author}` is an
# optional placeholder. Set to `false` to disable
supportComment: >
:wave: @{issue-author}, we use the issue tracker exclusively for bug reports.
However, this issue appears to be a support request, a feature request, or
attempts to ask a question.
Please use our support channels to get help with or discuss this project:
- The [ZoneMinder-Chat Slack channel](https://zoneminder-chat.herokuapp.com/)
- The [ZoneMinder USer Forum](https://forums.zoneminder.com/)
# Close issues marked as support requests
close: true
# Lock issues marked as support requests
lock: true
# Assign `off-topic` as the reason for locking. Set to `false` to disable
setLockReason: true
# Repository to extend settings from
# _extends: repo

25
.github/workflows/ci-xenial.yml vendored Normal file
View File

@ -0,0 +1,25 @@
name: CI Xenial
on:
push:
branches:
- '*'
pull_request:
branches: [ master ]
jobs:
build:
runs-on: zm-xenial-ci
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install libavdevice-dev libcurl4-gnutls-dev libvlc-dev libvncserver-dev libdate-manip-perl libdbd-mysql-perl libsys-mmap-perl libpolkit-gobject-1-dev
- name: Prepare
run: mkdir build
- name: Configure
run: cd build && cmake --version && cmake .. -DBUILD_MAN=0 -DENABLE_WERROR=1
- name: Build
run: cd build && make -j3 | grep --line-buffered -Ev '^(cp lib\/|Installing.+\.pm)' && (exit ${PIPESTATUS[0]})

79
.github/workflows/codeql-analysis.yml vendored Normal file
View File

@ -0,0 +1,79 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
on:
push:
branches: [master]
pull_request:
# The branches below must be a subset of the branches above
branches: [master]
schedule:
- cron: '0 3 * * 5'
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Override automatic language detection by changing the below list
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
language: ['cpp', 'javascript']
# Learn more...
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
steps:
- name: Checkout repository
uses: actions/checkout@v2
with:
# We must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head.
fetch-depth: 2
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
config-file: ./.github/codeql/codeql-config.yml
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main
- name: Clean install dependencies and build
run: |
git submodule init
git submodule update --init --recursive
sudo apt-get update
sudo apt-get install libavdevice-dev libavcodec-dev libavformat-dev libavutil-dev libswresample-dev libswscale-dev libjwt-gnutls-dev
sudo apt-get install libbz2-dev libgcrypt20-dev libcurl4-gnutls-dev libjpeg-turbo8-dev libturbojpeg0-dev
sudo apt-get install default-libmysqlclient-dev libpcre3-dev libpolkit-gobject-1-dev libv4l-dev libvlc-dev
sudo apt-get install libdate-manip-perl libdbd-mysql-perl libphp-serialization-perl libsys-mmap-perl
sudo apt-get install libwww-perl libdata-uuid-perl libssl-dev libcrypt-eksblowfish-perl libdata-entropy-perl
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
# and modify them (or add more) to build your code if your project
# uses a compiled language
#- run: |
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1

158
.gitignore vendored
View File

@ -1 +1,157 @@
_site
# If you are adding to this file, please ensure sorting is maintained. If using vim, you can use :%sort u
CMakeCache.txt
CMakeFiles/
Makefile
Makefile.in
aclocal.m4
autom4te.cache
cmake/cmake_uninstall.cmake
cmake_install.cmake
compile
config.guess
config.h
config.h.in
config.h.in~
config.log
config.status
config.sub
configure
db/CMakeFiles/
db/cmake_install.cmake
db/zm_create.sql
depcomp
docs/_build
install-sh
install_manifest.txt
misc/CMakeFiles/
misc/apache.conf
misc/cmake_install.cmake
misc/com.zoneminder.systemctl.policy
misc/com.zoneminder.systemctl.rules
misc/logrotate.conf
misc/syslog.conf
misc/zoneminder-tmpfiles.conf
misc/zoneminder.service
missing
mkinstalldirs
onvif/CMakeFiles/
onvif/cmake_install.cmake
onvif/modules/CMakeFiles/
onvif/modules/MYMETA.json
onvif/modules/MYMETA.yml
onvif/modules/MakefilePerl
onvif/modules/cmake_install.cmake
onvif/modules/output/
onvif/modules/pm_to_blib
onvif/proxy/CMakeFiles/
onvif/proxy/MYMETA.json
onvif/proxy/MYMETA.yml
onvif/proxy/MakefilePerl
onvif/proxy/cmake_install.cmake
onvif/proxy/output/
onvif/proxy/pm_to_blib
onvif/scripts/CMakeFiles/
onvif/scripts/cmake_install.cmake
scripts/CMakeFiles/
scripts/ZoneMinder/CMakeFiles/
scripts/ZoneMinder/MYMETA.json
scripts/ZoneMinder/MYMETA.yml
scripts/ZoneMinder/Makefile.old
scripts/ZoneMinder/MakefilePerl
scripts/ZoneMinder/blib
scripts/ZoneMinder/cmake_install.cmake
scripts/ZoneMinder/lib/ZoneMinder/Base.pm
scripts/ZoneMinder/lib/ZoneMinder/Config.pm
scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm
scripts/ZoneMinder/lib/ZoneMinder/Memory.pm
scripts/ZoneMinder/output/
scripts/ZoneMinder/pm_to_blib
scripts/cmake_install.cmake
scripts/zm
scripts/zmaudit.pl
scripts/zmcamtool.pl
scripts/zmcontrol.pl
scripts/zmdbbackup
scripts/zmdbrestore
scripts/zmdc.pl
scripts/zmeventdump
scripts/zmfilter.pl
scripts/zmlogrotate.conf
scripts/zmpkg.pl
scripts/zmsystemctl.pl
scripts/zmtelemetry.pl
scripts/zmtrack.pl
scripts/zmtrigger.pl
scripts/zmupdate.pl
scripts/zmvideo.pl
scripts/zmwatch.pl
scripts/zmx10.pl
scripts/zoneminder-zmaudit.pl.8
scripts/zoneminder-zmaudit.pl.8.gz
scripts/zoneminder-zmcamtool.pl.8
scripts/zoneminder-zmcamtool.pl.8.gz
scripts/zoneminder-zmcontrol.pl.8
scripts/zoneminder-zmcontrol.pl.8.gz
scripts/zoneminder-zmdc.pl.8
scripts/zoneminder-zmdc.pl.8.gz
scripts/zoneminder-zmfilter.pl.8
scripts/zoneminder-zmfilter.pl.8.gz
scripts/zoneminder-zmpkg.pl.8
scripts/zoneminder-zmpkg.pl.8.gz
scripts/zoneminder-zmsystemctl.pl.8
scripts/zoneminder-zmsystemctl.pl.8.gz
scripts/zoneminder-zmtelemetry.pl.8
scripts/zoneminder-zmtelemetry.pl.8.gz
scripts/zoneminder-zmtrack.pl.8
scripts/zoneminder-zmtrack.pl.8.gz
scripts/zoneminder-zmtrigger.pl.8
scripts/zoneminder-zmtrigger.pl.8.gz
scripts/zoneminder-zmupdate.pl.8
scripts/zoneminder-zmupdate.pl.8.gz
scripts/zoneminder-zmvideo.pl.8
scripts/zoneminder-zmvideo.pl.8.gz
scripts/zoneminder-zmwatch.pl.8
scripts/zoneminder-zmwatch.pl.8.gz
scripts/zoneminder-zmx10.pl.8
scripts/zoneminder-zmx10.pl.8.gz
src/*.o
src/.deps/
src/CMakeFiles/
src/cmake_install.cmake
src/libzm.a
src/nph-zms
src/zmc
src/zmf
src/zms
src/zmu
src/zoneminder-zmc.8
src/zoneminder-zmc.8.gz
src/zoneminder-zmf.8
src/zoneminder-zmf.8.gz
src/zoneminder-zmstreamer.8
src/zoneminder-zmstreamer.8.gz
src/zoneminder-zmu.8
src/zoneminder-zmu.8.gz
stamp-h.in
stamp-h1
web/CMakeFiles/
web/api/CMakeFiles/
web/api/app/Config/bootstrap.php
web/api/app/Config/core.php
web/api/cmake_install.cmake
web/cgi-bin/
web/cmake_install.cmake
web/events/
web/images/
web/includes/config.php
web/tools/mootools/CMakeFiles/
web/tools/mootools/cmake_install.cmake
web/tools/mootools/mootools-core.js
web/tools/mootools/mootools-more.js
web/undef.log
zm.conf
zmconfgen.pl
zmlinkcontent.sh
zm_config_data.h
zm_config_defines.h
**/.DS_Store

17
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,17 @@
default:
image:
name: ubuntu:latest
before_script:
- apt-get update -yq
- DEBIAN_FRONTEND=noninteractive apt-get install -yq devscripts sudo
deb:
stage: build
tags:
- docker
script:
- yes "" | ./utils/do_debian_package.sh --snapshot=stable --type=binary --interactive=no --dput=no --debbuild-extra=--no-sign || true
artifacts:
paths:
- '*.deb'
expire_in: 1 week

10
.gitmodules vendored Normal file
View File

@ -0,0 +1,10 @@
[submodule "web/api/app/Plugin/Crud"]
path = web/api/app/Plugin/Crud
url = https://github.com/FriendsOfCake/crud.git
branch = 3.0
[submodule "web/api/app/Plugin/CakePHP-Enum-Behavior"]
path = web/api/app/Plugin/CakePHP-Enum-Behavior
Url = https://github.com/ZoneMinder/CakePHP-Enum-Behavior.git
[submodule "dep/RtspServer"]
path = dep/RtspServer
url = https://github.com/ZoneMinder/RtspServer

58
.travis.yml Normal file
View File

@ -0,0 +1,58 @@
language: cpp
sudo: required
dist: bionic
git:
depth: 9999999
notifications:
irc: chat.freenode.net#zoneminder-dev
branches:
except:
- modern
cache: ccache
addons:
ssh_known_hosts: zmrepo.zoneminder.com
apt:
sources:
- sourceline: ppa:iconnor/zoneminder-master
- key_url: http://keyserver.ubuntu.com:11371/pks/lookup?op=get&search=0x4D0BF748776FFB04
packages:
- gdebi
- yum-utils
- patch
- git
- curl
- sshfs
- sed
- binfmt-support
- qemu
- qemu-user-static
- dnsutils
- traceroute
install:
- update-binfmts --enable qemu-arm
env:
- SMPFLAGS=-j4 OS=eslint DIST=eslint
- SMPFLAGS=-j4 OS=ubuntu DIST=bionic DOCKER_REPO=iconzm/packpack
compiler:
- gcc
services:
- mysql
- docker
script:
- utils/packpack/startpackpack.sh
before_deploy:
- openssl aes-256-cbc -K $encrypted_62a62750aa73_key -iv $encrypted_62a62750aa73_iv -in ./utils/packpack/deploy_rsa.enc -out /tmp/deploy_rsa -d
- eval "$(ssh-agent -s)"
- chmod 600 /tmp/deploy_rsa
- ssh-add /tmp/deploy_rsa
deploy:
provider: script
skip_cleanup: true
script: utils/packpack/rsync_xfer.sh
on:
branch: master

487
CHANGELOG.md Normal file
View File

@ -0,0 +1,487 @@
# Change Log
## [v1.29.0](https://github.com/ZoneMinder/ZoneMinder/tree/v1.29.0) (2016-02-03)
[Full Changelog](https://github.com/ZoneMinder/ZoneMinder/compare/v1.29.0-rc2...v1.29.0)
**Merged pull requests:**
- 1253 zms quit cmd [\#1254](https://github.com/ZoneMinder/ZoneMinder/pull/1254) ([pliablepixels](https://github.com/pliablepixels))
- Add Debug/Info lines reporting multi-server status [\#1252](https://github.com/ZoneMinder/ZoneMinder/pull/1252) ([connortechnology](https://github.com/connortechnology))
- Do debian package mods [\#1244](https://github.com/ZoneMinder/ZoneMinder/pull/1244) ([pliablepixels](https://github.com/pliablepixels))
- zmtrigger - process off+time delay condition [\#1240](https://github.com/ZoneMinder/ZoneMinder/pull/1240) ([knnniggett](https://github.com/knnniggett))
- Multi server [\#1233](https://github.com/ZoneMinder/ZoneMinder/pull/1233) ([connortechnology](https://github.com/connortechnology))
- remove Google open Sans external import [\#1232](https://github.com/ZoneMinder/ZoneMinder/pull/1232) ([connortechnology](https://github.com/connortechnology))
- PTZ - Added autostop to Down command on FI8918W [\#1189](https://github.com/ZoneMinder/ZoneMinder/pull/1189) ([marcolino7](https://github.com/marcolino7))
## [v1.29.0-rc2](https://github.com/ZoneMinder/ZoneMinder/tree/v1.29.0-rc2) (2016-01-05)
[Full Changelog](https://github.com/ZoneMinder/ZoneMinder/compare/v1.29.0-rc1...v1.29.0-rc2)
**Merged pull requests:**
- Multi server [\#1223](https://github.com/ZoneMinder/ZoneMinder/pull/1223) ([connortechnology](https://github.com/connortechnology))
- Multi server [\#1222](https://github.com/ZoneMinder/ZoneMinder/pull/1222) ([connortechnology](https://github.com/connortechnology))
- Multi server [\#1217](https://github.com/ZoneMinder/ZoneMinder/pull/1217) ([connortechnology](https://github.com/connortechnology))
- Multi server [\#1215](https://github.com/ZoneMinder/ZoneMinder/pull/1215) ([connortechnology](https://github.com/connortechnology))
- Change log updates [\#1172](https://github.com/ZoneMinder/ZoneMinder/pull/1172) ([SteveGilvarry](https://github.com/SteveGilvarry))
## [v1.29.0-rc1](https://github.com/ZoneMinder/ZoneMinder/tree/v1.29.0-rc1) (2016-01-01)
[Full Changelog](https://github.com/ZoneMinder/ZoneMinder/compare/v1.28.1...v1.29.0-rc1)
**Merged pull requests:**
- Bump version to 1.29.0 [\#1213](https://github.com/ZoneMinder/ZoneMinder/pull/1213) ([knnniggett](https://github.com/knnniggett))
- Missing rtd theme [\#1202](https://github.com/ZoneMinder/ZoneMinder/pull/1202) ([SteveGilvarry](https://github.com/SteveGilvarry))
- Skip directories that have non-digits in them [\#1201](https://github.com/ZoneMinder/ZoneMinder/pull/1201) ([connortechnology](https://github.com/connortechnology))
- updated mobile app info [\#1200](https://github.com/ZoneMinder/ZoneMinder/pull/1200) ([pliablepixels](https://github.com/pliablepixels))
- Api more security [\#1196](https://github.com/ZoneMinder/ZoneMinder/pull/1196) ([pliablepixels](https://github.com/pliablepixels))
- Documentation [\#1194](https://github.com/ZoneMinder/ZoneMinder/pull/1194) ([pliablepixels](https://github.com/pliablepixels))
- Documentation updated for ubuntu [\#1193](https://github.com/ZoneMinder/ZoneMinder/pull/1193) ([pliablepixels](https://github.com/pliablepixels))
- Fixes \#1179 Libvlc Live555 Segmentation Fault [\#1190](https://github.com/ZoneMinder/ZoneMinder/pull/1190) ([SteveGilvarry](https://github.com/SteveGilvarry))
- Add code to detect the change in REALM from older to newer firmware [\#1184](https://github.com/ZoneMinder/ZoneMinder/pull/1184) ([connortechnology](https://github.com/connortechnology))
- add a 1/8th scale option, which is useful for 1920x1080 streams [\#1182](https://github.com/ZoneMinder/ZoneMinder/pull/1182) ([connortechnology](https://github.com/connortechnology))
- Zms socket lock [\#1180](https://github.com/ZoneMinder/ZoneMinder/pull/1180) ([connortechnology](https://github.com/connortechnology))
- Check for the presence of CrudControllerTrait.php instead of .git [\#1178](https://github.com/ZoneMinder/ZoneMinder/pull/1178) ([knnniggett](https://github.com/knnniggett))
- Partial fix for \#1167 [\#1176](https://github.com/ZoneMinder/ZoneMinder/pull/1176) ([SteveGilvarry](https://github.com/SteveGilvarry))
- Error on missing submodules [\#1173](https://github.com/ZoneMinder/ZoneMinder/pull/1173) ([knnniggett](https://github.com/knnniggett))
- fix mem alloc fault in zm\_monitor.cpp [\#1168](https://github.com/ZoneMinder/ZoneMinder/pull/1168) ([knnniggett](https://github.com/knnniggett))
- compat for php 5.4 [\#1164](https://github.com/ZoneMinder/ZoneMinder/pull/1164) ([abishai](https://github.com/abishai))
- remove comment at end of line [\#1157](https://github.com/ZoneMinder/ZoneMinder/pull/1157) ([connortechnology](https://github.com/connortechnology))
- Reorder RTSPDescribe to avoid -wreorder warnings [\#1147](https://github.com/ZoneMinder/ZoneMinder/pull/1147) ([SteveGilvarry](https://github.com/SteveGilvarry))
- Update to \#1137 for backward compatibility. [\#1142](https://github.com/ZoneMinder/ZoneMinder/pull/1142) ([SteveGilvarry](https://github.com/SteveGilvarry))
- Update Travis to ffmpeg 2.8.1 for testing [\#1139](https://github.com/ZoneMinder/ZoneMinder/pull/1139) ([SteveGilvarry](https://github.com/SteveGilvarry))
- Replace deprecated FFmpeg API [\#1137](https://github.com/ZoneMinder/ZoneMinder/pull/1137) ([onlyjob](https://github.com/onlyjob))
- added prev/next event ids [\#1136](https://github.com/ZoneMinder/ZoneMinder/pull/1136) ([pliablepixels](https://github.com/pliablepixels))
- Install nph-zms with FILES so it is listed in install\_manifest.txt [\#1124](https://github.com/ZoneMinder/ZoneMinder/pull/1124) ([baffo32](https://github.com/baffo32))
- Stray semicolon causes SQL error [\#1123](https://github.com/ZoneMinder/ZoneMinder/pull/1123) ([baffo32](https://github.com/baffo32))
- Use relative URL's instead of absolute [\#1121](https://github.com/ZoneMinder/ZoneMinder/pull/1121) ([knnniggett](https://github.com/knnniggett))
- Update version check URL [\#1120](https://github.com/ZoneMinder/ZoneMinder/pull/1120) ([kylejohnson](https://github.com/kylejohnson))
- Add index to frames [\#1116](https://github.com/ZoneMinder/ZoneMinder/pull/1116) ([kylejohnson](https://github.com/kylejohnson))
- Fatal if content dirs are unwritable [\#1113](https://github.com/ZoneMinder/ZoneMinder/pull/1113) ([baffo32](https://github.com/baffo32))
- Fatal error if date.timezone is unset [\#1111](https://github.com/ZoneMinder/ZoneMinder/pull/1111) ([baffo32](https://github.com/baffo32))
- Fix faulty zm.conf.new install line [\#1107](https://github.com/ZoneMinder/ZoneMinder/pull/1107) ([baffo32](https://github.com/baffo32))
- Update preinst [\#1103](https://github.com/ZoneMinder/ZoneMinder/pull/1103) ([seebaer1976](https://github.com/seebaer1976))
- Update apache.conf [\#1102](https://github.com/ZoneMinder/ZoneMinder/pull/1102) ([seebaer1976](https://github.com/seebaer1976))
- Update rules [\#1101](https://github.com/ZoneMinder/ZoneMinder/pull/1101) ([seebaer1976](https://github.com/seebaer1976))
- Update links [\#1100](https://github.com/ZoneMinder/ZoneMinder/pull/1100) ([seebaer1976](https://github.com/seebaer1976))
- Update preinst [\#1099](https://github.com/ZoneMinder/ZoneMinder/pull/1099) ([seebaer1976](https://github.com/seebaer1976))
- Fix zmaudit [\#1095](https://github.com/ZoneMinder/ZoneMinder/pull/1095) ([connortechnology](https://github.com/connortechnology))
- fixed version compare logic [\#1094](https://github.com/ZoneMinder/ZoneMinder/pull/1094) ([pliablepixels](https://github.com/pliablepixels))
- Don't install zm.conf if it already exists [\#1090](https://github.com/ZoneMinder/ZoneMinder/pull/1090) ([connortechnology](https://github.com/connortechnology))
- change types and move things around to remove compile warnings [\#1089](https://github.com/ZoneMinder/ZoneMinder/pull/1089) ([connortechnology](https://github.com/connortechnology))
- Tz [\#1084](https://github.com/ZoneMinder/ZoneMinder/pull/1084) ([connortechnology](https://github.com/connortechnology))
- fixed orange display for monitor mode [\#1083](https://github.com/ZoneMinder/ZoneMinder/pull/1083) ([pliablepixels](https://github.com/pliablepixels))
- use deleteAll\(\) vs. delete\(\) when deleting an Event's Frames [\#1080](https://github.com/ZoneMinder/ZoneMinder/pull/1080) ([kylejohnson](https://github.com/kylejohnson))
- Added control script for SunEyes SP-P1802SWPTZ [\#1079](https://github.com/ZoneMinder/ZoneMinder/pull/1079) ([bofhdk](https://github.com/bofhdk))
- Use the 3.0 branch of crud, compatible with cakephp 2.x [\#1078](https://github.com/ZoneMinder/ZoneMinder/pull/1078) ([kylejohnson](https://github.com/kylejohnson))
- 663 frames primary key [\#1075](https://github.com/ZoneMinder/ZoneMinder/pull/1075) ([kylejohnson](https://github.com/kylejohnson))
- Delete fixes for Events [\#1073](https://github.com/ZoneMinder/ZoneMinder/pull/1073) ([pliablepixels](https://github.com/pliablepixels))
- restart monitor when edited via APIs [\#1070](https://github.com/ZoneMinder/ZoneMinder/pull/1070) ([pliablepixels](https://github.com/pliablepixels))
- add debug statements for when LastWriteTime is not defined. [\#1067](https://github.com/ZoneMinder/ZoneMinder/pull/1067) ([connortechnology](https://github.com/connortechnology))
- fixed recaptcha showing up pre DB update [\#1066](https://github.com/ZoneMinder/ZoneMinder/pull/1066) ([pliablepixels](https://github.com/pliablepixels))
- fixed security instructions for curl [\#1062](https://github.com/ZoneMinder/ZoneMinder/pull/1062) ([pliablepixels](https://github.com/pliablepixels))
- header typo corrections [\#1058](https://github.com/ZoneMinder/ZoneMinder/pull/1058) ([onlyjob](https://github.com/onlyjob))
- quick fix for \#1055: make sure our mmap fd is \> 2 [\#1057](https://github.com/ZoneMinder/ZoneMinder/pull/1057) ([connortechnology](https://github.com/connortechnology))
- Fix sgfault caused by the privacy mask stuff [\#1056](https://github.com/ZoneMinder/ZoneMinder/pull/1056) ([connortechnology](https://github.com/connortechnology))
- link to cambozola package, rather than download during build [\#1054](https://github.com/ZoneMinder/ZoneMinder/pull/1054) ([knnniggett](https://github.com/knnniggett))
- redhat rpm packaging modifications [\#1052](https://github.com/ZoneMinder/ZoneMinder/pull/1052) ([knnniggett](https://github.com/knnniggett))
- remove core.php, modify core.php.default [\#1049](https://github.com/ZoneMinder/ZoneMinder/pull/1049) ([knnniggett](https://github.com/knnniggett))
- Google recaptcha [\#1048](https://github.com/ZoneMinder/ZoneMinder/pull/1048) ([pliablepixels](https://github.com/pliablepixels))
- enable/disable RTSP Describe Header [\#1045](https://github.com/ZoneMinder/ZoneMinder/pull/1045) ([knnniggett](https://github.com/knnniggett))
- Add Documentation for Privacy zones [\#1044](https://github.com/ZoneMinder/ZoneMinder/pull/1044) ([schrorg](https://github.com/schrorg))
- added note about potential Perl and PHP time translation conflict wit… [\#1043](https://github.com/ZoneMinder/ZoneMinder/pull/1043) ([pliablepixels](https://github.com/pliablepixels))
- Multi server [\#1040](https://github.com/ZoneMinder/ZoneMinder/pull/1040) ([connortechnology](https://github.com/connortechnology))
- 1038 fixing state mgmt 1030 is active fix [\#1039](https://github.com/ZoneMinder/ZoneMinder/pull/1039) ([pliablepixels](https://github.com/pliablepixels))
- Grey color for disabled buttons [\#1037](https://github.com/ZoneMinder/ZoneMinder/pull/1037) ([pliablepixels](https://github.com/pliablepixels))
- Update filterevents.rst [\#1035](https://github.com/ZoneMinder/ZoneMinder/pull/1035) ([tikismoke](https://github.com/tikismoke))
- add warning and help text for maxfps fields [\#1033](https://github.com/ZoneMinder/ZoneMinder/pull/1033) ([knnniggett](https://github.com/knnniggett))
- update doc [\#1032](https://github.com/ZoneMinder/ZoneMinder/pull/1032) ([tikismoke](https://github.com/tikismoke))
- Remove full path from Logger filename [\#1029](https://github.com/ZoneMinder/ZoneMinder/pull/1029) ([knnniggett](https://github.com/knnniggett))
- Typo in README.md [\#1027](https://github.com/ZoneMinder/ZoneMinder/pull/1027) ([tikismoke](https://github.com/tikismoke))
- Add new zone type - privacy zones [\#1026](https://github.com/ZoneMinder/ZoneMinder/pull/1026) ([schrorg](https://github.com/schrorg))
- Send login activity to the zoneminder event log [\#1021](https://github.com/ZoneMinder/ZoneMinder/pull/1021) ([knnniggett](https://github.com/knnniggett))
- Small dark CSS fixes in frames and timeline view [\#1019](https://github.com/ZoneMinder/ZoneMinder/pull/1019) ([schrorg](https://github.com/schrorg))
- New User Permission "Groups" [\#1018](https://github.com/ZoneMinder/ZoneMinder/pull/1018) ([knnniggett](https://github.com/knnniggett))
- 1013 document migration [\#1017](https://github.com/ZoneMinder/ZoneMinder/pull/1017) ([pliablepixels](https://github.com/pliablepixels))
- Fix issue with score values less than 0 [\#1016](https://github.com/ZoneMinder/ZoneMinder/pull/1016) ([knnniggett](https://github.com/knnniggett))
- Explained a caveat with using relative times [\#1012](https://github.com/ZoneMinder/ZoneMinder/pull/1012) ([pliablepixels](https://github.com/pliablepixels))
- Included logic to not enforce authentication in API layer if ZM auth is off [\#1008](https://github.com/ZoneMinder/ZoneMinder/pull/1008) ([pliablepixels](https://github.com/pliablepixels))
- Update to ffmpeg 2.7.2 in travis build [\#1007](https://github.com/ZoneMinder/ZoneMinder/pull/1007) ([SteveGilvarry](https://github.com/SteveGilvarry))
- I was using the wrong field to check for portal authentication [\#1006](https://github.com/ZoneMinder/ZoneMinder/pull/1006) ([pliablepixels](https://github.com/pliablepixels))
- Demote user auth info message to debug [\#1003](https://github.com/ZoneMinder/ZoneMinder/pull/1003) ([Linwood-F](https://github.com/Linwood-F))
- Add scale as optional feature to image.php [\#1001](https://github.com/ZoneMinder/ZoneMinder/pull/1001) ([Linwood-F](https://github.com/Linwood-F))
- 995 events count per api \(bumps up \# of events reported per API call\) [\#996](https://github.com/ZoneMinder/ZoneMinder/pull/996) ([pliablepixels](https://github.com/pliablepixels))
- APIs will be served only if user is logged into the ZM portal [\#994](https://github.com/ZoneMinder/ZoneMinder/pull/994) ([pliablepixels](https://github.com/pliablepixels))
- Add option to make TimeStamp larger [\#992](https://github.com/ZoneMinder/ZoneMinder/pull/992) ([schrorg](https://github.com/schrorg))
- Implemented \#989 \(highlight current row in tables\) for dark CSS [\#990](https://github.com/ZoneMinder/ZoneMinder/pull/990) ([schrorg](https://github.com/schrorg))
- CSS\[skins/classic\]: highlight current row in tables. [\#989](https://github.com/ZoneMinder/ZoneMinder/pull/989) ([onlyjob](https://github.com/onlyjob))
- quiet error when no Servers in Servers table [\#986](https://github.com/ZoneMinder/ZoneMinder/pull/986) ([connortechnology](https://github.com/connortechnology))
- fix \#948 1 [\#985](https://github.com/ZoneMinder/ZoneMinder/pull/985) ([connortechnology](https://github.com/connortechnology))
- Remove shared data warning for purpose query only [\#984](https://github.com/ZoneMinder/ZoneMinder/pull/984) ([Linwood-F](https://github.com/Linwood-F))
- Change from info to debug [\#983](https://github.com/ZoneMinder/ZoneMinder/pull/983) ([Linwood-F](https://github.com/Linwood-F))
- Fix image dimensions check [\#980](https://github.com/ZoneMinder/ZoneMinder/pull/980) ([connortechnology](https://github.com/connortechnology))
- Apache.conf modifications [\#968](https://github.com/ZoneMinder/ZoneMinder/pull/968) ([SteveGilvarry](https://github.com/SteveGilvarry))
- Dark CSS for classic theme [\#967](https://github.com/ZoneMinder/ZoneMinder/pull/967) ([schrorg](https://github.com/schrorg))
- Auto generated changelog [\#966](https://github.com/ZoneMinder/ZoneMinder/pull/966) ([SteveGilvarry](https://github.com/SteveGilvarry))
- 959 add exif date time to images [\#962](https://github.com/ZoneMinder/ZoneMinder/pull/962) ([Linwood-F](https://github.com/Linwood-F))
- Add analysis interval parameter to monitors settings [\#956](https://github.com/ZoneMinder/ZoneMinder/pull/956) ([manupap1](https://github.com/manupap1))
- Fixed Configs API to return all values [\#955](https://github.com/ZoneMinder/ZoneMinder/pull/955) ([pliablepixels](https://github.com/pliablepixels))
- Change encoding of german language file to UTF-8 [\#952](https://github.com/ZoneMinder/ZoneMinder/pull/952) ([schrorg](https://github.com/schrorg))
- Show correct part of URL \(hostname\) for ffmpeg sources in console [\#951](https://github.com/ZoneMinder/ZoneMinder/pull/951) ([schrorg](https://github.com/schrorg))
- add php-gd to list of dependencies for debian and ubuntu builds [\#944](https://github.com/ZoneMinder/ZoneMinder/pull/944) ([connortechnology](https://github.com/connortechnology))
- rpm packaging - require php-gd [\#943](https://github.com/ZoneMinder/ZoneMinder/pull/943) ([knnniggett](https://github.com/knnniggett))
- add some utility db functions [\#942](https://github.com/ZoneMinder/ZoneMinder/pull/942) ([connortechnology](https://github.com/connortechnology))
- add space instead of + to handle old Axis cameras [\#941](https://github.com/ZoneMinder/ZoneMinder/pull/941) ([connortechnology](https://github.com/connortechnology))
- zmtrigger: POD documentation [\#938](https://github.com/ZoneMinder/ZoneMinder/pull/938) ([onlyjob](https://github.com/onlyjob))
- improve log [\#937](https://github.com/ZoneMinder/ZoneMinder/pull/937) ([connortechnology](https://github.com/connortechnology))
- add error handling on failure to open serial port [\#936](https://github.com/ZoneMinder/ZoneMinder/pull/936) ([connortechnology](https://github.com/connortechnology))
- fix utf8 ' characters [\#934](https://github.com/ZoneMinder/ZoneMinder/pull/934) ([connortechnology](https://github.com/connortechnology))
- roudn up when calculating buffer size for scaled image. Fixes \#932 [\#933](https://github.com/ZoneMinder/ZoneMinder/pull/933) ([connortechnology](https://github.com/connortechnology))
- Added API routing [\#931](https://github.com/ZoneMinder/ZoneMinder/pull/931) ([pliablepixels](https://github.com/pliablepixels))
- don't include .cpp in man [\#930](https://github.com/ZoneMinder/ZoneMinder/pull/930) ([connortechnology](https://github.com/connortechnology))
- fix pod2man generation for out-of-source builds [\#928](https://github.com/ZoneMinder/ZoneMinder/pull/928) ([knnniggett](https://github.com/knnniggett))
- Version to 1.28.99 [\#926](https://github.com/ZoneMinder/ZoneMinder/pull/926) ([connortechnology](https://github.com/connortechnology))
- Introduce a read\_into function in the Buffer. [\#923](https://github.com/ZoneMinder/ZoneMinder/pull/923) ([connortechnology](https://github.com/connortechnology))
- Added "RewriteBase /zm/api" for API routing [\#921](https://github.com/ZoneMinder/ZoneMinder/pull/921) ([pliablepixels](https://github.com/pliablepixels))
- Zms no crash [\#920](https://github.com/ZoneMinder/ZoneMinder/pull/920) ([connortechnology](https://github.com/connortechnology))
- add check for gettime in librt, needed for building on pi [\#919](https://github.com/ZoneMinder/ZoneMinder/pull/919) ([connortechnology](https://github.com/connortechnology))
- Add ServerId to Monitors [\#918](https://github.com/ZoneMinder/ZoneMinder/pull/918) ([connortechnology](https://github.com/connortechnology))
- Dumb down Crud from 4.0 -\> 3.0.10 [\#915](https://github.com/ZoneMinder/ZoneMinder/pull/915) ([knnniggett](https://github.com/knnniggett))
- Add Servers Table and add Id PRIMARY KEY to States [\#910](https://github.com/ZoneMinder/ZoneMinder/pull/910) ([connortechnology](https://github.com/connortechnology))
- fix montage view issue in mobile skin [\#909](https://github.com/ZoneMinder/ZoneMinder/pull/909) ([knnniggett](https://github.com/knnniggett))
- Solaris cmake [\#906](https://github.com/ZoneMinder/ZoneMinder/pull/906) ([knnniggett](https://github.com/knnniggett))
- Fix el7 build [\#902](https://github.com/ZoneMinder/ZoneMinder/pull/902) ([bill-mcgonigle](https://github.com/bill-mcgonigle))
- 898 is running states [\#899](https://github.com/ZoneMinder/ZoneMinder/pull/899) ([pliablepixels](https://github.com/pliablepixels))
- Fixed events API to remove thumbnail code [\#897](https://github.com/ZoneMinder/ZoneMinder/pull/897) ([pliablepixels](https://github.com/pliablepixels))
- Generate man pages for perl scripts & C Binaries in the bin folder [\#896](https://github.com/ZoneMinder/ZoneMinder/pull/896) ([knnniggett](https://github.com/knnniggett))
- 893 foscam 9831 w and other foscams [\#895](https://github.com/ZoneMinder/ZoneMinder/pull/895) ([pliablepixels](https://github.com/pliablepixels))
- 893 foscam 9831 w and other foscams [\#894](https://github.com/ZoneMinder/ZoneMinder/pull/894) ([pliablepixels](https://github.com/pliablepixels))
- Zmwatch cleanup2 [\#891](https://github.com/ZoneMinder/ZoneMinder/pull/891) ([connortechnology](https://github.com/connortechnology))
- reverse the if statement to reduce indenting [\#890](https://github.com/ZoneMinder/ZoneMinder/pull/890) ([connortechnology](https://github.com/connortechnology))
- Updated API document [\#886](https://github.com/ZoneMinder/ZoneMinder/pull/886) ([pliablepixels](https://github.com/pliablepixels))
- Use avconv as alternative to ffmpeg executable [\#884](https://github.com/ZoneMinder/ZoneMinder/pull/884) ([SteveGilvarry](https://github.com/SteveGilvarry))
- 881 bootstrap loading config [\#883](https://github.com/ZoneMinder/ZoneMinder/pull/883) ([pliablepixels](https://github.com/pliablepixels))
- Merged Angular UI branch API to master [\#882](https://github.com/ZoneMinder/ZoneMinder/pull/882) ([pliablepixels](https://github.com/pliablepixels))
- Add version to the startup log line [\#875](https://github.com/ZoneMinder/ZoneMinder/pull/875) ([connortechnology](https://github.com/connortechnology))
- German translation update [\#874](https://github.com/ZoneMinder/ZoneMinder/pull/874) ([seeebek](https://github.com/seeebek))
- reduce the wait to 2/10ths instead of a whole second [\#873](https://github.com/ZoneMinder/ZoneMinder/pull/873) ([connortechnology](https://github.com/connortechnology))
- alter the logic of ReadData. New behaviour is documented. [\#870](https://github.com/ZoneMinder/ZoneMinder/pull/870) ([connortechnology](https://github.com/connortechnology))
- analysis optimisations [\#867](https://github.com/ZoneMinder/ZoneMinder/pull/867) ([connortechnology](https://github.com/connortechnology))
- Don't die if db goes away during logging [\#866](https://github.com/ZoneMinder/ZoneMinder/pull/866) ([connortechnology](https://github.com/connortechnology))
- Move iostream inclusion in zm.h and declare explicitly the namespace [\#859](https://github.com/ZoneMinder/ZoneMinder/pull/859) ([manupap1](https://github.com/manupap1))
- Fix detection of deprecated libav / ffmpeg functions [\#858](https://github.com/ZoneMinder/ZoneMinder/pull/858) ([manupap1](https://github.com/manupap1))
- Correct bareword config entries with newer {} style [\#856](https://github.com/ZoneMinder/ZoneMinder/pull/856) ([connortechnology](https://github.com/connortechnology))
- update german translation [\#854](https://github.com/ZoneMinder/ZoneMinder/pull/854) ([seeebek](https://github.com/seeebek))
- ubuntu 15.04 [\#850](https://github.com/ZoneMinder/ZoneMinder/pull/850) ([seeebek](https://github.com/seeebek))
- faster shutdown [\#847](https://github.com/ZoneMinder/ZoneMinder/pull/847) ([connortechnology](https://github.com/connortechnology))
- Additional SLANG changes [\#845](https://github.com/ZoneMinder/ZoneMinder/pull/845) ([knnniggett](https://github.com/knnniggett))
- Cmake hostos [\#844](https://github.com/ZoneMinder/ZoneMinder/pull/844) ([knnniggett](https://github.com/knnniggett))
- Port to OmniOS/Solaris [\#842](https://github.com/ZoneMinder/ZoneMinder/pull/842) ([whorfin](https://github.com/whorfin))
- Zmaudit update1: Make MIN\_AGE Configurable [\#838](https://github.com/ZoneMinder/ZoneMinder/pull/838) ([connortechnology](https://github.com/connortechnology))
- Update to FI982821W\_Y2k [\#836](https://github.com/ZoneMinder/ZoneMinder/pull/836) ([connortechnology](https://github.com/connortechnology))
- add translate function [\#833](https://github.com/ZoneMinder/ZoneMinder/pull/833) ([knnniggett](https://github.com/knnniggett))
- Separate css window sizes [\#829](https://github.com/ZoneMinder/ZoneMinder/pull/829) ([connortechnology](https://github.com/connortechnology))
- Fix fast forward/reverse in event playback \(\#688\) [\#825](https://github.com/ZoneMinder/ZoneMinder/pull/825) ([rwg0](https://github.com/rwg0))
- Fix: typo in options\_libvlc [\#824](https://github.com/ZoneMinder/ZoneMinder/pull/824) ([Lihis](https://github.com/Lihis))
- close the session before requiring the page contents to fix the concurre... [\#823](https://github.com/ZoneMinder/ZoneMinder/pull/823) ([connortechnology](https://github.com/connortechnology))
- Fix build issues on kFreeBSD. Fixes \#771 [\#822](https://github.com/ZoneMinder/ZoneMinder/pull/822) ([connortechnology](https://github.com/connortechnology))
- beautifying \*.pm [\#821](https://github.com/ZoneMinder/ZoneMinder/pull/821) ([onlyjob](https://github.com/onlyjob))
- Remove hardcoded localized strings in php files and update lang files [\#820](https://github.com/ZoneMinder/ZoneMinder/pull/820) ([manupap1](https://github.com/manupap1))
- Fix french lang file [\#818](https://github.com/ZoneMinder/ZoneMinder/pull/818) ([manupap1](https://github.com/manupap1))
- more perlcritic/PBP corrections [\#816](https://github.com/ZoneMinder/ZoneMinder/pull/816) ([onlyjob](https://github.com/onlyjob))
- last batch of POD and readability conversions for \*.pl scripts [\#815](https://github.com/ZoneMinder/ZoneMinder/pull/815) ([onlyjob](https://github.com/onlyjob))
- Fixes \#760 in part Clean up CMakeLists.txt [\#812](https://github.com/ZoneMinder/ZoneMinder/pull/812) ([SteveGilvarry](https://github.com/SteveGilvarry))
- upgrade bundled jQuery \(Closes: \#785\) [\#809](https://github.com/ZoneMinder/ZoneMinder/pull/809) ([onlyjob](https://github.com/onlyjob))
- Update Mootools [\#803](https://github.com/ZoneMinder/ZoneMinder/pull/803) ([knnniggett](https://github.com/knnniggett))
- hide USE\_DEEP\_STORAGE [\#802](https://github.com/ZoneMinder/ZoneMinder/pull/802) ([knnniggett](https://github.com/knnniggett))
- link zms to nph-zms, rather than build identical [\#801](https://github.com/ZoneMinder/ZoneMinder/pull/801) ([knnniggett](https://github.com/knnniggett))
- \* use pthread\_join instead of pthread\_tryjoin\_np [\#800](https://github.com/ZoneMinder/ZoneMinder/pull/800) ([Sune1337](https://github.com/Sune1337))
- zmcontrol.pl, zmfilter.pl: pod2usage + readability improvements. [\#798](https://github.com/ZoneMinder/ZoneMinder/pull/798) ([onlyjob](https://github.com/onlyjob))
- one small fix for a log line where the 4th parameter wasn't included. T... [\#796](https://github.com/ZoneMinder/ZoneMinder/pull/796) ([connortechnology](https://github.com/connortechnology))
- zmaudit.pl, zmcamtool.pl: pod2usage, PBP/5 + readability [\#795](https://github.com/ZoneMinder/ZoneMinder/pull/795) ([onlyjob](https://github.com/onlyjob))
- as discussed... [\#794](https://github.com/ZoneMinder/ZoneMinder/pull/794) ([onlyjob](https://github.com/onlyjob))
- Leftover short open tags [\#793](https://github.com/ZoneMinder/ZoneMinder/pull/793) ([SteveGilvarry](https://github.com/SteveGilvarry))
- cmake - use perl INSTALLDIRS [\#792](https://github.com/ZoneMinder/ZoneMinder/pull/792) ([knnniggett](https://github.com/knnniggett))
- \#783 - related corrections [\#791](https://github.com/ZoneMinder/ZoneMinder/pull/791) ([onlyjob](https://github.com/onlyjob))
- skins/classic: fix HTML export with USE\_DEEP\_STORAGE \(Closes: \#506\). [\#782](https://github.com/ZoneMinder/ZoneMinder/pull/782) ([onlyjob](https://github.com/onlyjob))
- Check for libv4l1-videodev headers [\#781](https://github.com/ZoneMinder/ZoneMinder/pull/781) ([knnniggett](https://github.com/knnniggett))
- build: add PATH\_MAX definitions \(needed on GNU Hurd\) [\#778](https://github.com/ZoneMinder/ZoneMinder/pull/778) ([onlyjob](https://github.com/onlyjob))
- Freebsd fixes [\#775](https://github.com/ZoneMinder/ZoneMinder/pull/775) ([connortechnology](https://github.com/connortechnology))
- Use tmpfiles.d to manage tmpdir and sockdir [\#774](https://github.com/ZoneMinder/ZoneMinder/pull/774) ([knnniggett](https://github.com/knnniggett))
- Don't trigger linked cameras on new events [\#772](https://github.com/ZoneMinder/ZoneMinder/pull/772) ([balr0g](https://github.com/balr0g))
- POD: zmupdate.pl converted to "pod2usage" [\#763](https://github.com/ZoneMinder/ZoneMinder/pull/763) ([onlyjob](https://github.com/onlyjob))
- build: fix FTBFS with format-hardening \(please review\) [\#761](https://github.com/ZoneMinder/ZoneMinder/pull/761) ([onlyjob](https://github.com/onlyjob))
- fixing POD errors [\#759](https://github.com/ZoneMinder/ZoneMinder/pull/759) ([onlyjob](https://github.com/onlyjob))
- Ignore autogenerated files in git [\#746](https://github.com/ZoneMinder/ZoneMinder/pull/746) ([manupap1](https://github.com/manupap1))
- when auth is needed, try command again before dying. [\#739](https://github.com/ZoneMinder/ZoneMinder/pull/739) ([connortechnology](https://github.com/connortechnology))
- remove NETPBM dependency from autotools [\#737](https://github.com/ZoneMinder/ZoneMinder/pull/737) ([knnniggett](https://github.com/knnniggett))
- fix extra slash when adding trackurl to controlurl [\#732](https://github.com/ZoneMinder/ZoneMinder/pull/732) ([connortechnology](https://github.com/connortechnology))
- Fix image and css import paths for style/skin named "flat" [\#730](https://github.com/ZoneMinder/ZoneMinder/pull/730) ([ljack](https://github.com/ljack))
- Update control.css [\#729](https://github.com/ZoneMinder/ZoneMinder/pull/729) ([ljack](https://github.com/ljack))
- Fix event view [\#728](https://github.com/ZoneMinder/ZoneMinder/pull/728) ([connortechnology](https://github.com/connortechnology))
- User selectable arp tool [\#723](https://github.com/ZoneMinder/ZoneMinder/pull/723) ([knnniggett](https://github.com/knnniggett))
- remove unneeded files [\#722](https://github.com/ZoneMinder/ZoneMinder/pull/722) ([knnniggett](https://github.com/knnniggett))
- add onvif ptz control into update script [\#721](https://github.com/ZoneMinder/ZoneMinder/pull/721) ([knnniggett](https://github.com/knnniggett))
- Don't show ONVIf probe link when ONVIF support is not enabled [\#720](https://github.com/ZoneMinder/ZoneMinder/pull/720) ([knnniggett](https://github.com/knnniggett))
- Allow zm to build w/o ffmpeg [\#719](https://github.com/ZoneMinder/ZoneMinder/pull/719) ([knnniggett](https://github.com/knnniggett))
- Removed el6 from endif arguments [\#718](https://github.com/ZoneMinder/ZoneMinder/pull/718) ([SteveGilvarry](https://github.com/SteveGilvarry))
- Update fr\_fr.php [\#714](https://github.com/ZoneMinder/ZoneMinder/pull/714) ([Jypy](https://github.com/Jypy))
- Check to make sure that skin and css are valid. [\#713](https://github.com/ZoneMinder/ZoneMinder/pull/713) ([connortechnology](https://github.com/connortechnology))
- Fixes \#710 Added libavformat version check around free context functions [\#711](https://github.com/ZoneMinder/ZoneMinder/pull/711) ([SteveGilvarry](https://github.com/SteveGilvarry))
- try harder to find arp. [\#709](https://github.com/ZoneMinder/ZoneMinder/pull/709) ([connortechnology](https://github.com/connortechnology))
- Make el6 and el7 build process a little more automated [\#704](https://github.com/ZoneMinder/ZoneMinder/pull/704) ([clipo1979](https://github.com/clipo1979))
- small improvements: [\#702](https://github.com/ZoneMinder/ZoneMinder/pull/702) ([connortechnology](https://github.com/connortechnology))
- Centos 7 rpm packaging [\#700](https://github.com/ZoneMinder/ZoneMinder/pull/700) ([knnniggett](https://github.com/knnniggett))
- tmpfile.conf for systemd [\#699](https://github.com/ZoneMinder/ZoneMinder/pull/699) ([clipo1979](https://github.com/clipo1979))
- Improve delete event [\#696](https://github.com/ZoneMinder/ZoneMinder/pull/696) ([connortechnology](https://github.com/connortechnology))
- process RTSP DESCRIBE response header [\#687](https://github.com/ZoneMinder/ZoneMinder/pull/687) ([knnniggett](https://github.com/knnniggett))
## [v1.28.1](https://github.com/ZoneMinder/ZoneMinder/tree/v1.28.1) (2015-02-05)
[Full Changelog](https://github.com/ZoneMinder/ZoneMinder/compare/v1.28.0...v1.28.1)
**Merged pull requests:**
- fix content-type parsing when there are options on it [\#692](https://github.com/ZoneMinder/ZoneMinder/pull/692) ([connortechnology](https://github.com/connortechnology))
- this fixes Digest Auth for the mjpeg stream on a TV-IP302PI [\#691](https://github.com/ZoneMinder/ZoneMinder/pull/691) ([connortechnology](https://github.com/connortechnology))
- small performance improvement when streaming. [\#675](https://github.com/ZoneMinder/ZoneMinder/pull/675) ([connortechnology](https://github.com/connortechnology))
- Kill zmcontrol [\#666](https://github.com/ZoneMinder/ZoneMinder/pull/666) ([connortechnology](https://github.com/connortechnology))
- Don't fail if an unexpected rtp packet type is received [\#665](https://github.com/ZoneMinder/ZoneMinder/pull/665) ([knnniggett](https://github.com/knnniggett))
- Versions command line args [\#664](https://github.com/ZoneMinder/ZoneMinder/pull/664) ([connortechnology](https://github.com/connortechnology))
- Update et\_ee.php [\#662](https://github.com/ZoneMinder/ZoneMinder/pull/662) ([hanzese](https://github.com/hanzese))
- \#658 Fix error message for finding arp path [\#660](https://github.com/ZoneMinder/ZoneMinder/pull/660) ([SteveGilvarry](https://github.com/SteveGilvarry))
- Make the log export use ZM\_PATH\_SWAP and report the full path on error [\#657](https://github.com/ZoneMinder/ZoneMinder/pull/657) ([connortechnology](https://github.com/connortechnology))
- replace getLoad\(\) / getDiskPercent\(\) with PHP native functions [\#654](https://github.com/ZoneMinder/ZoneMinder/pull/654) ([lifeofguenter](https://github.com/lifeofguenter))
- Modified zmfilter.pl.in to fix \#652, crashing while processing backgroun... [\#653](https://github.com/ZoneMinder/ZoneMinder/pull/653) ([thebostik](https://github.com/thebostik))
- Remove no longer needed patch because applied to master [\#651](https://github.com/ZoneMinder/ZoneMinder/pull/651) ([manupap1](https://github.com/manupap1))
- Don't check for zmdc.pl when stopping via systemd [\#647](https://github.com/ZoneMinder/ZoneMinder/pull/647) ([ariscop](https://github.com/ariscop))
- Split the debian package into several packages [\#646](https://github.com/ZoneMinder/ZoneMinder/pull/646) ([manupap1](https://github.com/manupap1))
- Skin css default [\#645](https://github.com/ZoneMinder/ZoneMinder/pull/645) ([connortechnology](https://github.com/connortechnology))
- Offer login prompt instead of throwing error [\#640](https://github.com/ZoneMinder/ZoneMinder/pull/640) ([jrd288](https://github.com/jrd288))
- zmfilter: Send message for events that are still ongoing [\#638](https://github.com/ZoneMinder/ZoneMinder/pull/638) ([KristofRobot](https://github.com/KristofRobot))
- Some fixes to the debian folder [\#636](https://github.com/ZoneMinder/ZoneMinder/pull/636) ([manupap1](https://github.com/manupap1))
- Improve zmcontrol.pl [\#635](https://github.com/ZoneMinder/ZoneMinder/pull/635) ([connortechnology](https://github.com/connortechnology))
- Add debconf / dbconfig support to debian8 folder [\#634](https://github.com/ZoneMinder/ZoneMinder/pull/634) ([manupap1](https://github.com/manupap1))
- better fix for the view=console security flaw. [\#632](https://github.com/ZoneMinder/ZoneMinder/pull/632) ([connortechnology](https://github.com/connortechnology))
- add check to see if user has rights to view this monitor [\#631](https://github.com/ZoneMinder/ZoneMinder/pull/631) ([connortechnology](https://github.com/connortechnology))
- fix auth requirement on view=console by checking for user when AUTH is on [\#628](https://github.com/ZoneMinder/ZoneMinder/pull/628) ([connortechnology](https://github.com/connortechnology))
- Output to stderror when zmu can't read zm.conf [\#627](https://github.com/ZoneMinder/ZoneMinder/pull/627) ([knnniggett](https://github.com/knnniggett))
- Add missing dependency to policykit-1 [\#621](https://github.com/ZoneMinder/ZoneMinder/pull/621) ([manupap1](https://github.com/manupap1))
- Replace PHP Short Open Tags - Fixes \#11 [\#620](https://github.com/ZoneMinder/ZoneMinder/pull/620) ([SteveGilvarry](https://github.com/SteveGilvarry))
- Rtsp [\#615](https://github.com/ZoneMinder/ZoneMinder/pull/615) ([knnniggett](https://github.com/knnniggett))
- Merge flat css to classic [\#614](https://github.com/ZoneMinder/ZoneMinder/pull/614) ([connortechnology](https://github.com/connortechnology))
- echo the URL to the RTSP device during the OPTIONS directive [\#608](https://github.com/ZoneMinder/ZoneMinder/pull/608) ([knnniggett](https://github.com/knnniggett))
- Fix some memory leaks in zma [\#607](https://github.com/ZoneMinder/ZoneMinder/pull/607) ([manupap1](https://github.com/manupap1))
- Fix a mismatched free in zmc binary [\#606](https://github.com/ZoneMinder/ZoneMinder/pull/606) ([manupap1](https://github.com/manupap1))
- New debian folder for jessie release [\#605](https://github.com/ZoneMinder/ZoneMinder/pull/605) ([manupap1](https://github.com/manupap1))
- Css skins for classic [\#602](https://github.com/ZoneMinder/ZoneMinder/pull/602) ([connortechnology](https://github.com/connortechnology))
- Fix package dependency on debian jessie [\#596](https://github.com/ZoneMinder/ZoneMinder/pull/596) ([manupap1](https://github.com/manupap1))
- updated local\_zoneminder type extension file [\#594](https://github.com/ZoneMinder/ZoneMinder/pull/594) ([ndobbs](https://github.com/ndobbs))
- Creating options documentation fixes \#568 [\#591](https://github.com/ZoneMinder/ZoneMinder/pull/591) ([SteveGilvarry](https://github.com/SteveGilvarry))
- Convert french lang file to UTF-8 [\#589](https://github.com/ZoneMinder/ZoneMinder/pull/589) ([manupap1](https://github.com/manupap1))
- Digest auth [\#588](https://github.com/ZoneMinder/ZoneMinder/pull/588) ([connortechnology](https://github.com/connortechnology))
- Zmupdatefixes [\#584](https://github.com/ZoneMinder/ZoneMinder/pull/584) ([connortechnology](https://github.com/connortechnology))
- Update et\_ee.php [\#582](https://github.com/ZoneMinder/ZoneMinder/pull/582) ([hanzese](https://github.com/hanzese))
- Add zmeditconfigdata.sh script to source [\#577](https://github.com/ZoneMinder/ZoneMinder/pull/577) ([knnniggett](https://github.com/knnniggett))
- Close logger and database on exit [\#575](https://github.com/ZoneMinder/ZoneMinder/pull/575) ([manupap1](https://github.com/manupap1))
- Fix memory leaks with rtsp and a bug [\#574](https://github.com/ZoneMinder/ZoneMinder/pull/574) ([manupap1](https://github.com/manupap1))
- Fix a bug when closing RTSP session over TCP [\#573](https://github.com/ZoneMinder/ZoneMinder/pull/573) ([manupap1](https://github.com/manupap1))
- remove the case for level \>= 2. Since level is a bool, this code can ne... [\#572](https://github.com/ZoneMinder/ZoneMinder/pull/572) ([connortechnology](https://github.com/connortechnology))
- Add Control 3S N5071 Dome Ptz Camera [\#570](https://github.com/ZoneMinder/ZoneMinder/pull/570) ([jmcastro2014](https://github.com/jmcastro2014))
- Add the ability to specify the zm configdir at build time. [\#567](https://github.com/ZoneMinder/ZoneMinder/pull/567) ([knnniggett](https://github.com/knnniggett))
- Debian package migration to CMake and some improves with lintian help [\#565](https://github.com/ZoneMinder/ZoneMinder/pull/565) ([cosmedd](https://github.com/cosmedd))
- Use gnutls-openssl instead of gnutls to fix build with CMake. [\#564](https://github.com/ZoneMinder/ZoneMinder/pull/564) ([cosmedd](https://github.com/cosmedd))
- Use our own SSRC when sending packets on the RTP control stream [\#561](https://github.com/ZoneMinder/ZoneMinder/pull/561) ([manupap1](https://github.com/manupap1))
- Send keepalive messages if the rtsp server supports this feature [\#560](https://github.com/ZoneMinder/ZoneMinder/pull/560) ([manupap1](https://github.com/manupap1))
- Fixed bug in rtsp streaming caused by a bad string concatenation [\#557](https://github.com/ZoneMinder/ZoneMinder/pull/557) ([manupap1](https://github.com/manupap1))
- Add a stringVector join function for future use [\#556](https://github.com/ZoneMinder/ZoneMinder/pull/556) ([connortechnology](https://github.com/connortechnology))
- Fixed bug in rtsp streaming caused by a signed - unsigned conversion. [\#555](https://github.com/ZoneMinder/ZoneMinder/pull/555) ([manupap1](https://github.com/manupap1))
- Update Ubuntu install instructions [\#550](https://github.com/ZoneMinder/ZoneMinder/pull/550) ([SteveGilvarry](https://github.com/SteveGilvarry))
- Ignore more files and initial travis framework [\#544](https://github.com/ZoneMinder/ZoneMinder/pull/544) ([kylejohnson](https://github.com/kylejohnson))
- Update Travis to ffmpeg 2.4.2 [\#539](https://github.com/ZoneMinder/ZoneMinder/pull/539) ([SteveGilvarry](https://github.com/SteveGilvarry))
- Add libvlc to Travis [\#535](https://github.com/ZoneMinder/ZoneMinder/pull/535) ([knnniggett](https://github.com/knnniggett))
- 351-Rebase Attempt for ffmpeg stability fixes [\#531](https://github.com/ZoneMinder/ZoneMinder/pull/531) ([SteveGilvarry](https://github.com/SteveGilvarry))
- 478 Basic ONVIF Support [\#479](https://github.com/ZoneMinder/ZoneMinder/pull/479) ([altaroca](https://github.com/altaroca))
## [v1.28.0](https://github.com/ZoneMinder/ZoneMinder/tree/v1.28.0) (2014-10-18)
[Full Changelog](https://github.com/ZoneMinder/ZoneMinder/compare/v1.27.0...v1.28.0)
**Merged pull requests:**
- fixes ftbs with no ffmpeg support [\#530](https://github.com/ZoneMinder/ZoneMinder/pull/530) ([knnniggett](https://github.com/knnniggett))
- 498-Docker-Container-Broken [\#527](https://github.com/ZoneMinder/ZoneMinder/pull/527) ([SteveGilvarry](https://github.com/SteveGilvarry))
- Changes to handling of tmpdir & related variables [\#524](https://github.com/ZoneMinder/ZoneMinder/pull/524) ([knnniggett](https://github.com/knnniggett))
- Fixes 520 travis build ffmpeg failure [\#521](https://github.com/ZoneMinder/ZoneMinder/pull/521) ([SteveGilvarry](https://github.com/SteveGilvarry))
- full systemd support [\#502](https://github.com/ZoneMinder/ZoneMinder/pull/502) ([knnniggett](https://github.com/knnniggett))
- Minor corrections to README.OpenSuse [\#501](https://github.com/ZoneMinder/ZoneMinder/pull/501) ([PX03AFK](https://github.com/PX03AFK))
- Allow use other webservers than apache. [\#493](https://github.com/ZoneMinder/ZoneMinder/pull/493) ([cosmedd](https://github.com/cosmedd))
- Initial attempt to migrate wiki to readthedocs \#434 [\#492](https://github.com/ZoneMinder/ZoneMinder/pull/492) ([SteveGilvarry](https://github.com/SteveGilvarry))
- Update FI9821W\_Y2k.pm [\#485](https://github.com/ZoneMinder/ZoneMinder/pull/485) ([florian-asche](https://github.com/florian-asche))
- V4l to monitor [\#480](https://github.com/ZoneMinder/ZoneMinder/pull/480) ([connortechnology](https://github.com/connortechnology))
- Modified zmlinkcontent to chown and chmod content folder. Fixes \#463 [\#465](https://github.com/ZoneMinder/ZoneMinder/pull/465) ([SteveGilvarry](https://github.com/SteveGilvarry))
- Fix for shared data size conflict [\#462](https://github.com/ZoneMinder/ZoneMinder/pull/462) ([knnniggett](https://github.com/knnniggett))
- Update rules [\#459](https://github.com/ZoneMinder/ZoneMinder/pull/459) ([whopperg](https://github.com/whopperg))
- Determine full path to arp [\#458](https://github.com/ZoneMinder/ZoneMinder/pull/458) ([knnniggett](https://github.com/knnniggett))
- Fixes errors when opening Filters \(issue \#34\) [\#457](https://github.com/ZoneMinder/ZoneMinder/pull/457) ([knnniggett](https://github.com/knnniggett))
- Fixed missing $ on ARRAY\(event\[id\]\). Fixes \#455 [\#456](https://github.com/ZoneMinder/ZoneMinder/pull/456) ([SteveGilvarry](https://github.com/SteveGilvarry))
- Wrap sort order. Fixes \#450 [\#451](https://github.com/ZoneMinder/ZoneMinder/pull/451) ([SteveGilvarry](https://github.com/SteveGilvarry))
- scripts: BusyBox compatibility [\#445](https://github.com/ZoneMinder/ZoneMinder/pull/445) ([clandmeter](https://github.com/clandmeter))
- Fixed issue DateTime handling in filter queries that broke timeline view... [\#442](https://github.com/ZoneMinder/ZoneMinder/pull/442) ([Tim-Craig](https://github.com/Tim-Craig))
- Cleaning up the Contribution section of the README [\#440](https://github.com/ZoneMinder/ZoneMinder/pull/440) ([kylejohnson](https://github.com/kylejohnson))
- Add Bountysource badge to README [\#438](https://github.com/ZoneMinder/ZoneMinder/pull/438) ([bountysource-support](https://github.com/bountysource-support))
- Add new colums to zm\_create.sql.in [\#426](https://github.com/ZoneMinder/ZoneMinder/pull/426) ([m-bene](https://github.com/m-bene))
- Ffmpegoptions [\#421](https://github.com/ZoneMinder/ZoneMinder/pull/421) ([m-bene](https://github.com/m-bene))
- Update zm\_jpeg.cpp [\#418](https://github.com/ZoneMinder/ZoneMinder/pull/418) ([ghost](https://github.com/ghost))
- Added an FAQ for AlarmCheckMethod [\#416](https://github.com/ZoneMinder/ZoneMinder/pull/416) ([kylejohnson](https://github.com/kylejohnson))
- make skin selection persistent [\#415](https://github.com/ZoneMinder/ZoneMinder/pull/415) ([m-bene](https://github.com/m-bene))
- Added a doc for contributing to the project [\#413](https://github.com/ZoneMinder/ZoneMinder/pull/413) ([kylejohnson](https://github.com/kylejohnson))
- Update zmtrigger.pl.in [\#411](https://github.com/ZoneMinder/ZoneMinder/pull/411) ([martin67](https://github.com/martin67))
- Add the web/api folder to cmake [\#409](https://github.com/ZoneMinder/ZoneMinder/pull/409) ([mastertheknife](https://github.com/mastertheknife))
- Move API to under web dir [\#408](https://github.com/ZoneMinder/ZoneMinder/pull/408) ([kylejohnson](https://github.com/kylejohnson))
- Rtsp digest [\#407](https://github.com/ZoneMinder/ZoneMinder/pull/407) ([m-bene](https://github.com/m-bene))
- focus popup windows [\#406](https://github.com/ZoneMinder/ZoneMinder/pull/406) ([m-bene](https://github.com/m-bene))
- remove call of undefined "fixDevices" function [\#405](https://github.com/ZoneMinder/ZoneMinder/pull/405) ([m-bene](https://github.com/m-bene))
- Zms/videostream improvements [\#404](https://github.com/ZoneMinder/ZoneMinder/pull/404) ([Sune1337](https://github.com/Sune1337))
- RESTful API in CakePHP, and docs [\#403](https://github.com/ZoneMinder/ZoneMinder/pull/403) ([kylejohnson](https://github.com/kylejohnson))
- Remove SVN install from Travis CI [\#395](https://github.com/ZoneMinder/ZoneMinder/pull/395) ([hamiltont](https://github.com/hamiltont))
- Remove Subversion from prerequesite lists [\#393](https://github.com/ZoneMinder/ZoneMinder/pull/393) ([hamiltont](https://github.com/hamiltont))
- Dockerfile works properly, documentation updated [\#392](https://github.com/ZoneMinder/ZoneMinder/pull/392) ([hamiltont](https://github.com/hamiltont))
- Remove apt-get upgrade [\#390](https://github.com/ZoneMinder/ZoneMinder/pull/390) ([hamiltont](https://github.com/hamiltont))
- Update README.OpenSuse [\#389](https://github.com/ZoneMinder/ZoneMinder/pull/389) ([PX03AFK](https://github.com/PX03AFK))
- Update CMakeLists.txt [\#388](https://github.com/ZoneMinder/ZoneMinder/pull/388) ([PX03AFK](https://github.com/PX03AFK))
- Update zoneminder.cmake.OS13.spec - minor corrections [\#387](https://github.com/ZoneMinder/ZoneMinder/pull/387) ([PX03AFK](https://github.com/PX03AFK))
- fix sql error which prevents remote login from working [\#385](https://github.com/ZoneMinder/ZoneMinder/pull/385) ([maciekczwa](https://github.com/maciekczwa))
- Fix window sizes and input field sizes for flat skin [\#381](https://github.com/ZoneMinder/ZoneMinder/pull/381) ([m-bene](https://github.com/m-bene))
- Fix reload loop on switching skins [\#380](https://github.com/ZoneMinder/ZoneMinder/pull/380) ([m-bene](https://github.com/m-bene))
- Ability to skip frames in motion detection. [\#377](https://github.com/ZoneMinder/ZoneMinder/pull/377) ([Sune1337](https://github.com/Sune1337))
- same dvr controls in event as in monitor [\#375](https://github.com/ZoneMinder/ZoneMinder/pull/375) ([m-bene](https://github.com/m-bene))
- do not quote column names in parse filter [\#374](https://github.com/ZoneMinder/ZoneMinder/pull/374) ([m-bene](https://github.com/m-bene))
- Fix 'Undefined index: filter' php warnings for filter view when [\#373](https://github.com/ZoneMinder/ZoneMinder/pull/373) ([m-bene](https://github.com/m-bene))
- Reduce window size to exclude task bar area [\#371](https://github.com/ZoneMinder/ZoneMinder/pull/371) ([m-bene](https://github.com/m-bene))
- Update zoneminder.tmpfiles [\#367](https://github.com/ZoneMinder/ZoneMinder/pull/367) ([PX03AFK](https://github.com/PX03AFK))
- Update zoneminder.cmake.OS13.spec [\#362](https://github.com/ZoneMinder/ZoneMinder/pull/362) ([PX03AFK](https://github.com/PX03AFK))
- Update README.OpenSuse [\#361](https://github.com/ZoneMinder/ZoneMinder/pull/361) ([PX03AFK](https://github.com/PX03AFK))
- fix eyezm authentication issue [\#359](https://github.com/ZoneMinder/ZoneMinder/pull/359) ([knnniggett](https://github.com/knnniggett))
- Fix prev button while in gapless mode. All buttons tested and working. [\#358](https://github.com/ZoneMinder/ZoneMinder/pull/358) ([knnniggett](https://github.com/knnniggett))
- Update zmupdate.pl.in [\#353](https://github.com/ZoneMinder/ZoneMinder/pull/353) ([barjac](https://github.com/barjac))
- make curl header check case insensitive [\#352](https://github.com/ZoneMinder/ZoneMinder/pull/352) ([m-bene](https://github.com/m-bene))
- tie distro/opensuse folder into cmake build process [\#349](https://github.com/ZoneMinder/ZoneMinder/pull/349) ([knnniggett](https://github.com/knnniggett))
- Initial upload for opensuse rpm [\#348](https://github.com/ZoneMinder/ZoneMinder/pull/348) ([PX03AFK](https://github.com/PX03AFK))
- Patch for Debian bug 736516 - FTBFS on powerpc arch. [\#346](https://github.com/ZoneMinder/ZoneMinder/pull/346) ([knnniggett](https://github.com/knnniggett))
- Nagyrobi [\#342](https://github.com/ZoneMinder/ZoneMinder/pull/342) ([knnniggett](https://github.com/knnniggett))
- add feature to extend preclusive zone alarm state by x frames [\#338](https://github.com/ZoneMinder/ZoneMinder/pull/338) ([m-bene](https://github.com/m-bene))
- Support building with new libavcodec versions. [\#325](https://github.com/ZoneMinder/ZoneMinder/pull/325) ([elenril](https://github.com/elenril))
- Mysql2 pdo [\#231](https://github.com/ZoneMinder/ZoneMinder/pull/231) ([connortechnology](https://github.com/connortechnology))
## [v1.27.0](https://github.com/ZoneMinder/ZoneMinder/tree/v1.27.0) (2014-03-15)
[Full Changelog](https://github.com/ZoneMinder/ZoneMinder/compare/v1.26.5...v1.27.0)
**Merged pull requests:**
- zmcamtool.pl - import and export ptz camera controls & camera presets [\#318](https://github.com/ZoneMinder/ZoneMinder/pull/318) ([kylejohnson](https://github.com/kylejohnson))
- Example script to react to monitor alarms [\#317](https://github.com/ZoneMinder/ZoneMinder/pull/317) ([kylejohnson](https://github.com/kylejohnson))
- Change comments for many Camera subclasses [\#316](https://github.com/ZoneMinder/ZoneMinder/pull/316) ([nereocystis](https://github.com/nereocystis))
- Enable universe in the Docker container \[ci skip\] [\#310](https://github.com/ZoneMinder/ZoneMinder/pull/310) ([kylejohnson](https://github.com/kylejohnson))
- Add wget to Dockerfile prereq [\#309](https://github.com/ZoneMinder/ZoneMinder/pull/309) ([kylejohnson](https://github.com/kylejohnson))
- Add paths to flat skin in configure.ac and Makefile.am [\#308](https://github.com/ZoneMinder/ZoneMinder/pull/308) ([kylejohnson](https://github.com/kylejohnson))
- Zoneminder - flat theme. [\#303](https://github.com/ZoneMinder/ZoneMinder/pull/303) ([justinlawrence](https://github.com/justinlawrence))
- Additional compile guards to allow compilation on non-x86 archs [\#302](https://github.com/ZoneMinder/ZoneMinder/pull/302) ([pjhacnau](https://github.com/pjhacnau))
- Adding PTZ module for Toshiba IK-WB11A [\#300](https://github.com/ZoneMinder/ZoneMinder/pull/300) ([Tim-Craig](https://github.com/Tim-Craig))
- Add cURL source type [\#297](https://github.com/ZoneMinder/ZoneMinder/pull/297) ([mastertheknife](https://github.com/mastertheknife))
- glob ptz scripts under control folder [\#294](https://github.com/ZoneMinder/ZoneMinder/pull/294) ([knnniggett](https://github.com/knnniggett))
- Enclose value of the Notes attribute with quotes. [\#293](https://github.com/ZoneMinder/ZoneMinder/pull/293) ([hankintosh](https://github.com/hankintosh))
- Fix for few problems in Debian packaging [\#290](https://github.com/ZoneMinder/ZoneMinder/pull/290) ([dmak](https://github.com/dmak))
- Foscam IP cameras control script [\#289](https://github.com/ZoneMinder/ZoneMinder/pull/289) ([dmak](https://github.com/dmak))
- Specfile changes related to zmfix [\#284](https://github.com/ZoneMinder/ZoneMinder/pull/284) ([knnniggett](https://github.com/knnniggett))
- Remove references to zmfix in /distros [\#283](https://github.com/ZoneMinder/ZoneMinder/pull/283) ([nkwood](https://github.com/nkwood))
- Add zmMontageScale so montage scale is also 'saved' [\#282](https://github.com/ZoneMinder/ZoneMinder/pull/282) ([scottgrobinson](https://github.com/scottgrobinson))
- In the web/includes/functions.php there were some html formatting errors... [\#281](https://github.com/ZoneMinder/ZoneMinder/pull/281) ([martonmiklos](https://github.com/martonmiklos))
- Remove zmfix [\#280](https://github.com/ZoneMinder/ZoneMinder/pull/280) ([mastertheknife](https://github.com/mastertheknife))
- Add libVLC monitor type [\#277](https://github.com/ZoneMinder/ZoneMinder/pull/277) ([ebarnard](https://github.com/ebarnard))
- Disables non-POSIX warning when using gnu wildcard [\#276](https://github.com/ZoneMinder/ZoneMinder/pull/276) ([knnniggett](https://github.com/knnniggett))
- remove embedded jquery. \(fixes \#274\) [\#275](https://github.com/ZoneMinder/ZoneMinder/pull/275) ([kylejohnson](https://github.com/kylejohnson))
- Fixes \#313, initial commit of 'working' dockerfile [\#314](https://github.com/ZoneMinder/ZoneMinder/pull/314) ([kylejohnson](https://github.com/kylejohnson))
## [v1.26.5](https://github.com/ZoneMinder/ZoneMinder/tree/v1.26.5) (2013-12-16)
[Full Changelog](https://github.com/ZoneMinder/ZoneMinder/compare/v1.26.4...v1.26.5)
**Merged pull requests:**
- Add reference to zm\_update-1.26.5.sql in Makefile.am [\#269](https://github.com/ZoneMinder/ZoneMinder/pull/269) ([knnniggett](https://github.com/knnniggett))
- Detection Support for WansView Cams [\#268](https://github.com/ZoneMinder/ZoneMinder/pull/268) ([Phhere](https://github.com/Phhere))
- use proper DBI parameter passing to improve security [\#264](https://github.com/ZoneMinder/ZoneMinder/pull/264) ([connortechnology](https://github.com/connortechnology))
- Fix RTSP decoding errors in 1.26.4 \(addresses \#221\) [\#259](https://github.com/ZoneMinder/ZoneMinder/pull/259) ([ebarnard](https://github.com/ebarnard))
- Network Detection Support for Wansview [\#257](https://github.com/ZoneMinder/ZoneMinder/pull/257) ([Phhere](https://github.com/Phhere))
- Fix checkJsonError messages [\#256](https://github.com/ZoneMinder/ZoneMinder/pull/256) ([Phhere](https://github.com/Phhere))
- Update README.md [\#255](https://github.com/ZoneMinder/ZoneMinder/pull/255) ([zdanek](https://github.com/zdanek))
- ipv6 support [\#252](https://github.com/ZoneMinder/ZoneMinder/pull/252) ([guotie](https://github.com/guotie))
- Better inno d bupdate [\#251](https://github.com/ZoneMinder/ZoneMinder/pull/251) ([connortechnology](https://github.com/connortechnology))
- Fix shared memory errors on centos 6.4 [\#250](https://github.com/ZoneMinder/ZoneMinder/pull/250) ([insidenothing](https://github.com/insidenothing))
- Update zoneminder.service [\#246](https://github.com/ZoneMinder/ZoneMinder/pull/246) ([dtmf](https://github.com/dtmf))
- remove extra stuff that I don't think we need because we are the source. Opinions? [\#240](https://github.com/ZoneMinder/ZoneMinder/pull/240) ([connortechnology](https://github.com/connortechnology))
- Cast content\_length to signed int for error-check comparison [\#232](https://github.com/ZoneMinder/ZoneMinder/pull/232) ([josephevans](https://github.com/josephevans))
- Apply INSERTs in Event::AddFrames in batches to fix issue \#222 [\#223](https://github.com/ZoneMinder/ZoneMinder/pull/223) ([fastolfe](https://github.com/fastolfe))
- ffmpeg detection improvements [\#218](https://github.com/ZoneMinder/ZoneMinder/pull/218) ([mastertheknife](https://github.com/mastertheknife))
- ZoneMinder Dutch Translation updates by Alco \(a.k. nightcrawler\) [\#211](https://github.com/ZoneMinder/ZoneMinder/pull/211) ([kylejohnson](https://github.com/kylejohnson))
- Change Prev Button functionality [\#207](https://github.com/ZoneMinder/ZoneMinder/pull/207) ([knnniggett](https://github.com/knnniggett))
- Delete PATH\_BUILD and TIME\_BUILD from zm.conf and fix ZM\_DB\_TYPE [\#243](https://github.com/ZoneMinder/ZoneMinder/pull/243) ([mastertheknife](https://github.com/mastertheknife))
- Removeversionnumberfromzm.conf [\#242](https://github.com/ZoneMinder/ZoneMinder/pull/242) ([connortechnology](https://github.com/connortechnology))
- Add alarm reference image blend percentage option and replace the text field if fast blends are enabled [\#241](https://github.com/ZoneMinder/ZoneMinder/pull/241) ([mastertheknife](https://github.com/mastertheknife))
- Fix marker-out-of-bounds crash when defining zone points [\#233](https://github.com/ZoneMinder/ZoneMinder/pull/233) ([fastolfe](https://github.com/fastolfe))
## [v1.26.4](https://github.com/ZoneMinder/ZoneMinder/tree/v1.26.4) (2013-10-08)
[Full Changelog](https://github.com/ZoneMinder/ZoneMinder/compare/v1.26.3...v1.26.4)
**Merged pull requests:**
- Change frameserver warnings to debug level 2 [\#205](https://github.com/ZoneMinder/ZoneMinder/pull/205) ([knnniggett](https://github.com/knnniggett))
- Create pkgdatadir in make [\#203](https://github.com/ZoneMinder/ZoneMinder/pull/203) ([knnniggett](https://github.com/knnniggett))
- Signal improvements and fixes [\#201](https://github.com/ZoneMinder/ZoneMinder/pull/201) ([mastertheknife](https://github.com/mastertheknife))
- Create ZM\_PATH\_DATA and point zmupdate to ZM\_PATH\_DATA/db [\#200](https://github.com/ZoneMinder/ZoneMinder/pull/200) ([knnniggett](https://github.com/knnniggett))
- remove ${CMAKE\_CURRENT\_SOURCE\_DIR} from add\_custom\_target [\#199](https://github.com/ZoneMinder/ZoneMinder/pull/199) ([knnniggett](https://github.com/knnniggett))
- Added missing word in readme [\#194](https://github.com/ZoneMinder/ZoneMinder/pull/194) ([WDKevin](https://github.com/WDKevin))
- Add cmake to ZoneMinder [\#178](https://github.com/ZoneMinder/ZoneMinder/pull/178) ([mastertheknife](https://github.com/mastertheknife))
- Rtsp updates [\#174](https://github.com/ZoneMinder/ZoneMinder/pull/174) ([POKKAHOH](https://github.com/POKKAHOH))
- Solution for Issue \#170 [\#172](https://github.com/ZoneMinder/ZoneMinder/pull/172) ([raulcaj](https://github.com/raulcaj))
- Fixing debian build files including automated database setup [\#164](https://github.com/ZoneMinder/ZoneMinder/pull/164) ([jaydio](https://github.com/jaydio))
- Add fedora rpm development files to zoneminder source tree [\#163](https://github.com/ZoneMinder/ZoneMinder/pull/163) ([knnniggett](https://github.com/knnniggett))
- Improve Chrome browser support & log streaming events [\#162](https://github.com/ZoneMinder/ZoneMinder/pull/162) ([knnniggett](https://github.com/knnniggett))
- Can't seem to catch a break tonight. Moving debian files into correct folder [\#149](https://github.com/ZoneMinder/ZoneMinder/pull/149) ([knnniggett](https://github.com/knnniggett))
- Move debian folder under distros [\#148](https://github.com/ZoneMinder/ZoneMinder/pull/148) ([knnniggett](https://github.com/knnniggett))
- Removing the redhat folder from the root for real this time [\#141](https://github.com/ZoneMinder/ZoneMinder/pull/141) ([knnniggett](https://github.com/knnniggett))
- Redhat [\#136](https://github.com/ZoneMinder/ZoneMinder/pull/136) ([knnniggett](https://github.com/knnniggett))
- Error correction in database creation script [\#122](https://github.com/ZoneMinder/ZoneMinder/pull/122) ([dukess](https://github.com/dukess))
- Rewritten the query to allow mysql to use indexes [\#121](https://github.com/ZoneMinder/ZoneMinder/pull/121) ([rkojedzinszky](https://github.com/rkojedzinszky))
- Update zmupdate.pl.in for 1.26.3 release [\#119](https://github.com/ZoneMinder/ZoneMinder/pull/119) ([knnniggett](https://github.com/knnniggett))
## [v1.26.3](https://github.com/ZoneMinder/ZoneMinder/tree/v1.26.3) (2013-09-10)
[Full Changelog](https://github.com/ZoneMinder/ZoneMinder/compare/v1.26.2...v1.26.3)
**Merged pull requests:**
- Add 1.26.1 and 1.26.2 releases to zmupdate [\#116](https://github.com/ZoneMinder/ZoneMinder/pull/116) ([knnniggett](https://github.com/knnniggett))
## [v1.26.2](https://github.com/ZoneMinder/ZoneMinder/tree/v1.26.2) (2013-09-06)
[Full Changelog](https://github.com/ZoneMinder/ZoneMinder/compare/v1.26.1...v1.26.2)
**Merged pull requests:**
- Use GitHub repo for version check [\#111](https://github.com/ZoneMinder/ZoneMinder/pull/111) ([chriswiggins](https://github.com/chriswiggins))
## [v1.26.1](https://github.com/ZoneMinder/ZoneMinder/tree/v1.26.1) (2013-09-06)
[Full Changelog](https://github.com/ZoneMinder/ZoneMinder/compare/v1.26.0...v1.26.1)
## [v1.26.0](https://github.com/ZoneMinder/ZoneMinder/tree/v1.26.0) (2013-09-05)
[Full Changelog](https://github.com/ZoneMinder/ZoneMinder/compare/v1.26-beta.3...v1.26.0)
## [v1.26-beta.3](https://github.com/ZoneMinder/ZoneMinder/tree/v1.26-beta.3) (2013-08-28)
[Full Changelog](https://github.com/ZoneMinder/ZoneMinder/compare/v1.26-beta.2...v1.26-beta.3)
## [v1.26-beta.2](https://github.com/ZoneMinder/ZoneMinder/tree/v1.26-beta.2) (2013-08-15)
[Full Changelog](https://github.com/ZoneMinder/ZoneMinder/compare/v1.26-beta.1...v1.26-beta.2)
## [v1.26-beta.1](https://github.com/ZoneMinder/ZoneMinder/tree/v1.26-beta.1) (2013-08-13)
[Full Changelog](https://github.com/ZoneMinder/ZoneMinder/compare/v1.25...v1.26-beta.1)
## [v1.25](https://github.com/ZoneMinder/ZoneMinder/tree/v1.25) (2013-04-12)
\* *This Change Log was automatically generated by [github_changelog_generator](https://github.com/skywinder/Github-Changelog-Generator)*

889
CMakeLists.txt Normal file
View File

@ -0,0 +1,889 @@
# Main CMake file for the ZoneMinder project.
# Created by mastertheknife (Kfir Itzhak)
# For more information and installation, see the INSTALL file
#
cmake_minimum_required(VERSION 3.5.0)
project(zoneminder)
file(STRINGS "version" zoneminder_VERSION)
# make API version a minor of ZM version
set(zoneminder_API_VERSION "${zoneminder_VERSION}.1")
# Make sure the submodules are there
if(NOT EXISTS "${CMAKE_SOURCE_DIR}/web/api/app/Plugin/Crud/Lib/CrudControllerTrait.php")
message(SEND_ERROR "The git submodules are not available. Please run git submodule update --init --recursive")
endif()
# CMake does not allow out-of-source build if CMakeCache.exists
# in the source folder. Abort and notify the user
if((NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR)) AND (EXISTS "${CMAKE_SOURCE_DIR}/CMakeCache.txt"))
message(FATAL_ERROR " You are attempting to do an out-of-source build,
but a cmake cache file for an in-source build exists. Please delete
the file CMakeCache.txt from the source folder to proceed.")
endif()
# Default build type. To change the build type,
# use the CMAKE_BUILD_TYPE configuration option.
if(NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE Release CACHE STRING "Build type: Release or Debug" FORCE)
endif()
# Can assist in troubleshooting
#set(CMAKE_VERBOSE_MAKEFILE ON)
#set(CMAKE_INSTALL_ALWAYS ON)
# Default CLFAGS and CXXFLAGS:
set(CMAKE_C_FLAGS_RELEASE "-O2")
set(CMAKE_CXX_FLAGS_RELEASE "-O2")
set(CMAKE_C_FLAGS_DEBUG "-g")
set(CMAKE_CXX_FLAGS_DEBUG "-g")
set(CMAKE_C_FLAGS_OPTIMISED "-O3")
set(CMAKE_CXX_FLAGS_OPTIMISED "-O3")
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/Modules/")
include(ConfigureBaseTargets)
include(CheckPlatform)
# GCC below 6.0 doesn't support __target__("fpu=neon") attribute, required for compiling ARM Neon code, otherwise compilation fails.
# Must use -mfpu=neon compiler flag instead, but only do that for processors that support neon, otherwise strip the neon code alltogether,
# because passing -fmpu=neon is unsafe to processors that don't support neon
# Arm neon support only tested on Linux. If your arm hardware is running a non-Linux distro and is using gcc then contact us.
if(ZM_SYSTEM_PROC MATCHES "^arm")
if(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0)
exec_program(grep ARGS " neon " "/proc/cpuinfo" OUTPUT_VARIABLE neonoutput RETURN_VALUE neonresult)
if(neonresult EQUAL 0)
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -mfpu=neon")
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -mfpu=neon")
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} -mfpu=neon")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -mfpu=neon")
else()
add_definitions(-DZM_STRIP_NEON=1)
message(STATUS "ARM Neon is not available on this processor. Neon functions will be absent")
endif()
endif()
endif()
# Modules that we need:
include(GNUInstallDirs)
include(CheckIncludeFile)
include(CheckIncludeFiles)
include(CheckFunctionExists)
include(CheckPrototypeDefinition_fixed)
include(CheckTypeSize)
include(CheckStructHasMember)
include(CheckSendfile)
# Configuration options
mark_as_advanced(
FORCE ZM_EXTRA_LIBS
ZM_MYSQL_ENGINE
ZM_NO_MMAP
CMAKE_INSTALL_FULL_BINDIR
ZM_PERL_MM_PARMS
ZM_PERL_SEARCH_PATH
ZM_TARGET_DISTRO
ZM_PATH_MAP
ZM_PATH_ARP
ZM_CONFIG_DIR
ZM_CONFIG_SUBDIR
ZM_SYSTEMD
ZM_MANPAGE_DEST_PREFIX)
option(ENABLE_WERROR "Fail the build if a compiler warning is emitted" 0)
option(BUILD_TEST_SUITE "Build the test suite" 0)
option(BUILD_MAN "Build man pages" 1)
option(ASAN "DEBUGGING: Build with AddressSanitizer (ASan) support" 0)
option(TSAN "DEBUGGING: Build with ThreadSanitizer (TSan) support" 0)
if(ASAN AND TSAN)
message(FATAL_ERROR "ASAN and TSAN options are mutually exclusive")
endif()
set(ZM_RUNDIR "/var/run/zm" CACHE PATH
"Location of transient process files, default: /var/run/zm")
set(ZM_SOCKDIR "/var/run/zm" CACHE PATH
"Location of Unix domain socket files, default /var/run/zm")
set(ZM_TMPDIR "/var/tmp/zm" CACHE PATH
"Location of temporary files, default: /tmp/zm")
set(ZM_LOGDIR "/var/log/zm" CACHE PATH
"Location of generated log files, default: /var/log/zm")
set(ZM_WEBDIR "${CMAKE_INSTALL_FULL_DATADIR}/zoneminder/www" CACHE PATH
"Location of the web files, default: <prefix>/${CMAKE_INSTALL_DATADIR}/zoneminder/www")
set(ZM_CGIDIR "${CMAKE_INSTALL_FULL_LIBEXECDIR}/zoneminder/cgi-bin" CACHE PATH
"Location of the cgi-bin files, default: <prefix>/${CMAKE_INSTALL_LIBEXECDIR}/zoneminder/cgi-bin")
set(ZM_CACHEDIR "/var/cache/zoneminder" CACHE PATH
"Location of the web server cache busting files, default: /var/cache/zoneminder")
set(ZM_CONTENTDIR "/var/lib/zoneminder" CACHE PATH
"Location of dynamic content (events and images), default: /var/lib/zoneminder")
set(ZM_FONTDIR "${CMAKE_INSTALL_FULL_DATADIR}/zoneminder/fonts" CACHE PATH
"Location of the font files used for timestamping, default: <prefix>/${CMAKE_INSTALL_DATADIR}/zoneminder/fonts")
set(ZM_DB_HOST "localhost" CACHE STRING
"Hostname where ZoneMinder database located, default: localhost")
set(ZM_DB_NAME "zm" CACHE STRING
"Name of ZoneMinder database, default: zm")
set(ZM_DB_USER "zmuser" CACHE STRING
"Name of ZoneMinder database user, default: zmuser")
set(ZM_DB_PASS "zmpass" CACHE STRING
"Password of ZoneMinder database user, default: zmpass")
set(ZM_WEB_USER "" CACHE STRING
"The user apache or the local web server runs on. Leave empty for automatic detection.
If that fails, you can use this variable to force")
set(ZM_WEB_GROUP "" CACHE STRING
"The group apache or the local web server runs on,
Leave empty to be the same as the web user")
set(ZM_DIR_EVENTS "${ZM_CONTENTDIR}/events" CACHE PATH
"Location where events are recorded to, default: ZM_CONTENTDIR/events")
set(ZM_DIR_SOUNDS "sounds" CACHE PATH
"Location to look for optional sound files, default: sounds")
set(ZM_PATH_ZMS "/cgi-bin/nph-zms" CACHE PATH
"Web url to zms streaming server, default: /cgi-bin/nph-zms")
set(ZM_PATH_SHUTDOWN "/sbin/shutdown" CACHE PATH
"Path to shutdown binary, default: /sbin/shutdown")
# Advanced
set(ZM_PATH_MAP "/dev/shm" CACHE PATH
"Location to save mapped memory files, default: /dev/shm")
set(ZM_PATH_ARP "" CACHE PATH
"Full path to compatible arp binary. Leave empty for automatic detection.")
set(ZM_CONFIG_DIR "/${CMAKE_INSTALL_SYSCONFDIR}" CACHE PATH
"Location of ZoneMinder configuration, default system config directory")
set(ZM_CONFIG_SUBDIR "${ZM_CONFIG_DIR}/conf.d" CACHE PATH
"Location of ZoneMinder configuration subfolder, default: ZM_CONFIG_DIR/conf.d")
set(ZM_EXTRA_LIBS "" CACHE STRING
"A list of optional libraries, separated by semicolons, e.g. ssl;theora")
set(ZM_MYSQL_ENGINE "InnoDB" CACHE STRING
"MySQL engine to use with database, default: InnoDB")
set(ZM_NO_MMAP "OFF" CACHE BOOL
"Set to ON to not use mmap shared memory. Shouldn't be enabled unless you
experience problems with the shared memory. default: OFF")
set(ZM_NO_LIBVLC "OFF" CACHE BOOL
"Set to ON to skip libvlc checks and force building ZM without libvlc. default: OFF")
set(ZM_NO_LIBVNC "OFF" CACHE BOOL
"Set to ON to skip libvnc checks and force building ZM without libvnc. default: OFF")
set(ZM_NO_CURL "OFF" CACHE BOOL
"Set to ON to skip cURL checks and force building ZM without cURL. default: OFF")
set(ZM_NO_X10 "OFF" CACHE BOOL
"Set to ON to build ZoneMinder without X10 support. default: OFF")
set(ZM_ONVIF "ON" CACHE BOOL
"Set to ON to enable basic ONVIF support. This is EXPERIMENTAL and may not
work with all cameras claiming to be ONVIF compliant. default: ON")
set(ZM_NO_RTSPSERVER "OFF" CACHE BOOL
"Set to ON to skip building ZM with rtsp server support. default: OFF")
set(ZM_PERL_MM_PARMS INSTALLDIRS=vendor NO_PACKLIST=1 NO_PERLLOCAL=1 CACHE STRING
"By default, ZoneMinder's Perl modules are installed into the Vendor folders,
as defined by your installation of Perl. You can change that here. Consult Perl's
MakeMaker documentation for a definition of acceptable parameters. If you set this
to something that causes the modules to be installed outside Perl's normal search
path, then you will also need to set ZM_PERL_SEARCH_PATH accordingly.")
set(ZM_PERL_SEARCH_PATH "" CACHE PATH
"Use to add a folder to your Perl's search path. This will need to be set in cases
where ZM_PERL_MM_PARMS has been modified such that ZoneMinder's Perl modules are
installed outside Perl's default search path.")
set(ZM_TARGET_DISTRO "" CACHE STRING
"Build ZoneMinder for a specific distribution. Currently, valid names are: fc27, fc26, el7, OS13, FreeBSD")
set(ZM_SYSTEMD "OFF" CACHE BOOL
"Set to ON to force building ZM with systemd support. default: OFF")
set(ZM_MANPAGE_DEST_PREFIX "share/man" CACHE PATH
"Relative path used to install ZoneMinder's Man pages into a
non-standard folder. Most Linux users will not need to change this.
BSD users may need to set this.")
set(ZM_CAKEPHP_CACHE "Apc" CACHE STRING
"Set the CakePHP cache engine, default: Apc")
# Reassign some variables if a target distro has been specified
if(ZM_TARGET_DISTRO MATCHES "^fc")
set(ZM_CAKEPHP_CACHE "Memcached")
endif()
if((ZM_TARGET_DISTRO MATCHES "^el") OR (ZM_TARGET_DISTRO MATCHES "^fc"))
set(ZM_RUNDIR "/var/run/zoneminder")
set(ZM_SOCKDIR "/var/lib/zoneminder/sock")
set(ZM_TMPDIR "/var/lib/zoneminder/temp")
set(ZM_LOGDIR "/var/log/zoneminder")
set(ZM_CONFIG_DIR "/etc/zm")
set(ZM_CONFIG_SUBDIR "/etc/zm/conf.d")
set(ZM_WEBDIR "/usr/share/zoneminder/www")
set(ZM_CGIDIR "/usr/libexec/zoneminder/cgi-bin")
set(ZM_DIR_EVENTS "/var/lib/zoneminder/events")
set(ZM_PATH_ZMS "/cgi-bin-zm/nph-zms")
elseif(ZM_TARGET_DISTRO STREQUAL "OS13")
set(ZM_RUNDIR "/var/run/zoneminder")
set(ZM_TMPDIR "/var/run/zoneminder")
set(ZM_CONTENTDIR "/var/run/zoneminder")
set(ZM_LOGDIR "/var/log/zoneminder")
set(ZM_WEB_USER "wwwrun")
set(ZM_WEB_GROUP "www")
set(ZM_WEBDIR "/srv/www/htdocs/zoneminder")
set(ZM_CGIDIR "/srv/www/cgi-bin")
elseif(ZM_TARGET_DISTRO STREQUAL "FreeBSD")
set(ZM_RUNDIR "/var/run/zm")
set(ZM_SOCKDIR "/var/run/zm")
set(ZM_TMPDIR "/var/tmp/zm")
set(ZM_CONTENTDIR "/usr/local/var/lib/zoneminder")
set(ZM_WEB_USER "www")
set(ZM_WEB_GROUP "www")
set(ZM_CONFIG_DIR "/usr/local/etc/zm")
set(ZM_CONFIG_SUBDIR "/usr/local/etc/zm/conf.d")
set(ZM_WEBDIR "/usr/local/share/zoneminder/www")
set(ZM_CGIDIR "/usr/local/libexec/zoneminder/cgi-bin")
set(ZM_PERL_MM_PARMS "INSTALLDIRS=site")
endif()
if(BUILD_MAN)
message(STATUS "Building man pages: Yes (default)")
set(ZM_PERL_MM_PARMS_FULL ${ZM_PERL_MM_PARMS})
else()
message(STATUS "Building man pages: No")
list(APPEND ZM_PERL_MM_PARMS_FULL ${ZM_PERL_MM_PARMS}
"INSTALLMAN1DIR=none"
"INSTALLMAN3DIR=none")
endif()
# Required for certain checks to work
set(CMAKE_EXTRA_INCLUDE_FILES ${CMAKE_EXTRA_INCLUDE_FILES} stdio.h stdlib.h math.h signal.h)
# This is required to enable searching in lib64 (if exists), do not change
set_property(GLOBAL PROPERTY FIND_LIBRARY_USE_LIB64_PATHS ON)
# Set the systemd flag if systemd is autodetected or ZM_SYSTEMD has been set
if(ZM_SYSTEMD OR (IS_DIRECTORY /usr/lib/systemd/system) OR (IS_DIRECTORY /lib/systemd/system))
set(WITH_SYSTEMD 1)
endif()
# System checks
check_include_file("libv4l1-videodev.h" HAVE_LIBV4L1_VIDEODEV_H)
if(NOT HAVE_LIBV4L1_VIDEODEV_H)
check_include_file("linux/videodev.h" HAVE_LINUX_VIDEODEV_H)
endif()
check_include_file("linux/videodev2.h" HAVE_LINUX_VIDEODEV2_H)
check_include_file("execinfo.h" HAVE_EXECINFO_H)
if(HAVE_EXECINFO_H)
check_function_exists("backtrace" HAVE_DECL_BACKTRACE)
if(NOT HAVE_DECL_BACKTRACE)
find_library(EXECINFO_LIBRARY NAMES execinfo)
if(EXECINFO_LIBRARY)
list(APPEND ZM_BIN_LIBS "-lexecinfo")
endif()
endif()
check_function_exists("backtrace_symbols" HAVE_DECL_BACKTRACE_SYMBOLS)
endif()
check_include_file("ucontext.h" HAVE_UCONTEXT_H)
check_include_file("sys/sendfile.h" HAVE_SYS_SENDFILE_H)
check_include_file("sys/syscall.h" HAVE_SYS_SYSCALL_H)
check_function_exists("syscall" HAVE_SYSCALL)
check_function_exists("sendfile" HAVE_SENDFILE)
check_function_exists("posix_memalign" HAVE_POSIX_MEMALIGN)
check_type_size("siginfo_t" HAVE_SIGINFO_T)
check_type_size("ucontext_t" HAVE_UCONTEXT_T)
# *** LIBRARY CHECKS ***
if(UNIX)
include(CheckLibraryExists)
CHECK_LIBRARY_EXISTS(rt clock_gettime "time.h" HAVE_CLOCK_GETTIME)
if(NOT HAVE_CLOCK_GETTIME)
message(FATAL_ERROR "clock_gettime not found")
else()
list(APPEND ZM_BIN_LIBS "-lrt")
endif()
endif()
# zlib
find_package(ZLIB)
if(ZLIB_FOUND)
set(HAVE_LIBZLIB 1)
list(APPEND ZM_BIN_LIBS "${ZLIB_LIBRARIES}")
include_directories("${ZLIB_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${ZLIB_INCLUDE_DIR}")
check_include_file("zlib.h" HAVE_ZLIB_H)
set(optlibsfound "${optlibsfound} zlib")
else()
set(optlibsnotfound "${optlibsnotfound} zlib")
endif()
# Do not check for cURL if ZM_NO_CURL is on
if(NOT ZM_NO_CURL)
# cURL
find_package(CURL)
if(CURL_FOUND)
set(HAVE_LIBCURL 1)
#list(APPEND ZM_BIN_LIBS ${CURL_LIBRARIES})
include_directories(${CURL_INCLUDE_DIRS})
set(CMAKE_REQUIRED_INCLUDES ${CURL_INCLUDE_DIRS})
check_include_file("curl/curl.h" HAVE_CURL_CURL_H)
set(optlibsfound "${optlibsfound} cURL")
else()
set(optlibsnotfound "${optlibsnotfound} cURL")
endif()
endif()
# jpeg
find_package(JPEG)
if(JPEG_FOUND)
set(HAVE_LIBJPEG 1)
list(APPEND ZM_BIN_LIBS "${JPEG_LIBRARIES}")
#link_directories(${JPEG_LIBRARY})
include_directories("${JPEG_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${JPEG_INCLUDE_DIR}")
check_include_files("stdio.h;jpeglib.h" HAVE_JPEGLIB_H)
if(NOT HAVE_JPEGLIB_H)
message(FATAL_ERROR
"ZoneMinder requires libjpeg headers - check that libjpeg development packages are installed")
endif()
else()
message(FATAL_ERROR
"ZoneMinder requires jpeg but it was not found on your system")
endif()
# LIBJWT
find_package(LibJWT)
if(LIBJWT_FOUND)
set(HAVE_LIBJWT 1)
set(optlibsfound "${optlibsfound} LIBJWT")
list(APPEND ZM_BIN_LIBS "${LIBJWT_LIBRARY}")
else()
set(optlibsnotfound "${optlibsnotfound} LIBJWT")
endif()
# gnutls (using find_library and find_path)
if(HAVE_LIBJWT)
find_library(GNUTLS_LIBRARIES gnutls)
if(GNUTLS_LIBRARIES)
set(HAVE_LIBGNUTLS 1)
list(APPEND ZM_BIN_LIBS "${GNUTLS_LIBRARIES}")
find_path(GNUTLS_INCLUDE_DIR gnutls/gnutls.h)
if(GNUTLS_INCLUDE_DIR)
include_directories("${GNUTLS_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}")
endif()
mark_as_advanced(FORCE GNUTLS_LIBRARIES GNUTLS_INCLUDE_DIR)
check_include_file("gnutls/gnutls.h" HAVE_GNUTLS_GNUTLS_H)
set(optlibsfound "${optlibsfound} GnuTLS")
else()
set(optlibsnotfound "${optlibsnotfound} GnuTLS")
endif()
endif()
# OpenSSL
if(NOT HAVE_LIBGNUTLS OR NOT HAVE_LIBJWT)
find_package(OpenSSL)
if(OPENSSL_FOUND)
set(HAVE_LIBOPENSSL 1)
set(HAVE_LIBCRYPTO 1)
list(APPEND ZM_BIN_LIBS "${OPENSSL_LIBRARIES}")
include_directories("${OPENSSL_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
check_include_file("openssl/md5.h" HAVE_OPENSSL_MD5_H)
set(optlibsfound "${optlibsfound} OpenSSL")
else()
set(optlibsnotfound "${optlibsnotfound} OpenSSL")
endif()
endif()
# pthread (using find_library and find_path)
find_library(PTHREAD_LIBRARIES pthread)
if(PTHREAD_LIBRARIES)
set(HAVE_LIBPTHREAD 1)
list(APPEND ZM_BIN_LIBS "${PTHREAD_LIBRARIES}")
find_path(PTHREAD_INCLUDE_DIR pthread.h)
if(PTHREAD_INCLUDE_DIR)
include_directories("${PTHREAD_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${PTHREAD_INCLUDE_DIR}")
endif()
mark_as_advanced(FORCE PTHREAD_LIBRARIES PTHREAD_INCLUDE_DIR)
check_include_file("pthread.h" HAVE_PTHREAD_H)
if(NOT HAVE_PTHREAD_H)
message(FATAL_ERROR "ZoneMinder requires pthread headers - check that pthread development packages are installed")
endif()
else()
message(FATAL_ERROR "ZoneMinder requires pthread but it was not found on your system")
endif()
# pcre (using find_library and find_path)
find_library(PCRE_LIBRARIES pcre)
if(PCRE_LIBRARIES)
set(HAVE_LIBPCRE 1)
list(APPEND ZM_BIN_LIBS "${PCRE_LIBRARIES}")
find_path(PCRE_INCLUDE_DIR pcre.h)
if(PCRE_INCLUDE_DIR)
include_directories("${PCRE_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${PCRE_INCLUDE_DIR}")
endif()
mark_as_advanced(FORCE PCRE_LIBRARIES PCRE_INCLUDE_DIR)
check_include_file("pcre.h" HAVE_PCRE_H)
set(optlibsfound "${optlibsfound} PCRE")
else()
set(optlibsnotfound "${optlibsnotfound} PCRE")
endif()
# gcrypt (using find_library and find_path)
find_library(GCRYPT_LIBRARIES gcrypt)
if(GCRYPT_LIBRARIES)
set(HAVE_LIBGCRYPT 1)
list(APPEND ZM_BIN_LIBS "${GCRYPT_LIBRARIES}")
find_path(GCRYPT_INCLUDE_DIR gcrypt.h)
if(GCRYPT_INCLUDE_DIR)
include_directories("${GCRYPT_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${GCRYPT_INCLUDE_DIR}")
endif()
mark_as_advanced(FORCE GCRYPT_LIBRARIES GCRYPT_INCLUDE_DIR)
check_include_file("gcrypt.h" HAVE_GCRYPT_H)
set(optlibsfound "${optlibsfound} GCrypt")
else()
set(optlibsnotfound "${optlibsnotfound} GCrypt")
endif()
# mysqlclient (using find_library and find_path)
find_library(MYSQLCLIENT_LIBRARIES mysqlclient PATH_SUFFIXES mysql)
if(MYSQLCLIENT_LIBRARIES)
set(HAVE_LIBMYSQLCLIENT 1)
list(APPEND ZM_BIN_LIBS "${MYSQLCLIENT_LIBRARIES}")
find_path(MYSQLCLIENT_INCLUDE_DIR mysql.h PATH_SUFFIXES mysql)
if(MYSQLCLIENT_INCLUDE_DIR)
include_directories("${MYSQLCLIENT_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${MYSQLCLIENT_INCLUDE_DIR}")
endif()
mark_as_advanced(FORCE MYSQLCLIENT_LIBRARIES MYSQLCLIENT_INCLUDE_DIR)
check_include_file("mysql.h" HAVE_MYSQL_H)
if(NOT HAVE_MYSQL_H)
message(FATAL_ERROR "ZoneMinder requires MySQL headers - check that MySQL development packages are installed")
endif()
else()
message(FATAL_ERROR "ZoneMinder requires mysqlclient but it was not found on your system")
endif()
set(PATH_FFMPEG "")
set(OPT_FFMPEG "no")
# avformat (using find_library and find_path)
find_library(AVFORMAT_LIBRARIES avformat)
if(AVFORMAT_LIBRARIES)
set(HAVE_LIBAVFORMAT 1)
list(APPEND ZM_BIN_LIBS "${AVFORMAT_LIBRARIES}")
find_path(AVFORMAT_INCLUDE_DIR "libavformat/avformat.h" /usr/include/ffmpeg)
if(AVFORMAT_INCLUDE_DIR)
include_directories("${AVFORMAT_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${AVFORMAT_INCLUDE_DIR}")
endif()
mark_as_advanced(FORCE AVFORMAT_LIBRARIES AVFORMAT_INCLUDE_DIR)
check_include_file("libavformat/avformat.h" HAVE_LIBAVFORMAT_AVFORMAT_H)
set(optlibsfound "${optlibsfound} AVFormat")
else()
set(optlibsnotfound "${optlibsnotfound} AVFormat")
endif()
# avcodec (using find_library and find_path)
find_library(AVCODEC_LIBRARIES avcodec)
if(AVCODEC_LIBRARIES)
set(HAVE_LIBAVCODEC 1)
list(APPEND ZM_BIN_LIBS "${AVCODEC_LIBRARIES}")
find_path(AVCODEC_INCLUDE_DIR "libavcodec/avcodec.h" /usr/include/ffmpeg)
if(AVCODEC_INCLUDE_DIR)
include_directories("${AVCODEC_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${AVCODEC_INCLUDE_DIR}")
endif()
mark_as_advanced(FORCE AVCODEC_LIBRARIES AVCODEC_INCLUDE_DIR)
check_include_file("libavcodec/avcodec.h" HAVE_LIBAVCODEC_AVCODEC_H)
set(optlibsfound "${optlibsfound} AVCodec")
else()
message(WARNING "\nWhile it should be possible to build ZM without AVCODEC the result will pretty useless.")
set(optlibsnotfound "${optlibsnotfound} AVCodec")
endif()
# avdevice (using find_library and find_path)
find_library(AVDEVICE_LIBRARIES avdevice)
if(AVDEVICE_LIBRARIES)
set(HAVE_LIBAVDEVICE 1)
list(APPEND ZM_BIN_LIBS "${AVDEVICE_LIBRARIES}")
find_path(AVDEVICE_INCLUDE_DIR "libavdevice/avdevice.h" /usr/include/ffmpeg)
if(AVDEVICE_INCLUDE_DIR)
include_directories("${AVDEVICE_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${AVDEVICE_INCLUDE_DIR}")
endif()
mark_as_advanced(FORCE AVDEVICE_LIBRARIES AVDEVICE_INCLUDE_DIR)
check_include_file("libavdevice/avdevice.h" HAVE_LIBAVDEVICE_AVDEVICE_H)
set(optlibsfound "${optlibsfound} AVDevice")
else()
set(optlibsnotfound "${optlibsnotfound} AVDevice")
endif()
# avutil (using find_library and find_path)
find_library(AVUTIL_LIBRARIES avutil)
if(AVUTIL_LIBRARIES)
set(HAVE_LIBAVUTIL 1)
list(APPEND ZM_BIN_LIBS "${AVUTIL_LIBRARIES}")
find_path(AVUTIL_INCLUDE_DIR "libavutil/avutil.h" /usr/include/ffmpeg)
if(AVUTIL_INCLUDE_DIR)
include_directories("${AVUTIL_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${AVUTIL_INCLUDE_DIR}")
endif()
mark_as_advanced(FORCE AVUTIL_LIBRARIES AVUTIL_INCLUDE_DIR)
check_include_file("libavutil/avutil.h" HAVE_LIBAVUTIL_AVUTIL_H)
check_include_file("libavutil/mathematics.h" HAVE_LIBAVUTIL_MATHEMATICS_H)
check_include_file("libavutil/hwcontext.h" HAVE_LIBAVUTIL_HWCONTEXT_H)
set(optlibsfound "${optlibsfound} AVUtil")
else()
set(optlibsnotfound "${optlibsnotfound} AVUtil")
endif()
# swscale (using find_library and find_path)
find_library(SWSCALE_LIBRARIES swscale)
if(SWSCALE_LIBRARIES)
set(HAVE_LIBSWSCALE 1)
list(APPEND ZM_BIN_LIBS "${SWSCALE_LIBRARIES}")
find_path(SWSCALE_INCLUDE_DIR "libswscale/swscale.h" /usr/include/ffmpeg)
if(SWSCALE_INCLUDE_DIR)
include_directories("${SWSCALE_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${SWSCALE_INCLUDE_DIR}")
endif()
mark_as_advanced(FORCE SWSCALE_LIBRARIES SWSCALE_INCLUDE_DIR)
check_include_file("libswscale/swscale.h" HAVE_LIBSWSCALE_SWSCALE_H)
set(optlibsfound "${optlibsfound} SWScale")
else()
set(optlibsnotfound "${optlibsnotfound} SWScale")
endif()
# SWresample (using find_library and find_path)
find_library(SWRESAMPLE_LIBRARIES swresample)
if(SWRESAMPLE_LIBRARIES)
set(HAVE_LIBSWRESAMPLE 1)
list(APPEND ZM_BIN_LIBS "${SWRESAMPLE_LIBRARIES}")
find_path(SWRESAMPLE_INCLUDE_DIR "libswresample/swresample.h" /usr/include/ffmpeg)
if(SWRESAMPLE_INCLUDE_DIR)
include_directories("${SWRESAMPLE_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${SWRESAMPLE_INCLUDE_DIR}")
endif()
mark_as_advanced(FORCE SWRESAMPLE_LIBRARIES SWRESAMPLE_INCLUDE_DIR)
check_include_file("libswresample/swresample.h" HAVE_LIBSWRESAMPLE_SWRESAMPLE_H)
set(optlibsfound "${optlibsfound} SWResample")
else()
set(optlibsnotfound "${optlibsnotfound} SWResample")
# AVresample (using find_library and find_path)
find_library(AVRESAMPLE_LIBRARIES avresample)
if(AVRESAMPLE_LIBRARIES)
set(HAVE_LIBAVRESAMPLE 1)
list(APPEND ZM_BIN_LIBS "${AVRESAMPLE_LIBRARIES}")
find_path(AVRESAMPLE_INCLUDE_DIR "libavresample/avresample.h" /usr/include/ffmpeg)
if(AVRESAMPLE_INCLUDE_DIR)
include_directories("${AVRESAMPLE_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${AVRESAMPLE_INCLUDE_DIR}")
endif()
mark_as_advanced(FORCE AVRESAMPLE_LIBRARIES AVRESAMPLE_INCLUDE_DIR)
check_include_file("libavresample/avresample.h" HAVE_LIBAVRESAMPLE_AVRESAMPLE_H)
set(optlibsfound "${optlibsfound} AVResample")
else()
set(optlibsnotfound "${optlibsnotfound} AVResample")
endif()
endif()
# Find the path to the ffmpeg executable
find_program(FFMPEG_EXECUTABLE
NAMES ffmpeg avconv
PATH_SUFFIXES ffmpeg)
if(FFMPEG_EXECUTABLE)
set(PATH_FFMPEG "${FFMPEG_EXECUTABLE}")
set(OPT_FFMPEG "yes")
mark_as_advanced(FFMPEG_EXECUTABLE)
endif()
# Do not check for libvlc if ZM_NO_LIBVLC is on
if(NOT ZM_NO_LIBVLC)
# libvlc (using find_library and find_path)
find_library(LIBVLC_LIBRARIES vlc)
if(LIBVLC_LIBRARIES)
set(HAVE_LIBVLC 1)
#list(APPEND ZM_BIN_LIBS "${LIBVLC_LIBRARIES}")
find_path(LIBVLC_INCLUDE_DIR "vlc/vlc.h")
if(LIBVLC_INCLUDE_DIR)
include_directories("${LIBVLC_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${LIBVLC_INCLUDE_DIR}")
endif()
mark_as_advanced(FORCE LIBVLC_LIBRARIES LIBVLC_INCLUDE_DIR)
check_include_file("vlc/vlc.h" HAVE_VLC_VLC_H)
set(optlibsfound "${optlibsfound} libVLC")
else()
set(optlibsnotfound "${optlibsnotfound} libVLC")
endif()
endif()
if(NOT ZM_NO_LIBVNC)
# libvncclient (using find_library and find_path)
find_library(LIBVNC_LIBRARIES vncclient)
if(LIBVNC_LIBRARIES)
set(HAVE_LIBVNC 1)
#list(APPEND ZM_BIN_LIBS "${LIBVNC_LIBRARIES}")
find_path(LIBVNC_INCLUDE_DIR "rfb/rfb.h")
if(LIBVNC_INCLUDE_DIR)
include_directories("${LIBVNC_INCLUDE_DIR}")
set(CMAKE_REQUIRED_INCLUDES "${LIBVNC_INCLUDE_DIR}")
endif()
mark_as_advanced(FORCE LIBVNC_LIBRARIES LIBVNC_INCLUDE_DIR)
check_include_file("rfb/rfb.h" HAVE_RFB_RFB_H)
set(optlibsfound "${optlibsfound} libVNC")
else()
set(optlibsnotfound "${optlibsnotfound} libVNC")
endif()
endif()
#find_package(Boost 1.36.0)
#if(Boost_FOUND)
#include_directories(${Boost_INCLUDE_DIRS})
##set(CMAKE_REQUIRED_INCLUDES "${Boost_INCLUDE_DIRS}")
#list(APPEND ZM_BIN_LIBS "${Boost_LIBRARIES}")
#endif()
if(NOT ZM_NO_RTSPSERVER)
set(HAVE_RTSP_SERVER 1)
else()
set(HAVE_RTSP_SERVER 0)
endif()
#
# *** END OF LIBRARY CHECKS ***
# Check for gnutls or crypto
if((NOT HAVE_LIBCRYPTO) AND (NOT HAVE_LIBGNUTLS))
message(FATAL_ERROR "ZoneMinder requires crypto or gnutls but none were found on your system")
endif()
# Check for V4L header files and enable ZM_HAS_V4L, ZM_HAS_V4L1, ZM_HAS_V4L2 accordingly
# Setting to zeros first is required because ZM uses #define for these
set(ZM_HAS_V4L 0)
set(ZM_HAS_V4L1 0)
set(ZM_HAS_V4L2 0)
if(HAVE_LINUX_VIDEODEV_H OR HAVE_LIBV4L1_VIDEODEV_H)
set(ZM_HAS_V4L 1)
set(ZM_HAS_V4L1 1)
endif()
if(HAVE_LINUX_VIDEODEV2_H)
set(ZM_HAS_V4L 1)
set(ZM_HAS_V4L2 1)
endif()
if((NOT HAVE_LINUX_VIDEODEV_H)
AND (NOT HAVE_LIBV4L1_VIDEODEV_H)
AND (NOT HAVE_LINUX_VIDEODEV2_H))
message(AUTHOR_WARNING "Video 4 Linux headers weren't found - Analog and USB camera support will not be available")
endif()
# Check for PCRE and enable ZM_PCRE accordingly
set(ZM_PCRE 0)
if(HAVE_LIBPCRE AND HAVE_PCRE_H)
set(ZM_PCRE 1)
endif()
# Check for mmap and enable in all components
set(ZM_MEM_MAPPED 0)
set(ENABLE_MMAP no)
if(NOT ZM_NO_MMAP)
set(ZM_MEM_MAPPED 1)
set(ENABLE_MMAP yes)
set(ZM_MMAP_PERLPACKAGE "Sys::Mmap")
endif()
# Check for the ONVIF flag and enable ZM_HAS_ONVIF accordingly
set(ZM_HAS_ONVIF 0)
if(ZM_ONVIF)
set(ZM_HAS_ONVIF 1)
endif()
# Check for authentication functions
if(HAVE_OPENSSL_MD5_H)
set(CMAKE_REQUIRED_LIBRARIES "${OPENSSL_LIBRARIES}")
set(CMAKE_REQUIRED_INCLUDES "${OPENSSL_INCLUDE_DIR}")
check_prototype_definition(
MD5
"unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md)" "NULL" "openssl/md5.h"
HAVE_MD5_OPENSSL)
endif()
if(HAVE_GNUTLS_GNUTLS_H)
set(CMAKE_REQUIRED_LIBRARIES "${GNUTLS_LIBRARIES}")
set(CMAKE_REQUIRED_INCLUDES "${GNUTLS_INCLUDE_DIR}")
check_prototype_definition(
gnutls_fingerprint
"int gnutls_fingerprint (gnutls_digest_algorithm_t algo, const gnutls_datum_t * data, void *result, size_t * result_size)" "0" "stdlib.h;gnutls/gnutls.h"
HAVE_DECL_GNUTLS_FINGERPRINT)
endif()
if(NOT HAVE_DECL_GNUTLS_FINGERPRINT AND HAVE_MD5_OPENSSL)
set(HAVE_DECL_MD5 1)
endif()
if((NOT HAVE_MD5_OPENSSL) AND (NOT HAVE_DECL_GNUTLS_FINGERPRINT))
message(AUTHOR_WARNING
"ZoneMinder requires a working MD5 function for hashed authentication but
none were found - hashed authentication will not be available")
endif()
# Dirty fix for zm_user only using openssl's md5 if gnutls and gcrypt are not available.
# This needs to be fixed in zm_user.[h,cpp] but such fix will also require changes to configure.ac
if(HAVE_LIBCRYPTO AND HAVE_OPENSSL_MD5_H AND HAVE_MD5_OPENSSL)
set(HAVE_GCRYPT_H 0)
set(HAVE_GNUTLS_OPENSSL_H 0)
endif()
# Check for Perl
find_package(Perl)
if(NOT PERL_FOUND)
message(FATAL_ERROR "ZoneMinder requires Perl 5.6.0 or newer but it was not found on your system")
endif()
# Checking for perl modules requires FindPerlModules.cmake
# Check all required modules at once
# TODO: Add checking for the optional modules
find_package(
PerlModules COMPONENTS Sys::Syslog DBI DBD::mysql
Getopt::Long Time::HiRes Date::Manip LWP::UserAgent
ExtUtils::MakeMaker ${ZM_MMAP_PERLPACKAGE})
if(NOT PERLMODULES_FOUND)
message(WARNING "Not all required perl modules were found on your system")
endif()
# Attempt to check which user apache (or other web server) runs on by
# searching for a user beginning with apache or www and then cutting the user
# from the first matching user line
if(ZM_WEB_USER STREQUAL "")
# Check for a user matching ^apache and cut the username from the
# userline in the first match
file(STRINGS "/etc/passwd" userline_apache REGEX "^apache")
file(STRINGS "/etc/passwd" userline_www REGEX "^www")
if(NOT (userline_apache STREQUAL ""))
execute_process(
COMMAND echo ${userline_apache}
COMMAND cut -d: -f1 OUTPUT_VARIABLE ZM_WEB_USER
OUTPUT_STRIP_TRAILING_WHITESPACE)
elseif(NOT (userline_www STREQUAL ""))
execute_process(
COMMAND echo ${userline_www}
COMMAND cut -d: -f1 OUTPUT_VARIABLE ZM_WEB_USER
OUTPUT_STRIP_TRAILING_WHITESPACE)
endif()
message(STATUS "Detected web server user: ${ZM_WEB_USER}")
endif()
# Check if webgroup contains anything. If not, use the web user as the web group
if(NOT ZM_WEB_GROUP)
set(ZM_WEB_GROUP ${ZM_WEB_USER})
endif()
message(STATUS "Using web user: ${ZM_WEB_USER}")
message(STATUS "Using web group: ${ZM_WEB_GROUP}")
if(WITH_SYSTEMD)
# Check for polkit
find_package(Polkit)
if(NOT POLKIT_FOUND)
message(WARNING "Running ZoneMinder requires polkit. Building ZoneMinder requires the polkit development package.")
endif()
endif()
# Find the path to an arp compatible executable
if(ZM_PATH_ARP STREQUAL "")
find_program(ARP_EXECUTABLE arp)
if(ARP_EXECUTABLE)
set(ZM_PATH_ARP "${ARP_EXECUTABLE}")
mark_as_advanced(ARP_EXECUTABLE)
else()
find_program(ARP_EXECUTABLE ip)
if(ARP_EXECUTABLE)
set(ZM_PATH_ARP "${ARP_EXECUTABLE} neigh")
mark_as_advanced(ARP_EXECUTABLE)
endif()
endif()
if(ARP_EXECUTABLE-NOTFOUND)
message(WARNING "Unable to find a compatible arp binary. Monitor probe will not function.")
endif()
endif()
# Some variables that zm expects
set(ZM_PID "${ZM_RUNDIR}/zm.pid")
set(ZM_CONFIG "${ZM_CONFIG_DIR}/zm.conf")
set(VERSION "${zoneminder_VERSION}")
set(API_VERSION "${zoneminder_API_VERSION}")
set(PKGDATADIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATADIR}/zoneminder")
set(BINDIR "${CMAKE_INSTALL_FULL_BINDIR}")
set(LIBDIR "${CMAKE_INSTALL_FULL_LIBDIR}")
set(SYSCONFDIR "/${CMAKE_INSTALL_SYSCONFDIR}")
set(WEB_PREFIX "${ZM_WEBDIR}")
set(CGI_PREFIX "${ZM_CGIDIR}")
set(WEB_USER "${ZM_WEB_USER}")
set(WEB_GROUP "${ZM_WEB_GROUP}")
set(ZM_DB_TYPE "mysql")
if(ZM_PERL_SEARCH_PATH)
set(EXTRA_PERL_LIB "use lib '${ZM_PERL_SEARCH_PATH}'; # Include custom perl install path")
else()
set(EXTRA_PERL_LIB "# Include from system perl paths only")
endif()
# If this is an out-of-source build, copy the files we need to the binary directory
if(NOT (CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR))
file(COPY "${CMAKE_CURRENT_SOURCE_DIR}/conf.d" DESTINATION "${CMAKE_CURRENT_BINARY_DIR}" PATTERN "*.in" EXCLUDE)
endif()
# Generate files from the .in files
configure_file(zm.conf.in "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" @ONLY)
configure_file(conf.d/01-system-paths.conf.in "${CMAKE_CURRENT_BINARY_DIR}/conf.d/01-system-paths.conf" @ONLY)
configure_file(zoneminder-config.cmake "${CMAKE_CURRENT_BINARY_DIR}/config.h" @ONLY)
configure_file(zmconfgen.pl.in "${CMAKE_CURRENT_BINARY_DIR}/zmconfgen.pl" @ONLY)
configure_file(zmlinkcontent.sh.in "${CMAKE_CURRENT_BINARY_DIR}/zmlinkcontent.sh" @ONLY)
# Create a target for man pages
include(Pod2Man)
# Process subdirectories
add_subdirectory(dep)
add_subdirectory(src)
add_subdirectory(scripts)
add_subdirectory(db)
add_subdirectory(fonts)
add_subdirectory(web)
add_subdirectory(misc)
add_subdirectory(onvif)
if(BUILD_TEST_SUITE)
message("Building unit tests: Yes")
find_package(Catch2 REQUIRED)
include(CTest)
add_subdirectory(tests)
else()
message("Building unit tests: No (default)")
endif()
# Process distro subdirectories
if((ZM_TARGET_DISTRO MATCHES "^el") OR (ZM_TARGET_DISTRO MATCHES "^fc"))
add_subdirectory(distros/redhat)
elseif()
add_subdirectory(distros/opensuse)
endif()
# Print optional libraries detection status
message(STATUS "Optional libraries found:${optlibsfound}")
message(STATUS "Optional libraries not found:${optlibsnotfound}")
# Run ZM configuration generator
message(STATUS "Running ZoneMinder configuration generator")
execute_process(COMMAND perl ${CMAKE_CURRENT_BINARY_DIR}/zmconfgen.pl RESULT_VARIABLE ZMCONFGEN_RESULT)
if(ZMCONFGEN_RESULT EQUAL 0)
message(STATUS "ZoneMinder configuration generator completed successfully")
else()
message(FATAL_ERROR "ZoneMinder configuration generator failed. Exit code: ${zmconfgen_result}")
endif()
# Install zm.conf
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm.conf" DESTINATION "${ZM_CONFIG_DIR}")
install(DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}/conf.d/" DESTINATION "${ZM_CONFIG_SUBDIR}" PATTERN "*.in" EXCLUDE)
# Uninstall target
configure_file(
"${CMAKE_CURRENT_SOURCE_DIR}/cmake/cmake_uninstall.cmake.in"
"${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake"
IMMEDIATE @ONLY)
add_custom_target(uninstall
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake/cmake_uninstall.cmake)
# Configure CCache if available
find_program(CCACHE_FOUND ccache)
if(CCACHE_FOUND)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
endif()
install(DIRECTORY icons DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/")

17
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,17 @@
# Contributing
The ZoneMinder project was originally written by Philip Coombes in 2001. It has since moved to Github and is maintained by just a few who volunteer their spare time.
Over the years, ZoneMinder has accumulated a rather large user base. This presents a challenge to the development team when it comes to managing communications. Welcome to the world of software development, right?
In order to keep the kinds of issues, which require changes to the source code, separate from all other questions and comments, our methods of communication are organized in the following manner:
- The ZoneMinder Github forum is intended for bug reports and serious feature requests only
- The ZoneMinder user forum is intended for general questions and tech support
- The ZoneMinder IRC channel is intended for general questions and tech support
More details can be found in our [Github Posting Rules](https://github.com/ZoneMinder/ZoneMinder/wiki/Github-Posting-Rules). Please read this before creating an issue in our Github forum.
Knowledge of Github is a necessary first step to contribute to the project. To contribute, one must generate a pull request. For those just starting out, [this guide](https://github.com/ZoneMinder/ZoneMinder/wiki/Understanding-Github-and-Pull-Requests) will step you through the process.
Note that pasting code into our Github forum, with the expectation we will do the work for you, is not acceptable.

339
COPYING Normal file
View File

@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

View File

@ -1,2 +0,0 @@
source 'https://rubygems.org'
gem 'github-pages'

View File

@ -1,96 +0,0 @@
GEM
remote: https://rubygems.org/
specs:
RedCloth (4.2.9)
activesupport (4.1.2.rc1)
i18n (~> 0.6, >= 0.6.9)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
tzinfo (~> 1.1)
blankslate (2.1.2.4)
classifier (1.3.4)
fast-stemmer (>= 1.0.0)
colorator (0.1)
commander (4.1.6)
highline (~> 1.6.11)
fast-stemmer (1.0.2)
ffi (1.9.3)
gemoji (1.5.0)
github-pages (19)
RedCloth (= 4.2.9)
jekyll (= 1.5.1)
jekyll-mentions (= 0.0.6)
jekyll-redirect-from (= 0.3.1)
jekyll-sitemap (= 0.3.0)
jemoji (= 0.1.0)
kramdown (= 1.3.1)
liquid (= 2.5.5)
maruku (= 0.7.0)
rdiscount (= 2.1.7)
redcarpet (= 2.3.0)
highline (1.6.21)
html-pipeline (1.5.0)
activesupport (>= 2)
nokogiri (~> 1.4)
i18n (0.6.9)
jekyll (1.5.1)
classifier (~> 1.3)
colorator (~> 0.1)
commander (~> 4.1.3)
liquid (~> 2.5.5)
listen (~> 1.3)
maruku (= 0.7.0)
pygments.rb (~> 0.5.0)
redcarpet (~> 2.3.0)
safe_yaml (~> 1.0)
toml (~> 0.1.0)
jekyll-mentions (0.0.6)
html-pipeline (~> 1.5.0)
jekyll (~> 1.4)
jekyll-redirect-from (0.3.1)
jekyll (~> 1.4)
jekyll-sitemap (0.3.0)
jekyll (~> 1.4)
jemoji (0.1.0)
gemoji (~> 1.5.0)
html-pipeline (~> 1.5.0)
jekyll (~> 1.4)
json (1.8.1)
kramdown (1.3.1)
liquid (2.5.5)
listen (1.3.1)
rb-fsevent (>= 0.9.3)
rb-inotify (>= 0.9)
rb-kqueue (>= 0.2)
maruku (0.7.0)
mini_portile (0.6.0)
minitest (5.3.4)
nokogiri (1.6.3.rc1)
mini_portile (= 0.6.0)
parslet (1.5.0)
blankslate (~> 2.0)
posix-spawn (0.3.8)
pygments.rb (0.5.4)
posix-spawn (~> 0.3.6)
yajl-ruby (~> 1.1.0)
rb-fsevent (0.9.4)
rb-inotify (0.9.4)
ffi (>= 0.5.0)
rb-kqueue (0.2.3)
ffi (>= 0.5.0)
rdiscount (2.1.7)
redcarpet (2.3.0)
safe_yaml (1.0.3)
thread_safe (0.3.4)
toml (0.1.1)
parslet (~> 1.5.0)
tzinfo (1.2.1)
thread_safe (~> 0.1)
yajl-ruby (1.1.0)
PLATFORMS
ruby
DEPENDENCIES
github-pages

340
LICENSE Normal file
View File

@ -0,0 +1,340 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Library General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Library General
Public License instead of this License.

94
README.md Normal file
View File

@ -0,0 +1,94 @@
ZoneMinder
==========
[![Build Status](https://travis-ci.org/ZoneMinder/zoneminder.png)](https://travis-ci.org/ZoneMinder/zoneminder)
[![Bounty Source](https://api.bountysource.com/badge/team?team_id=204&style=bounties_received)](https://www.bountysource.com/teams/zoneminder/issues?utm_source=ZoneMinder&utm_medium=shield&utm_campaign=bounties_received)
[![Join Slack](https://github.com/ozonesecurity/ozonebase/blob/master/img/slacksm.png?raw=true)](https://join.slack.com/t/zoneminder-chat/shared_invite/enQtNTU0NDkxMDM5NDQwLTdhZmQ5Y2M2NWQyN2JkYTBiN2ZkMzIzZGQ0MDliMTRmM2FjZWRlYzUwYTQ2MjMwMTVjMzQ1NjYxOTdmMjE2MTE)
[![IRC Network](https://img.shields.io/badge/irc-%23zoneminder-blue.svg "IRC Freenode")](https://webchat.freenode.net/?channels=zoneminder)
All documentation for ZoneMinder is now online at https://zoneminder.readthedocs.org
## Overview
ZoneMinder is an integrated set of applications which provide a complete surveillance solution allowing capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine. It is designed to run on distributions which support the Video For Linux (V4L) interface and has been tested with video cameras attached to BTTV cards, various USB cameras and also supports most IP network cameras.
## Contacting the Development Team
Before creating an issue in our github forum, please read our posting rules:
https://github.com/ZoneMinder/ZoneMinder/wiki/Github-Posting-Rules
## Our Dockerfile has moved
Please file issues against the ZoneMinder Dockerfile here:
https://github.com/ZoneMinder/zmdockerfiles
## Installation Methods
### Install from a Package Repository
This is the recommended method to install ZoneMinder onto your system. ZoneMinder packages are maintained for the following distros:
- Ubuntu via [Iconnor's PPA](https://launchpad.net/~iconnor)
- Debian from their [default repository](https://packages.debian.org/search?searchon=names&keywords=zoneminder)
- RHEL/CentOS and clones via [RPM Fusion](http://rpmfusion.org)
- Fedora via [RPM Fusion](http://rpmfusion.org)
- OpenSuse via [third party repository](https://wiki.zoneminder.com/Installing_using_ZoneMinder_RPMs_for_SuSE)
- Mageia from their default repository
- Arch via the [AUR](https://aur.archlinux.org/packages/zoneminder/)
- Gentoo via [Portage Overlays](http://gpo.zugaina.org/www-misc/zoneminder)
If a repository that hosts ZoneMinder packages is not available for your distro, then you are encouraged to build your own package, rather than build from source. While each distro is different in ways that set it apart from all the others, they are often similar enough to allow you to adapt another distro's package building instructions to your own.
### Building from Source is Discouraged
Historically, installing ZoneMinder onto your system required building from source code by issuing the traditional configure, make, make install commands. To get ZoneMinder to build, all of its dependencies had to be determined and installed beforehand. Init and logrotate scripts had to be manually copied into place following the build. Optional packages such as jscalendar and Cambozola had to be manually installed. Uninstalls could leave stale files around, which could cause problems during an upgrade. Speaking of upgrades, when it comes time to upgrade all these manual steps must be repeated again.
Better methods exist today that do much of this for you. The current development team, along with other volunteers, have taken great strides in providing the resources necessary to avoid building from source.
### Building a ZoneMinder Package ###
Building ZoneMinder into a package is not any harder than building from source. As a matter of fact, if you have successfully built ZoneMinder from source in the past, then you may find these steps to be easier.
When building a package, it is best to do this work in a separate environment, dedicated to development purposes. This could be as simple as creating a virtual machine, using Docker, or using mock. All it takes is one “Oops” to regret doing this work on your production server.
Lastly, if you desire to build a development snapshot from the master branch, it is recommended you first build your package using an official release of ZoneMinder. This will help identify whether any problems you may encounter are caused by the build process or is a new issue in the master branch.
Please visit our [ReadtheDocs site](https://zoneminder.readthedocs.org/en/stable/installationguide/index.html) for distro specific instructions.
### Package Maintainers
Many of the ZoneMinder configuration variable default values are not configurable at build time through autotools or cmake. A new tool called *zmeditconfigdata.sh* has been added to allow package maintainers to manipulate any variable stored in ConfigData.pm without patching the source.
For example, let's say I have created a new ZoneMinder package that contains the cambozola javascript file. However, by default cambozola support is turned off. To fix that, add this to the packaging script:
```bash
./utils/zmeditconfigdata.sh ZM_OPT_CAMBOZOLA yes
```
Note that zmeditconfigdata.sh is intended to be called, from the root build folder, prior to running cmake or configure.
#### Docker
Docker is a system to run applications inside isolated containers. ZoneMinder, and the ZM webserver, will run using the
Dockerfile contained in this repository. However, there is still work needed to ensure that the main ZM features work
properly and are documented.
## Contribution Model and Development
* Source hosted at [GitHub](https://github.com/ZoneMinder/ZoneMinder/)
* Report issues at [GitHub Issues](https://github.com/ZoneMinder/ZoneMinder/issues)
* Questions/feature requests in [Slack](https://zoneminder-chat.slack.com/) or [forums](https://forums.zoneminder.com)
Pull requests are very welcome! If you would like to contribute, please follow
the following steps. While step 3 is optional, it is preferred.
1. Fork the repo
2. Open an issue at our [GitHub Issues Tracker](https://github.com/ZoneMinder/ZoneMinder/issues).
Follow the issue template to describe the bug or security issue you found. Please note feature
requests or questions should be posted in our user forum or Slack channel.
3. Create your feature branch (`git checkout -b 456-my-new-feature`)
4. Commit your changes (`git commit -am 'Added some feature'`)
It is preferred that you 'commit early and often' instead of bunching all
changes into a single commit.
5. Push your branch to your fork on github (`git push origin 456-my-new-feature`)
6. Create new Pull Request
7. The team will then review, discuss and hopefully merge your changes.
[![Analytics](https://ga-beacon.appspot.com/UA-15147273-6/ZoneMinder/README.md)](https://github.com/igrigorik/ga-beacon)

18
SECURITY.md Normal file
View File

@ -0,0 +1,18 @@
# Security Policy
## Supported Versions
Time and computers move on. We do not have the resources to support every ancient version of everything
(unless you'd like to pay us to do so.) We ONLY support the latest stable release and development releases.
| Version | Supported |
| ------- | ------------------ |
| 1.34.x | :white_check_mark: |
| 1.35.x | :white_check_mark: |
| < 1.34.x | :x: |
## Reporting a Vulnerability
Since sometimes security vulnerabilities can be sensitive, you can just email me at isaac@zoneminder.com.
If it's not such a big deal, by all means, create an issue here on github

View File

@ -1,11 +0,0 @@
# Site settings
name: ZoneMinder
title: Linux video camera security and surveillance solution.
email: your-email@domain.com
description: "ZoneMinder is a free, open source CCTV Linux application which supports monitoring, alerting and recording of IP, USB and analog cameras. Use it with just about any camera to monitor your home, business, crib, or anything else."
baseurl: ""
url: "http://zoneminder.com"
# Build settings
markdown: kramdown
permalinks: pretty

View File

@ -1,29 +0,0 @@
- text: Home
link: '/'
target: '_self'
- text: Documentation
link: 'http://zoneminder.readthedocs.org/en/latest/'
target: '_blank'
- text: Forum
link: 'http://www.zoneminder.com/forums'
target: '_blank'
- text: Screenshots
link: '/screenshots'
target: '_self'
- text: About
link: '/about'
target: '_self'
- text: News
link: '/news'
target: '_self'
- text: Downloads
link: '/downloads'
target: '_self'

View File

@ -1,3 +0,0 @@
<script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
</body>
</html>

View File

@ -1,20 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="{{ site.description }}">
<title>{{ site.name }} - {{ page.title }}</title>
<link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/main.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body>

View File

@ -1,2 +0,0 @@
<div class="jumbotron">
</div>

View File

@ -1,13 +0,0 @@
<div class="panel panel-default">
<div class="panel-heading"> <h3 class="panel-title">Latest Releases</h3> </div>
<div class="panel-body">
<p>Stable: <a href="https://github.com/ZoneMinder/ZoneMinder/releases/latest">ZM 1.27 "Battery"</a></p>
<p>Release Date: March 15th, 2014</p>
<a href="https://github.com/ZoneMinder/ZoneMinder/archive/v1.27.0.tar.gz" class="btn btn-default">
<span class="glyphicon glyphicon-download"></span>
Source code (.tar.gz)
</a>
</div>
</div>

View File

@ -1,31 +0,0 @@
<div class="navbar navbar-default" role="navigation">
<div class="container-fluid">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a class="navbar-brand" href="/">ZoneMinder</a>
</div>
<div class="navbar-collapse collapse">
<ul class="nav navbar-nav">
{% assign navs = site.data.navigation %}
{% for nav in navs %}
{% if page.title == nav.text %}
<li class="current"><a href="{{ nav.link }}" target="{{ nav.target }}">{{ nav.text }}</a></li>
{% else %}
<li><a href="{{ nav.link }}" target="{{ nav.target }}">{{ nav.text }}</a></li>
{% endif %}
{% endfor %}
</ul>
<div class="pull-right">
<a href="http://www.facebook.com/zoneminder"><img src="/images/social/facebook.png" class="navbar-btn" /></a>
<a href="https://twitter.com/zoneminder"><img src="/images/social/twitter.png" class="navbar-btn" /></a>
<a href="https://github.com/ZoneMinder/ZoneMinder/"><img src="/images/social/Octocat.png" class="navbar-btn" /></a>
</div>
</div>
</div>
</div>

View File

@ -1,12 +0,0 @@
<div class="panel panel-default">
<div class="panel-heading"> <h3 class="panel-title">News Entries</h3> </div>
<div class="panel-body">
<ul>
{% for post in site.posts %}
<li>
<a href="{{ post.url }}">{{ post.title }}</a>
</li>
{% endfor %}
</ul>
</div>
</div>

View File

@ -1,15 +0,0 @@
{% for post in site.posts %}
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">{{ post.title }}</h3>
</div>
<div class="panel-body">
{{ post.content }}
</div>
<div class="panel-footer">
<span class="date">{{ post.date }}</span>
</div>
</div>
{% endfor %}

View File

@ -1,30 +0,0 @@
{% include head.html %}
<div class="container">
{% include navigation.ext %}
<div class="row">
<div class="col-sm-9">
{% if page.title == 'Home' %}
<h1>ZoneMinder</1>
<p class="lead"> ZoneMinder is a free, open source <abbr title="Closed-Circuit TeleVision">CCTV</abbr> Linux application which supports monitoring, alerting and recording of IP, USB and analog cameras. Use it with just about any camera to monitor your home, business, crib, or anything else, for free.</p>
<p><a href="/about" class="btn btn-primary btn-lg" role="button">Learn more</a></p>
{% endif %}
{{ content }}
</div>
<div class="col-sm-3">
{% include latest_release.ext %}
{% include post_index.ext %}
</div>
</div>
</div>
{% include footer.html %}

View File

@ -1,17 +0,0 @@
{% include head.html %}
<div class="container">
{% include navigation.ext %}
<header class="post-header">
<h2>{{ page.title }}</h2>
</header>
<article class="post-content">
{{ content }}
</article>
</div>
{% include footer.html %}

View File

@ -1,15 +0,0 @@
---
layout: default
---
<div class="post">
<header class="post-header">
<h1>{{ page.title }}</h1>
<p class="meta">{{ page.date | date: "%b %-d, %Y" }}{% if page.author %} • {{ page.author }}{% endif %}{% if page.meta %} • {{ page.meta }}{% endif %}</p>
</header>
<article class="post-content">
{{ content }}
</article>
</div>

View File

@ -1,12 +0,0 @@
---
layout: post
title: "ZoneMinder 1.26 is underway"
date: 2013-05-18 16:01:00
---
As it has been over 18 months since the last release, now is probably a good time to post an update. ZoneMinder is not dead.
I have been working with a few others from the #zoneminder freenode IRC channel to move the code base over to [github](https://github.com/ZoneMinder/ZoneMinder/), with the goal of making this project more transparent. We would like to open up development to the community, and to allow direct issue, bug and feature request tracking, all of which github allows. Our immediate goal is to release ZoneMinder 1.26! The 1.26 release will support a number of bug fixes and performance improvement from community patches.
Head on over to [our github page](https://github.com/ZoneMinder/ZoneMinder/) to follow the development, [submit (or solve) a bug](https://github.com/ZoneMinder/ZoneMinder/issues/), or contribute to the code! We are currently developing in [a number of branches](https://github.com/ZoneMinder/ZoneMinder/branches), which will eventually be merged for a beta release, followed by a merge to the master branch and tagged for a 1.26 stable release.

View File

@ -1,27 +0,0 @@
---
layout: post
title: "Release 1.27.0 - Battery"
date: 2014-03-15 12:00:00
---
This is an exciting release as we are fixing a number of bugs, as well as releasing a few new features. Notable notables include:
<h4>A new skin!</h4>
<img src="/images/console.png" alt="Flat ZoneMinder Console Skin" class='img-responsive img-thumbnail' />
This is the initial release of the 'flat' skin, courteously of Justin Lawrence (@justinlawrence). If you'd like to give it a try, you can do so by changing the ZM_SKIN variable in the options menu, or by appending ?skin=flat to your URL. Please report any bugs with this skin if you choose to use it.
<h4>zmcamtool.pl</h4>
Previously, there was no easy way to bring in new ptz controls and camera presets into an existing ZoneMinder system. For the non-technical, programming the same camera into a different system usually meant typing everything in by hand again. This new tool makes it possible to import and export these settings to or from a sql file. You can also use this tool to import any new controls or presets into your existing database, which were added to a new version of ZoneMinder. Execute "zmcamtool.pl --help" from the command line for further details.
<h4>Docker</h4>
This release contains an inital ZoneMinder Dockerfile. Docker, and Dockerfiles, allow you to spin up disposable 'containers', which are essentially self-contained linux virtual machines, each with a specific purpose (such as running ZoneMinder). This feature is an attempt to speed up testing of features and bugs.
This is still in early stages, however more information can be found here.
<h4>A new camera source type, libvlc.</h4>
Courtesy of @ebarnard! Yes, you can probably guess what this means. If the optional libvlc libraries are installed on your system, ZoneMinder will theoretically be able to stream from any camera the popular VLC media player can stream from. If you own an IP camera that previous versions of ZoneMinder did not support then try this new method. More information is here.

View File

@ -1,51 +0,0 @@
---
layout: page
title: About
permalink: /about/
---
<h3>Overview</h3>
ZoneMinder is intended for use in single or multi-camera video security applications, including commercial or home CCTV, theft prevention and child, family member or home monitoring and other domestic care scenarios such as nanny cam installations. It supports capture, analysis, recording, and monitoring of video data coming from one or more video or network cameras attached to a Linux system.
ZoneMinder also supports web and semi-automatic control of Pan/Tilt/Zoom cameras using a variety of protocols. It is suitable for use as a DIY home video security system and for commercial or professional video security and surveillance. It can also be integrated into a home automation system via X.10 or other protocols.
<h3>Technical Details</h3>
ZoneMinder is an integrated set of applications which provide a complete surveillance solution allowing capture, analysis, recording and monitoring of any CCTV or security cameras attached to a Linux based machine. It is designed to run on distributions which support the Video For Linux (V4L) interface and has been tested with video cameras attached to BTTV cards, various USB cameras and also supports most IP network cameras. A partial list is given in the Wiki and Support sections, please give feedback in the Forums if it works with yours. ZoneMinder also requires MySQL and PHP, and is enhanced by a webserver such as Apache.
ZoneMinder is highly componentised and comprises both the back-end daemons which do the actual image capture and analysis and a user friendly web GUI enabling you to both monitor the current situation and view and organise historical events that have taken place. The web GUI allows you to check and control your ZoneMinder installation from other computers in your home or from anywhere in the world. ZoneMinder does not require X at all, or the web interface for day-to-day functions and so is also suitable for 'headless' systems. There is also a simple xHTML interface allowing basic monitoring from suitable phones! Recent versions of ZoneMinder also include optional DVR (digital video recorder) functions allowing you to pause, rewind and even digitally zoom both live and historical video.
There is no hard upper or lower limit to the number of cameras that ZoneMinder can support, it entirely depends on the resources available on the host PC. This means that a basic home CCTV system can often be installed on old hardware that may be lying around unused giving you DIY CCTV completely for free!
<h3>Feature List</h3>
<div class="row">
<div class="col-sm-6">
<ul>
<li>Runs on any Linux distribution!</li>
<li>Supports analog, USB and IP cameras.</li>
<li>Support Pan/Tilt/Zoom cameras, extensible to add new control protocols.</li>
<li>Built on standard tools, C++, perl and PHP.</li>
<li>Uses high performance MySQL database.</li>
<li>High performance independent video capture and analysis daemons allowing high failure redundancy.</li>
<li>Multiple Zones (Regions Of Interest) can be defined per camera. Each can have a different sensitivity or be ignored altogether.</li>
<li>Large number of configuration options allowing maximum performance on any hardware.</li>
<li>User friendly web interface allowing full control of system or cameras as well as live views and event replays.</li>
</ul>
</div>
<div class="col-sm-6">
<ul>
<li>Supports live video in mpeg video, multi-part jpeg and stills formats.</li>
<li>Supports event replay in mpeg video, multi-part jpeg, stills formats, along with statistics detail.</li>
<li>User defined filters allowing selection of any number of events by combination of characteristics in any order.</li>
<li>Event notification by email or SMS including attached still images or video of specific events by filter.</li>
<li>Automatic uploading of matching events to external FTP storage for archiving and data security.</li>
<li>Includes bi-directional X.10 (home automation protocol) integration allowing X.10 signals to control when video is captured and for motion detection to trigger X.10 devices.</li>
<li>Highly partitioned design allow other hardware interfacing protocols to be added easily for support of alarm panels etc.</li>
<li>Multiple users and user access levels Multi-language support with many languages already included Full control script support allowing most tasks to be automated or added to other applications.</li>
<li>Support external triggering by 3rd party applications or equipment.</li>
<li>xHTML mobile/cellular phone access allowing access to common functions</li>
<li>iPhone interface available</li>
</ul>
</div>
</div>

View File

@ -0,0 +1,44 @@
set(HOST_OS "")
if(${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(HOST_OS "linux")
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES ".*(SunOS|Solaris).*")
set(HOST_OS "solaris")
set(SOLARIS 1)
endif()
if(${CMAKE_SYSTEM_NAME} MATCHES ".*BSD.*")
set(HOST_OS "BSD")
set(BSD 1)
endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Darwin")
set(HOST_OS "darwin")
endif()
if(NOT HOST_OS)
message(FATAL_ERROR
"ZoneMinder was unable to deterimine the host OS. Please report this.
Value of CMAKE_SYSTEM_NAME: ${CMAKE_SYSTEM_NAME}")
endif()
if(CMAKE_SYSTEM_NAME MATCHES "Linux")
string(TOLOWER "${CMAKE_SYSTEM_PROCESSOR}" ZM_SYSTEM_PROC)
if((ZM_SYSTEM_PROC STREQUAL "") OR (ZM_SYSTEM_PROC STREQUAL "unknown"))
execute_process(COMMAND uname -m OUTPUT_VARIABLE ZM_SYSTEM_PROC ERROR_VARIABLE ZM_SYSTEM_PROC_ERR)
# maybe make the following error checks fatal
if(ZM_SYSTEM_PROC_ERR)
message(WARNING "\nAn error occurred while attempting to determine the system processor:\n${ZM_SYSTEM_PROC_ERR}")
endif()
if(NOT ZM_SYSTEM_PROC)
message(WARNING "\nUnable to determine the system processor. This may cause a build failure.\n")
endif()
endif()
endif()
message(STATUS "Detected compiler: ${CMAKE_C_COMPILER}")
if(CMAKE_C_COMPILER MATCHES "gcc" OR CMAKE_C_COMPILER_ID STREQUAL "GNU")
include(${CMAKE_SOURCE_DIR}/cmake/compiler/gcc/settings.cmake)
elseif(CMAKE_C_COMPILER MATCHES "clang" OR CMAKE_C_COMPILER_ID MATCHES "Clang")
include(${CMAKE_SOURCE_DIR}/cmake/compiler/clang/settings.cmake)
else()
message(FATAL_ERROR "No supported compiler found")
endif()

View File

@ -0,0 +1,29 @@
@CHECK_PROTOTYPE_DEFINITION_HEADER@
static void cmakeRequireSymbol(int dummy, ...) {
(void) dummy;
}
static void checkSymbol(void) {
#ifndef @CHECK_PROTOTYPE_DEFINITION_SYMBOL@
cmakeRequireSymbol(0, &@CHECK_PROTOTYPE_DEFINITION_SYMBOL@);
#endif
}
@CHECK_PROTOTYPE_DEFINITION_PROTO@ {
return @CHECK_PROTOTYPE_DEFINITION_RETURN@;
}
#ifdef __CLASSIC_C__
int main() {
int ac;
char*av[];
#else
int main(int ac, char *av[]) {
#endif
checkSymbol();
if (ac > 1000) {
return *av[0];
}
return 0;
}

View File

@ -0,0 +1,98 @@
# - Check if the protoype we expect is correct.
# check_prototype_definition(FUNCTION PROTOTYPE RETURN HEADER VARIABLE)
# FUNCTION - The name of the function (used to check if prototype exists)
# PROTOTYPE- The prototype to check.
# RETURN - The return value of the function.
# HEADER - The header files required.
# VARIABLE - The variable to store the result.
# Example:
# check_prototype_definition(getpwent_r
# "struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)"
# "NULL"
# "unistd.h;pwd.h"
# SOLARIS_GETPWENT_R)
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
#=============================================================================
# Copyright 2005-2009 Kitware, Inc.
# Copyright 2010-2011 Andreas Schneider <asn@cryptomilk.org>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
#
get_filename_component(__check_proto_def_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE)
if ("${_VARIABLE}" MATCHES "^${_VARIABLE}$")
set(CHECK_PROTOTYPE_DEFINITION_CONTENT "/* */\n")
set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS})
if (CMAKE_REQUIRED_LIBRARIES)
set(CHECK_PROTOTYPE_DEFINITION_LIBS
LINK_LIBRARIES ${CMAKE_REQUIRED_LIBRARIES})
else()
set(CHECK_PROTOTYPE_DEFINITION_LIBS)
endif()
if (CMAKE_REQUIRED_INCLUDES)
set(CMAKE_SYMBOL_EXISTS_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
else()
set(CMAKE_SYMBOL_EXISTS_INCLUDES)
endif()
foreach(_FILE ${_HEADER})
set(CHECK_PROTOTYPE_DEFINITION_HEADER
"${CHECK_PROTOTYPE_DEFINITION_HEADER}#include <${_FILE}>\n")
endforeach()
set(CHECK_PROTOTYPE_DEFINITION_SYMBOL ${_FUNCTION})
set(CHECK_PROTOTYPE_DEFINITION_PROTO ${_PROTOTYPE})
set(CHECK_PROTOTYPE_DEFINITION_RETURN ${_RETURN})
configure_file("${__check_proto_def_dir}/CheckPrototypeDefinition.c.in"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c" @ONLY)
file(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c _SOURCE)
try_compile(${_VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
${CHECK_PROTOTYPE_DEFINITION_LIBS}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CHECK_PROTOTYPE_DEFINITION_FLAGS}
"${CMAKE_SYMBOL_EXISTS_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)
if (${_VARIABLE})
set(${_VARIABLE} 1 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - True")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} passed with the following output:\n"
"${OUTPUT}\n\n")
else ()
message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - False")
set(${_VARIABLE} 0 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} failed with the following output:\n"
"${OUTPUT}\n\n${_SOURCE}\n\n")
endif ()
endif()
endfunction()

View File

@ -0,0 +1,98 @@
# - Check if the protoype we expect is correct.
# check_prototype_definition(FUNCTION PROTOTYPE RETURN HEADER VARIABLE)
# FUNCTION - The name of the function (used to check if prototype exists)
# PROTOTYPE- The prototype to check.
# RETURN - The return value of the function.
# HEADER - The header files required.
# VARIABLE - The variable to store the result.
# Example:
# check_prototype_definition(getpwent_r
# "struct passwd *getpwent_r(struct passwd *src, char *buf, int buflen)"
# "NULL"
# "unistd.h;pwd.h"
# SOLARIS_GETPWENT_R)
# The following variables may be set before calling this macro to
# modify the way the check is run:
#
# CMAKE_REQUIRED_FLAGS = string of compile command line flags
# CMAKE_REQUIRED_DEFINITIONS = list of macros to define (-DFOO=bar)
# CMAKE_REQUIRED_INCLUDES = list of include directories
# CMAKE_REQUIRED_LIBRARIES = list of libraries to link
#=============================================================================
# Copyright 2005-2009 Kitware, Inc.
# Copyright 2010-2011 Andreas Schneider <asn@cryptomilk.org>
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
#
get_filename_component(__check_proto_def_dir "${CMAKE_CURRENT_LIST_FILE}" PATH)
function(CHECK_PROTOTYPE_DEFINITION _FUNCTION _PROTOTYPE _RETURN _HEADER _VARIABLE)
if ("${_VARIABLE}" MATCHES "^${_VARIABLE}$")
set(CHECK_PROTOTYPE_DEFINITION_CONTENT "/* */\n")
set(CHECK_PROTOTYPE_DEFINITION_FLAGS ${CMAKE_REQUIRED_FLAGS})
if (CMAKE_REQUIRED_LIBRARIES)
set(CHECK_PROTOTYPE_DEFINITION_LIBS
${LINK_LIBRARIES} ${CMAKE_REQUIRED_LIBRARIES})
else()
set(CHECK_PROTOTYPE_DEFINITION_LIBS)
endif()
if (CMAKE_REQUIRED_INCLUDES)
set(CMAKE_SYMBOL_EXISTS_INCLUDES
"-DINCLUDE_DIRECTORIES:STRING=${CMAKE_REQUIRED_INCLUDES}")
else()
set(CMAKE_SYMBOL_EXISTS_INCLUDES)
endif()
foreach(_FILE ${_HEADER})
set(CHECK_PROTOTYPE_DEFINITION_HEADER
"${CHECK_PROTOTYPE_DEFINITION_HEADER}#include <${_FILE}>\n")
endforeach()
set(CHECK_PROTOTYPE_DEFINITION_SYMBOL ${_FUNCTION})
set(CHECK_PROTOTYPE_DEFINITION_PROTO ${_PROTOTYPE})
set(CHECK_PROTOTYPE_DEFINITION_RETURN ${_RETURN})
configure_file("${__check_proto_def_dir}/CheckPrototypeDefinition.c.in"
"${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c" @ONLY)
file(READ ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c _SOURCE)
try_compile(${_VARIABLE}
${CMAKE_BINARY_DIR}
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CheckPrototypeDefinition.c
COMPILE_DEFINITIONS ${CMAKE_REQUIRED_DEFINITIONS}
${CHECK_PROTOTYPE_DEFINITION_LIBS}
CMAKE_FLAGS -DCOMPILE_DEFINITIONS:STRING=${CHECK_PROTOTYPE_DEFINITION_FLAGS}
"${CMAKE_SYMBOL_EXISTS_INCLUDES}"
OUTPUT_VARIABLE OUTPUT)
if (${_VARIABLE})
set(${_VARIABLE} 1 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - True")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeOutput.log
"Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} passed with the following output:\n"
"${OUTPUT}\n\n")
else ()
message(STATUS "Checking prototype ${_FUNCTION} for ${_VARIABLE} - False")
set(${_VARIABLE} 0 CACHE INTERNAL "Have correct prototype for ${_FUNCTION}")
file(APPEND ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the prototype ${_FUNCTION} exists for ${_VARIABLE} failed with the following output:\n"
"${OUTPUT}\n\n${_SOURCE}\n\n")
endif ()
endif()
endfunction()

View File

@ -0,0 +1,58 @@
# Check whether sendfile() is supported and what prototype it has
include(CheckCSourceCompiles)
if (UNIX OR MINGW)
SET(CMAKE_REQUIRED_DEFINITIONS -Werror-implicit-function-declaration)
endif()
check_c_source_compiles("#include <sys/sendfile.h>
#include <stdio.h>
int main()
{
sendfile(1, 1, NULL, 0);
return 0;
}" HAVE_SENDFILE4_SUPPORT)
if(HAVE_SENDFILE4_SUPPORT)
add_definitions(-DHAVE_SENDFILE4_SUPPORT=1)
unset(CMAKE_REQUIRED_DEFINITIONS)
message(STATUS "Sendfile support: Linux/Solaris sendfile()")
return()
endif()
find_library(SENDFILE_LIBRARIES NAMES sendfile)
if(SENDFILE_LIBRARIES)
include(CheckLibraryExists)
check_library_exists(sendfile sendfile ${SENDFILE_LIBRARIES} HAVE_SENDFILE4_SUPPORT)
if(HAVE_SENDFILE4_SUPPORT)
add_definitions(-DHAVE_SENDFILE4_SUPPORT=1)
unset(CMAKE_REQUIRED_DEFINITIONS)
message(STATUS "Sendfile support: Solaris sendfile()")
return()
endif()
endif()
set(SENDFILE_LIBRARIES "")
check_c_source_compiles("#include <sys/socket.h>
#include <stdio.h>
int main()
{
sendfile(1, 1, 0, 0, NULL, NULL, 0);
return 0;
}" HAVE_SENDFILE7_SUPPORT)
if(HAVE_SENDFILE7_SUPPORT)
add_definitions(-DHAVE_SENDFILE7_SUPPORT=1)
unset(CMAKE_REQUIRED_DEFINITIONS)
message(STATUS "Sendfile support: FreeBSD sendfile()")
return()
endif()
check_c_source_compiles("#include <sys/socket.h>
#include <stdio.h>
#include <sys/uio.h>
int main()
{
sendfile(1, 1, 0, NULL, NULL, 0);
return 0;
}" HAVE_SENDFILE6_SUPPORT)
if(HAVE_SENDFILE6_SUPPORT)
add_definitions(-DHAVE_SENDFILE6_SUPPORT=1)
unset(CMAKE_REQUIRED_DEFINITIONS)
message(STATUS "Sendfile support: MacOS sendfile()")
return()
endif()

View File

@ -0,0 +1,50 @@
add_library(zm-compile-option-interface INTERFACE)
# Use -std=c++11 instead of -std=gnu++11
set(CMAKE_CXX_EXTENSIONS OFF)
add_library(zm-feature-interface INTERFACE)
# The cxx_std_* feature flags were only introduced in CMake 3.8
# Use to old way to specify the required standard level for older CMake versions.
# Remove this once we raise the required CMake version.
if(${CMAKE_VERSION} VERSION_LESS 3.8.0)
set(CMAKE_CXX_STANDARD 11)
else()
target_compile_features(zm-feature-interface
INTERFACE
cxx_std_11)
endif()
# Interface to set warning levels on targets.
# It gets populated in the compiler specific script.
add_library(zm-warning-interface INTERFACE)
# Interface which disables all warnings on the target.
add_library(zm-no-warning-interface INTERFACE)
target_compile_options(zm-no-warning-interface
INTERFACE
-w)
# An interface used by all other interfaces.
add_library(zm-default-interface INTERFACE)
target_link_libraries(zm-default-interface
INTERFACE
zm-compile-option-interface
zm-feature-interface)
# An interface which provides the flags and definitions
# used by the non-dependency targets.
add_library(zm-core-interface INTERFACE)
target_link_libraries(zm-core-interface
INTERFACE
zm-default-interface
zm-warning-interface)
# An interface which provides the flags and definitions
# used by the external dependency targets.
add_library(zm-dependency-interface INTERFACE)
target_link_libraries(zm-dependency-interface
INTERFACE
zm-default-interface
zm-no-warning-interface)

View File

@ -0,0 +1,55 @@
# - Try to find the GLIB2 libraries
# Once done this will define
#
# GLIB2_FOUND - system has glib2
# GLIB2_INCLUDE_DIR - the glib2 include directory
# GLIB2_LIBRARIES - glib2 library
# Copyright (c) 2008 Laurent Montel, <montel@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
if(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES)
# Already in cache, be silent
set(GLIB2_FIND_QUIETLY TRUE)
endif(GLIB2_INCLUDE_DIR AND GLIB2_LIBRARIES)
if (NOT WIN32)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules(PC_LibGLIB2 glib-2.0)
endif (PKG_CONFIG_FOUND)
endif(NOT WIN32)
if (PC_LibGLIB2_INCLUDEDIR)
set(GLIB2_MAIN_INCLUDE_DIR ${PC_LibGLIB2_INCLUDEDIR})
else (PC_LibGLIB2_INCLUDEDIR)
find_path(GLIB2_MAIN_INCLUDE_DIR NAMES glib.h PATH_SUFFIXES glib-2.0)
endif (PC_LibGLIB2_INCLUDEDIR)
# search the glibconfig.h include dir under the same root where the library is found
find_library(GLIB2_LIBRARIES
NAMES glib-2.0
HINTS ${PC_LibGLIB2_LIBDIR}
)
get_filename_component(glib2LibDir "${GLIB2_LIBRARIES}" PATH)
find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h
PATH_SUFFIXES glib-2.0/include
HINTS ${PC_LibGLIB2_INCLUDEDIR} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH})
set(GLIB2_INCLUDE_DIR "${GLIB2_MAIN_INCLUDE_DIR}")
# not sure if this include dir is optional or required
# for now it is optional
if(GLIB2_INTERNAL_INCLUDE_DIR)
set(GLIB2_INCLUDE_DIR ${GLIB2_INCLUDE_DIR} "${GLIB2_INTERNAL_INCLUDE_DIR}")
endif(GLIB2_INTERNAL_INCLUDE_DIR)
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(GLIB2 DEFAULT_MSG GLIB2_LIBRARIES GLIB2_MAIN_INCLUDE_DIR)
mark_as_advanced(GLIB2_INCLUDE_DIR GLIB2_LIBRARIES)

View File

@ -0,0 +1,28 @@
include(FindPackageHandleStandardArgs)
find_package(PkgConfig QUIET)
pkg_check_modules(PC_LIBJWT QUIET libjwt)
find_path(LIBJWT_INCLUDE_DIR
NAMES jwt.h
HINTS ${PC_LIBJWT_INCLUDEDIR} ${PC_LIBJWT_INCLUDE_DIRS}
)
find_library(LIBJWT_LIBRARY
NAMES jwt-gnutls libjwt-gnutls liblibjwt-gnutls
HINTS ${PC_LIBJWT_LIBDIR} ${PC_LIBJWT_LIBRARY_DIR}
)
find_package_handle_standard_args(LibJWT
REQUIRED_VARS LIBJWT_INCLUDE_DIR LIBJWT_LIBRARY
)
if(LIBJWT_FOUND)
add_library(libjwt STATIC IMPORTED GLOBAL)
set_target_properties(libjwt PROPERTIES
IMPORTED_LOCATION "${LIBJWT_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${LIBJWT_INCLUDE_DIR}"
)
endif()
mark_as_advanced(LIBJWT_INCLUDE_DIR LIBJWT_LIBRARY)

View File

@ -0,0 +1,78 @@
# - try to find perl modules, passed as COMPONENTS
#
# Non-cache variable you might use in your CMakeLists.txt:
# PERLMODULES_FOUND
#
# Requires these CMake modules:
# FindPackageHandleStandardArgs (known included with CMake >=2.6.2)
#
# Original Author:
# 2012 Ryan Pavlik <rpavlik@iastate.edu> <abiryan@ryand.net>
# http://academic.cleardefinition.com
# Iowa State University HCI Graduate Program/VRAC
#
# Copyright Iowa State University 2012.
# Distributed under the Boost Software License, Version 1.0.
# (See accompanying file LICENSE_1_0.txt or copy at
# http://www.boost.org/LICENSE_1_0.txt)
if(NOT PERL_FOUND)
find_package(Perl QUIET)
endif()
set(_deps_check)
if(PERL_FOUND)
foreach(module ${PerlModules_FIND_COMPONENTS})
string(REPLACE "::" "/" modfilename "${module}.pm")
string(REPLACE "::" "_" modvarname "PERLMODULES_${module}_MODULE")
string(TOUPPER "${modvarname}" modvarname)
list(APPEND _deps_check ${modvarname})
if(NOT ${modvarname})
if(NOT PerlModules_FIND_QUIETLY)
message(STATUS "Checking for perl module ${module}")
endif()
execute_process(COMMAND
"${PERL_EXECUTABLE}"
"-e"
"use ${module}; print \$INC{\"${modfilename}\"}"
RESULT_VARIABLE result_code
OUTPUT_VARIABLE filename
ERROR_VARIABLE error_info
OUTPUT_STRIP_TRAILING_WHITESPACE)
if(result_code EQUAL 0)
if(NOT PerlModules_FIND_QUIETLY)
message(STATUS
"Checking for perl module ${module} - found at ${filename}")
endif()
set(${modvarname}
"${filename}"
CACHE
FILEPATH
"Location found for module ${module}"
FORCE)
mark_as_advanced(${modvarname})
else()
if(NOT PerlModules_FIND_QUIETLY)
message(STATUS "Checking for perl module ${module} - failed")
endif()
set(${modvarname}
"NOTFOUND"
CACHE
FILEPATH
"No location found for module ${module}"
FORCE)
file(APPEND
${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeError.log
"Determining if the Perl module ${module} exists failed with the following error output:\n"
"${error_info}\n\n")
endif()
endif()
endforeach()
endif()
include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(PerlModules
DEFAULT_MSG
PERL_FOUND
${_deps_check})

View File

@ -0,0 +1,63 @@
# - Try to find Polkit
# Once done this will define
#
# POLKIT_FOUND - system has Polkit
# POLKIT_INCLUDE_DIRS - Polkit's include directories
# POLKIT_AGENT_INCLUDE_DIRS - Polkit-agent's include directories
# POLKIT_LIBRARIES - Link this to use polkit's gobject library
# POLKIT_AGENT_LIBRARY - Link this to use the agent wrapper in polkit
# POLKIT_DEFINITIONS - Compiler switches required for using Polkit
# Copyright (c) 2009, Dario Freddi, <drf@kde.org>
#
# Redistribution and use is allowed according to the terms of the BSD license.
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
#NOTE: Polkit agent library is disabled!
if (POLKIT_INCLUDE_DIR AND POLKIT_LIB)
set(POLKIT_FIND_QUIETLY TRUE)
endif (POLKIT_INCLUDE_DIR AND POLKIT_LIB)
if (NOT WIN32)
# use pkg-config to get the directories and then use these values
# in the FIND_PATH() and FIND_LIBRARY() calls
find_package(PkgConfig)
pkg_search_module(PC_POLKIT polkit-gobject-1 polkit)
#pkg_check_modules(PC_POLKIT_AGENT polkit-agent-1)
set(POLKIT_DEFINITIONS ${PC_POLKIT_CFLAGS_OTHER})
endif (NOT WIN32)
# We must include glib paths too... which sucks balls
find_package(GLIB2)
find_path( GLIB_CONFIG_INCLUDE_DIR
NAMES glibconfig.h
PATH_SUFFIXES glib-2.0/include
HINTS ${PC_POLKIT_INCLUDE_DIRS}
)
find_path( POLKIT_INCLUDE_DIR
NAMES polkit/polkit.h libpolkit/libpolkit.h
PATH_SUFFIXES polkit-1 polkit
HINTS ${PC_POLKIT_INCLUDE_DIRS}
)
#find_path( POLKIT_AGENT_INCLUDE_DIR
# NAMES polkitagent/polkitagent.h
# PATH_SUFFIXES polkit-1
# HINTS ${PC_POLKIT_AGENT_INCLUDE_DIRS}
#)
#set(POLKIT_INCLUDE_DIRS ${GLIB2_INCLUDE_DIR} ${_POLKIT_INCLUDE_DIR})
#set(POLKIT_AGENT_INCLUDE_DIRS ${GLIB2_INCLUDE_DIR} ${_POLKIT_AGENT_INCLUDE_DIR})
find_library( POLKIT_LIBRARIES
NAMES polkit-gobject-1 polkit
HINTS ${PC_POLKIT_LIBDIR}
)
#find_library( POLKIT_AGENT_LIBRARY
# NAMES polkit-agent-1
# HINTS ${PC_POLKIT_AGENT_LIBDIR}
#)
#set(POLKIT_LIBRARIES ${_POLKIT_LIBRARIES} ${GLIB2_LIBRARIES})
#set(POLKIT_AGENT_LIBRARY ${_POLKIT_AGENT_LIBRARY} ${GLIB2_LIBRARIES})
include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set POLKIT_FOUND to TRUE if
# all listed variables are TRUE
#find_package_handle_standard_args(Polkit DEFAULT_MSG POLKIT_LIBRARIES POLKIT_AGENT_LIBRARY
# POLKIT_INCLUDE_DIR POLKIT_AGENT_INCLUDE_DIR GLIB2_FOUND)
find_package_handle_standard_args(Polkit DEFAULT_MSG POLKIT_LIBRARIES
POLKIT_INCLUDE_DIR GLIB2_FOUND)
mark_as_advanced(POLKIT_INCLUDE_DIRS POLKIT_AGENT_INCLUDE_DIRS POLKIT_LIBRARIES POLKIT_AGENT_LIBRARY GLIB_INCLUDE_DIR)
set(POLKIT_POLICY_FILES_INSTALL_DIR ${CMAKE_INSTALL_PREFIX}/share/polkit-1/actions)

View File

@ -0,0 +1,188 @@
# - Define GNU standard installation directories
# Provides install directory variables as defined for GNU software:
# http://www.gnu.org/prep/standards/html_node/Directory-Variables.html
# Inclusion of this module defines the following variables:
# CMAKE_INSTALL_<dir> - destination for files of a given type
# CMAKE_INSTALL_FULL_<dir> - corresponding absolute path
# where <dir> is one of:
# BINDIR - user executables (bin)
# SBINDIR - system admin executables (sbin)
# LIBEXECDIR - program executables (libexec)
# SYSCONFDIR - read-only single-machine data (etc)
# SHAREDSTATEDIR - modifiable architecture-independent data (com)
# LOCALSTATEDIR - modifiable single-machine data (var)
# LIBDIR - object code libraries (lib or lib64 or lib/<multiarch-tuple> on Debian)
# INCLUDEDIR - C header files (include)
# OLDINCLUDEDIR - C header files for non-gcc (/usr/include)
# DATAROOTDIR - read-only architecture-independent data root (share)
# DATADIR - read-only architecture-independent data (DATAROOTDIR)
# INFODIR - info documentation (DATAROOTDIR/info)
# LOCALEDIR - locale-dependent data (DATAROOTDIR/locale)
# MANDIR - man documentation (DATAROOTDIR/man)
# DOCDIR - documentation root (DATAROOTDIR/doc/PROJECT_NAME)
# Each CMAKE_INSTALL_<dir> value may be passed to the DESTINATION options of
# install() commands for the corresponding file type. If the includer does
# not define a value the above-shown default will be used and the value will
# appear in the cache for editing by the user.
# Each CMAKE_INSTALL_FULL_<dir> value contains an absolute path constructed
# from the corresponding destination by prepending (if necessary) the value
# of CMAKE_INSTALL_PREFIX.
#=============================================================================
# Copyright 2011 Nikita Krupen'ko <krnekit@gmail.com>
# Copyright 2011 Kitware, Inc.
#
# Distributed under the OSI-approved BSD License (the "License");
# see accompanying file Copyright.txt for details.
#
# This software is distributed WITHOUT ANY WARRANTY; without even the
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# See the License for more information.
#=============================================================================
# (To distribute this file outside of CMake, substitute the full
# License text for the above reference.)
# Installation directories
#
if(NOT DEFINED CMAKE_INSTALL_BINDIR)
set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)")
endif()
if(NOT DEFINED CMAKE_INSTALL_SBINDIR)
set(CMAKE_INSTALL_SBINDIR "sbin" CACHE PATH "system admin executables (sbin)")
endif()
if(NOT DEFINED CMAKE_INSTALL_LIBEXECDIR)
set(CMAKE_INSTALL_LIBEXECDIR "libexec" CACHE PATH "program executables (libexec)")
endif()
if(NOT DEFINED CMAKE_INSTALL_SYSCONFDIR)
set(CMAKE_INSTALL_SYSCONFDIR "etc" CACHE PATH "read-only single-machine data (etc)")
endif()
if(NOT DEFINED CMAKE_INSTALL_SHAREDSTATEDIR)
set(CMAKE_INSTALL_SHAREDSTATEDIR "com" CACHE PATH "modifiable architecture-independent data (com)")
endif()
if(NOT DEFINED CMAKE_INSTALL_LOCALSTATEDIR)
set(CMAKE_INSTALL_LOCALSTATEDIR "var" CACHE PATH "modifiable single-machine data (var)")
endif()
if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(_LIBDIR_DEFAULT "lib")
# Override this default 'lib' with 'lib64' iff:
# - we are on Linux system but NOT cross-compiling
# - we are NOT on debian
# - we are on a 64 bits system
# reason is: amd64 ABI: http://www.x86-64.org/documentation/abi.pdf
# For Debian with multiarch, use 'lib/${CMAKE_LIBRARY_ARCHITECTURE}' if
# CMAKE_LIBRARY_ARCHITECTURE is set (which contains e.g. "i386-linux-gnu"
# See http://wiki.debian.org/Multiarch
if(CMAKE_SYSTEM_NAME MATCHES "Linux"
AND NOT CMAKE_CROSSCOMPILING)
if (EXISTS "/etc/debian_version") # is this a debian system ?
if(CMAKE_LIBRARY_ARCHITECTURE)
set(_LIBDIR_DEFAULT "lib/${CMAKE_LIBRARY_ARCHITECTURE}")
endif()
else() # not debian, rely on CMAKE_SIZEOF_VOID_P:
if(NOT DEFINED CMAKE_SIZEOF_VOID_P)
message(AUTHOR_WARNING
"Unable to determine default CMAKE_INSTALL_LIBDIR directory because no target architecture is known. "
"Please enable at least one language before including GNUInstallDirs.")
else()
if("${CMAKE_SIZEOF_VOID_P}" EQUAL "8")
set(_LIBDIR_DEFAULT "lib64")
endif()
endif()
endif()
endif()
set(CMAKE_INSTALL_LIBDIR "${_LIBDIR_DEFAULT}" CACHE PATH "object code libraries (${_LIBDIR_DEFAULT})")
endif()
if(NOT DEFINED CMAKE_INSTALL_INCLUDEDIR)
set(CMAKE_INSTALL_INCLUDEDIR "include" CACHE PATH "C header files (include)")
endif()
if(NOT DEFINED CMAKE_INSTALL_OLDINCLUDEDIR)
set(CMAKE_INSTALL_OLDINCLUDEDIR "/usr/include" CACHE PATH "C header files for non-gcc (/usr/include)")
endif()
if(NOT DEFINED CMAKE_INSTALL_DATAROOTDIR)
set(CMAKE_INSTALL_DATAROOTDIR "share" CACHE PATH "read-only architecture-independent data root (share)")
endif()
#-----------------------------------------------------------------------------
# Values whose defaults are relative to DATAROOTDIR. Store empty values in
# the cache and store the defaults in local variables if the cache values are
# not set explicitly. This auto-updates the defaults as DATAROOTDIR changes.
if(NOT CMAKE_INSTALL_DATADIR)
set(CMAKE_INSTALL_DATADIR "" CACHE PATH "read-only architecture-independent data (DATAROOTDIR)")
set(CMAKE_INSTALL_DATADIR "${CMAKE_INSTALL_DATAROOTDIR}")
endif()
if(NOT CMAKE_INSTALL_INFODIR)
set(CMAKE_INSTALL_INFODIR "" CACHE PATH "info documentation (DATAROOTDIR/info)")
set(CMAKE_INSTALL_INFODIR "${CMAKE_INSTALL_DATAROOTDIR}/info")
endif()
if(NOT CMAKE_INSTALL_LOCALEDIR)
set(CMAKE_INSTALL_LOCALEDIR "" CACHE PATH "locale-dependent data (DATAROOTDIR/locale)")
set(CMAKE_INSTALL_LOCALEDIR "${CMAKE_INSTALL_DATAROOTDIR}/locale")
endif()
if(NOT CMAKE_INSTALL_MANDIR)
set(CMAKE_INSTALL_MANDIR "" CACHE PATH "man documentation (DATAROOTDIR/man)")
set(CMAKE_INSTALL_MANDIR "${CMAKE_INSTALL_DATAROOTDIR}/man")
endif()
if(NOT CMAKE_INSTALL_DOCDIR)
set(CMAKE_INSTALL_DOCDIR "" CACHE PATH "documentation root (DATAROOTDIR/doc/PROJECT_NAME)")
set(CMAKE_INSTALL_DOCDIR "${CMAKE_INSTALL_DATAROOTDIR}/doc/${PROJECT_NAME}")
endif()
#-----------------------------------------------------------------------------
mark_as_advanced(
CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_SBINDIR
CMAKE_INSTALL_LIBEXECDIR
CMAKE_INSTALL_SYSCONFDIR
CMAKE_INSTALL_SHAREDSTATEDIR
CMAKE_INSTALL_LOCALSTATEDIR
CMAKE_INSTALL_LIBDIR
CMAKE_INSTALL_INCLUDEDIR
CMAKE_INSTALL_OLDINCLUDEDIR
CMAKE_INSTALL_DATAROOTDIR
CMAKE_INSTALL_DATADIR
CMAKE_INSTALL_INFODIR
CMAKE_INSTALL_LOCALEDIR
CMAKE_INSTALL_MANDIR
CMAKE_INSTALL_DOCDIR
)
# Result directories
#
foreach(dir
BINDIR
SBINDIR
LIBEXECDIR
SYSCONFDIR
SHAREDSTATEDIR
LOCALSTATEDIR
LIBDIR
INCLUDEDIR
OLDINCLUDEDIR
DATAROOTDIR
DATADIR
INFODIR
LOCALEDIR
MANDIR
DOCDIR
)
if(NOT IS_ABSOLUTE ${CMAKE_INSTALL_${dir}})
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_${dir}}")
else()
set(CMAKE_INSTALL_FULL_${dir} "${CMAKE_INSTALL_${dir}}")
endif()
endforeach()

View File

@ -0,0 +1,70 @@
#
# Copyright (C) 2012 Emmanuel Roullit <emmanuel.roullit@gmail.com>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or (at
# your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110, USA
#
# Generate man pages of the project by using the
# POD header written in the tool source code.
# To use it, include this file in CMakeLists.txt and
# invoke POD2MAN(<podfile> <manfile> <section>)
MACRO(POD2MAN PODFILE MANFILE SECTION MANPAGE_DEST_PREFIX)
FIND_PROGRAM(POD2MAN pod2man)
FIND_PROGRAM(GZIP gzip)
IF(NOT POD2MAN)
MESSAGE(FATAL ERROR "Need pod2man installed to generate man page")
ENDIF(NOT POD2MAN)
IF(NOT GZIP)
MESSAGE(FATAL ERROR "Need gzip installed to compress man page")
ENDIF(NOT GZIP)
IF(NOT EXISTS ${PODFILE})
MESSAGE(FATAL ERROR "Could not find pod file ${PODFILE} to generate man page")
ENDIF(NOT EXISTS ${PODFILE})
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}
DEPENDS ${PODFILE}
COMMAND ${POD2MAN}
ARGS --section ${SECTION} --center ${CMAKE_PROJECT_NAME} --release --stderr --name ${MANFILE}
${PODFILE} > ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}
)
ADD_CUSTOM_COMMAND(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}.gz
COMMAND ${GZIP} --best -c ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION} > ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}.gz
DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}
)
SET(MANPAGE_TARGET "man-${MANFILE}")
ADD_CUSTOM_TARGET(${MANPAGE_TARGET} ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}.gz)
INSTALL(
FILES ${CMAKE_CURRENT_BINARY_DIR}/${MANFILE}.${SECTION}.gz
DESTINATION ${MANPAGE_DEST_PREFIX}/man${SECTION}
)
ENDMACRO(POD2MAN PODFILE MANFILE SECTION MANPAGE_DEST_PREFIX)
MACRO(ADD_MANPAGE_TARGET)
# It is not possible add a dependency to target 'install'
# Run hard-coded 'make man' when 'make install' is invoked
INSTALL(CODE "EXECUTE_PROCESS(COMMAND make man)")
ADD_CUSTOM_TARGET(man)
ENDMACRO(ADD_MANPAGE_TARGET)

View File

@ -0,0 +1,26 @@
if(POLICY CMP0007)
cmake_policy(SET CMP0007 OLD)
endif(POLICY CMP0007)
if (NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
message(FATAL_ERROR "Cannot find install manifest: \"@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt\"")
endif(NOT EXISTS "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt")
file(READ "@CMAKE_CURRENT_BINARY_DIR@/install_manifest.txt" files)
string(REGEX REPLACE "\n" ";" files "${files}")
list(REVERSE files)
foreach (file ${files})
message(STATUS "Uninstalling \"$ENV{DESTDIR}${file}\"")
if (EXISTS "$ENV{DESTDIR}${file}")
execute_process(
COMMAND @CMAKE_COMMAND@ -E remove "$ENV{DESTDIR}${file}"
OUTPUT_VARIABLE rm_out
RESULT_VARIABLE rm_retval
)
if(NOT ${rm_retval} EQUAL 0)
message(FATAL_ERROR "Problem when removing \"$ENV{DESTDIR}${file}\"")
endif (NOT ${rm_retval} EQUAL 0)
else (EXISTS "$ENV{DESTDIR}${file}")
message(STATUS "File \"$ENV{DESTDIR}${file}\" does not exist.")
endif (EXISTS "$ENV{DESTDIR}${file}")
endforeach(file)

View File

@ -0,0 +1,43 @@
target_compile_options(zm-warning-interface
INTERFACE
-Wall
-Wextra
-Wimplicit-fallthrough
-Wno-unused-parameter
-Wvla)
if(ENABLE_WERROR)
target_compile_options(zm-warning-interface
INTERFACE
-Werror)
endif()
if(ASAN)
target_compile_options(zm-compile-option-interface
INTERFACE
-fno-omit-frame-pointer
-fsanitize=address
-fsanitize-recover=address
-fsanitize-address-use-after-scope)
target_link_options(zm-compile-option-interface
INTERFACE
-fno-omit-frame-pointer
-fsanitize=address
-fsanitize-recover=address
-fsanitize-address-use-after-scope)
message(STATUS "Clang: Enabled AddressSanitizer (ASan)")
endif()
if(TSAN)
target_compile_options(zm-compile-option-interface
INTERFACE
-fsanitize=thread)
target_link_options(zm-compile-option-interface
INTERFACE
-fsanitize=thread)
message(STATUS "Clang: Enabled ThreadSanitizer (TSan)")
endif()

View File

@ -0,0 +1,48 @@
target_compile_options(zm-warning-interface
INTERFACE
-Wall
$<$<VERSION_GREATER:$<CXX_COMPILER_VERSION>,5.0>:-Wconditionally-supported>
-Wextra
-Wformat-security
-Wno-cast-function-type
$<$<VERSION_LESS:$<CXX_COMPILER_VERSION>,11>:-Wno-clobbered>
-Wno-unused-parameter
-Woverloaded-virtual
-Wvla)
if(ENABLE_WERROR)
target_compile_options(zm-warning-interface
INTERFACE
-Werror)
endif()
if(ASAN)
target_compile_options(zm-compile-option-interface
INTERFACE
-D_GLIBCXX_SANITIZE_VECTOR=1
-fno-omit-frame-pointer
-fsanitize=address
-fsanitize-recover=address
-fsanitize-address-use-after-scope)
target_link_options(zm-compile-option-interface
INTERFACE
-fno-omit-frame-pointer
-fsanitize=address
-fsanitize-recover=address
-fsanitize-address-use-after-scope)
message(STATUS "GCC: Enabled AddressSanitizer (ASan)")
endif()
if(TSAN)
target_compile_options(zm-compile-option-interface
INTERFACE
-fsanitize=thread)
target_link_options(zm-compile-option-interface
INTERFACE
-fsanitize=thread)
message(STATUS "GCC: Enabled ThreadSanitizer (TSan)")
endif()

85
cmakecacheimport.sh Executable file
View File

@ -0,0 +1,85 @@
#!/bin/bash
# The purpose of this file is to add entries from zm.conf to cmake's cache.
echo "*** This bash script imports configuration from zm.conf into cmake initial cache file"
echo "*** The file can be used with cmake like so: cmake -C zm_conf.cmake [extra cmake options] ."
echo "*** Usage: ./cmakecacheimport.sh [PATH TO ZM.CONF]"
echo ""
# Check for too many prameters
if [[ "$#" -gt "0" && "$#" -ne "1" ]]; then
echo "Error: Too many parameters!"
exit 50
fi
# Check if zm.conf was supplied as an argument and that it exists
if [ "$#" -eq "1" ]; then
ZM_CONFIG="$1"
if [ ! -f "$ZM_CONFIG" ]; then
echo "The zoneminder configuration file $ZM_CONFIG does not exist!"
exit 40
fi
fi
# Load zm.conf
if [ -n "$ZM_CONFIG" ]; then
echo "Using custom zm.conf $ZM_CONFIG"
source "$ZM_CONFIG"
elif [ -f "/etc/zm.conf" ]; then
echo "Using system zm.conf"
source "/etc/zm.conf"
elif [ -f "zm.conf" ]; then
echo "Using local zm.conf"
source "zm.conf"
else
echo "Failed locating zoneminder configuration file (zm.conf)\nPlease specify the full path to the zoneminder configuration file"
exit 45
fi
# Create the file
touch "zm_conf.cmake"
if [ "$?" != "0" ]; then
echo "Failed creating zm_conf.cmake in the current directory"
exit 10
fi
# Print some information
#echo "Executables directory : $ZM_PATH_BIN"
#echo "Libraries directory : $ZM_PATH_LIB"
#echo "System config directory : $ZM_PATH_CONF"
echo "Web directory : $ZM_PATH_WEB"
echo "CGI directory : $ZM_PATH_CGI"
echo "Web user : $ZM_WEB_USER"
echo "Web group : $ZM_WEB_GROUP"
echo "Database host : $ZM_DB_HOST"
echo "Database name : $ZM_DB_NAME"
echo "Database user : $ZM_DB_USER"
echo "Database password : Not shown"
echo "Database SSL CA Cert : $ZM_DB_SSL_CA_CERT"
echo "Database SSL Client Key : $ZM_DB_SSL_CLIENT_KEY"
echo "Database SSL Client Cert : $ZM_DB_SSL_CLIENT_CERT"
CMPATH="CACHE PATH \"Imported by cmakecacheimport.sh\" FORCE"
CMSTRING="CACHE STRING \"Imported by cmakecacheimport.sh\" FORCE"
# Write
echo "# This file was generated by cmakecacheimport.sh">zm_conf.cmake
#echo "set(CMAKE_INSTALL_FULL_BINDIR \"$ZM_PATH_BIN\" $CMPATH)">>zm_conf.cmake
#echo "set(CMAKE_INSTALL_FULL_LIBDIR \"$ZM_PATH_LIB\" $CMPATH)">>zm_conf.cmake
#echo "set(CMAKE_INSTALL_FULL_SYSCONFDIR \"$ZM_PATH_CONF\" $CMPATH)">>zm_conf.cmake
echo "set(ZM_WEBDIR \"$ZM_PATH_WEB\" $CMPATH)">>zm_conf.cmake
echo "set(ZM_CGIDIR \"$ZM_PATH_CGI\" $CMPATH)">>zm_conf.cmake
echo "set(ZM_WEB_USER \"$ZM_WEB_USER\" $CMSTRING)">>zm_conf.cmake
echo "set(ZM_WEB_GROUP \"$ZM_WEB_GROUP\" $CMSTRING)">>zm_conf.cmake
echo "set(ZM_DB_HOST \"$ZM_DB_HOST\" $CMSTRING)">>zm_conf.cmake
echo "set(ZM_DB_NAME \"$ZM_DB_NAME\" $CMSTRING)">>zm_conf.cmake
echo "set(ZM_DB_USER \"$ZM_DB_USER\" $CMSTRING)">>zm_conf.cmake
echo "set(ZM_DB_PASS \"$ZM_DB_PASS\" $CMSTRING)">>zm_conf.cmake
echo "set(ZM_DB_SSL_CA_CERT \"$ZM_DB_SSL_CA_CERT\" $CMSTRING)">>zm_conf.cmake
echo "set(ZM_DB_SSL_CLIENT_KEY \"$ZM_DB_SSL_CLIENT_KEY\" $CMSTRING)">>zm_conf.cmake
echo "set(ZM_DB_SSL_CLIENT_CERT \"$ZM_DB_SSL_CLIENT_CERT\" $CMSTRING)">>zm_conf.cmake
echo ""
echo "Wrote zm_conf.cmake"
echo ""
echo "All done"

74
code_of_conduct.md Normal file
View File

@ -0,0 +1,74 @@
# Contributor Covenant Code of Conduct
## Our Pledge
In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.
## Our Standards
Examples of behavior that contributes to creating a positive environment
include:
* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members
Examples of unacceptable behavior by participants include:
* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting
## Our Responsibilities
Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.
Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.
## Scope
This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.
## Enforcement
Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at abuse@zoneminder.com. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.
Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [http://contributor-covenant.org/version/1/4][version]
[homepage]: http://contributor-covenant.org
[version]: http://contributor-covenant.org/version/1/4/

View File

@ -0,0 +1,51 @@
# ==========================================================================
#
# ZoneMinder System Paths Configuration
#
# ==========================================================================
#
# This config file contains the variables previously found under Options -> Paths
#
# *** DO NOT EDIT THIS FILE ***
#
# To make custom changes to the variables below, create a new configuration
# file, with an extention of .conf, containing your desired modifications.
#
# Full path to the folder events are recorded to.
# The web account user must have full read/write permission to this folder.
ZM_DIR_EVENTS=@ZM_DIR_EVENTS@
# Foldername under the webroot where ZoneMinder looks for optional sound files
# to play when an alarm is detected.
ZM_DIR_SOUNDS=@ZM_DIR_SOUNDS@
# Full path to the folder where exported archives are stored
# The web account user must have full read/write permission to this folder.
ZM_DIR_EXPORTS=@ZM_TMPDIR@
# ZoneMinder url path to the zms streaming server
ZM_PATH_ZMS=@ZM_PATH_ZMS@
# Full Path to ZoneMinder's mapped memory files
# The web account user must have full read/write permission to this folder.
ZM_PATH_MAP=@ZM_PATH_MAP@
# Full Path to ZoneMinder's socket folder
# The web account user must have full read/write permission to this folder.
ZM_PATH_SOCKS=@ZM_SOCKDIR@
# Full path to ZoneMinder's log folder
# The web account user must have full read/write permission to this folder.
ZM_PATH_LOGS=@ZM_LOGDIR@
# Full path to ZoneMinder's swap folder
# The web account user must have full read/write permission to this folder.
ZM_PATH_SWAP=@ZM_TMPDIR@
# Full path to optional arp binary
# ZoneMinder will find the arp binary automatically on most systems
ZM_PATH_ARP="@ZM_PATH_ARP@"
#Full path to shutdown binary
ZM_PATH_SHUTDOWN="@ZM_PATH_SHUTDOWN@"

View File

@ -0,0 +1,12 @@
# ==========================================================================
#
# ZoneMinder Multiserver Configuration
#
# ==========================================================================
# Do NOT set ZM_SERVER_HOST if you are not using Multi-Server
# You have been warned
#
# The name specified here must have a corresponding entry
# in the Servers tab under Options
#ZM_SERVER_HOST=

19
conf.d/README Normal file
View File

@ -0,0 +1,19 @@
conf.d/README
Any changes to ZoneMinder's configuration should be made here in this folder,
rather than directly editing the default zm.conf file.
ZoneMinder will process each file in this folder with a ".conf" extension.
Each "Var = Value" pair, in each config file, will be loaded into ZoneMinder's
running configuration, overriding any variables with the same name found in the
default zm.conf file.
After creating a custom config file, don't forget to set the proper file and
owner permission on it. For example, this is typically what you should do after
saving the config file to disk:
sudo chown root:apache *.conf
sudo chmod 640 *.conf
Substitute "apache" with the name of the web server user account on your system.

View File

@ -1,65 +0,0 @@
body {
background-color: #333;
border-top: solid 5px #369;
color: #DDD;
}
.navbar {
background-color: #333;
border:0;
border-radius: 0;
}
.nav {
margin-top:10px;
}
.navbar-default .navbar-nav > li > a {
color: #369;
font-size: 14px;
font-weight: bold;
text-transform: uppercase;
border-radius: 5px;
padding:5px 15px;
}
.navbar-default .navbar-nav > li > a:hover {
background-color: #fff;
}
h2 {
color: #016C9C;
border-bottom: solid 1px #369;
}
.downloads {
display: flex;
flex-direction: row;
flex-wrap: wrap;
padding: 0;
margin: 0;
justify-content: space-around;
}
.download {
margin-top:5px;
background-color: #444;
border-radius: 5px;
padding: 5px 15px;
width: 500px;
height: 300px;
margin: 10px;
}
.panel-body {
background-color: #444;
}
.current {
background-color: #FFF;
border-radius: 5px;
}

View File

@ -1,60 +0,0 @@
.highlight { background: #ffffff; }
.highlight .c { color: #999988; font-style: italic } /* Comment */
.highlight .err { color: #a61717; background-color: #e3d2d2 } /* Error */
.highlight .k { font-weight: bold } /* Keyword */
.highlight .o { font-weight: bold } /* Operator */
.highlight .cm { color: #999988; font-style: italic } /* Comment.Multiline */
.highlight .cp { color: #999999; font-weight: bold } /* Comment.Preproc */
.highlight .c1 { color: #999988; font-style: italic } /* Comment.Single */
.highlight .cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.highlight .gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.highlight .gd .x { color: #000000; background-color: #ffaaaa } /* Generic.Deleted.Specific */
.highlight .ge { font-style: italic } /* Generic.Emph */
.highlight .gr { color: #aa0000 } /* Generic.Error */
.highlight .gh { color: #999999 } /* Generic.Heading */
.highlight .gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.highlight .gi .x { color: #000000; background-color: #aaffaa } /* Generic.Inserted.Specific */
.highlight .go { color: #888888 } /* Generic.Output */
.highlight .gp { color: #555555 } /* Generic.Prompt */
.highlight .gs { font-weight: bold } /* Generic.Strong */
.highlight .gu { color: #aaaaaa } /* Generic.Subheading */
.highlight .gt { color: #aa0000 } /* Generic.Traceback */
.highlight .kc { font-weight: bold } /* Keyword.Constant */
.highlight .kd { font-weight: bold } /* Keyword.Declaration */
.highlight .kp { font-weight: bold } /* Keyword.Pseudo */
.highlight .kr { font-weight: bold } /* Keyword.Reserved */
.highlight .kt { color: #445588; font-weight: bold } /* Keyword.Type */
.highlight .m { color: #009999 } /* Literal.Number */
.highlight .s { color: #d14 } /* Literal.String */
.highlight .na { color: #008080 } /* Name.Attribute */
.highlight .nb { color: #0086B3 } /* Name.Builtin */
.highlight .nc { color: #445588; font-weight: bold } /* Name.Class */
.highlight .no { color: #008080 } /* Name.Constant */
.highlight .ni { color: #800080 } /* Name.Entity */
.highlight .ne { color: #990000; font-weight: bold } /* Name.Exception */
.highlight .nf { color: #990000; font-weight: bold } /* Name.Function */
.highlight .nn { color: #555555 } /* Name.Namespace */
.highlight .nt { color: #000080 } /* Name.Tag */
.highlight .nv { color: #008080 } /* Name.Variable */
.highlight .ow { font-weight: bold } /* Operator.Word */
.highlight .w { color: #bbbbbb } /* Text.Whitespace */
.highlight .mf { color: #009999 } /* Literal.Number.Float */
.highlight .mh { color: #009999 } /* Literal.Number.Hex */
.highlight .mi { color: #009999 } /* Literal.Number.Integer */
.highlight .mo { color: #009999 } /* Literal.Number.Oct */
.highlight .sb { color: #d14 } /* Literal.String.Backtick */
.highlight .sc { color: #d14 } /* Literal.String.Char */
.highlight .sd { color: #d14 } /* Literal.String.Doc */
.highlight .s2 { color: #d14 } /* Literal.String.Double */
.highlight .se { color: #d14 } /* Literal.String.Escape */
.highlight .sh { color: #d14 } /* Literal.String.Heredoc */
.highlight .si { color: #d14 } /* Literal.String.Interpol */
.highlight .sx { color: #d14 } /* Literal.String.Other */
.highlight .sr { color: #009926 } /* Literal.String.Regex */
.highlight .s1 { color: #d14 } /* Literal.String.Single */
.highlight .ss { color: #990073 } /* Literal.String.Symbol */
.highlight .bp { color: #999999 } /* Name.Builtin.Pseudo */
.highlight .vc { color: #008080 } /* Name.Variable.Class */
.highlight .vg { color: #008080 } /* Name.Variable.Global */
.highlight .vi { color: #008080 } /* Name.Variable.Instance */
.highlight .il { color: #009999 } /* Literal.Number.Integer.Long */

24
db/CMakeLists.txt Normal file
View File

@ -0,0 +1,24 @@
# CMakeLists.txt for the ZoneMinder database scripts
# Create files from the .in files
configure_file(zm_create.sql.in "${CMAKE_CURRENT_BINARY_DIR}/zm_create.sql" @ONLY)
configure_file(zm_update-1.31.30.sql.in "${CMAKE_CURRENT_BINARY_DIR}/zm_update-1.31.30.sql" @ONLY)
configure_file(zm_update-1.35.24.sql.in "${CMAKE_CURRENT_BINARY_DIR}/zm_update-1.35.24.sql" @ONLY)
# Glob all database upgrade scripts
file(GLOB dbfileslist RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "zm_update-*.sql")
# Install the database upgrade scripts
install(FILES ${dbfileslist} DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/db")
# install zm_update-1.31.30.sql
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm_update-1.31.30.sql" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/db")
# install zm_update-1.35.24.sql
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm_update-1.35.24.sql" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/db")
# install zm_create.sql
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/zm_create.sql" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/db")
# install triggers.sql
install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/triggers.sql" DESTINATION "${CMAKE_INSTALL_DATADIR}/zoneminder/db")

2
db/test.monitor.sql Normal file
View File

@ -0,0 +1,2 @@
INSERT INTO Monitors (Name, Type, Function, Enabled, Format, Protocol, Method, Host, Port, Path, Width, Height, Colours, Palette, Orientation, Deinterlacing, Brightness, Contrast, Hue, Colour, RefBlendPerc) VALUES ('travis_test1','Remote','Modect',1,255,'http','simple','50.79.143.149','21146','/mjpg/video.mjpg',1280,800,3,0,'0',0,-1,-1,-1,-1,12);
INSERT INTO Monitors (Name, Type, Function, Enabled, Format, Protocol, Method, Host, Port, Path, Width, Height, Colours, Palette, Orientation, Deinterlacing, Brightness, Contrast, Hue, Colour, RefBlendPerc) VALUES ('travis_test2','Remote','Modect',1,255,'http','simple','50.79.143.149','21146','/mjpg/video.mjpg',1280,800,3,0,'0',0,-1,-1,-1,-1,12);

248
db/triggers.sql Normal file
View File

@ -0,0 +1,248 @@
delimiter //
DROP TRIGGER IF EXISTS Events_Hour_delete_trigger//
CREATE TRIGGER Events_Hour_delete_trigger BEFORE DELETE ON Events_Hour
FOR EACH ROW BEGIN
UPDATE Event_Summaries SET
HourEvents = GREATEST(COALESCE(HourEvents,1)-1,0),
HourEventDiskSpace=GREATEST(COALESCE(HourEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0)
WHERE Event_Summaries.MonitorId=OLD.MonitorId;
END;
//
DROP TRIGGER IF EXISTS Events_Hour_update_trigger//
CREATE TRIGGER Events_Hour_update_trigger AFTER UPDATE ON Events_Hour
FOR EACH ROW
BEGIN
declare diff BIGINT default 0;
set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0);
IF ( diff ) THEN
IF ( NEW.MonitorID != OLD.MonitorID ) THEN
UPDATE Event_Summaries SET HourEventDiskSpace=GREATEST(COALESCE(HourEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) WHERE Event_Summaries.MonitorId=OLD.MonitorId;
UPDATE Event_Summaries SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Event_Summaries.MonitorId=NEW.MonitorId;
ELSE
UPDATE Event_Summaries SET HourEventDiskSpace=COALESCE(HourEventDiskSpace,0)+diff WHERE Event_Summaries.MonitorId=NEW.MonitorId;
END IF;
END IF;
END;
//
DROP TRIGGER IF EXISTS Events_Day_delete_trigger//
CREATE TRIGGER Events_Day_delete_trigger BEFORE DELETE ON Events_Day
FOR EACH ROW BEGIN
UPDATE Event_Summaries SET
DayEvents = GREATEST(COALESCE(DayEvents,1)-1,0),
DayEventDiskSpace=GREATEST(COALESCE(DayEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0)
WHERE Event_Summaries.MonitorId=OLD.MonitorId;
END;
//
DROP TRIGGER IF EXISTS Events_Day_update_trigger;
CREATE TRIGGER Events_Day_update_trigger AFTER UPDATE ON Events_Day
FOR EACH ROW
BEGIN
declare diff BIGINT default 0;
set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0);
IF ( diff ) THEN
IF ( NEW.MonitorID != OLD.MonitorID ) THEN
UPDATE Event_Summaries SET DayEventDiskSpace=GREATEST(COALESCE(DayEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) WHERE Event_Summaries.MonitorId=OLD.MonitorId;
UPDATE Event_Summaries SET DayEventDiskSpace=COALESCE(DayEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Event_Summaries.MonitorId=NEW.MonitorId;
ELSE
UPDATE Event_Summaries SET DayEventDiskSpace=GREATEST(COALESCE(DayEventDiskSpace,0)+diff,0) WHERE Event_Summaries.MonitorId=NEW.MonitorId;
END IF;
END IF;
END;
//
DROP TRIGGER IF EXISTS Events_Week_delete_trigger//
CREATE TRIGGER Events_Week_delete_trigger BEFORE DELETE ON Events_Week
FOR EACH ROW BEGIN
UPDATE Event_Summaries SET
WeekEvents = GREATEST(COALESCE(WeekEvents,1)-1,0),
WeekEventDiskSpace=GREATEST(COALESCE(WeekEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0)
WHERE Event_Summaries.MonitorId=OLD.MonitorId;
END;
//
DROP TRIGGER IF EXISTS Events_Week_update_trigger;
CREATE TRIGGER Events_Week_update_trigger AFTER UPDATE ON Events_Week
FOR EACH ROW
BEGIN
declare diff BIGINT default 0;
set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0);
IF ( diff ) THEN
IF ( NEW.MonitorID != OLD.MonitorID ) THEN
UPDATE Event_Summaries SET WeekEventDiskSpace=GREATEST(COALESCE(WeekEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0) WHERE Event_Summaries.MonitorId=OLD.MonitorId;
UPDATE Event_Summaries SET WeekEventDiskSpace=COALESCE(WeekEventDiskSpace,0)+COALESCE(NEW.DiskSpace,0) WHERE Event_Summaries.MonitorId=NEW.MonitorId;
ELSE
UPDATE Event_Summaries SET WeekEventDiskSpace=GREATEST(COALESCE(WeekEventDiskSpace,0)+diff,0) WHERE Event_Summaries.MonitorId=NEW.MonitorId;
END IF;
END IF;
END;
//
DROP TRIGGER IF EXISTS Events_Month_delete_trigger//
CREATE TRIGGER Events_Month_delete_trigger BEFORE DELETE ON Events_Month
FOR EACH ROW BEGIN
UPDATE Event_Summaries SET
MonthEvents = GREATEST(COALESCE(MonthEvents,1)-1,0),
MonthEventDiskSpace=GREATEST(COALESCE(MonthEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0)
WHERE Event_Summaries.MonitorId=OLD.MonitorId;
END;
//
DROP TRIGGER IF EXISTS Events_Month_update_trigger;
CREATE TRIGGER Events_Month_update_trigger AFTER UPDATE ON Events_Month
FOR EACH ROW
BEGIN
declare diff BIGINT default 0;
set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0);
IF ( diff ) THEN
IF ( NEW.MonitorID != OLD.MonitorID ) THEN
UPDATE Event_Summaries SET MonthEventDiskSpace=GREATEST(COALESCE(MonthEventDiskSpace,0)-COALESCE(OLD.DiskSpace),0) WHERE Event_Summaries.MonitorId=OLD.MonitorId;
UPDATE Event_Summaries SET MonthEventDiskSpace=COALESCE(MonthEventDiskSpace,0)+COALESCE(NEW.DiskSpace) WHERE Event_Summaries.MonitorId=NEW.MonitorId;
ELSE
UPDATE Event_Summaries SET MonthEventDiskSpace=GREATEST(COALESCE(MonthEventDiskSpace,0)+diff,0) WHERE Event_Summaries.MonitorId=NEW.MonitorId;
END IF;
END IF;
END;
//
drop procedure if exists update_storage_stats//
drop trigger if exists event_update_trigger//
CREATE TRIGGER event_update_trigger AFTER UPDATE ON Events
FOR EACH ROW
BEGIN
declare diff BIGINT default 0;
set diff = COALESCE(NEW.DiskSpace,0) - COALESCE(OLD.DiskSpace,0);
IF ( NEW.StorageId = OLD.StorageID ) THEN
IF ( diff ) THEN
UPDATE Storage SET DiskSpace = GREATEST(COALESCE(DiskSpace,0) + diff,0) WHERE Storage.Id = OLD.StorageId;
END IF;
ELSE
IF ( NEW.DiskSpace ) THEN
UPDATE Storage SET DiskSpace = COALESCE(DiskSpace,0) + NEW.DiskSpace WHERE Storage.Id = NEW.StorageId;
END IF;
IF ( OLD.DiskSpace ) THEN
UPDATE Storage SET DiskSpace = GREATEST(COALESCE(DiskSpace,0) - OLD.DiskSpace,0) WHERE Storage.Id = OLD.StorageId;
END IF;
END IF;
UPDATE Events_Hour SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id;
UPDATE Events_Day SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id;
UPDATE Events_Week SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id;
UPDATE Events_Month SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id;
IF ( NEW.Archived != OLD.Archived ) THEN
IF ( NEW.Archived ) THEN
INSERT INTO Events_Archived (EventId,MonitorId,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.DiskSpace);
INSERT INTO Event_Summaries (MonitorId,ArchivedEvents,ArchivedEventDiskSpace) VALUES (NEW.MonitorId,1,NEW.DiskSpace) ON DUPLICATE KEY
UPDATE ArchivedEvents = COALESCE(ArchivedEvents,0)+1, ArchivedEventDiskSpace = COALESCE(ArchivedEventDiskSpace,0) + COALESCE(NEW.DiskSpace,0);
ELSEIF ( OLD.Archived ) THEN
DELETE FROM Events_Archived WHERE EventId=OLD.Id;
UPDATE Event_Summaries
SET
ArchivedEvents = GREATEST(COALESCE(ArchivedEvents,0)-1,0),
ArchivedEventDiskSpace = GREATEST(COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0),0)
WHERE Event_Summaries.MonitorId=OLD.MonitorId;
ELSE
IF ( OLD.DiskSpace != NEW.DiskSpace ) THEN
UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id;
UPDATE Event_Summaries SET
ArchivedEventDiskSpace = GREATEST(COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0),0)
WHERE Event_Summaries.MonitorId=OLD.MonitorId;
END IF;
END IF;
ELSEIF ( NEW.Archived AND diff ) THEN
UPDATE Events_Archived SET DiskSpace=NEW.DiskSpace WHERE EventId=NEW.Id;
END IF;
IF ( diff ) THEN
UPDATE Event_Summaries
SET
TotalEventDiskSpace = GREATEST(COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0) + COALESCE(NEW.DiskSpace,0),0)
WHERE Event_Summaries.MonitorId=OLD.MonitorId;
END IF;
END;
//
DROP TRIGGER IF EXISTS event_insert_trigger//
/* The assumption is that when an Event is inserted, it has no size yet, so don't bother updating the DiskSpace, just the count.
* The DiskSpace will get update in the Event Update Trigger
*/
CREATE TRIGGER event_insert_trigger AFTER INSERT ON Events
FOR EACH ROW
BEGIN
INSERT INTO Events_Hour (EventId,MonitorId,StartDateTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartDateTime,0);
INSERT INTO Events_Day (EventId,MonitorId,StartDateTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartDateTime,0);
INSERT INTO Events_Week (EventId,MonitorId,StartDateTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartDateTime,0);
INSERT INTO Events_Month (EventId,MonitorId,StartDateTime,DiskSpace) VALUES (NEW.Id,NEW.MonitorId,NEW.StartDateTime,0);
INSERT INTO Event_Summaries (MonitorId,HourEvents,DayEvents,WeekEvents,MonthEvents,TotalEvents) VALUES (NEW.MonitorId,1,1,1,1,1) ON DUPLICATE KEY
UPDATE
HourEvents = COALESCE(HourEvents,0)+1,
DayEvents = COALESCE(DayEvents,0)+1,
WeekEvents = COALESCE(WeekEvents,0)+1,
MonthEvents = COALESCE(MonthEvents,0)+1,
TotalEvents = COALESCE(TotalEvents,0)+1;
END;
//
DROP TRIGGER IF EXISTS event_delete_trigger//
CREATE TRIGGER event_delete_trigger BEFORE DELETE ON Events
FOR EACH ROW
BEGIN
IF ( OLD.DiskSpace ) THEN
UPDATE Storage SET DiskSpace = GREATEST(COALESCE(DiskSpace,0) - COALESCE(OLD.DiskSpace,0),0) WHERE Storage.Id = OLD.StorageId;
END IF;
DELETE FROM Events_Hour WHERE EventId=OLD.Id;
DELETE FROM Events_Day WHERE EventId=OLD.Id;
DELETE FROM Events_Week WHERE EventId=OLD.Id;
DELETE FROM Events_Month WHERE EventId=OLD.Id;
IF ( OLD.Archived ) THEN
DELETE FROM Events_Archived WHERE EventId=OLD.Id;
UPDATE Event_Summaries SET
ArchivedEvents = GREATEST(COALESCE(ArchivedEvents,1) - 1,0),
ArchivedEventDiskSpace = GREATEST(COALESCE(ArchivedEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0),0),
TotalEvents = GREATEST(COALESCE(TotalEvents,1) - 1,0),
TotalEventDiskSpace = GREATEST(COALESCE(TotalEventDiskSpace,0) - COALESCE(OLD.DiskSpace,0),0)
WHERE Event_Summaries.MonitorId=OLD.MonitorId;
ELSE
UPDATE Event_Summaries SET
TotalEvents = GREATEST(COALESCE(TotalEvents,1)-1,0),
TotalEventDiskSpace=GREATEST(COALESCE(TotalEventDiskSpace,0)-COALESCE(OLD.DiskSpace,0),0)
WHERE Event_Summaries.MonitorId=OLD.MonitorId;
END IF;
END;
//
DROP TRIGGER IF EXISTS Zone_Insert_Trigger//
CREATE TRIGGER Zone_Insert_Trigger AFTER INSERT ON Zones
FOR EACH ROW
BEGIN
UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=NEW.MonitorId) WHERE Monitors.Id=NEW.MonitorID;
END
//
DROP TRIGGER IF EXISTS Zone_Delete_Trigger//
CREATE TRIGGER Zone_Delete_Trigger AFTER DELETE ON Zones
FOR EACH ROW
BEGIN
UPDATE Monitors SET ZoneCount=(SELECT COUNT(*) FROM Zones WHERE MonitorId=OLD.MonitorId) WHERE Monitors.Id=OLD.MonitorID;
END
//
DELIMITER ;

1123
db/zm_create.sql.in Normal file

File diff suppressed because it is too large Load Diff

62
db/zm_update-0.0.1.sql Normal file
View File

@ -0,0 +1,62 @@
--
-- This updates a 0.0.1 database to 0.9.7
--
alter table Monitors modify Device tinyint unsigned NOT NULL default '0';
alter table Monitors modify Format tinyint unsigned NOT NULL;
alter table Monitors drop column WarmUpCount;
alter table Monitors drop column PreEventCount;
alter table Monitors drop column PostEventCount;
alter table Monitors modify LabelFormat varchar(32) not null default '%%s - %y/%m/%d %H:%M:%S';
alter table Monitors modify LabelX smallint unsigned not null;
alter table Monitors modify LabelY smallint unsigned not null;
alter table Monitors add column ImageBufferCount smallint unsigned NOT NULL default '100';
alter table Monitors add column WarmupCount smallint unsigned NOT NULL default '25';
alter table Monitors add column PreEventCount smallint unsigned NOT NULL default '10';
alter table Monitors add column PostEventCount smallint unsigned NOT NULL default '10';
alter table Monitors add column AlarmFrameCount smallint unsigned NOT NULL default '1';
alter table Monitors add column FPSReportInterval smallint unsigned NOT NULL default '250';
alter table Monitors add column RefBlendPerc tinyint unsigned NOT NULL default '10';
alter table Monitors add column X10Activation char(32);
alter table Monitors add column X10AlarmInput char(32);
alter table Monitors add column X10AlarmOutput char(32);
alter table Monitors modify column Function enum('None','Passive','Active','X10') default 'Passive' not null;
update Monitors set LabelFormat = '%%s - %y/%m/%d %H:%M:%S';
update Monitors set LabelX = 0;
update Monitors set LabelY = Height-8;
alter table Events add column TotScore int unsigned not null default 0 after AlarmFrames;
update Events set TotScore = AlarmFrames * AvgScore where TotScore = 0;
alter table Events modify column Archived tinyint unsigned not null default 0;
alter table Events add column Uploaded tinyint unsigned not null default 0 after Archived;
alter table Events add column LearnState char(1) default '' after Uploaded;
CREATE TABLE Filters (
Id int(10) unsigned NOT NULL auto_increment,
MonitorId int(10) unsigned NOT NULL default '0',
Name varchar(64) NOT NULL default '',
Query text NOT NULL,
AutoDelete tinyint(4) unsigned NOT NULL default '0',
AutoUpload tinyint(4) unsigned NOT NULL default '0',
PRIMARY KEY (Id),
UNIQUE KEY FilterIDX (MonitorId,Name)
) TYPE=MyISAM;
CREATE TABLE Stats (
MonitorId int(10) unsigned NOT NULL default '0',
ZoneId int(10) unsigned NOT NULL default '0',
EventId int(10) unsigned NOT NULL default '0',
FrameId int(10) unsigned NOT NULL default '0',
AlarmPixels int(10) unsigned NOT NULL default '0',
FilterPixels int(10) unsigned NOT NULL default '0',
BlobPixels int(10) unsigned NOT NULL default '0',
Blobs smallint(5) unsigned NOT NULL default '0',
MinBlobSize smallint(5) unsigned NOT NULL default '0',
MaxBlobSize smallint(5) unsigned NOT NULL default '0',
MinX smallint(5) unsigned NOT NULL default '0',
MaxX smallint(5) unsigned NOT NULL default '0',
MinY smallint(5) unsigned NOT NULL default '0',
MaxY smallint(5) unsigned NOT NULL default '0',
Score smallint(5) unsigned NOT NULL default '0',
KEY EventId (EventId),
KEY MonitorId (MonitorId),
KEY ZoneId (ZoneId)
) TYPE=MyISAM;
-- Not a problem if this fails
drop table Alarms;

15
db/zm_update-0.9.10.sql Normal file
View File

@ -0,0 +1,15 @@
--
-- This updates a 0.9.10 database to 0.9.11
--
alter table Monitors change column Colours Palette tinyint(3) unsigned NOT NULL default '1';
update Monitors set Palette = 1 where Palette = 8;
update Monitors set Palette = 4 where Palette = 24;
alter table Zones modify column Type enum('Active','Inclusive','Exclusive','Preclusive','Inactive') not null default 'Active';
alter table Filters add column AutoArchive tinyint unsigned not null default 0 after Query;
-- These are optional, it just seemed a good time...
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

11
db/zm_update-0.9.11.sql Normal file
View File

@ -0,0 +1,11 @@
--
-- This updates a 0.9.11 database to 0.9.12
--
alter table Monitors add column Orientation enum('0','90','180','270') not null default '0' after Palette;
-- These are optional, it just seemed a good time...
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

26
db/zm_update-0.9.12.sql Normal file
View File

@ -0,0 +1,26 @@
--
-- This updates a 0.9.12 database to 0.9.13
--
CREATE TABLE Users (
Id int(10) unsigned NOT NULL auto_increment,
Username varchar(32) NOT NULL default '',
Password varchar(32) NOT NULL default '',
Enabled tinyint(3) unsigned NOT NULL default '1',
Stream enum('None','View') NOT NULL default 'None',
Events enum('None','View','Edit') NOT NULL default 'None',
Monitors enum('None','View','Edit') NOT NULL default 'None',
System enum('None','View','Edit') NOT NULL default 'None',
MonitorIds tinytext,
PRIMARY KEY (Id),
UNIQUE KEY UC_Id (Id),
UNIQUE KEY UC_Username (Username)
) TYPE=MyISAM;
insert into Users values ('','admin',password('admin'),1,'View','Edit','Edit','Edit',NULL);
--
-- These are optional, it just seemed a good time...
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

28
db/zm_update-0.9.13.sql Normal file
View File

@ -0,0 +1,28 @@
--
-- This updates a 0.9.13 database to 0.9.14
--
CREATE TABLE Config (
Id smallint(5) unsigned NOT NULL default '0',
Name varchar(32) NOT NULL default '',
Value text NOT NULL,
Type tinytext NOT NULL,
DefaultValue tinytext,
Hint tinytext,
Pattern tinytext,
Format tinytext,
Prompt tinytext,
Help text,
Category varchar(32) NOT NULL default '',
Readonly tinyint(3) unsigned NOT NULL default '0',
Requires text,
PRIMARY KEY (Name),
UNIQUE KEY UC_Name (Name)
) TYPE=MyISAM;
--
-- These are optional, but we might as well
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

57
db/zm_update-0.9.15.sql Normal file
View File

@ -0,0 +1,57 @@
--
-- This updates a 0.9.15 database to 0.9.16
--
-- Make changes to Monitor table
--
alter table Monitors change column Function OldFunction enum('None','Passive','Active','X10') NOT NULL default 'Passive';
alter table Monitors add column Function enum('None','Monitor','Modect','Record','Mocord') NOT NULL default 'Monitor';
alter table Monitors add column RunMode enum('Continuous','Triggered') NOT NULL default 'Continuous' after Function;
alter table Monitors add column Triggers set('X10') NOT NULL after RunMode;
alter table Monitors add column SectionLength int(10) unsigned not null default 600 after PostEventCount;
alter table Monitors add column FrameSkip smallint unsigned not null default 0 after SectionLength;
--
-- Update to reflect existing setup
--
update Monitors set Function = 'Monitor' where OldFunction = 'Passive';
update Monitors set Function = 'Modect' where OldFunction = 'Active';
update Monitors set Function = 'Modect' where OldFunction = 'X10';
update Monitors set RunMode = 'Triggered' where OldFunction = 'X10';
update Monitors set Triggers = 'X10' where OldFunction = 'X10';
--
-- Create the X10 triggers table
--
CREATE TABLE TriggersX10 (
MonitorId int(10) unsigned NOT NULL default '0',
Activation varchar(32) default NULL,
AlarmInput varchar(32) default NULL,
AlarmOutput varchar(32) default NULL,
PRIMARY KEY (MonitorId)
) TYPE=MyISAM;
--
-- Update to reflect existing setup
--
insert into TriggersX10 select Id, X10Activation, X10AlarmInput, X10AlarmOutput from Monitors where Function = 'X10';
--
-- Clean up temporary and unused columns
--
alter table Monitors drop column OldFunction ;
alter table Monitors drop column X10Activation ;
alter table Monitors drop column X10AlarmInput ;
alter table Monitors drop column X10AlarmOutput ;
--
-- Table structure for table `States`
--
CREATE TABLE States (
Name varchar(32) NOT NULL default '',
Definition tinytext NOT NULL,
PRIMARY KEY (Name)
) TYPE=MyISAM;
--
-- These are optional, but we might as well
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

15
db/zm_update-0.9.16.sql Normal file
View File

@ -0,0 +1,15 @@
--
-- This updates a 0.9.16 database to 0.9.17
--
-- Make changes to Users table
--
alter table Users add column Language varchar(8) not null default "" after Password;
--
-- These are optional, but we might as well
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

9
db/zm_update-0.9.7.sql Normal file
View File

@ -0,0 +1,9 @@
--
-- This updates a 0.9.7 database to 0.9.8
--
alter table Filters modify column AutoDelete tinyint unsigned not null default 0;
alter table Filters modify column AutoUpload tinyint unsigned not null default 0;
alter table Filters add column AutoEmail tinyint unsigned not null default 0;
alter table Filters add column AutoMessage tinyint unsigned not null default 0;
alter table Events add column Emailed tinyint unsigned not null default 0 after Uploaded;
alter table Events add column Messaged tinyint unsigned not null default 0 after Emailed;

8
db/zm_update-0.9.8.sql Normal file
View File

@ -0,0 +1,8 @@
--
-- This updates a 0.9.8 database to 0.9.9
--
update Monitors set Colours = Colours * 8;
optimize table Events;
alter table Events modify column Length numeric( 10, 2 ) not null default 0.00;
optimize table Frames;
alter table Frames add column Delta numeric( 8, 2 ) not null default 0.00 after TimeStamp;

15
db/zm_update-0.9.9.sql Normal file
View File

@ -0,0 +1,15 @@
--
-- This updates a 0.9.9 database to 0.9.10
--
alter table Monitors add column Type enum('Local','Remote') NOT NULL default 'Local' after Name;
alter table Monitors add column Host varchar(64) default NULL after Format;
alter table Monitors add column Port varchar(8) default '80' after Host;
alter table Monitors add column Path varchar(255) default NULL after Port;
alter table Monitors add column MaxFPS decimal( 5, 2) not null default 0.0 after AlarmFrameCount;
alter table Monitors drop column AlarmFrameCount;
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

17
db/zm_update-1.17.1.sql Normal file
View File

@ -0,0 +1,17 @@
--
-- This updates a 1.17.1 database to 1.17.2
--
-- Make changes to Zones table
--
alter table Zones change column AlarmThreshold MinPixelThreshold smallint unsigned;
alter table Zones add column MaxPixelThreshold smallint unsigned after MinPixelThreshold;
alter table Events drop column ImagePath;
--
-- These are optional, but we might as well
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

18
db/zm_update-1.17.2.sql Normal file
View File

@ -0,0 +1,18 @@
--
-- This updates a 1.17.2 database to 1.18.0
--
-- Make changes to Filter table
--
alter table Zones add column CheckMethod enum('AlarmedPixels','FilteredPixels','Blobs') NOT NULL default 'Blobs' after AlarmRGB;
alter table Filters drop index FilterIDX;
alter table Filters drop column MonitorId;
update Filters set AutoArchive = 0, AutoDelete = 0, AutoUpload = 0, AutoEmail = 0, AutoMessage = 0;
--
-- These are optional, but we might as well
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

3
db/zm_update-1.18.0.sql Normal file
View File

@ -0,0 +1,3 @@
--
-- There are no updates from a 1.18.0 database to 1.18.1
--

22
db/zm_update-1.18.1.sql Normal file
View File

@ -0,0 +1,22 @@
--
-- This updates a 1.18.1 database to 1.19.0
--
-- Make changes to Frames table
--
alter table Frames add column Type enum('Normal','Bulk','Alarm') NOT NULL default 'Normal' after FrameId;
update Frames set Type = 'Alarm' where AlarmFrame = 1;
alter table Frames drop column AlarmFrame;
--
-- Make changes to Filters table
update Filters set Name = concat( Name, '_', Id );
alter table Filters drop column Id;
alter table Filters add primary key(Name);
--
-- These are optional, but we might as well
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

3
db/zm_update-1.19.0.sql Normal file
View File

@ -0,0 +1,3 @@
--
-- There are no updates from a 1.19.0 database to 1.19.1
--

23
db/zm_update-1.19.1.sql Normal file
View File

@ -0,0 +1,23 @@
--
-- This updates a 1.19.1 database to 1.19.2
--
-- Make changes to Events table
--
alter table Events add column Executed tinyint(3) unsigned not null default 0 after Messaged;
--
-- Make changes to Filters table
--
alter table Filters add column AutoExecute tinytext default '';
--
-- Add in a sample filter to purge the oldest 5 events when the disk is 99% full, delete is disabled though
--
insert into Filters values ('PurgeWhenFull','trms=2&obr1=&cbr1=&attr1=Archived&op1=&val1=0&cnj2=and&obr2=&cbr2=&attr2=DiskPercent&op2=>=&val2=99&sort_field=Id&sort_asc=1&limit=5',0,0,0,0,0,'');
--
-- These are optional, but we might as well
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

15
db/zm_update-1.19.2.sql Normal file
View File

@ -0,0 +1,15 @@
--
-- This updates a 1.19.2 database to 1.19.3
--
-- Make changes to Users table
--
alter table Users modify column Password varchar(64) not null default '';
--
-- These are optional, but we might as well
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

3
db/zm_update-1.19.3.sql Normal file
View File

@ -0,0 +1,3 @@
--
-- There are no updates from a 1.19.3 database to 1.19.4
--

20
db/zm_update-1.19.4.sql Normal file
View File

@ -0,0 +1,20 @@
--
-- This updates a 1.19.4 database to 1.19.5
--
-- Make changes to Monitors table
--
alter table Monitors add column EventPrefix varchar(32) not null default 'Event-' after Orientation;
alter table Monitors add column AlarmFrameCount smallint(5) unsigned not null default '1' after PostEventCount;
alter table Monitors add column Brightness mediumint(7) NOT NULL default '-1' after Orientation;
alter table Monitors add column Contrast mediumint(7) NOT NULL default '-1' after Brightness;
alter table Monitors add column Hue mediumint(7) NOT NULL default '-1' after Contrast;
alter table Monitors add column Colour mediumint(7) NOT NULL default '-1' after Hue;
--
-- These are optional, but we might as well do it now
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

44
db/zm_update-1.19.5.sql Normal file
View File

@ -0,0 +1,44 @@
--
-- This updates a 1.19.5 database to 1.20.0
--
-- Create the Groups table
--
CREATE TABLE Groups (
Id int(10) unsigned NOT NULL auto_increment,
Name varchar(64) NOT NULL,
MonitorIds tinytext NOT NULL,
PRIMARY KEY (Id)
) TYPE=MyISAM;
--
-- Make changes to Users table
--
alter table Users modify MonitorIds tinytext not null default '';
--
-- Make changes to Monitors table
--
alter table Monitors modify column Function enum('None','Monitor','Modect','Record','Mocord','Nodect') NOT NULL default 'Monitor';
--
-- Make changes to Events table
--
alter table Events add column Cause varchar(32) not null default '' after Name;
alter table Events add column Notes tinytext after LearnState;
--
-- Add a new index to the Events table
--
alter table Events add index (Frames);
--
-- Rationalise some of the name columns
alter table Events modify column Name varchar(64) not null;
alter table Filters modify column Name varchar(64) not null;
alter table Monitors modify column Name varchar(64) not null;
alter table States modify column Name varchar(64) not null;
alter table Zones modify column Name varchar(64) not null;
--
-- These are optional, but we might as well do it now
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

15
db/zm_update-1.20.0.sql Normal file
View File

@ -0,0 +1,15 @@
--
-- This updates a 1.20.0 database to 1.20.1
--
-- Make changes to Users table
--
alter table Users modify column Username varchar(32) BINARY NOT NULL default '';
--
-- These are optional, but we might as well do it now
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

148
db/zm_update-1.20.1.sql Normal file
View File

@ -0,0 +1,148 @@
--
-- This updates a 1.20.0 database to 1.20.1
--
-- Make changes to Monitors table
--
alter table Monitors add column Controllable tinyint(3) unsigned NOT NULL default '0';
alter table Monitors add column ControlId int(10) unsigned NOT NULL default '0';
alter table Monitors add column ControlDevice varchar(255) default NULL;
alter table Monitors add column ControlAddress varchar(255) default NULL;
alter table Monitors add column TrackMotion tinyint(3) unsigned NOT NULL default '0';
alter table Monitors add column TrackDelay smallint(5) unsigned NOT NULL default '0';
alter table Monitors add column ReturnLocation tinyint(3) NOT NULL default '-1';
alter table Monitors add column ReturnDelay smallint(5) unsigned NOT NULL default '0';
--
-- Add new table `Controls`
--
CREATE TABLE Controls (
Id int(10) unsigned NOT NULL auto_increment,
Name varchar(64) NOT NULL default '',
Type enum('Local','Remote') NOT NULL default 'Local',
Command varchar(255) default NULL,
CanWake tinyint(3) unsigned NOT NULL default '0',
CanSleep tinyint(3) unsigned NOT NULL default '0',
CanReset tinyint(3) unsigned NOT NULL default '0',
CanZoom tinyint(3) unsigned NOT NULL default '0',
CanAutoZoom tinyint(3) unsigned NOT NULL default '0',
CanZoomAbs tinyint(3) unsigned NOT NULL default '0',
CanZoomRel tinyint(3) unsigned NOT NULL default '0',
CanZoomCon tinyint(3) unsigned NOT NULL default '0',
MinZoomRange int(10) unsigned default NULL,
MaxZoomRange int(10) unsigned default NULL,
MinZoomStep int(10) unsigned default NULL,
MaxZoomStep int(10) unsigned default NULL,
HasZoomSpeed tinyint(3) unsigned NOT NULL default '0',
MinZoomSpeed int(10) unsigned default NULL,
MaxZoomSpeed int(10) unsigned default NULL,
CanFocus tinyint(3) unsigned NOT NULL default '0',
CanAutoFocus tinyint(3) unsigned NOT NULL default '0',
CanFocusAbs tinyint(3) unsigned NOT NULL default '0',
CanFocusRel tinyint(3) unsigned NOT NULL default '0',
CanFocusCon tinyint(3) unsigned NOT NULL default '0',
MinFocusRange int(10) unsigned default NULL,
MaxFocusRange int(10) unsigned default NULL,
MinFocusStep int(10) unsigned default NULL,
MaxFocusStep int(10) unsigned default NULL,
HasFocusSpeed tinyint(3) unsigned NOT NULL default '0',
MinFocusSpeed int(10) unsigned default NULL,
MaxFocusSpeed int(10) unsigned default NULL,
CanIris tinyint(3) unsigned NOT NULL default '0',
CanAutoIris tinyint(3) unsigned NOT NULL default '0',
CanIrisAbs tinyint(3) unsigned NOT NULL default '0',
CanIrisRel tinyint(3) unsigned NOT NULL default '0',
CanIrisCon tinyint(3) unsigned NOT NULL default '0',
MinIrisRange int(10) unsigned default NULL,
MaxIrisRange int(10) unsigned default NULL,
MinIrisStep int(10) unsigned default NULL,
MaxIrisStep int(10) unsigned default NULL,
HasIrisSpeed tinyint(3) unsigned NOT NULL default '0',
MinIrisSpeed int(10) unsigned default NULL,
MaxIrisSpeed int(10) unsigned default NULL,
CanGain tinyint(3) unsigned NOT NULL default '0',
CanAutoGain tinyint(3) unsigned NOT NULL default '0',
CanGainAbs tinyint(3) unsigned NOT NULL default '0',
CanGainRel tinyint(3) unsigned NOT NULL default '0',
CanGainCon tinyint(3) unsigned NOT NULL default '0',
MinGainRange int(10) unsigned default NULL,
MaxGainRange int(10) unsigned default NULL,
MinGainStep int(10) unsigned default NULL,
MaxGainStep int(10) unsigned default NULL,
HasGainSpeed tinyint(3) unsigned NOT NULL default '0',
MinGainSpeed int(10) unsigned default NULL,
MaxGainSpeed int(10) unsigned default NULL,
CanWhite tinyint(3) unsigned NOT NULL default '0',
CanAutoWhite tinyint(3) unsigned NOT NULL default '0',
CanWhiteAbs tinyint(3) unsigned NOT NULL default '0',
CanWhiteRel tinyint(3) unsigned NOT NULL default '0',
CanWhiteCon tinyint(3) unsigned NOT NULL default '0',
MinWhiteRange int(10) unsigned default NULL,
MaxWhiteRange int(10) unsigned default NULL,
MinWhiteStep int(10) unsigned default NULL,
MaxWhiteStep int(10) unsigned default NULL,
HasWhiteSpeed tinyint(3) unsigned NOT NULL default '0',
MinWhiteSpeed int(10) unsigned default NULL,
MaxWhiteSpeed int(10) unsigned default NULL,
HasPresets tinyint(3) unsigned NOT NULL default '0',
NumPresets tinyint(3) unsigned NOT NULL default '0',
HasHomePreset tinyint(3) unsigned NOT NULL default '0',
CanSetPresets tinyint(3) unsigned NOT NULL default '0',
CanMove tinyint(3) unsigned NOT NULL default '0',
CanMoveDiag tinyint(3) unsigned NOT NULL default '0',
CanMoveMap tinyint(3) unsigned NOT NULL default '0',
CanMoveAbs tinyint(3) unsigned NOT NULL default '0',
CanMoveRel tinyint(3) unsigned NOT NULL default '0',
CanMoveCon tinyint(3) unsigned NOT NULL default '0',
CanPan tinyint(3) unsigned NOT NULL default '0',
MinPanRange int(10) default NULL,
MaxPanRange int(10) default NULL,
MinPanStep int(10) default NULL,
MaxPanStep int(10) default NULL,
HasPanSpeed tinyint(3) unsigned NOT NULL default '0',
MinPanSpeed int(10) default NULL,
MaxPanSpeed int(10) default NULL,
HasTurboPan tinyint(3) unsigned NOT NULL default '0',
TurboPanSpeed int(10) default NULL,
CanTilt tinyint(3) unsigned NOT NULL default '0',
MinTiltRange int(10) default NULL,
MaxTiltRange int(10) default NULL,
MinTiltStep int(10) default NULL,
MaxTiltStep int(10) default NULL,
HasTiltSpeed tinyint(3) unsigned NOT NULL default '0',
MinTiltSpeed int(10) default NULL,
MaxTiltSpeed int(10) default NULL,
HasTurboTilt tinyint(3) unsigned NOT NULL default '0',
TurboTiltSpeed int(10) default NULL,
CanAutoScan tinyint(3) unsigned NOT NULL default '0',
NumScanPaths tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (Id),
UNIQUE KEY UC_Id (Id)
) TYPE=MyISAM;
--
-- Some sample control protocol definitions
--
insert into Controls values (1,'pelco-d','Local','/usr/local/bin/zmcontrol-pelco-d.pl',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0);
insert into Controls values (2,'visca','Local','/usr/local/bin/zmcontrol-visca.pl',1,1,0,1,0,0,0,1,0,16384,10,4000,1,1,6,1,1,1,0,1,0,1536,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,3,1,1,1,1,0,1,1,0,1,-15578,15578,100,10000,1,1,50,1,254,1,-7789,7789,100,5000,1,1,50,1,254,0,0);
insert into Controls values (3,'KX-HCM10','Remote','/usr/local/bin/zmcontrol-kx-hcm10.pl',0,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,8,1,1,1,0,1,0,0,1,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0);
insert into Controls values (4,'pelco-d-full','Local','/usr/local/bin/zmcontrol-pelco-d.pl',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0);
--
-- These are optional, but we might as well do it now
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

31
db/zm_update-1.21.0.sql Normal file
View File

@ -0,0 +1,31 @@
--
-- This updates a 1.21.0 database to 1.21.1
--
-- Make changes to Monitors table
--
alter table Monitors modify column Orientation enum('0','90','180','270','hori','vert') NOT NULL default '0';
alter table Monitors add column AutoStopTimeout decimal(5,2) default NULL after ControlAddress;
--
-- Make changes to Stats table
--
alter table Stats modify column MinBlobSize int(10) unsigned NOT NULL default '0';
alter table Stats modify column MaxBlobSize int(10) unsigned NOT NULL default '0';
--
-- Make changes to Zones table
--
alter table Zones modify column MinBlobPixels int(10) unsigned default NULL;
alter table Zones modify column MaxBlobPixels int(10) unsigned default NULL;
--
-- Add in extra PTZ protocol
--
insert into Controls values (0,'PELCO-P','Local','/usr/local/bin/zmcontrol-pelco-p.pl',1,1,0,1,1,0,0,1,NULL,NULL,NULL,NULL,1,0,3,1,1,0,0,1,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,1,0,1,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,20,1,1,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,1,0,63,1,254,1,NULL,NULL,NULL,NULL,1,0,63,1,254,0,0);
INSERT INTO Controls VALUES (0,'Axis API v2','Remote','/usr/local/bin/zmcontrol-axis-v2.pl',0,0,0,1,0,0,1,0,0,9999,10,2500,0,NULL,NULL,1,1,0,1,0,0,9999,10,2500,0,NULL,NULL,1,1,0,1,0,0,9999,10,2500,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,12,1,1,1,1,1,0,1,0,1,-360,360,1,90,0,NULL,NULL,0,NULL,1,-360,360,1,90,0,NULL,NULL,0,NULL,0,0);
--
-- These are optional, but we might as well do it now
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

13
db/zm_update-1.21.1.sql Normal file
View File

@ -0,0 +1,13 @@
--
-- This updates a 1.21.1 database to 1.21.2
--
-- No changes required
--
-- These are optional, but we might as well do it now
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

13
db/zm_update-1.21.2.sql Normal file
View File

@ -0,0 +1,13 @@
--
-- This updates a 1.21.2 database to 1.21.3
--
-- No changes required
--
-- These are optional, but we might as well do it now
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

25
db/zm_update-1.21.3.sql Normal file
View File

@ -0,0 +1,25 @@
--
-- This updates a 1.21.3 database to 1.21.4
--
alter table Monitors add column WebColour varchar(32) not null default 'red';
update Monitors set WebColour = concat( '#', hex(14*rand()),hex(15*rand()),hex(14*rand()),hex(15*rand()),hex(14*rand()),hex(15*rand()) );
alter table Monitors add column Sequence smallint unsigned;
alter table Monitors modify column Device tinytext;
update Monitors set Device = concat( "/dev/video", Device );
update Monitors set Device = NULL where Type = "Remote";
alter table Monitors add column DefaultScale smallint unsigned after ReturnDelay;
alter table Monitors modify column Type enum('Local','Remote','File') NOT NULL default 'Local';
alter table Events add column Height smallint(5) unsigned not null default '0' after EndTime;
alter table Events add column Width smallint(5) unsigned not null default '0' after EndTime;
alter table Users add column Control enum('None','View','Edit') NOT NULL default 'None' after Events;
update Users set Control = System;
alter table Users add column MaxBandwidth varchar(16) not null default '' after System;
--
-- These are optional, but we might as well do it now
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

134
db/zm_update-1.21.4.sql Normal file
View File

@ -0,0 +1,134 @@
--
-- This updates a 1.21.4 database to 1.22.0
--
alter table Monitors change column RunMode Enabled tinyint(3) unsigned NOT NULL default '1';
alter table Monitors add column DefaultRate smallint unsigned not null default 100 after ReturnDelay;
--
alter table Events add column Videoed tinyint unsigned not null default 0 after Archived;
alter table Filters add column AutoVideo tinyint unsigned not null default 0 after AutoArchive;
alter table Filters add column Temp tinyint unsigned not null default 0;
update Filters set Temp = AutoDelete;
alter table Filters drop column AutoDelete;
alter table Filters change column Temp AutoDelete tinyint unsigned not null default 0;
alter table Filters change column AutoExecute AutoExecuteCmd tinytext;
alter table Filters add column AutoExecute tinyint unsigned not null default 0 after AutoMessage;
update Filters set AutoExecute = if(isnull(AutoExecuteCmd)||AutoExecuteCmd='', 0, 1 );
--
alter table Zones add column NumCoords tinyint(3) unsigned NOT NULL default '0' after Units;
alter table Zones add column Coords tinytext NOT NULL after NumCoords;
alter table Zones add column Area int(10) unsigned not null default 0 after Coords;
alter table Zones modify column AlarmRGB int(10) unsigned default '0';
alter table Zones add index MonitorId (MonitorId);
--
insert into Controls values ('','Neu-Fusion NCS370','Remote','zmcontrol-ncs370.pl',0,0,0,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,0,0,0,0,0,NULL,NULL,NULL,NULL,0,NULL,NULL,1,24,1,0,1,1,0,0,0,1,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,1,NULL,NULL,NULL,NULL,0,NULL,NULL,0,NULL,0,0);
--
-- Table structure for table `MonitorPresets`
--
CREATE TABLE MonitorPresets (
Id int(10) unsigned NOT NULL auto_increment,
Name varchar(64) NOT NULL,
Type enum('Local','Remote','File') NOT NULL default 'Local',
Device tinytext,
Channel varchar(32) default NULL,
Format varchar(32) default NULL,
Host varchar(64) default NULL,
Port varchar(8) default NULL,
Path varchar(255) default NULL,
Width smallint(5) unsigned default NULL,
Height smallint(5) unsigned default NULL,
Palette tinyint(3) unsigned default NULL,
MaxFPS decimal(5,2) default NULL,
Controllable tinyint(3) unsigned NOT NULL default '0',
ControlId varchar(16) default NULL,
ControlDevice varchar(255) default NULL,
ControlAddress varchar(255) default NULL,
DefaultRate smallint(5) unsigned NOT NULL default '100',
DefaultScale smallint(5) unsigned NOT NULL default '100',
PRIMARY KEY (Id)
) TYPE=MyISAM;
--
-- Dumping data for table `MonitorPresets`
--
INSERT INTO MonitorPresets VALUES ('','BTTV Video, PAL, 320x240','Local','/dev/video<?>','<?>','0',NULL,NULL,NULL,320,240,4,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','BTTV Video, PAL, 320x240, max 5 FPS','Local','/dev/video<?>','<?>','0',NULL,NULL,NULL,320,240,4,5.0,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','BTTV Video, PAL, 640x480','Local','/dev/video<?>','<?>','0',NULL,NULL,NULL,640,480,4,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','BTTV Video, PAL, 640x480, max 5 FPS','Local','/dev/video<?>','<?>','0',NULL,NULL,NULL,640,480,4,5.0,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','BTTV Video, NTSC, 320x240','Local','/dev/video<?>','<?>','1',NULL,NULL,NULL,320,240,4,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','BTTV Video, NTSC, 320x240, max 5 FPS','Local','/dev/video<?>','<?>','1',NULL,NULL,NULL,320,240,4,5.0,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','BTTV Video, NTSC, 640x480','Local','/dev/video<?>','<?>','1',NULL,NULL,NULL,640,480,4,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','BTTV Video, NTSC, 640x480, max 5 FPS','Local','/dev/video<?>','<?>','1',NULL,NULL,NULL,640,480,4,5.0,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Axis IP, 320x240, mpjpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240',320,240,4,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Axis IP, 320x240, mpjpeg, max 5 FPS','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240&req_fps=5',320,240,4,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Axis IP, 320x240, jpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',320,240,4,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Axis IP, 320x240, jpeg, max 5 FPS','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',320,240,4,5.0,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Axis IP, 640x480, mpjpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480',640,480,4,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Axis IP, 640x480, mpjpeg, max 5 FPS','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480&req_fps=5',640,480,4,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Axis IP, 640x480, jpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',640,480,4,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Axis IP, 640x480, jpeg, max 5 FPS','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',640,480,4,5.0,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 320x240, mpjpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240',320,240,4,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 320x240, mpjpeg, max 5 FPS','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240&req_fps=5',320,240,4,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 320x240, jpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',320,240,4,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 320x240, jpeg, max 5 FPS','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=320x240',320,240,4,5.0,1,4,NULL,'<ip-address>:<port>',100,100);
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 640x480, mpjpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480',640,480,4,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 640x480, mpjpeg, max 5 FPS','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480&req_fps=5',640,480,4,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 640x480, jpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',640,480,4,NULL,1,4,NULL,'<ip-address>:<port>',100,100);
INSERT INTO MonitorPresets VALUES ('','Axis IP PTZ, 640x480, jpeg, max 5 FPS','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/jpg/image.cgi?resolution=640x480',640,480,4,5.0,1,4,NULL,'<ip-address>:<port>',100,100);
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 320x240, mpjpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/nphMotionJpeg?Resolution=320x240&Quality=Standard',320,240,4,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 320x240, jpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',320,240,4,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 320x240, jpeg, max 5 FPS','Remote',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',320,240,4,5.0,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 640x480, mpjpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/nphMotionJpeg?Resolution=640x480&Quality=Standard',640,480,4,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 640x480, jpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',640,480,4,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Panasonic IP, 640x480, jpeg, max 5 FPS','Remote',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',640,480,4,5.0,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 320x240, mpjpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/nphMotionJpeg?Resolution=320x240&Quality=Standard',320,240,4,NULL,1,5,NULL,'<ip-address>:<port>',100,100);
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 320x240, jpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',320,240,4,NULL,1,5,NULL,'<ip-address>:<port>',100,100);
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 320x240, jpeg, max 5 FPS','Remote',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=320x240&Quality=Standard',320,240,4,5.0,1,5,NULL,'<ip-address>:<port>',100,100);
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 640x480, mpjpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/nphMotionJpeg?Resolution=640x480&Quality=Standard',640,480,4,NULL,1,5,NULL,'<ip-address>:<port>',100,100);
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 640x480, jpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',640,480,4,NULL,1,5,NULL,'<ip-address>:<port>',100,100);
INSERT INTO MonitorPresets VALUES ('','Panasonic IP PTZ, 640x480, jpeg, max 5 FPS','Remote',NULL,NULL,NULL,'<ip-address>',80,'/SnapshotJPEG?Resolution=640x480&Quality=Standard',640,480,4,5.0,1,5,NULL,'<ip-address>:<port>',100,100);
--
-- Table structure for table `ZonePresets`
--
CREATE TABLE ZonePresets (
Id int(10) unsigned NOT NULL auto_increment,
Name varchar(64) NOT NULL default '',
Type enum('Active','Inclusive','Exclusive','Preclusive','Inactive') NOT NULL default 'Active',
Units enum('Pixels','Percent') NOT NULL default 'Pixels',
CheckMethod enum('AlarmedPixels','FilteredPixels','Blobs') NOT NULL default 'Blobs',
MinPixelThreshold smallint(5) unsigned default NULL,
MaxPixelThreshold smallint(5) unsigned default NULL,
MinAlarmPixels int(10) unsigned default NULL,
MaxAlarmPixels int(10) unsigned default NULL,
FilterX tinyint(3) unsigned default NULL,
FilterY tinyint(3) unsigned default NULL,
MinFilterPixels int(10) unsigned default NULL,
MaxFilterPixels int(10) unsigned default NULL,
MinBlobPixels int(10) unsigned default NULL,
MaxBlobPixels int(10) unsigned default NULL,
MinBlobs smallint(5) unsigned default NULL,
MaxBlobs smallint(5) unsigned default NULL,
PRIMARY KEY (Id),
UNIQUE KEY UC_Id (Id)
) TYPE=MyISAM;
--
-- Dumping data for table `ZonePresets`
--
INSERT INTO ZonePresets VALUES (1,'Fast, low sensitivity','Active','Percent','AlarmedPixels',25,NULL,20,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
INSERT INTO ZonePresets VALUES (2,'Fast, medium sensitivity','Active','Percent','AlarmedPixels',15,NULL,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
INSERT INTO ZonePresets VALUES (3,'Fast, high sensitivity','Active','Percent','AlarmedPixels',10,NULL,5,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
INSERT INTO ZonePresets VALUES (4,'Best, low sensitivity','Active','Percent','Blobs',25,NULL,36,NULL,7,7,24,NULL,20,NULL,1,NULL);
INSERT INTO ZonePresets VALUES (5,'Best, medium sensitivity','Active','Percent','Blobs',15,NULL,16,NULL,5,5,12,NULL,10,NULL,1,NULL);
INSERT INTO ZonePresets VALUES (6,'Best, high sensitivity','Active','Percent','Blobs',10,NULL,8,NULL,3,3,6,NULL,5,NULL,1,NULL);
--
-- These are optional, but we might as well do it now
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

56
db/zm_update-1.22.0.sql Normal file
View File

@ -0,0 +1,56 @@
--
-- This updates a 1.22.0 database to 1.22.1
--
--
-- Add support for linked monitors
--
alter table Monitors add column LinkedMonitors varchar(255) NOT NULL default '' after Enabled;
--
-- Revise some defaults and sizes
--
alter table Monitors modify column Device varchar(64) not null default '';
alter table Monitors modify column Host varchar(64) not null default '';
alter table Monitors modify column Port varchar(8) not null default '';
alter table Monitors modify column Path varchar(255) not null default '';
alter table Monitors modify column LabelX smallint(5) unsigned not null default 0;
alter table Monitors modify column LabelY smallint(5) unsigned not null default 0;
alter table Monitors modify column MaxFPS decimal(5,2) default NULL;
update Monitors set MaxFPS = NULL where MaxFPS = 0.00;
--
-- Add monitor specific alarm max FPS
--
alter table Monitors add column AlarmMaxFPS decimal(5,2) default NULL after MaxFPS;
--
-- Add average pixel difference to stats
--
alter table Stats add column PixelDiff tinyint(3) unsigned NOT NULL default '0' after FrameId;
--
-- Add some new monitor presets
--
INSERT INTO MonitorPresets VALUES ('','Axis IP, 320x240, mpjpeg, B&W','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=320x240&color=0',320,240,4,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Axis IP, 640x480, mpjpeg, B&W','Remote',NULL,NULL,NULL,'<ip-address>',80,'/axis-cgi/mjpg/video.cgi?resolution=640x480&color=0',640,480,4,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Gadspot IP, jpeg, max 5 FPS','Remote',NULL,NULL,NULL,'<ip-address>',80,'/Jpeg/CamImg.jpg',NULL,NULL,4,5.0,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Gadspot IP, mpjpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/GetData.cgi',NULL,NULL,4,NULL,0,NULL,NULL,NULL,100,100);
INSERT INTO MonitorPresets VALUES ('','Gadspot IP, mpjpeg','Remote',NULL,NULL,NULL,'<ip-address>',80,'/Jpeg/CamImg.jpg',NULL,NULL,4,5.0,0,NULL,NULL,NULL,100,100);
--
-- Modify zone presets a bit
--
UPDATE ZonePresets SET MinPixelThreshold = 60 WHERE Id = 1 OR Id = 4;
UPDATE ZonePresets SET MinPixelThreshold = 40 WHERE Id = 2 OR Id = 5;
UPDATE ZonePresets SET MinPixelThreshold = 20 WHERE Id = 3 OR Id = 6;
--
-- These are optional, but we might as well do it now
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

26
db/zm_update-1.22.1.sql Normal file
View File

@ -0,0 +1,26 @@
--
-- This updates a 1.22.1 database to 1.22.2
--
--
-- Add missing Zone Preset
--
replace into ZonePresets values (6,'Best, high sensitivity','Active','Percent','Blobs',20,NULL,8,NULL,3,3,6,NULL,5,NULL,1,NULL);
--
-- Remove redundant Zone columns
--
alter table Zones drop column LoX;
alter table Zones drop column HiX;
alter table Zones drop column LoY;
alter table Zones drop column HiY;
--
-- These are optional, but we might as well do it now
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

63
db/zm_update-1.22.2.sql Normal file
View File

@ -0,0 +1,63 @@
--
-- This updates a 1.22.2 database to 1.22.3
--
--
-- Add new Background column into Filters
--
alter table Filters add column Background tinyint(1) unsigned not null default 0;
--
-- Set the Background flag for any filters currently saved with Auto tasks
--
update Filters set Background = 1 where (AutoArchive = 1 or AutoVideo = 1 or AutoUpload = 1 or AutoEmail = 1 or AutoMessage = 1 or AutoExecute = 1 or AutoDelete = 1);
--
-- Add default view column into Monitors
--
alter table Monitors add column DefaultView enum ('Events','Control') not null default 'Events' after ReturnDelay;
alter table Monitors modify LabelFormat varchar(64) NOT NULL default '%%s - %y/%m/%d %H:%M:%S';
--
-- Add device permissions column into Users, set the permissions for existing users to
-- be the same as for Monitors as a default
--
alter table Users add column Devices enum('None','View','Edit') NOT NULL default 'None' after Monitors;
update Users set Devices = Monitors;
--
-- Increase size of Notes field in Events
--
alter table Events modify column Notes text;
--
-- Create new preset labels table
--
CREATE TABLE `ControlPresets` (
`MonitorId` int(10) unsigned NOT NULL default '0',
`Preset` int(10) unsigned NOT NULL default '0',
`Label` varchar(64) NOT NULL default '',
PRIMARY KEY (`MonitorId`,`Preset`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- Create new devices table
--
CREATE TABLE `Devices` (
`Id` int(10) unsigned NOT NULL auto_increment,
`Name` tinytext NOT NULL,
`Type` enum('X10') NOT NULL default 'X10',
`KeyString` varchar(32) NOT NULL default '',
PRIMARY KEY (`Id`),
UNIQUE KEY `UC_Id` (`Id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
--
-- These are optional, but we might as well do it now
--
optimize table Frames;
optimize table Events;
optimize table Filters;
optimize table Zones;
optimize table Monitors;
optimize table Stats;

Some files were not shown because too many files have changed in this diff Show More