Skip to content

Commit

Permalink
install tpl
Browse files Browse the repository at this point in the history
  • Loading branch information
VictorTrapenok committed Mar 21, 2018
1 parent fd67f34 commit ee6fe3f
Show file tree
Hide file tree
Showing 41 changed files with 1,559 additions and 569 deletions.
86 changes: 15 additions & 71 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
## Next Release

BREAKING CHANGES:
FEATURES:
IMPROVEMENTS:
BREAKING CHANGES:
FEATURES:
IMPROVEMENTS:
BUG FIXES:

## v3.37
BUG FIXES:
* bug fix for dev_id=0
* bug fix for users_data js api call

## v3.36

## v3.35

FEATURES:
* add table users_data
* add table revoked_tokens
* add jwt support
* add web_pipe_count command for track_* pipes
* add multi db

## v3.35

BUG FIXES:
* bug `Table doesn't exist` for table `conference_members`

## v3.34

Expand Down Expand Up @@ -56,49 +45,20 @@ BUG FIXES:
## v3.30

BUG FIXES:

* fix bug in cmake files

* errors when restart mysql server
* fix bug #36 CometServerApi.js:824 Invalid pipe name subscription web_chat_pipe chatControl
* fix bug #35 _cometServerApi.prototype.send_msg("pipe_log\n"+pipe_name+"\n"+marker+"\n");
* fix bug #34 tabSignal.connect is not a function

## v3.29

BUG FIXES:

* fix bug in star scripts

IMPROVEMENTS:

* add parametr connection_attempts to section db
* rebild docs in .md files and impruve links in docs


## v3.28

BUG FIXES:

* fix bug in star and stop scripts
* fix bug in stats


## v3.26

BUG FIXES:

* bug fix to query `select * from pipes where name in ("web_test");`

