2020-06-06 14:53:53 -07:00
|
|
|
set full_bundle_file=%bundle_full_name%.zip
|
|
|
|
set update_bundle_file=%bundle_full_name%_autoupdate.zip
|
|
|
|
|
|
|
|
echo Packaging temp\%full_bundle_file% file
|
|
|
|
|
|
|
|
rm -rf temp
|
|
|
|
mkdir temp
|
2020-06-06 14:26:39 -07:00
|
|
|
|
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
|
2020-06-06 14:53:53 -07:00
|
|
|
rem This working folder name starts with 'temp/'
|
2019-06-01 11:08:31 -07:00
|
|
|
echo %script_name%: Working folder: %folder%
|
2019-02-17 09:54:02 -08:00
|
|
|
mkdir %folder%
|
2020-06-06 16:51:11 -07:00
|
|
|
echo %bundle_full_name% > %folder%\bundle_name.ini
|
|
|
|
|
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%
|
|
|
|
)
|
|
|
|
|
2020-06-06 19:26:15 -07:00
|
|
|
cp java_console/rusefi_autoupdate.jar %console_folder%
|
2019-06-09 16:05:57 -07:00
|
|
|
cp java_console_binary/rusefi_console.jar %console_folder%
|
2020-06-17 20:54:11 -07:00
|
|
|
cp java_tools/ts_plugin_launcher/build/jar/rusefi_plugin_launcher.jar %console_folder%
|
2020-06-06 19:26:15 -07:00
|
|
|
cp simulator/build/rusefi_simulator.exe %console_folder%
|
|
|
|
cp misc/console_launcher/rusefi_*.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
|
|
|
|
2020-05-22 05:49:54 -07:00
|
|
|
if [%bundle_name%] neq [] (
|
2020-05-22 11:14:51 -07:00
|
|
|
mv %folder%/rusefi.dfu %folder%/rusefi_%bundle_name%.dfu
|
2020-05-21 22:57:39 -07: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
|
2020-06-06 14:53:53 -07:00
|
|
|
zip -r %full_bundle_file% *
|
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
|
|
|
|
|
2020-06-06 14:53:53 -07:00
|
|
|
echo %script_name%: Bundle %full_bundle_file% ready
|
|
|
|
ls -l %full_bundle_file%
|
2020-06-06 15:41:59 -07:00
|
|
|
|
|
|
|
if not exist %full_bundle_file% echo %script_name%: ERROR not found %full_bundle_file%
|
|
|
|
if not exist %full_bundle_file% EXIT /B 1
|
|
|
|
|
|
|
|
echo "%script_name%: Uploading full bundle"
|
2020-06-06 14:53:53 -07:00
|
|
|
ncftpput -u %RUSEFI_BUILD_FTP_USER% -p %RUSEFI_BUILD_FTP_PASS% %RUSEFI_FTP_SERVER% . %full_bundle_file%
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
|
|
|
mkdir artifacts
|
|
|
|
mv temp/%full_bundle_file% artifacts
|
|
|
|
|
2020-06-06 15:45:53 -07:00
|
|
|
echo Removing more static content
|
2020-06-06 16:51:11 -07:00
|
|
|
rm -rf %console_folder%/openocd
|
2020-06-06 14:53:53 -07:00
|
|
|
rm -rf %console_folder%/DfuSe
|
2020-06-06 16:51:11 -07:00
|
|
|
rm -rf %console_folder%/rusefi_simulator.exe
|
|
|
|
|
2020-06-06 14:53:53 -07:00
|
|
|
rm -rf %drivers_folder%
|
2020-06-06 15:45:53 -07:00
|
|
|
|
2020-06-06 19:42:57 -07:00
|
|
|
rem for autoupdate we do not want the unique folder name with timestamp
|
|
|
|
cd %folder%
|
|
|
|
zip -r ../%update_bundle_file% *
|
|
|
|
cd ..
|
2020-06-06 14:53:53 -07:00
|
|
|
ls -l %update_bundle_file%
|
2020-06-06 17:42:42 -07:00
|
|
|
ncftpput -u %RUSEFI_BUILD_FTP_USER% -p %RUSEFI_BUILD_FTP_PASS% %RUSEFI_FTP_SERVER% autoupdate %update_bundle_file%
|
2019-02-17 09:54:02 -08:00
|
|
|
cd ..
|
2020-06-06 14:53:53 -07:00
|
|
|
|
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%
|