mirror of
https://github.com/ossrs/srs.git
synced 2025-03-09 15:49:59 +00:00
print the system info when startup main
This commit is contained in:
parent
2eeb289c2f
commit
d89d16ca1e
4 changed files with 21 additions and 9 deletions
|
@ -3,6 +3,7 @@
|
|||
# variables, parent script must set it:
|
||||
# SRS_JOBS: the build jobs.
|
||||
# SrsArmMakeOptions: the arm make options for ubuntu12(armhf, v7cpu)
|
||||
# SRS_AUTO_HEADERS_H: the auto generated header file.
|
||||
|
||||
#####################################################################################
|
||||
#####################################################################################
|
||||
|
@ -542,3 +543,6 @@ if [ $SRS_ARM_UBUNTU12 = YES ]; then
|
|||
else
|
||||
echo "#undef SRS_ARM_UBUNTU12" >> $SRS_AUTO_HEADERS_H
|
||||
fi
|
||||
|
||||
# new empty line to auto headers file.
|
||||
echo "" >> $SRS_AUTO_HEADERS_H
|
||||
|
|
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# variables, parent script must set it:
|
||||
# SRS_AUTO_HEADERS_H: the auto generated header file.
|
||||
|
||||
#####################################################################################
|
||||
#####################################################################################
|
||||
# parse user options, do this at first
|
||||
|
|
19
trunk/configure
vendored
19
trunk/configure
vendored
|
@ -19,6 +19,7 @@ BLACK="\\e[0m"
|
|||
# srs features: SRS_SSL/SRS_HLS/SRS_FFMPEG/SRS_HTTP_CALLBACK/SRS_RESEARCH/SRS_UTEST
|
||||
# build options: SRS_JOBS
|
||||
#####################################################################################
|
||||
SRS_AUTO_HEADERS_H="${SRS_OBJS}/srs_auto_headers.hpp"
|
||||
# parse options, exit with error when parse options invalid.
|
||||
. auto/options.sh
|
||||
|
||||
|
@ -28,15 +29,18 @@ if [[ -f Makefile ]]; then
|
|||
make clean
|
||||
fi
|
||||
|
||||
# write user options to headers
|
||||
echo "#define SRS_BUILD_TS \"`date +%s`\"" >> $SRS_AUTO_HEADERS_H
|
||||
echo "#define SRS_BUILD_DATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $SRS_AUTO_HEADERS_H
|
||||
echo "#define SRS_UNAME \"`uname -a`\"" >> $SRS_AUTO_HEADERS_H
|
||||
echo "#define SRS_CONFIGURE \"${SRS_CONFIGURE}\"" >> $SRS_AUTO_HEADERS_H
|
||||
|
||||
# new empty line to auto headers file.
|
||||
echo "" >> $SRS_AUTO_HEADERS_H
|
||||
|
||||
#####################################################################################
|
||||
# generate auto headers file, depends on the finished of options.sh
|
||||
#####################################################################################
|
||||
# write user options to headers
|
||||
SRS_AUTO_HEADERS_H="${SRS_OBJS}/srs_auto_headers.hpp"
|
||||
echo "#define SRS_CONFIGURE \"${SRS_CONFIGURE}\"" > $SRS_AUTO_HEADERS_H
|
||||
echo "#define SRS_BUILD_DATE \"`date \"+%Y-%m-%d %H:%M:%S\"`\"" >> $SRS_AUTO_HEADERS_H
|
||||
echo "#define SRS_BUILD_TS \"`date +%s`\"" >> $SRS_AUTO_HEADERS_H
|
||||
|
||||
# the arm-ubuntu12 options for make for depends
|
||||
SrsArmCC="arm-linux-gnueabi-gcc"
|
||||
SrsArmGCC="arm-linux-gnueabi-gcc"
|
||||
|
@ -48,9 +52,6 @@ SrsArmRANDLIB="arm-linux-gnueabi-ranlib"
|
|||
# apply user options.
|
||||
. auto/depends.sh
|
||||
|
||||
# new empty line to auto headers file.
|
||||
echo "" >> $SRS_AUTO_HEADERS_H
|
||||
|
||||
#####################################################################################
|
||||
# generate Makefile.
|
||||
#####################################################################################
|
||||
|
|
|
@ -80,6 +80,10 @@ int main(int argc, char** argv)
|
|||
return -1;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
srs_trace("uname: "SRS_UNAME);
|
||||
srs_trace("build: %s, %s", SRS_BUILD_DATE, srs_is_little_endian()? "little-endian":"big-endian");
|
||||
srs_trace("configure: "SRS_CONFIGURE);
|
||||
|
||||
if ((ret = _srs_server->initialize()) != ERROR_SUCCESS) {
|
||||
return ret;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue