Skip to content

Commit

Permalink
Split from library.git.
Browse files Browse the repository at this point in the history
  • Loading branch information
wcb33 committed Apr 26, 2020
1 parent 8b854c2 commit 7e3ed22
Show file tree
Hide file tree
Showing 46 changed files with 342 additions and 2 deletions.
39 changes: 39 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
*.sdf
*.suo
*.ipch
*.opensdf
/Universal/x64
/Universal/x86
/Universal/SloongLua/Debug
/Universal/SloongLua/x86
/Universal/CtrlTest/x64
/Universal/CtrlTest/x86
/Universal/UnitTest/x64
/Universal/UnitTest/x86
/Universal/Universal/x86
/Universal/Universal/x64
/SloongMath/SloongMath/Debug
/SloongMath/SloongMath/x64/Debug
/SloongMath/UnitTest/x64/Debug
/SloongMath/x64/Debug
/SloongGraphics/SloongGraphics/Debug
/SloongMath/SloongMath/x64/Release
/SloongMath/SloongMath/x86/Release
/SloongMath/x64/Release
/SloongMath/x86/Release
/SloongGraphics/Debug
/Universal/SloongLua/x64/Debug
*.tlog
ipch
Debug
Release
tlog
*.user
*.o
*.log
*.db
/.vs/
libuniv_*
.vscode/launch.json
build/debug
build/release
31 changes: 31 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# 更新历史
***

