mirror of
https://github.com/netchx/netch.git
synced 2026-03-18 18:13:21 +08:00
done
This commit is contained in:
3
scripts/.gitignore
vendored
Normal file
3
scripts/.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
/release
|
||||
/x64
|
||||
/x86
|
||||
6
scripts/BUILD.BAT
Normal file
6
scripts/BUILD.BAT
Normal 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
4
scripts/CLEAN.BAT
Normal 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
28
scripts/GENERATE.py
Normal 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
30
scripts/PACK.BAT
Normal 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
|
||||
Reference in New Issue
Block a user