This commit is contained in:
Connection Refused
2019-12-02 19:51:12 +08:00
commit b2ea730984
229 changed files with 86605 additions and 0 deletions

3
scripts/.gitignore vendored Normal file
View File

@@ -0,0 +1,3 @@
/release
/x64
/x86

6
scripts/BUILD.BAT Normal file
View File

@@ -0,0 +1,6 @@
@ECHO OFF
RD /S /Q ..\Netch\bin > NUL 2>&1
RD /S /Q ..\Netch\obj > NUL 2>&1
MSBuild /t:Rebuild /p:Configuration=Release;Platform=x64 ..\Netch.sln
MSBuild /t:Rebuild /p:Configuration=Release;Platform=x86 ..\Netch.sln
PAUSE

4
scripts/CLEAN.BAT Normal file
View File

@@ -0,0 +1,4 @@
@ECHO OFF
RD /S /Q release > NUL 2>&1
RD /S /Q x64 > NUL 2>&1
RD /S /Q x86 > NUL 2>&1

28
scripts/GENERATE.py Normal file
View File

@@ -0,0 +1,28 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import hashlib, os
text = '''| 文件名 | SHA256 |
| :- | :- |'''
def checksum(filename):
algorithm = hashlib.sha256()
with open(filename, 'rb') as f:
for byte_block in iter(lambda: f.read(4096), b''):
algorithm.update(byte_block)
return str(algorithm.hexdigest())
def filelist(path):
r = []
n = os.listdir(path)
for f in n:
if not os.path.isdir(f):
r.append(f)
return r
r = filelist('release')
print(text)
for i in r:
print('| {0} | {1} |'.format(i, checksum('release\\' + i)))

30
scripts/PACK.BAT Normal file
View File

@@ -0,0 +1,30 @@
@ECHO OFF
RD /S /Q release > NUL 2>&1
RD /S /Q x64 > NUL 2>&1
RD /S /Q x86 > NUL 2>&1
MKDIR release > NUL 2>&1
XCOPY /E /Y ..\Netch\bin\x64\Release x64
XCOPY /E /Y ..\Netch\bin\x86\Release x86
PAUSE
CD x64
DEL /F /S /Q *.config
DEL /F /S /Q *.pdb
DEL /F /S /Q *.xml
7z a -r Netch.x64.7z *
MOVE Netch.x64.7z ..\release
CD ..\x86
DEL /F /S /Q *.config
DEL /F /S /Q *.pdb
DEL /F /S /Q *.xml
7z a -r Netch.x86.7z *
MOVE Netch.x86.7z ..\release
CD ..
RD /S /Q x64
RD /S /Q x86
PAUSE