mirror of
https://github.com/danieleteti/delphimvcframework.git
synced 2024-11-15 15:55:54 +01:00
Added samples in the zip release
This commit is contained in:
parent
a866a37b27
commit
b654b3cb07
83
build.py
83
build.py
@ -1,83 +0,0 @@
|
||||
# coding: latin-1
|
||||
import subprocess
|
||||
import os
|
||||
import glob
|
||||
from colorama import *
|
||||
|
||||
init()
|
||||
|
||||
|
||||
#################################################################################
|
||||
def buildProject(project, platform = 'Win32'):
|
||||
print(Fore.YELLOW + "Building " + project)
|
||||
p = project.replace('.dproj', '.cfg')
|
||||
if os.path.isfile(p):
|
||||
if os.path.isfile(p + '.unused'):
|
||||
os.remove(p + '.unused')
|
||||
os.rename(p, p + '.unused')
|
||||
# print os.system("msbuild /t:Build /p:Config=Debug \"" + project + "\"")
|
||||
return subprocess.call("rsvars.bat & msbuild /t:Build /p:Config=Debug /p:Platform=" + platform + " \"" + project + "\"", shell=True) == 0
|
||||
|
||||
|
||||
def summaryTable(builds):
|
||||
print(ansi.clear_screen())
|
||||
dmvc_copyright()
|
||||
print(Fore.WHITE + "PROJECT NAME".ljust(80) + "STATUS".ljust(10))
|
||||
print(Fore.YELLOW + "=" * 90)
|
||||
good = bad = 0
|
||||
for item in builds:
|
||||
if item['status'].startswith('ok'):
|
||||
good += 1
|
||||
else:
|
||||
bad += 1
|
||||
print(Fore.BLUE + item['project'].ljust(80) + (Fore.WHITE if item['status'].startswith('ok') else Fore.RED) + item['status'].ljust(4))
|
||||
|
||||
print(Fore.YELLOW + "=" * 90)
|
||||
print(Fore.WHITE + "GOOD :".rjust(80) + str(good).rjust(10, '.'))
|
||||
print(Fore.RED + "BAD :".rjust(80) + str(bad).rjust(10, '.'))
|
||||
|
||||
|
||||
#################################################################################
|
||||
|
||||
def main(projects):
|
||||
dmvc_copyright()
|
||||
builds = []
|
||||
for project in projects:
|
||||
filename = '\\'.join(project.split('\\')[-3:])
|
||||
list = {'project': filename}
|
||||
if project.find('delphistompclient') > -1 or project.find('contribsamples') > -1:
|
||||
list['status'] = 'skip'
|
||||
continue
|
||||
|
||||
list = {'project': filename}
|
||||
if buildProject(project):
|
||||
list["status"] = "ok"
|
||||
else:
|
||||
list["status"] = "ko"
|
||||
builds.append(list)
|
||||
|
||||
if (os.path.exists(project + '.android')):
|
||||
list = {'project': filename}
|
||||
if buildProject(project, 'Android'):
|
||||
list["status"] = "okandroid"
|
||||
else:
|
||||
list["status"] = "koandroid"
|
||||
builds.append(list)
|
||||
summaryTable(builds)
|
||||
|
||||
# Store current attribute settings
|
||||
#old_setting = WConio.gettextinfo()[4] & 0x00FF
|
||||
|
||||
def dmvc_copyright():
|
||||
print(Style.BRIGHT + Fore.WHITE + "----------------------------------------------------------------------------------------")
|
||||
print(Fore.RED + " ** Delphi MVC Framework Building System **")
|
||||
print(Fore.WHITE + "Delphi MVC Framework is CopyRight (2010-2017) of Daniele Teti and the DMVCFramework TEAM")
|
||||
print(Fore.RESET + "----------------------------------------------------------------------------------------\n")
|
||||
|
||||
## MAIN ##
|
||||
projects = glob.glob("ideexpert\*.dproj")
|
||||
projects += glob.glob("unittests\**\*.dproj")
|
||||
projects += glob.glob("*\**\*.dproj")
|
||||
projects += glob.glob("*\**\**\*.dproj")
|
||||
main(projects)
|
||||
print(Style.RESET_ALL)
|
@ -1 +0,0 @@
|
||||
7z a dmvcframeworksamples.zip -r -i@7ziplistfile.txt
|
64
dodo.py
64
dodo.py
@ -19,36 +19,6 @@ projects += glob.glob("unittests\**\*.dproj")
|
||||
projects += glob.glob("*\**\*.dproj")
|
||||
projects += glob.glob("*\**\**\*.dproj")
|
||||
|
||||
# projects = [
|
||||
# tools_project,
|
||||
# #CLOUD SUPPORT
|
||||
# 'IDSource\Moduli\H2W_Cloud\h2wproxy\H2WProxy.dproj',
|
||||
# 'IDSource\Moduli\H2W_Cloud\h2wcloudserver\H2WCloudServer.dproj',
|
||||
# 'IDSource\IDServer\IDServer.dproj',
|
||||
# #END-CLOUD SUPPORT
|
||||
# 'IDSource\pepeFile\DataManager.dproj',
|
||||
# 'IDSource\PepeSetup\SetupManager.dproj',
|
||||
# 'IDSource\POS\POS.dproj',
|
||||
# 'IDSource\IBBackup\IBBackup.dproj',
|
||||
# 'IDSource\IBSetup\IBSetup.dproj',
|
||||
# 'IDSource\IBUpdate\IBUpdate.dproj',
|
||||
# 'IDSource\Telefonia\PhoneManager\PhoneManager.dproj',
|
||||
# 'IDSource\Telefonia\Multicarrier\IDCallAccountEditor.dproj',
|
||||
# 'IDSource\Telefonia\IDSerial\IDSerial.dproj',
|
||||
# 'IDSource\Telefonia\IDCsta\IDCsta.dproj',
|
||||
# 'IDSource\Telefonia\IDCsta\IDHotelCsta\IDHotelCSTA.dproj',
|
||||
# 'IDSource\Telefonia\CilHotel\RX\CilHotelRX.dproj',
|
||||
# 'IDSource\Telefonia\CilHotel\TX\CilHotelTX.dproj',
|
||||
# 'IDSource\Telefonia\IDSAE3000\IDSAE3000.dproj',
|
||||
# 'IDSource\Telefonia\IDCsta\IDWatchDog\IDWatchDog.dproj',
|
||||
# 'IDSource\DLLDocumenti\EDW2003.dproj',
|
||||
# 'IDSource\DLLDocumenti\WordDocsDLL.dproj',
|
||||
# 'IDSource\pepe\Reception.dproj',
|
||||
# 'IDSource\Cont\Step1\pjHGWnew.dproj',
|
||||
# 'IDSource\Moduli\H2W\server\H2Ws.dproj',
|
||||
# 'IDSource\Personalizer\Personalizer.dproj',
|
||||
# 'IDSource\Boffice\BackOffice.dproj'
|
||||
# ]
|
||||
releases_path = "releases"
|
||||
output = "bin"
|
||||
output_folder = "" # defined at runtime
|
||||
@ -147,7 +117,7 @@ def copy_libs():
|
||||
copy2("lib\\dmustache\\README.md", curr_folder)
|
||||
|
||||
|
||||
def create_build_tag(version):
|
||||
def init_build(version):
|
||||
global GlobalBuildVersion
|
||||
global output_folder
|
||||
global releases_path
|
||||
@ -167,6 +137,12 @@ def create_build_tag(version):
|
||||
copy2("LICENSE", output_folder)
|
||||
|
||||
|
||||
def zip_samples(version):
|
||||
global releases_path
|
||||
output_folder = releases_path + "\\" + version
|
||||
cmdline = "7z a " + output_folder + "\\dmvcframeworksamples.zip -r -i@7ziplistfile.txt"
|
||||
return subprocess.call(cmdline, shell=True) == 0
|
||||
|
||||
def create_zip(version):
|
||||
global GlobalBuildVersion
|
||||
global releases_path
|
||||
@ -187,13 +163,14 @@ def create_zip(version):
|
||||
##########################################################################
|
||||
|
||||
def task_build():
|
||||
'''Use: doit build -v <VERSION>. Then creates SFX archive.'''
|
||||
'''Use: doit build -v <VERSION>.'''
|
||||
return {
|
||||
'actions': [
|
||||
create_build_tag,
|
||||
init_build,
|
||||
# "echo %%date%% %%time:~0,8%% > " + releases_path + "\\DELPHIMVCFRAMEWORK-BUILD-TIMESTAMP.TXT",
|
||||
copy_sources,
|
||||
copy_libs,
|
||||
zip_samples,
|
||||
create_zip],
|
||||
'params': [{'name': 'version',
|
||||
'short': 'v',
|
||||
@ -211,7 +188,7 @@ def task_build():
|
||||
|
||||
|
||||
def task_zip():
|
||||
'''Use: doit zip -v <VERSION>. Then creates SFX archive.'''
|
||||
'''Use: doit zip -v <VERSION>.'''
|
||||
return {
|
||||
'actions': [
|
||||
create_zip],
|
||||
@ -240,8 +217,17 @@ def task_buildlight():
|
||||
}
|
||||
|
||||
|
||||
# def task_tools():
|
||||
# '''creates the tools setup'''
|
||||
# return {
|
||||
# 'actions': [(buildProject, [tools_project]), compileSetup]
|
||||
# }
|
||||
def task_samples():
|
||||
'''creates the samples zip file'''
|
||||
return {
|
||||
'actions': [init_build, zip_samples],
|
||||
'params': [
|
||||
{
|
||||
'name': 'version',
|
||||
'short': 'v',
|
||||
'long': 'version',
|
||||
'type': str,
|
||||
'default': 'DEVELOPMENT'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user