Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Z
ZLMediaKit
概览
Overview
Details
Activity
Cycle Analytics
版本库
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
问题
0
Issues
0
列表
Board
标记
里程碑
合并请求
0
Merge Requests
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
Snippets
成员
Collapse sidebar
Close sidebar
活动
图像
聊天
创建新问题
作业
提交
Issue Boards
Open sidebar
张翔宇
ZLMediaKit
Commits
a548fcd7
Unverified
Commit
a548fcd7
authored
Sep 30, 2021
by
夏楚
Committed by
GitHub
Sep 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Feature/dev (#1143)
* 防止每次cmake后导致重复编译
parent
a83187d2
隐藏空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
37 行增加
和
23 行删除
+37
-23
server/main.cpp
+1
-1
src/Common/config.cpp
+10
-10
src/Common/macros.cpp
+23
-0
src/Common/macros.h
+2
-11
version.h.ini
+1
-1
没有找到文件。
server/main.cpp
查看文件 @
a548fcd7
...
...
@@ -159,7 +159,7 @@ public:
[](
const
std
::
shared_ptr
<
ostream
>
&
stream
,
const
string
&
arg
)
->
bool
{
//版本信息
*
stream
<<
"编译日期: "
<<
BUILD_TIME
<<
std
::
endl
;
*
stream
<<
"当前git分支: "
<<
BRANCH_
TI
ME
<<
std
::
endl
;
*
stream
<<
"当前git分支: "
<<
BRANCH_
NA
ME
<<
std
::
endl
;
*
stream
<<
"当前git hash值: "
<<
COMMIT_HASH
<<
std
::
endl
;
throw
ExitException
();
});
...
...
src/Common/config.cpp
查看文件 @
a548fcd7
...
...
@@ -133,16 +133,16 @@ onceToken token([](){
#endif
mINI
::
Instance
()[
kRootPath
]
=
"./www"
;
mINI
::
Instance
()[
kNotFound
]
=
"<html
>"
"<head><title>404 Not Found</title></head
>"
"<body bgcolor=
\"
white
\"
>"
"<center><h1>您访问的资源不存在!</h1></
center>"
"<hr><center>"
SERVER_NAME
"</center
>"
"</body
>"
"</html>"
;
mINI
::
Instance
()[
kNotFound
]
=
StrPrinter
<<
"<html>"
"<head><title>404 Not Found</title></head
>"
"<body bgcolor=
\"
white
\"
>"
"<center><h1>您访问的资源不存在!</h1></center
>"
"<hr><
center>"
<<
SERVER_NAME
<<
"</center>"
"</body
>"
"</html
>"
<<
endl
;
},
nullptr
);
}
//namespace Http
...
...
src/Common/macros.cpp
0 → 100644
查看文件 @
a548fcd7
/*
* Copyright (c) 2016 The ZLMediaKit project authors. All Rights Reserved.
*
* This file is part of ZLMediaKit(https://github.com/xia-chu/ZLMediaKit).
*
* Use of this source code is governed by MIT license that can be found in the
* LICENSE file in the root of the source tree. All contributing project authors
* may be found in the AUTHORS file in the root of the source tree.
*/
#include "macros.h"
#if defined(ENABLE_VERSION)
#include "Version.h"
#endif
//请遵循MIT协议,勿修改服务器声明
#if !defined(ENABLE_VERSION)
const
char
SERVER_NAME
[]
=
"ZLMediaKit-6.0(build in "
__DATE__
" "
__TIME__
")"
;
#else
const
char
SERVER_NAME
[]
=
"ZLMediaKit(git hash:"
COMMIT_HASH
",branch:"
BRANCH_NAME
",build time:"
__DATE__
" "
__TIME__
")"
;
#endif
src/Common/macros.h
查看文件 @
a548fcd7
...
...
@@ -11,10 +11,6 @@
#ifndef ZLMEDIAKIT_MACROS_H
#define ZLMEDIAKIT_MACROS_H
#if defined(ENABLE_VERSION)
#include "Version.h"
#endif
#if defined(__MACH__)
#include <arpa/inet.h>
#include <machine/endian.h>
...
...
@@ -57,13 +53,6 @@
#define CLEAR_ARR(arr) for(auto &item : arr){ item = 0;}
#endif //CLEAR_ARR
//请遵循MIT协议,勿修改服务器声明
#if !defined(ENABLE_VERSION)
#define SERVER_NAME "ZLMediaKit-6.0(build in " __DATE__ " " __TIME__ ")"
#else
#define SERVER_NAME "ZLMediaKit(git hash:" COMMIT_HASH ",branch:" BRANCH_TIME ",build time:" __DATE__ " " __TIME__ ")"
#endif
#define VHOST_KEY "vhost"
#define HTTP_SCHEMA "http"
#define RTSP_SCHEMA "rtsp"
...
...
@@ -73,6 +62,8 @@
#define FMP4_SCHEMA "fmp4"
#define DEFAULT_VHOST "__defaultVhost__"
extern
const
char
SERVER_NAME
[];
#ifdef __cplusplus
extern
"C"
{
#endif
...
...
version.h.ini
查看文件 @
a548fcd7
...
...
@@ -2,7 +2,7 @@
#define __GIT_VERSION_H__
#define COMMIT_HASH "@COMMIT_HASH@"
#define BRANCH_
TI
ME "@BRANCH_NAME@"
#define BRANCH_
NA
ME "@BRANCH_NAME@"
#define BUILD_TIME "@BUILD_TIME@"
#endif //__GIT_VERSION_H__
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论