* Command systemctl stop comet.service does not work on Ubuntu 16 ( #17 )

IMPROVEMENTS:

* Added parameter `send_user_online_events` to `main`
* Added parameter `send_user_offline_events` to `main`
* Added parameter `save_users_last_online_time` to `main`

* Added section `cluster`
* Added section `cometqlproxy`
* Added clustering mechanism #15

* Added pidfile option in section `main`.`pidfile`

* Added queryes like `set paramName paramValue`
Expand All @@ -120,51 +80,35 @@ BUG FIXES:

* Was rename parameter `benchmark` to `statistics`

## v3.23

IMPROVEMENTS:

* added parametr `allow` to section `statistics` in .ini file
* added ini file documentation in to file ./docs/comet.ini.md

## v3.22

BUG FIXES:

* last online time did not save

IMPROVEMENTS:

* Added functions for aggregating statistics of using server
* Added settings to .ini file for controll content-type header
* Added dosc in dokuwiki format
* Was translated comments in comet.ini
* Added the white list of hosts to .ini file


## v3.21

IMPROVEMENTS:

* Added caching in memory for sending static files
* Added cache-control headers for get requests

## v3.2

BUG FIXES:
* Js Api version 3.28 (Fix bug in auth callbacks)
* Fix bug in auth callbacks
* complete api function getTrackPipeUsers


## v3.1

FEATURES:
FEATURES:

* Added function to getting users in track_pipes from js api
* Added deleting api query for pipes history #5
* Added deleting api query for pipes history #5
* Added CODE_OF_CONDUCT.md
* Added CONTRIBUTING.md
* Added CHANGELOG.md
* Added server version to ws answer
* Js Api version 3.26
* Removed message `setState` from console log in Js Api
* Fixed bug when Js api in offline
* Added server version to ws answer
27 changes: 25 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -175,12 +175,35 @@ set_property(TARGET libjwta PROPERTY


# Создает исполняемый файл с именем cpp_comet из исходников
add_executable(cpp_comet ${HASHLIB2PLUS_EXE} ${SOURCE_EXE} ${TINYXML2_EXE} ${ESL_EXE} )
add_executable(cppcomet ${HASHLIB2PLUS_EXE} ${SOURCE_EXE} ${TINYXML2_EXE} ${ESL_EXE} )

# Подключение библиотеки pthreads
target_link_libraries (cpp_comet ${CMAKE_THREAD_LIBS_INIT} ${MYSQL_LIBRARIES} ${OPENSSL_LIBRARIES} crypt uuid libjwta)
target_link_libraries (cppcomet ${CMAKE_THREAD_LIBS_INIT} ${MYSQL_LIBRARIES} ${OPENSSL_LIBRARIES} crypt uuid libjwta)


#cmake ./ && make

#INSTALL( DIRECTORY <directory> DESTINATION usr/myproject )

#mkdir /etc/comet-server
#cp ./comet-service.sh /etc/comet-server/comet-service.sh
#cp ./comet.ini /etc/comet-server/comet.ini
#cp ./cpp_comet /etc/comet-server/cpp_comet
# https://mirkokiefer.com/cmake-by-example-f95eb47d45b1

set(INSTALL_CONF_DIR
/etc/comet-server)

set(INSTALL_BIN_DIR
/usr/bin)

set(INSTALL_SYSTEMD_DIR
/etc/systemd/system)

install(FILES comet.service DESTINATION ${INSTALL_SYSTEMD_DIR})
install(FILES comet.ini DESTINATION ${INSTALL_CONF_DIR})
install(FILES comet-service.sh DESTINATION ${INSTALL_CONF_DIR})
install(TARGETS cppcomet DESTINATION ${INSTALL_BIN_DIR})

# https://cmake.org/pipermail/cmake/2009-September/031887.html
# INSTALL(SCRIPT CopyIfNotExists.cmake)
6 changes: 3 additions & 3 deletions comet-service.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
echo "CppComet"

PATH=/sbin:/usr/sbin:/bin:/usr/bin
RUNDIR=/etc/comet-server/
RUNDIR=/usr/bin
EXTRAOPTS=
PIDFILE=/var/run/cppcomet.pid

Expand All @@ -17,7 +17,7 @@ case "$1" in
echo "CppComet already run"
else
echo "Starting CppComet"
./cpp_comet > /var/log/cpp_comet.log 2>/var/log/cpp_comet.log &
/usr/bin/cppcomet --conf /etc/comet-server/comet.ini > /var/log/cpp_comet.log 2>/var/log/cpp_comet.log &
fi
;;
stop)
Expand All @@ -41,7 +41,7 @@ case "$1" in
echo "pid file does not exist"
fi
echo "Starting CppComet"
./cpp_comet > /var/log/cpp_comet.log 2>/var/log/cpp_comet.log &
/usr/bin/cppcomet > /var/log/cpp_comet.log 2>/var/log/cpp_comet.log &
;;
esac

Expand Down
5 changes: 2 additions & 3 deletions comet.ini
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

[main]
isTest = false; включение тестов

dev_index_size = 100000

node_name = n1
useQueryLoger = false
mono_password = false
mono_password = false # EE_VERSION

base_dir = static

Expand Down
59 changes: 31 additions & 28 deletions db.sql
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,16 @@
-- version 3.4.11.1deb2+deb7u8
-- http://www.phpmyadmin.net
--
-- Хост: test.comet.su:3305
-- Время создания: Янв 24 2018 г., 14:56
-- Версия сервера: 5.5.57
-- Хост: db-n1.comet.su:3306
-- Время создания: Янв 09 2018 г., 02:24
-- Версия сервера: 5.5.58
-- Версия PHP: 5.6.31-1~dotdeb+7.1

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- База данных: `comet_db_saas`
-- База данных: `comet_db`
--

-- --------------------------------------------------------
Expand All @@ -41,6 +35,21 @@ CREATE TABLE IF NOT EXISTS `conference` (

-- --------------------------------------------------------

--
-- Структура таблицы `dev_config`
--

CREATE TABLE IF NOT EXISTS `dev_config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`key` char(64) CHARACTER SET ascii COLLATE ascii_bin NOT NULL,
`url` char(255) CHARACTER SET ascii NOT NULL DEFAULT '*',
`active_time` int(11) NOT NULL DEFAULT '0' COMMENT 'Время последней активности',
PRIMARY KEY (`id`),
KEY `key` (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=500001 ;

-- --------------------------------------------------------

--
-- Структура таблицы `log_event`
--
Expand All @@ -49,7 +58,7 @@ CREATE TABLE IF NOT EXISTS `log_event` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`text` varchar(250) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1661 ;
) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1637 ;

-- --------------------------------------------------------

Expand Down Expand Up @@ -102,19 +111,6 @@ CREATE TABLE IF NOT EXISTS `pipe_messages` (

-- --------------------------------------------------------

--
-- Структура таблицы `revoked_tokens`
--

CREATE TABLE IF NOT EXISTS `revoked_tokens` (
`dev_id` int(11) NOT NULL,
`token` varbinary(600) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`dev_id`,`token`)
) ENGINE=InnoDB DEFAULT CHARSET=ascii COLLATE=ascii_bin;

-- --------------------------------------------------------

--
-- Структура таблицы `users_auth`
--
Expand All @@ -137,7 +133,7 @@ CREATE TABLE IF NOT EXISTS `users_auth` (
CREATE TABLE IF NOT EXISTS `users_data` (
`dev_id` int(9) NOT NULL,
`user_id` int(11) NOT NULL,
`data` varbinary(600) NOT NULL,
`data` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL,
PRIMARY KEY (`dev_id`,`user_id`),
KEY `dev_id` (`dev_id`),
KEY `user_id` (`user_id`)
Expand Down Expand Up @@ -178,6 +174,13 @@ CREATE TABLE IF NOT EXISTS `users_time` (
KEY `user_id` (`user_id`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
--
-- Структура таблицы `revoked_tokens`
--

CREATE TABLE IF NOT EXISTS `revoked_tokens` (
`dev_id` int(11) NOT NULL,
`token` varbinary(600) NOT NULL,
`time` int(11) NOT NULL,
PRIMARY KEY (`dev_id`,`token`)
) ENGINE=InnoDB DEFAULT CHARSET=ascii COLLATE=ascii_bin;
Loading

0 comments on commit ee6fe3f

Please sign in to comment.