2017-03-24 10:49:18 -07:00
|
|
|
rem
|
|
|
|
rem This script would compile firmware, dev console and win32 simulator into a single bundle file
|
|
|
|
rem This script depends on Cygwin tools: zip
|
|
|
|
rem
|
|
|
|
|
2017-08-29 19:14:38 -07:00
|
|
|
set FTP_SERVER=home451478433.1and1-data.host
|
2017-08-29 19:05:33 -07:00
|
|
|
|
2017-04-06 17:57:45 -07:00
|
|
|
echo build_current_bundle.bat: Hello rusEfi build full bundle
|
2017-03-24 10:49:18 -07:00
|
|
|
|
|
|
|
echo %date% %time%
|
|
|
|
|
|
|
|
|
2019-03-28 04:38:15 -07:00
|
|
|
cd firmware/bootloader
|
|
|
|
call !clean_bootloader.bat
|
|
|
|
call !compile_bootloader_discovery407.bat
|
|
|
|
if not exist bootloader_generated.hxx echo FAILED TO COMPILE BOOTLOADER
|
|
|
|
if not exist bootloader_generated.hxx exit -1
|
|
|
|
pwd
|
|
|
|
cd ../..
|
|
|
|
|
2017-03-24 10:49:18 -07:00
|
|
|
cd firmware
|
|
|
|
echo %date% %time%
|
2017-04-05 16:48:22 -07:00
|
|
|
|
|
|
|
|
2019-02-21 09:38:39 -08:00
|
|
|
echo build_current_bundle.bat: will be Erasing chip
|
2019-02-21 09:29:50 -08:00
|
|
|
if not exist flash_erase407.bat echo NOT FOUND flash_erase.bat
|
|
|
|
if not exist flash_erase407.bat exit -1
|
2019-02-21 09:38:39 -08:00
|
|
|
echo build_current_bundle.bat: Erasing chip
|
|
|
|
pwd
|
2019-02-21 10:30:27 -08:00
|
|
|
rem Using magic 'cd' system variable here
|
|
|
|
set "cur_folder=%cd%"
|
2019-02-21 09:29:50 -08:00
|
|
|
call flash_erase407.bat
|
2019-02-21 10:30:27 -08:00
|
|
|
cd %cur_folder%
|
2019-02-21 09:38:39 -08:00
|
|
|
pwd
|
2017-04-05 16:48:22 -07:00
|
|
|
|
|
|
|
|
2017-04-06 17:57:45 -07:00
|
|
|
echo build_current_bundle.bat: Building firmware
|
2018-12-15 21:19:15 -08:00
|
|
|
call clean.bat
|
2017-04-06 17:57:45 -07:00
|
|
|
git submodule update --init
|
|
|
|
|
|
|
|
call update_version.bat
|
2017-03-24 10:49:18 -07:00
|
|
|
|
|
|
|
call clean_compile_two_versions.bat
|
2019-04-13 14:20:02 -07:00
|
|
|
if not exist deliver/rusefi_release.hex echo Just to confirm - FAILED to compile RELEASE
|
2017-03-24 10:49:18 -07:00
|
|
|
if not exist deliver/rusefi_release.hex exit -1
|
|
|
|
|
2019-04-13 14:20:02 -07:00
|
|
|
if not exist deliver/rusefi_debug.hex echo Just to confirm - FAILED to compile DEBUG
|
2017-03-24 10:49:18 -07:00
|
|
|
if not exist deliver/rusefi_debug.hex exit -1
|
|
|
|
|
2019-01-04 17:00:45 -08:00
|
|
|
..\misc\hex2dfu\HEX2DFU.exe deliver/rusefi_release.hex -out deliver/rusefi_release.dfu
|
2019-01-04 15:27:33 -08:00
|
|
|
..\misc\hex2dfu\HEX2DFU.exe deliver/rusefi_debug.hex -out deliver/rusefi_debug.dfu
|
2017-03-24 10:49:18 -07:00
|
|
|
cd ..
|
|
|
|
|
2019-02-12 17:01:16 -08:00
|
|
|
call misc\jenkins\build_java_console.bat
|
2017-03-24 10:49:18 -07:00
|
|
|
if not exist java_console_binary/rusefi_console.jar exit -1
|
|
|
|
|
2019-02-12 17:01:16 -08:00
|
|
|
call misc\jenkins\build_simulator.bat
|
|
|
|
if not exist simulator/build/rusefi_simulator.exe exit -1
|
2017-03-24 10:49:18 -07:00
|
|
|
|
|
|
|
rm -rf temp
|
|
|
|
mkdir temp
|
|
|
|
|
2019-02-12 17:01:16 -08:00
|
|
|
set stm_arch=stm32f407
|
|
|
|
set folder=snapshot_%date:~10%%date:~4,2%%date:~7,2%_%time:~0,2%%time:~3,2%_%stm_arch%_rusefi
|
2017-03-24 10:49:18 -07:00
|
|
|
set folder=temp\%folder%
|
|
|
|
|
2019-02-17 10:17:56 -08:00
|
|
|
rem this replaces spaces with 0s - that's needed before 10am
|
2017-03-24 10:49:18 -07:00
|
|
|
set folder=%folder: =0%
|
2019-02-17 10:17:56 -08:00
|
|
|
echo "folder variable=%folder%"
|
2017-03-24 10:49:18 -07:00
|
|
|
|
2019-02-17 10:17:56 -08:00
|
|
|
pwd
|
|
|
|
call misc\jenkins\build_working_folder.bat
|
2017-03-24 10:49:18 -07:00
|
|
|
|
|
|
|
echo "Building only console"
|
|
|
|
cd %folder%
|
|
|
|
pwd
|
|
|
|
dir
|
|
|
|
zip ../rusefi_console.zip rusefi_console.jar rusefi.xml
|
|
|
|
|
|
|
|
if not exist ../rusefi_console.zip echo CONSOLE ZIP FAILED
|
|
|
|
if not exist ../rusefi_console.zip exit -1
|
|
|
|
|
|
|
|
echo "only console ready"
|
|
|
|
|
|
|
|
echo "Going back to root folder"
|
|
|
|
cd ..
|
|
|
|
cd ..
|
|
|
|
pwd
|
|
|
|
|
|
|
|
echo "Making rusefi_simulator.zip"
|
|
|
|
pwd
|
2017-04-10 07:00:42 -07:00
|
|
|
zip -j temp/rusefi_simulator.zip simulator/build/rusefi_simulator.exe firmware/tunerstudio/rusefi.ini java_console_binary/rusefi_console.jar
|
2017-03-24 10:49:18 -07:00
|
|
|
|
|
|
|
|
2019-06-01 07:37:32 -07:00
|
|
|
echo open ftp://%RUSEFI_BUILD_FTP_USER%:%RUSEFI_BUILD_FTP_PASS%@%FTP_SERVER%/ > ftp_commands.txt
|
2017-03-24 10:49:18 -07:00
|
|
|
echo binary >> ftp_commands.txt
|
|
|
|
echo put rusefi_bundle.zip >> ftp_commands.txt
|
|
|
|
|
|
|
|
echo cd separate_files >> ftp_commands.txt
|
|
|
|
echo put rusefi_simulator.zip >> ftp_commands.txt
|
|
|
|
echo put rusefi_console.zip >> ftp_commands.txt
|
|
|
|
echo exit >> ftp_commands.txt
|
|
|
|
|
|
|
|
cd temp
|
|
|
|
call winscp.com /script=../ftp_commands.txt
|
|
|
|
IF NOT ERRORLEVEL 0 echo winscp error DETECTED
|
|
|
|
IF NOT ERRORLEVEL 0 EXIT /B 1
|
|
|
|
|
|
|
|
|
|
|
|
cd ..
|
2019-04-20 14:27:04 -07:00
|
|
|
echo "TIMESTAMP %date% %time%"
|
2017-03-24 10:49:18 -07:00
|
|
|
echo "build_current_bundle: DONE here"
|
|
|
|
pwd
|
|
|
|
|