Update python scripts, build_windows.cmd
This commit is contained in:
@@ -1,11 +1,11 @@
|
|||||||
import os
|
import os
|
||||||
from sys import argv
|
from sys import argv
|
||||||
|
import inspect
|
||||||
from common import *
|
from common import *
|
||||||
|
|
||||||
def package():
|
def package():
|
||||||
set_current_activity("PACKAGE")
|
set_current_activity("PACKAGE")
|
||||||
set_original_folder(os.getcwd())
|
set_dirs()
|
||||||
set_project_folder(os.path.abspath(os.path.join(ORIGINAL_DIR , "..\..")))
|
|
||||||
|
|
||||||
say("Testing if all required build environment variables are set:")
|
say("Testing if all required build environment variables are set:")
|
||||||
ZIP_LOC = get_required_env_var_path(ZIP_LOC_VAR_NAME, ZIP_LOC_DEFAULT)
|
ZIP_LOC = get_required_env_var_path(ZIP_LOC_VAR_NAME, ZIP_LOC_DEFAULT)
|
||||||
@@ -34,8 +34,7 @@ def package():
|
|||||||
|
|
||||||
def deploy():
|
def deploy():
|
||||||
set_current_activity("DEPLOY")
|
set_current_activity("DEPLOY")
|
||||||
set_original_folder(os.getcwd())
|
set_dirs()
|
||||||
set_project_folder(os.path.abspath(os.path.join(ORIGINAL_DIR , "..\..")))
|
|
||||||
|
|
||||||
say("Testing if all required build environment variables are set:")
|
say("Testing if all required build environment variables are set:")
|
||||||
QT_LOC = get_required_env_var_path(QT_LOC_VAR_NAME, QT_LOC_DEFAULT)
|
QT_LOC = get_required_env_var_path(QT_LOC_VAR_NAME, QT_LOC_DEFAULT)
|
||||||
@@ -91,8 +90,7 @@ def deploy():
|
|||||||
|
|
||||||
def build():
|
def build():
|
||||||
set_current_activity("BUILD")
|
set_current_activity("BUILD")
|
||||||
set_original_folder(os.getcwd())
|
set_dirs()
|
||||||
set_project_folder(os.path.abspath(os.path.join(ORIGINAL_DIR , "..\..")))
|
|
||||||
|
|
||||||
COMPILE_MODE = ""
|
COMPILE_MODE = ""
|
||||||
COMPILER = ""
|
COMPILER = ""
|
||||||
|
|||||||
@@ -85,23 +85,22 @@ def get_required_env_var_path(env_var_name: str, default_env_var_value: str):
|
|||||||
return path
|
return path
|
||||||
|
|
||||||
def create_batch_file():
|
def create_batch_file():
|
||||||
file = open("test.bat", "w+")
|
file = open(get_project_dir() + "\\build_scripts\\win\\test.bat", "w+")
|
||||||
file.write(bat_file_contents)
|
file.write(bat_file_contents)
|
||||||
file.close()
|
file.close()
|
||||||
|
|
||||||
def exit_on_error(error_number):
|
def exit_on_error(error_number):
|
||||||
sys.exit(error_number)
|
sys.exit(error_number)
|
||||||
|
|
||||||
def set_original_folder(path):
|
def set_dirs():
|
||||||
global ORIGINAL_DIR
|
global ORIGINAL_DIR
|
||||||
ORIGINAL_DIR = path
|
|
||||||
|
|
||||||
def set_project_folder(path):
|
|
||||||
global PROJECT_DIR
|
global PROJECT_DIR
|
||||||
global DEPLOY_DIR
|
global DEPLOY_DIR
|
||||||
PROJECT_DIR = path
|
ORIGINAL_DIR = os.path.dirname(__file__)
|
||||||
DEPLOY_DIR = PROJECT_DIR + OUTPUT_DIR
|
PROJECT_DIR = os.path.abspath(os.path.join(ORIGINAL_DIR, r"..\.."))
|
||||||
|
DEPLOY_DIR = DEPLOY_DIR = PROJECT_DIR + OUTPUT_DIR
|
||||||
|
|
||||||
|
print(ORIGINAL_DIR)
|
||||||
|
|
||||||
def get_project_dir():
|
def get_project_dir():
|
||||||
return PROJECT_DIR
|
return PROJECT_DIR
|
||||||
|
|||||||
@@ -0,0 +1,4 @@
|
|||||||
|
set PATH=%PATH%;C:\Qt\5.11.1\msvc2017_64\bin\;
|
||||||
|
@ECHO Starting windeployqt:
|
||||||
|
"windeployqt" --dir Z:\Programming\Cpp\2018-09-12_OpenVR_AdvancedSettings\OpenVR-AdvancedSettings\\bin\\win64\\AdvancedSettings\qtdata --libdir Z:\Programming\Cpp\2018-09-12_OpenVR_AdvancedSettings\OpenVR-AdvancedSettings\\bin\\win64\\AdvancedSettings --plugindir Z:\Programming\Cpp\2018-09-12_OpenVR_AdvancedSettings\OpenVR-AdvancedSettings\\bin\\win64\\AdvancedSettings\qtdata\plugins --no-system-d3d-compiler --no-opengl-sw --release --qmldir Z:\Programming\Cpp\2018-09-12_OpenVR_AdvancedSettings\OpenVR-AdvancedSettings\src\res\qml\ Z:\Programming\Cpp\2018-09-12_OpenVR_AdvancedSettings\OpenVR-AdvancedSettings\\bin\\win64\\AdvancedSettings\AdvancedSettings.exe
|
||||||
|
@ECHO windeployqt finished.
|
||||||
@@ -27,6 +27,16 @@ IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps%
|
|||||||
|
|
||||||
ECHO %top_level_activity%: Calling deployment script.
|
ECHO %top_level_activity%: Calling deployment script.
|
||||||
CALL %project_dir%\build_scripts\win\deploy.cmd
|
CALL %project_dir%\build_scripts\win\deploy.cmd
|
||||||
|
=======
|
||||||
|
python %project_dir%\build_scripts\win\build.py build
|
||||||
|
IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps%
|
||||||
|
call %project_dir%\build_scripts\win\test.bat
|
||||||
|
IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps%
|
||||||
|
|
||||||
|
ECHO %top_level_activity%: Calling deployment script.
|
||||||
|
python %project_dir%\build_scripts\win\build.py deploy
|
||||||
|
IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps%
|
||||||
|
call %project_dir%\build_scripts\win\test.bat
|
||||||
IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps%
|
IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps%
|
||||||
|
|
||||||
REM The average dev doesn't need to package and zip it, just build it and test.
|
REM The average dev doesn't need to package and zip it, just build it and test.
|
||||||
@@ -37,6 +47,10 @@ IF NOT DEFINED BUILD_PACKAGE (
|
|||||||
)
|
)
|
||||||
ECHO %top_level_activity%: Calling packaging script.
|
ECHO %top_level_activity%: Calling packaging script.
|
||||||
CALL %project_dir%\build_scripts\win\package.cmd
|
CALL %project_dir%\build_scripts\win\package.cmd
|
||||||
|
=======
|
||||||
|
python %project_dir%\build_scripts\win\build.py package
|
||||||
|
IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps%
|
||||||
|
call %project_dir%\build_scripts\win\test.bat
|
||||||
IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps%
|
IF ERRORLEVEL 1 EXIT /B %exit_code_failure_build_apps%
|
||||||
|
|
||||||
CD %original_dir%
|
CD %original_dir%
|
||||||
|
|||||||
Reference in New Issue
Block a user