2019-06-01 10:01:43 -07:00
|
|
|
set script_name=build_working_folder.bat
|
|
|
|
echo Entering %script_name%
|
2019-02-17 09:54:02 -08:00
|
|
|
|
2019-06-01 11:08:31 -07:00
|
|
|
pwd
|
|
|
|
echo %script_name%: Working folder: %folder%
|
2019-02-17 09:54:02 -08:00
|
|
|
mkdir %folder%
|
2019-06-09 16:17:32 -07:00
|
|
|
set console_folder=%folder%\console
|
2019-06-30 15:07:55 -07:00
|
|
|
set drivers_folder=%folder%\drivers
|
2019-06-09 16:05:57 -07:00
|
|
|
mkdir %console_folder%
|
2019-06-30 15:07:55 -07:00
|
|
|
mkdir %drivers_folder%
|
2019-06-09 16:17:32 -07:00
|
|
|
ls -l %folder%
|
2019-02-17 09:54:02 -08:00
|
|
|
|
2019-07-07 01:46:23 -07:00
|
|
|
wget https://rusefi.com/build_server/st_files/silent_st_drivers.exe -P %drivers_folder%
|
2019-06-30 16:00:27 -07:00
|
|
|
if not exist %drivers_folder%/silent_st_drivers.exe (
|
2019-06-30 16:47:33 -07:00
|
|
|
echo %script_name%: ERROR DOWNLOADING silent_st_drivers.exe
|
2019-06-30 16:00:27 -07:00
|
|
|
EXIT /B 1
|
|
|
|
)
|
2019-06-30 15:07:55 -07:00
|
|
|
|
2019-07-31 19:26:12 -07:00
|
|
|
if %ini_file_override%x==nox (
|
|
|
|
set ini_file_override=rusefi.ini
|
|
|
|
echo %script_name%: N/a ini_file_override specified
|
|
|
|
)
|
2019-06-09 18:08:19 -07:00
|
|
|
if %ini_file_override%.==. (
|
|
|
|
set ini_file_override=rusefi.ini
|
|
|
|
echo %script_name%: No ini_file_override specified
|
|
|
|
)
|
|
|
|
echo %script_name%: Will use %ini_file_override%
|
|
|
|
|
2019-07-31 19:26:12 -07:00
|
|
|
if %rusefi_console_settings%.==. (
|
|
|
|
echo %script_name%: No rusefi_console_settings
|
|
|
|
) else (
|
2019-07-31 20:15:13 -07:00
|
|
|
echo Using rusefi_console_settings [%rusefi_console_settings%]
|
2019-07-31 19:26:12 -07:00
|
|
|
cp %rusefi_console_settings% %console_folder%
|
|
|
|
)
|
|
|
|
|
2019-06-09 16:05:57 -07:00
|
|
|
cp java_console_binary/rusefi_console.jar %console_folder%
|
|
|
|
cp simulator/build/rusefi_simulator.exe %console_folder%
|
|
|
|
cp misc/console_launcher/rusefi_console.exe %console_folder%
|
|
|
|
cp java_console/rusefi.xml %console_folder%
|
2019-02-17 09:54:02 -08:00
|
|
|
|
2019-06-08 14:35:55 -07:00
|
|
|
cp misc/console_launcher/readme.html %folder%
|
|
|
|
|
2019-06-09 18:08:19 -07:00
|
|
|
cp firmware/tunerstudio/%ini_file_override% %folder%
|
|
|
|
rem Unsetting since would not be used anywhere else
|
|
|
|
set ini_file_override=
|
2019-07-31 19:26:12 -07:00
|
|
|
set rusefi_console_settings=
|
2019-06-09 16:05:57 -07:00
|
|
|
|
|
|
|
rem users probably do not really care for this file
|
|
|
|
rem cp firmware/svnversion.h %folder%
|
|
|
|
|
|
|
|
cp -r misc/install/openocd %console_folder%
|
2019-08-03 15:39:53 -07:00
|
|
|
cp -r misc/install/DfuSe %console_folder%
|
2019-06-08 13:15:32 -07:00
|
|
|
rem 407 has additional version of firmware
|
2019-06-08 15:38:08 -07:00
|
|
|
cp firmware/deliver/rusefi_no_asserts.bin %folder%
|
|
|
|
cp firmware/deliver/rusefi_no_asserts.dfu %folder%
|
2019-02-17 09:54:02 -08:00
|
|
|
rem 746 builds one version at the moment
|
2019-06-08 14:35:55 -07:00
|
|
|
rem probably not needed cp firmware/build/rusefi.hex %folder%
|
2019-07-07 04:42:17 -07:00
|
|
|
cp firmware/deliver/rusefi.bin %folder%
|
2019-06-08 14:35:55 -07:00
|
|
|
rem probably not needed cp firmware/build/rusefi.elf %folder%
|
2019-07-07 04:42:17 -07:00
|
|
|
cp firmware/deliver/rusefi.dfu %folder%
|
2019-02-17 09:54:02 -08:00
|
|
|
|
2019-07-13 15:22:18 -07:00
|
|
|
if not exist firmware/deliver/rusefi.bin echo %script_name%: rusefi.bin not found
|
|
|
|
if not exist firmware/deliver/rusefi.bin exit -1
|
2019-02-17 09:54:02 -08:00
|
|
|
|
|
|
|
cd temp
|
2019-06-01 10:01:43 -07:00
|
|
|
|
2019-02-17 09:54:02 -08:00
|
|
|
|
|
|
|
echo "Building bundle"
|
|
|
|
pwd
|
2019-06-01 10:01:43 -07:00
|
|
|
set zip_name=rusefi_bundle.zip
|
2019-06-01 10:13:04 -07:00
|
|
|
zip -r %zip_name% *
|
2019-06-01 10:01:43 -07:00
|
|
|
IF NOT ERRORLEVEL 0 echo %script_name%: ERROR INVOKING zip
|
2019-06-01 09:34:29 -07:00
|
|
|
IF NOT ERRORLEVEL 0 EXIT /B 1
|
|
|
|
|
2019-06-01 11:08:31 -07:00
|
|
|
echo %script_name%: Bundle %zip_name% ready
|
|
|
|
ls -l %zip_name%
|
2019-02-17 09:54:02 -08:00
|
|
|
cd ..
|
2019-06-01 10:01:43 -07:00
|
|
|
echo "%script_name%: We are back in root directory"
|
|
|
|
|
2019-02-17 09:54:02 -08:00
|
|
|
pwd
|
2019-06-01 10:01:43 -07:00
|
|
|
echo Exiting %script_name%
|