### 未发布
#### 新增特性
* [#42 ](https://git.sloong.com/public/sloongnet/issues/42)GetThumbImage返回值问题
* [#43 ](https://git.sloong.com/public/sloongnet/issues/42)MD5校验失败后添加相关信息以便定位问题
#### 功能改进
* [#40 ](https://git.sloong.com/public/sloongnet/issues/40)优先级标志位使用char型的数字优先级
### v2.2.3 @ 2016-06-11
#### BUG修复
* 修复每条log前都输出了文件未打开提示信息 [#7](https://git.sloong.com/public/library/issues/7)
#### 功能改进
* debug模式下,日志立即写入到文件中 [#8](https://git.sloong.com/public/library/issues/8)
#### 新增特性
* log系统增加flush函数 [#9](https://git.sloong.com/public/library/issues/9)
### v2.2.2 @2016-05-05
#### BUG修复
* 修复在linux下folder设置无效的问题 [#6](https://git.sloong.com/public/library/issues/6)
#### 功能改进
* 提升log模块在windows系统下的资源占用和效率提升 [#5](https://git.sloong.com/public/library/issues/5)
### v2.2.1 @ 2016-04-21
#### 新增特性
* log模块支持自定义的信息类型字段 [#4](https://git.sloong.com/public/library/issues/4)
* lua模块增加int类型的push和get [#3](https://git.sloong.com/public/library/issues/3)
### v2.1.1 @ 2016-04-01
#### 新增特性
* 日志系统增加启动和停止控制函数 [#2](https://git.sloong.com/public/library/issues/2)
* 配合sloongnet增加了新的RunFunction函数 [#1](https://git.sloong.com/public/library/issues/1)
### v2.0.1 @ 2016-02-17
#### 由TFS迁移到GIT的第一个版本.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Library - power by sloong.com
开源的通用库,封装了一些常用函数。加快开发速度和效率

***
## Language
[English](https://github.com/soaringloong/sloongnet/blob/develop/README_EN.md)

## 概述
* 基于C++编写
* 支持Windows和Linux系统


## 功能特性
* 对std::string进行便捷封装
* 对常用函数增加Windows和Linux自动兼容

## 更新历史
[点击查看](https://git.sloong.com/public/library/src/master/ChangeLog.md)

## 联系我们
如果有任何问题,请联系我们。

* [Email]([email protected])

* Develop Request
```
sudo apt installl make gcc g++ libboost-dev libssl-dev liblua5.3-dev
```
107 changes: 107 additions & 0 deletions build/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
#!/bin/bash
#
#echo '$0: '$0
#echo "pwd: "`pwd`
#echo "scriptPath1: "$(cd `dirname $0`; pwd)
#echo "scriptPath2: "$(dirname $(readlink -f $0))

#WORKFOLDER=`pwd`
#echo "Workfolder: "$WORKFOLDER


show_help(){
echo -e "build.sh [operation]
operation:
-r: to build release version
-d: to build debug version
-rz: build release to tar.gz
-dz: build debug to tar.gz
-i: build debug and install"
}


SCRIPTFOLDER=$(dirname $(readlink -f $0))
#echo "ScriptFolder: "$SCRIPTFOLDER
# cd to current file folder
cd $SCRIPTFOLDER

# default value is debug
VERSION_STR=$(cat $SCRIPTFOLDER/../version)
PROJECT=libuniv
MAKEFLAG=debug
CMAKE_FILE_PATH=$SCRIPTFOLDER/../univ
OUTPATH=$SCRIPTFOLDER/$MAKEFLAG/v$VERSION_STR

clean(){
rm -rdf $MAKEFLAG
}

build(){
if [ ! -d $MAKEFLAG ];then
mkdir $MAKEFLAG
fi
cd $MAKEFLAG
cmake -DCMAKE_BUILD_TYPE=$MAKEFLAG $CMAKE_FILE_PATH
make
cd ../
copy_file
}

copy_file(){
rm -rdf $OUTPATH
mkdir -p $OUTPATH
cp -f $SCRIPTFOLDER/$MAKEFLAG/libuniv.so $OUTPATH/libuniv.so
mkdir -p $OUTPATH/include/univ/
cp -f $SCRIPTFOLDER/../univ/*.h $OUTPATH/include/univ/
cp -f $SCRIPTFOLDER/install.sh $OUTPATH/install.sh
}

build_debug(){
MAKEFLAG=debug
clean
build
}

build_release(){
MAKEFLAG=release
clean
build
}

zip(){
ZIPOUTPUTPATH=$SCRIPTFOLDER/libuniv_v$VERSION_STR.tar.gz
cd $OUTPATH/
tar -czf $ZIPOUTPUTPATH ./*
}


install(){
cd $OUTPATH
sudo ./install.sh
}

# -eq 等于,
# -ne 不等于
# -gt 大于,
# -ge 大于等于,
# -lt 小于,
# -le 小于等于
if [ $# -eq 0 ]; then
build
exit
fi

if [ $# -ge 1 ]; then
case $1 in
-r) build_release;;
-d) build_debug;;
-rz)
build_release
zip;;
-dz)
build_debug
zip;;
-i) install;;
* ) show_help;;
esac
fi
1 change: 1 addition & 0 deletions build/environment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
sudo apt install -y make cmake gcc g++ libboost-dev libboost-serialization1.65 libssl-dev liblua5.3-dev
6 changes: 6 additions & 0 deletions build/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

cp sloong.conf /etc/ld.so.conf.d/sloong.conf
mkdir -p /usr/local/include/univ
mkdir -p /usr/local/lib/sloong
cp -f include/univ/*.h /usr/local/include/univ/
cp -f libuniv.so /usr/local/lib/sloong/
73 changes: 73 additions & 0 deletions library.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28803.202
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "univ", "univ\univ.vcxproj", "{A3A8387F-9C65-4C46-8C0F-8B3B9CA4C4F5}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "graphics", "graphics\SloongGraphics.vcxproj", "{78DBD20E-C94A-4221-ADA0-289D19ECD733}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "math", "math\SLoongMath.vcxproj", "{2C099C1F-DEDC-4EE9-9C9D-1A4EB763BBAE}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test", "test\test.vcxproj", "{492611B4-E51E-4F58-A631-406BA1BD0465}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Win32 = Debug|Win32
Debug|x64 = Debug|x64
Release|Win32 = Release|Win32
Release|x64 = Release|x64
UnitTest|Win32 = UnitTest|Win32
UnitTest|x64 = UnitTest|x64
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A3A8387F-9C65-4C46-8C0F-8B3B9CA4C4F5}.Debug|Win32.ActiveCfg = Debug|Win32
{A3A8387F-9C65-4C46-8C0F-8B3B9CA4C4F5}.Debug|Win32.Build.0 = Debug|Win32
{A3A8387F-9C65-4C46-8C0F-8B3B9CA4C4F5}.Debug|x64.ActiveCfg = Debug|x64
{A3A8387F-9C65-4C46-8C0F-8B3B9CA4C4F5}.Debug|x64.Build.0 = Debug|x64
{A3A8387F-9C65-4C46-8C0F-8B3B9CA4C4F5}.Release|Win32.ActiveCfg = Release|x64
{A3A8387F-9C65-4C46-8C0F-8B3B9CA4C4F5}.Release|x64.ActiveCfg = Release|x64
{A3A8387F-9C65-4C46-8C0F-8B3B9CA4C4F5}.Release|x64.Build.0 = Release|x64
{A3A8387F-9C65-4C46-8C0F-8B3B9CA4C4F5}.UnitTest|Win32.ActiveCfg = Release|x64
{A3A8387F-9C65-4C46-8C0F-8B3B9CA4C4F5}.UnitTest|x64.ActiveCfg = Release|x64
{A3A8387F-9C65-4C46-8C0F-8B3B9CA4C4F5}.UnitTest|x64.Build.0 = Release|x64
{78DBD20E-C94A-4221-ADA0-289D19ECD733}.Debug|Win32.ActiveCfg = Debug|Win32
{78DBD20E-C94A-4221-ADA0-289D19ECD733}.Debug|Win32.Build.0 = Debug|Win32
{78DBD20E-C94A-4221-ADA0-289D19ECD733}.Debug|x64.ActiveCfg = Debug|x64
{78DBD20E-C94A-4221-ADA0-289D19ECD733}.Debug|x64.Build.0 = Debug|x64
{78DBD20E-C94A-4221-ADA0-289D19ECD733}.Release|Win32.ActiveCfg = Release|x64
{78DBD20E-C94A-4221-ADA0-289D19ECD733}.Release|x64.ActiveCfg = Release|x64
{78DBD20E-C94A-4221-ADA0-289D19ECD733}.Release|x64.Build.0 = Release|x64
{78DBD20E-C94A-4221-ADA0-289D19ECD733}.UnitTest|Win32.ActiveCfg = Release|x64
{78DBD20E-C94A-4221-ADA0-289D19ECD733}.UnitTest|x64.ActiveCfg = Release|x64
{78DBD20E-C94A-4221-ADA0-289D19ECD733}.UnitTest|x64.Build.0 = Release|x64
{2C099C1F-DEDC-4EE9-9C9D-1A4EB763BBAE}.Debug|Win32.ActiveCfg = Debug|Win32
{2C099C1F-DEDC-4EE9-9C9D-1A4EB763BBAE}.Debug|Win32.Build.0 = Debug|Win32
{2C099C1F-DEDC-4EE9-9C9D-1A4EB763BBAE}.Debug|x64.ActiveCfg = Debug|x64
{2C099C1F-DEDC-4EE9-9C9D-1A4EB763BBAE}.Debug|x64.Build.0 = Debug|x64
{2C099C1F-DEDC-4EE9-9C9D-1A4EB763BBAE}.Release|Win32.ActiveCfg = Release|x64
{2C099C1F-DEDC-4EE9-9C9D-1A4EB763BBAE}.Release|x64.ActiveCfg = Release|x64
{2C099C1F-DEDC-4EE9-9C9D-1A4EB763BBAE}.Release|x64.Build.0 = Release|x64
{2C099C1F-DEDC-4EE9-9C9D-1A4EB763BBAE}.UnitTest|Win32.ActiveCfg = Release|x64
{2C099C1F-DEDC-4EE9-9C9D-1A4EB763BBAE}.UnitTest|x64.ActiveCfg = Release|x64
{2C099C1F-DEDC-4EE9-9C9D-1A4EB763BBAE}.UnitTest|x64.Build.0 = Release|x64
{492611B4-E51E-4F58-A631-406BA1BD0465}.Debug|Win32.ActiveCfg = Debug|Win32
{492611B4-E51E-4F58-A631-406BA1BD0465}.Debug|Win32.Build.0 = Debug|Win32
{492611B4-E51E-4F58-A631-406BA1BD0465}.Debug|x64.ActiveCfg = Debug|x64
{492611B4-E51E-4F58-A631-406BA1BD0465}.Debug|x64.Build.0 = Debug|x64
{492611B4-E51E-4F58-A631-406BA1BD0465}.Release|Win32.ActiveCfg = Release|Win32
{492611B4-E51E-4F58-A631-406BA1BD0465}.Release|Win32.Build.0 = Release|Win32
{492611B4-E51E-4F58-A631-406BA1BD0465}.Release|x64.ActiveCfg = Release|x64
{492611B4-E51E-4F58-A631-406BA1BD0465}.Release|x64.Build.0 = Release|x64
{492611B4-E51E-4F58-A631-406BA1BD0465}.UnitTest|Win32.ActiveCfg = Release|Win32
{492611B4-E51E-4F58-A631-406BA1BD0465}.UnitTest|Win32.Build.0 = Release|Win32
{492611B4-E51E-4F58-A631-406BA1BD0465}.UnitTest|x64.ActiveCfg = Release|x64
{492611B4-E51E-4F58-A631-406BA1BD0465}.UnitTest|x64.Build.0 = Release|x64
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {2C10D331-CB50-4EDC-8CBB-6B7BDBF72B38}
EndGlobalSection
EndGlobal
1 change: 0 additions & 1 deletion sloong.conf

This file was deleted.

1 change: 0 additions & 1 deletion univ.creator

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2.5.2.255
32 changes: 32 additions & 0 deletions version.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#!/bin/bash
#
# the version resource text file
VER_FILE_PATH=univ/version.h
# the version file
VER_PATH=version
# the version template file
VER_TEMPLATE_PATH=version.template
# remove old version file
rm -f $VER_FILE_PATH
rm -f $VER_PATH
# get git version
_GIT_VERSION_VALUE=`git rev-list --all | wc -l`
# build version text with template file. set text 'GET_VERSION' to value of git version.
VER_TEXT=$(cat $VER_TEMPLATE_PATH | sed "s/GIT_VERSION/$_GIT_VERSION_VALUE/g")
echo "$VER_TEXT" > $VER_FILE_PATH

for i in `cat $VER_TEMPLATE_PATH`
do
case $i in
L*"GIT_VERSION"*) VER_TEXT=$i;;
esac
done
# build version file
VER_TEXT=${VER_TEXT/GIT_VERSION/$_GIT_VERSION_VALUE}
VER_TEXT=${VER_TEXT#*\"}
VER_TEXT=${VER_TEXT%\"*}

echo $VER_TEXT > $VER_PATH
# update version to git
git add $VER_FILE_PATH
git add $VER_PATH
24 changes: 24 additions & 0 deletions version.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#ifndef VERSION_H
#define VERSION_H


// Version
#define VERSION_NUMBER 2,5,2,GIT_VERSION
#define VERSION_FILEVERSION L"2.5.2.GIT_VERSION"
#define VERSION_BUILDTIME L"2020/01/21"

#ifdef _DEBUG
#define VERSION_PRODUCTVERSION L"Ver.2.5 for Debug"
#define VERSION_FILEDESCRIPTION L"Sloong Universal Debug Libaray"
#define VERSION_PRODUCTNAME L"Sloong Universal Debug Libaray"
#else
#define VERSION_PRODUCTVERSION L"Ver.2.5")
#define VERSION_FILEDESCRIPTION L"Sloong Universal Libaray"
#define VERSION_PRODUCTNAME L"Sloong Universal Libaray"
#endif // _DEBUG
#define VERSION_INTERNALNAME L"Universal.dll")
#define VERSION_COMPANYNAME L"Sloong, Inc.")
#define VERSION_LEGALCOPYRIGHT L"Copyright (C) 2014-2020 Sloong, Inc."


#endif // !VERSION_H

0 comments on commit 7e3ed22

Please sign in to comment.