构建模板文件

This commit is contained in:
潘佳 2022-11-03 15:19:23 +08:00
parent 9e2d3f86fd
commit 9e9b43b7b5
61 changed files with 507 additions and 0 deletions

112
200标准.DotNET/.gitignore vendored Normal file
View File

@ -0,0 +1,112 @@
# ---> C Sharp
# Build Folders (you can keep bin if you'd like, to store dlls and pdbs)
[Bb]in/
[Oo]bj/
# mstest test results
TestResults
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
# User-specific files
*.suo
*.user
*.sln.docstates
# Build results
[Dd]ebug/
[Rr]elease/
x64/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.log
*.vspscc
*.vssscc
.builds
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opensdf
*.sdf
# Visual Studio profiler
*.psess
*.vsp
*.vspx
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*
# NCrunch
*.ncrunch*
.*crunch*.local.xml
# Installshield output folder
[Ee]xpress
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish
# Publish Web Output
*.Publish.xml
# NuGet Packages Directory
packages
# Windows Azure Build Output
csx
*.build.csdef
# Windows Store app package directory
AppPackages/
# Others
[Bb]in
[Oo]bj
sql
TestResults
[Tt]est[Rr]esult*
*.Cache
ClientBin
[Ss]tyle[Cc]op.*
~$*
*.dbmdl
Generated_Code #added for RIA/Silverlight projects
# Backup & report files from converting an old project file to a newer
# Visual Studio version. Backup files are not needed, because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
9.published/*

View File

@ -0,0 +1 @@
.

View File

View File

@ -0,0 +1 @@
ECHO 处于关闭状态。

View File

@ -0,0 +1 @@
-- 数据库脚本(1.0.0.221103145242)

View File

@ -0,0 +1 @@
-- 数据库脚本(1.0.0.221103145242)

View File

@ -0,0 +1,22 @@
%~d0
@echo off
cd %~dp0
::读取版本配置文件
set configVersion=serviceName.txt
for /f "tokens=1,2 delims=:" %%a IN (%configVersion%) Do (
set tag1=%%a
set tag2=%%b
)
set serviceName=%tag2%
echo %tag1%=%serviceName%
if %serviceName% == "" (
echo serviceName is error
pause
exit
)
nssm stop %serviceName%
nssm remove %serviceName% confirm
pause

Binary file not shown.

View File

@ -0,0 +1,32 @@
@echo off
%~d0
cd %~dp0
::读取版本配置文件
set configVersion=serviceName.txt
for /f "tokens=1,2 delims=:" %%a IN (%configVersion%) Do (
set tag1=%%a
set tag2=%%b
)
set serviceName=%tag2%
echo %tag1%=%serviceName%
if %serviceName% == "" (
echo serviceName is error
pause
exit
)
set exe=%cd%
echo exe=%exe%
cd ..
set apppath=%cd%\net6.0\Panda.WebUI.WebAPI.exe
echo appPath=%apppath%
cd %exe%
nssm install %serviceName% %apppath%
nssm set %serviceName% DisplayName "%serviceName%"
nssm set %serviceName% Description "%serviceName%"
nssm start %serviceName%
pause

View File

@ -0,0 +1 @@
serviceName:satlic.com.cloud.webapi

View File

@ -0,0 +1,32 @@
@echo off
%~d0
cd %~dp0
::读取版本配置文件
set configVersion=serviceName.txt
for /f "tokens=1,2 delims=:" %%a IN (%configVersion%) Do (
set tag1=%%a
set tag2=%%b
)
set serviceName=%tag2%
echo %tag1%=%serviceName%
if %serviceName% == "" (
echo serviceName is error
pause
exit
)
set exe=%cd%
echo exe=%exe%
cd ..
set apppath=%cd%\net6.0\Panda.WebUI.IoTCenter.exe
echo appPath=%apppath%
cd %exe%
nssm install %serviceName% %apppath%
nssm set %serviceName% DisplayName "%serviceName%"
nssm set %serviceName% Description "%serviceName%"
nssm start %serviceName%
pause

View File

@ -0,0 +1 @@
serviceName:satlic.com.cloud.iotCenter

View File

@ -0,0 +1,32 @@
@echo off
%~d0
cd %~dp0
::读取版本配置文件
set configVersion=serviceName.txt
for /f "tokens=1,2 delims=:" %%a IN (%configVersion%) Do (
set tag1=%%a
set tag2=%%b
)
set serviceName=%tag2%
echo %tag1%=%serviceName%
if %serviceName% == "" (
echo serviceName is error
pause
exit
)
set exe=%cd%
echo exe=%exe%
cd ..
set apppath=%cd%\net6.0\Panda.WebUI.LogCenter.exe
echo appPath=%apppath%
cd %exe%
nssm install %serviceName% %apppath%
nssm set %serviceName% DisplayName "%serviceName%"
nssm set %serviceName% Description "%serviceName%"
nssm start %serviceName%
pause

View File

@ -0,0 +1 @@
serviceName:satlic.com.cloud.logCenter

View File

@ -0,0 +1,32 @@
@echo off
%~d0
cd %~dp0
::读取版本配置文件
set configVersion=serviceName.txt
for /f "tokens=1,2 delims=:" %%a IN (%configVersion%) Do (
set tag1=%%a
set tag2=%%b
)
set serviceName=%tag2%
echo %tag1%=%serviceName%
if %serviceName% == "" (
echo serviceName is error
pause
exit
)
set exe=%cd%
echo exe=%exe%
cd ..
set apppath=%cd%\net6.0\Panda.WebUI.GatewayOcelot.exe
echo appPath=%apppath%
cd %exe%
nssm install %serviceName% %apppath%
nssm set %serviceName% DisplayName "%serviceName%"
nssm set %serviceName% Description "%serviceName%"
nssm start %serviceName%
pause

View File

@ -0,0 +1 @@
serviceName:satlic.com.cloud.ocelotCenter

View File

@ -0,0 +1,12 @@
@echo off
cd /d %~dp0
set curpath=%cd%
cd /d %curpath%/net6.0
start /max panda.webui.webapi.exe
ping 127.0.0.1 -n 3 >nul
exit

View File

@ -0,0 +1,12 @@
@echo off
cd /d %~dp0
set curpath=%cd%
cd /d %curpath%/net6.0
start /max Panda.WebUI.GatewayOcelot.exe
ping 127.0.0.1 -n 3 >nul
exit

View File

@ -0,0 +1,12 @@
@echo off
cd /d %~dp0
set curpath=%cd%
cd /d %curpath%/net6.0
start /max Panda.WebUI.IoTCenter.exe
ping 127.0.0.1 -n 3 >nul
exit

View File

@ -0,0 +1,12 @@
@echo off
cd /d %~dp0
set curpath=%cd%
cd /d %curpath%/net6.0
start /max Panda.WebUI.LogCenter.exe
ping 127.0.0.1 -n 3 >nul
exit

View File

2
200标准.DotNET/8.version/.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
VersionInfo.cs
versiontemp.txt

View File

@ -0,0 +1 @@
.

View File

@ -0,0 +1,49 @@
@echo off
cd /d %~dp0
::读取版本配置文件
set configVersion=version.txt
for /f "tokens=1,2,3 delims=." %%a IN (%configVersion%) Do (
set tag1=%%a
set tag2=%%b
set tag3=%%c
)
set oldVersion=%tag1%.%tag2%.%tag3%
echo v%oldVersion%
::提交数据,并打包为节点
cd /d %rootPath%
set tagName=%oldVersion%_%date:~0,4%%date:~5,2%%date:~8,2%%time:~0,2%%time:~3,2%%time:~6,2%
git tag -a %tagName% -m 建立节点
git push origin %tagName%
pause
::切换到根目录
cd ..
set rootPath=%cd%
::打包数据库脚本
set oldversionDB=%rootPath%\2.database\v%oldVersion%
if not exist %oldversionDB% (
md %oldversionDB%
)
copy /y %rootPath%\2.database\数据库脚本.txt %oldversionDB%\
copy /y %rootPath%\2.database\v*.txt %oldversionDB%\
del /q %rootPath%\2.database\v*.txt
::写入版本
::set /a tag3=%tag3%+1
echo oldVersion = v%tag1%.%tag2%.%tag3%
set newVersion=%tag1%.%tag2%.%tag3%
echo %tag1%.%tag2%.%tag3%>%configVersion%
echo newVersion = v%newVersion%
del /q %rootPath%\v*.txt
type nul>v%newVersion%.txt
type nul>%rootPath%\2.database\v%newVersion%.txt
type nul>%rootPath%\2.database\数据库脚本.txt
pause

View File

@ -0,0 +1 @@
1.0.0.221103145242

View File

@ -0,0 +1,58 @@
@echo off
setlocal EnableDelayedExpansion
cd /d %~dp0
net.exe session 1>NUL 2>NUL && (
goto as_admin
) || (
goto not_admin
)
:as_admin
::读取版本配置文件
set configVersion=version.txt
for /f "tokens=1,2,3 delims=." %%a IN (%configVersion%) Do (
set tag1=%%a
set tag2=%%b
set tag3=%%c
)
set /a tag3=1+%tag3%
set oldVersion=%tag1%.%tag2%.%tag3%
::替换
set d=%date: =0%
set t=%time: =0%
set productname=%oldVersion%.%d:~2,2%%d:~5,2%%d:~8,2%%t:~0,2%%t:~3,2%%t:~6,2%
echo %productname%
echo %productname%> version.txt
del /q *.panda
echo .>%oldVersion%.panda
cd ..
del /q *.panda
echo .>%oldVersion%.panda
cd 2.database
del /q *.panda
echo >v%oldVersion%.panda
if not exist v%oldVersion% md v%oldVersion%
cd v%oldVersion%
if not exist 脚本文件.txt echo -- 数据库脚本(%productname%)>脚本文件.txt
set jb=%cd%\脚本文件.txt
cd ..
echo pp=%jb%
del /q 脚本文件.txt
mklink 更新脚本.txt %jb%
echo 执行成功,生成 v%oldVersion%
goto end
:not_admin
echo not as admin
:end
ping 127.0.0.1 -n 3 >nul
exit

View File

@ -0,0 +1,20 @@
@echo off
cd /d %~dp0
::读取版本配置文件
set configVersion=version.txt
for /f "tokens=1,2,3 delims=." %%a IN (%configVersion%) Do (
set tag1=%%a
set tag2=%%b
set tag3=%%c
)
set oldVersion=%tag1%.%tag2%.%tag3%
::替换
set d=%date: =0%
set t=%time: =0%
set productname=%oldVersion%.%d:~2,2%%d:~5,2%%d:~8,2%%t:~0,2%%t:~3,2%%t:~6,2%
echo %productname%
echo [assembly:System.Reflection.AssemblyFileVersion("%productname%")]> VersionInfo.cs
echo %productname%> versiontemp.txt

View File

@ -0,0 +1,34 @@
@echo off
cd /d %~dp0
::初始化项目变量
set vs="C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE"
set sln=%cd%\5.code\xxxx.sln
::版本管理软件
set versionfile=%cd%\8.version\VersionInfo.cs
if not exist %versionfile% echo [assembly:System.Reflection.AssemblyFileVersion("1.0.0.0")]>%versionfile%
if exist %sln% (
goto OpenSln
) else (
goto Tip
)
:OpenSln
if exist %vs% (
cd /d %vs%
devenv %sln% && exit
goto exit
) else (
start %sln%
goto exit
)
:Tip
ECHO 未找到项目,请联系管理员(panjia@ulee.work)
pause
:exit
exit

6
200标准.DotNET/LICENSE Normal file
View File

@ -0,0 +1,6 @@
ISC License:
Copyright (c) Year(s), Company or Person's Name
Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

View File

@ -0,0 +1,3 @@
# panjia.cloud
家庭云平台

View File

@ -0,0 +1,15 @@
@echo off
echo %cd%\5.code
pause
set nowPath=%cd%\5.code
cd /d %nowPath%
pause
::delete specify file(*.pdb,*.vshost.*)
for /r %nowPath% %%i in (*.pdb,*.vshost.*) do (del %%i)
::delete specify folder(obj,bin)
for /r %nowPath% %%i in (obj,bin,packages) do (IF EXIST %%i RD /s /q %%i)
echo OK
pause

View File

0
300标准.Rust/rust.txt Normal file
View File

View File