From 37fcd9075a37edbc36176c265f128da7a5a7cecb Mon Sep 17 00:00:00 2001 From: chrislake Date: Thu, 15 Jun 2017 08:40:58 +1000 Subject: [PATCH] get the cmd files working --- 7zSfxMod/make_bin.cmd | 21 +++++++++--------- 7zSfxMod/make_modules_archive.cmd | 20 ++++++++--------- 7zSfxMod/make_sfx_tools.cmd | 36 +++++++++++++++---------------- 7zSfxMod/make_sources.cmd | 18 ++++++++-------- 7zSfxMod/make_test.cmd | 24 ++++++++++----------- 7zSfxMod/snapshot.cmd | 26 +++++++++++----------- 6 files changed, 73 insertions(+), 72 deletions(-) diff --git a/7zSfxMod/make_bin.cmd b/7zSfxMod/make_bin.cmd index 135ca12..322a9fb 100644 --- a/7zSfxMod/make_bin.cmd +++ b/7zSfxMod/make_bin.cmd @@ -1,14 +1,15 @@ -@Echo off -rem SetLocal enabledelayedexpansion +@ECHO OFF +REM SETLOCAL ENABLEDELAYEDEXPANSION -Set SfxVersion=170 +SET SfxVersion=170 -For /F %%i In (SfxBuild.txt) Do Set %%i +FOR /F %%i IN (SfxBuild.txt) DO SET %%i -set source_dir=%CD% -set sfx_bin_name=%source_dir%\..\bin\7zsd_%SfxVersion%_%SfxBuild% -set sfx_src_name=%source_dir%\..\bin\7zsd_src_%SfxVersion%_%SfxBuild% +SET source_dir=%CD% +SET sfx_bin_name=%source_dir%\..\bin\7zsd_%SfxVersion%_%SfxBuild% +SET sfx_src_name=%source_dir%\..\bin\7zsd_src_%SfxVersion%_%SfxBuild% + +CD ..\output +"C:\Program Files\7-Zip\7z.exe" a -mx=9 %sfx_bin_name%.7z -xr!7zsd_Debug* *.sfx +"C:\Program Files\7-Zip\7z.exe" a -mx=9 %sfx_src_name%.7z ..\7-Zip ..\7zSfxMod -cd ..\output -7z a -mx=9 %sfx_bin_name%.7z -xr!7zsd_Debug* *.sfx || exit 1 -7z a -mx=9 %sfx_src_name%.7z ..\7-Zip ..\7zSfxMod diff --git a/7zSfxMod/make_modules_archive.cmd b/7zSfxMod/make_modules_archive.cmd index 6a60a5e..2caee6a 100644 --- a/7zSfxMod/make_modules_archive.cmd +++ b/7zSfxMod/make_modules_archive.cmd @@ -1,14 +1,14 @@ -@Echo off -rem SetLocal enabledelayedexpansion +@ECHO OFF +REM SETLOCAL ENABLEDELAYEDEXPANSION -Set SfxVersion=170 +SET SfxVersion=170 -For /F %%i In (SfxBuild.txt) Do Set %%i +FOR /F %%i IN (SfxBuild.txt) DO SET %%i -set source_dir=%CD% -set sfx_name=%source_dir%\..\snapshots\7zsd_%SfxVersion%_%SfxBuild% +SET source_dir=%CD% +SET sfx_name=%source_dir%\..\snapshots\7zsd_%SfxVersion%_%SfxBuild% -cd ..\output\win32 -7z a -mx=9 %sfx_name%_x86.7z -xr!7zsd_Debug* *.sfx -cd ..\win64 -7z a -mx=9 %sfx_name%_x64.7z -xr!7zsd_Debug* *.sfx +CD ..\output\win32 +"C:\Program Files\7-Zip\7z.exe" a -mx=9 %sfx_name%_x86.7z -xr!7zsd_Debug* *.sfx +CD ..\win64 +"C:\Program Files\7-Zip\7z.exe" a -mx=9 %sfx_name%_x64.7z -xr!7zsd_Debug* *.sfx diff --git a/7zSfxMod/make_sfx_tools.cmd b/7zSfxMod/make_sfx_tools.cmd index 2f49b70..63d9448 100644 --- a/7zSfxMod/make_sfx_tools.cmd +++ b/7zSfxMod/make_sfx_tools.cmd @@ -1,23 +1,23 @@ -@Echo off -rem SetLocal enabledelayedexpansion +@ECHO OFF +REM SETLOCAL ENABLEDELAYEDEXPANSION -Set SfxVersion=170 +SET SfxVersion=170 -For /F %%i In (SfxBuild.txt) Do Set %%i +FOR /F %%i IN (SfxBuild.txt) DO SET %%i -Set tm=%time% -Set HH=%tm:~0,2% -Set HH=%HH: =0% -set timestamp=%date:~6,4%%date:~3,2%%date:~0,2%_%HH%%tm:~3,2% -echo %timestamp% +SET tm=%time% +SET HH=%tm:~0,2% +SET HH=%HH: =0% +SET timestamp=%date:~10,4%%date:~7,2%%date:~4,2%_%HH%%tm:~3,2% +ECHO %timestamp% -set sfx_name=..\snapshots\7zsd_tools_%SfxVersion%_%SfxBuild% -set archive_name=%sfx_name%_%timestamp% +SET sfx_name=..\snapshots\7zsd_tools_%SfxVersion%_%SfxBuild% +SET archive_name=%sfx_name%_%timestamp% -cd ..\output -7z a -mx=9 %archive_name%.7z -xr!7zsd_Debug* *.sfx -copy /b 7zsd_LZMA_Dialogs.sfx + ..\7zSfxMod\configs\test_config.txt +%archive_name%.7z %sfx_name%_x86_test.exe -copy /b 7zsd_LZMA_Dialogs.sfx + ..\7zSfxMod\configs\7zsd_tools_RTF_uk_ru.txt +%archive_name%.7z %sfx_name%_x86.exe -copy /b 7zsd_LZMA_Dialogs_x64.sfx + ..\7zSfxMod\configs\7zsd_tools_RTF_uk_ru.txt +%archive_name%.7z %sfx_name%_x64.exe -copy /b 7zsd_LZMA_Dialogs.sfx + ..\7zSfxMod\configs\+%archive_name%.7z %sfx_name%_x86_2.exe -del %archive_name%.7z \ No newline at end of file +CD ..\output +"C:\Program Files\7-Zip\7z.exe" a -mx=9 %archive_name%.7z -xr!7zsd_Debug* *.sfx +COPY /b 7zsd_LZMA_Dialogs.sfx + ..\7zSfxMod\configs\test_config.txt + %archive_name%.7z %sfx_name%_x86_test.exe +COPY /b 7zsd_LZMA_Dialogs.sfx + ..\7zSfxMod\configs\7zsd_tools_RTF_uk_ru.txt + %archive_name%.7z %sfx_name%_x86.exe +COPY /b 7zsd_LZMA_Dialogs_x64.sfx + ..\7zSfxMod\configs\7zsd_tools_RTF_uk_ru.txt + %archive_name%.7z %sfx_name%_x64.exe +COPY /b 7zsd_LZMA_Dialogs.sfx + ..\7zSfxMod\configs\ + %archive_name%.7z %sfx_name%_x86_2.exe +DEL %archive_name%.7z diff --git a/7zSfxMod/make_sources.cmd b/7zSfxMod/make_sources.cmd index c539957..f8d251f 100644 --- a/7zSfxMod/make_sources.cmd +++ b/7zSfxMod/make_sources.cmd @@ -1,14 +1,14 @@ -@Echo off -rem SetLocal enabledelayedexpansion +@ECHO OFF +REM SETLOCAL ENABLEDELAYEDEXPANSION -Set SfxVersion=170 +SET SfxVersion=170 -For /F %%i In (SfxBuild.txt) Do Set %%i +FOR /F %%i IN (SfxBuild.txt) DO SET %%i -set archive_name=snapshots\7zsd_src_%SfxVersion%_%SfxBuild% +SET archive_name=snapshots\7zsd_src_%SfxVersion%_%SfxBuild% -cd .. -set sources_7zip=7-Zip\Asm\* 7-Zip\C\* 7-Zip\CPP\* 7-Zip\DOC\* -set sources_7zSfxMod=7zSfxMod\sources\* 7zSfxMod\7zSfxMod.vcproj 7zSfxMod\7zSfxMod.sln +CD .. +SET sources_7zip=7-Zip\Asm\* 7-Zip\C\* 7-Zip\CPP\* 7-Zip\DOC\* +SET sources_7zSfxMod=7zSfxMod\sources\* 7zSfxMod\7zSfxMod.vcproj 7zSfxMod\7zSfxMod.sln -7z a -mx=9 -m0=PPMd %archive_name% -xr!.svn %sources_7zip% %sources_7zSfxMod% \ No newline at end of file +"C:\Program Files\7-Zip\7z.exe" a -mx=9 -m0=PPMd %archive_name% -xr!.svn %sources_7zip% %sources_7zSfxMod% \ No newline at end of file diff --git a/7zSfxMod/make_test.cmd b/7zSfxMod/make_test.cmd index 63c8587..057b1e9 100644 --- a/7zSfxMod/make_test.cmd +++ b/7zSfxMod/make_test.cmd @@ -1,14 +1,14 @@ -@Echo off -rem SetLocal enabledelayedexpansion +@ECHO OFF +REM SETLOCAL ENABLEDELAYEDEXPANSION -set archive_name=c:\tmp\test.7z -set config_name=..\7zSfxMod\configs\test20160306.txt -set test_sfx=c:\tmp\test_sfx.exe +SET archive_name=..\tmp\test.7z +SET config_name=..\7zSfxMod\configs\test20160306.txt +SET test_sfx=..\tmp\test_sfx.exe -del %test_sfx% 2>NUL -xcopy /Y /E configs\tools\* ..\output\ && cd ..\output || exit 1 -mkdir win32 -mkdir win64 -move *_x64.sfx win64 -move *.sfx win32 -7z a %archive_name% win64\* x86\* *.sfx.* && copy /b win32\7zsd_LZMA_Dialogs.sfx + %config_name% +%archive_name% %test_sfx% +DEL %test_sfx% 2>NUL +XCOPY /Y /E configs\tools\* ..\output\ && CD ..\output || EXIT 1 +MKDIR win32 +MKDIR win64 +MOVE *_x64.sfx win64 +MOVE *.sfx win32 +"C:\Program Files\7-Zip\7z.exe" a %archive_name% win64\* win32\* *.sfx.* && COPY /b win32\7zsd_LZMA_Dialogs.sfx + %config_name% + %archive_name% %test_sfx% diff --git a/7zSfxMod/snapshot.cmd b/7zSfxMod/snapshot.cmd index 5e0a02d..87d3b09 100644 --- a/7zSfxMod/snapshot.cmd +++ b/7zSfxMod/snapshot.cmd @@ -1,18 +1,18 @@ -@Echo off -rem SetLocal enabledelayedexpansion +@ECHO OFF +REM SETLOCAL ENABLEDELAYEDEXPANSION -Set SfxVersion=160 +SET SfxVersion=170 -For /F %%i In (SfxBuild.txt) Do Set %%i +FOR /F %%i IN (SfxBuild.txt) DO SET %%i -Set tm=%time% -Set HH=%tm:~0,2% -Set HH=%HH: =0% -set timestamp=%date:~6,4%%date:~3,2%%date:~0,2%_%HH%%tm:~3,2% -echo %timestamp% +SET tm=%time% +SET HH=%tm:~0,2% +SET HH=%HH: =0% +SET timestamp=%date:~10,4%%date:~7,2%%date:~4,2%_%HH%%tm:~3,2% +ECHO %timestamp% -set archive_name=7zsd.%SfxVersion%.%SfxBuild%.%timestamp% +SET archive_name=7zsd.%SfxVersion%.%SfxBuild%.%timestamp% -set exclude_files=-x!*/7ZSfxMod.*.user -x!*/7zSfxMod.ncb -x!*/7zSfxMod.suo -x!*/*/.svn -x!*/.svn -x!*/*/*/.svn -cd .. -7z a -mx=9 snapshots\%archive_name%.7z %exclude_files% 7zSfxMod/sources/* output/win32/*.sfx output/win32/*.exe output/win32/*.map 7zSfxMod/7zSfxMod.* output/win64/*.sfx output/win64/*.exe output/win64/*.map changes.txt 7zSfxMod/*.cmd ..\configs\* \ No newline at end of file +SET exclude_files=-x!*/7zSfxMod.*.user -x!*/7zSfxMod.ncb -x!*/7zSfxMod.suo -x!*/*/.svn -x!*/.svn -x!*/*/*/.svn +CD .. +"C:\Program Files\7-Zip\7z.exe" a -mx=9 snapshots\%archive_name%.7z %exclude_files% 7zSfxMod/sources/* output/win32/*.sfx output/win32/*.exe output/win32/*.map 7zSfxMod/7zSfxMod.* output/win64/*.sfx output/win64/*.exe output/win64/*.map changes.txt 7zSfxMod/*.cmd ..\configs\*