Lines Matching +full:- +full:5

19 @set "script_folder=%script_folder:~0,-1%"
20 @set "dependency_path=%TEMP%\mingw-build-dependencies"
54 @if not defined output_path set "output_path=%script_folder%\mingw-builds"
67 @set /a "log_keep=log_keep-1"
69 @for /f "skip=%log_keep%" %%f in ('dir /b /o-D /tc %log_folder%') do @(
97 :: -------------------------- Functions start here ----------------------------
99 :main - Main function that performs the download
100 :: %1 - Target architecture
101 :: %2 - Version of MinGW to get [optional]
102 :: %3 - Threading model [optional]
103 :: %4 - Exception model [optional]
104 :: %5 - Package revision [optional]
108 @call :log 6 "------------------------------------"
116 @set "revision=%~5"
124 @call :log 0 "Failed to get the MinGW-builds repository information"
142 :repository - Gets the MinGW-builds repository
143 :: %1 - The return variable for the repository file path
154 …rl=http://downloads.sourceforge.net/project/mingw-w64/Toolchains targetting Win32/Personal Builds/…
157 @set "file_path=%dependency_path%\mingw-repository.txt"
165 @for /f "delims=| tokens=1-6,*" %%a in (%file_path%) do @(
179 @for /l %%a in (1,1,32) do @if "!url:~-1!" == " " set url=!url:~0,-1!
186 :resolve - Gets the MinGW-builds repository
187 :: %1 - The return variable for the MinGW slug
188 :: %2 - The return variable for the MinGW URL
189 :: %3 - The repository information to use
190 :: %4 - Target architecture
191 :: %5 - Version of MinGW to get [optional]
192 :: %6 - Threading model [optional]
193 :: %7 - Exception model [optional]
194 :: %8 - Package revision [optional]
204 @call :resolve_version version "%repository%" "%arch%" "%~5"
213 @for /f "delims=| tokens=1-6" %%a in (%repository%) do @(
225 @set slug=gcc-%version%-%arch%-%threading%-%exceptions%-rev%revision%
231 :unpack - Unpacks the MinGW archive
232 :: %1 - The return variable name for the compiler path
233 :: %2 - The filepath or URL of the archive
234 :: %3 - The folder to unpack to
254 @for /f %%a in ("!url: =-!") do @set "file_name=%%~na"
255 @for /f %%a in ("!url: =-!") do @set "file_ext=%%~xa"
272 @for /f %%a in ("%archive_path: =-%") do @set "file_name=%%~na"
273 @for /f %%a in ("%archive_path: =-%") do @set "file_ext=%%~xa"
282 @for /f %%a in ("%folder_path%") do @set "tmp_path=%%~dpatmp-%iso8601%"
283 @"%sevenzip_executable%" x -y "-o%tmp_path%" "%archive_path%" > nul
311 :find_sevenzip - Finds (or downloads) the 7zip executable
312 :: %1 - The return variable for the 7zip executable path
322 @set "url=http://7-zip.org/a/7za920.zip"
323 @for /f %%a in ("%url: =-%") do @set "file_name=%%~na"
324 @for /f %%a in ("%url: =-%") do @set "file_ext=%%~xa"
354 :unzip - Unzips a .zip archive
355 :: %1 - The archive to unzip
356 :: %2 - The location to unzip to
362 @for /f %%a in ("%archive_path: =-%") do @set "file_name=%%~na"
363 @for /f %%a in ("%archive_path: =-%") do @set "file_ext=%%~xa"
366 @set "log_path=%temp%\unzip-%iso8601%-%file_name%.log"
368 Add-Type -assembly "system.io.compression.filesystem"; ^
379 :resolve_version - Gets the version of the MinGW compiler
380 :: %1 - The return variable for the version
381 :: %2 - The repository information to use
382 :: %3 - The architecture of the compiler
383 :: %4 - Version of MinGW to get [optional]
401 @for /f "delims=| tokens=1-6" %%a in (%repository%) do @(
420 :resolve_threading - Gets the threading model of the MinGW compiler
421 :: %1 - The return variable for the threading model
422 :: %2 - The repository information to use
423 :: %3 - The architecture of the compiler
424 :: %4 - The version of the compiler
425 :: %5 - threading model of MinGW to use [optional]
440 @set "threading=%~5"
443 @for /f "delims=| tokens=1-6" %%a in (%repository%) do @(
461 :resolve_exceptions - Gets the exception model of the MinGW compiler
462 :: %1 - The return variable for the exception model
463 :: %2 - The repository information to use
464 :: %3 - The architecture of the compiler
465 :: %4 - The version of the compiler
466 :: %4 - The threading model of the compiler
467 :: %5 - exception model of MinGW to use [optional]
482 @set "threading=%~5"
487 @for /f "delims=| tokens=1-6" %%a in (%repository%) do @(
509 :resolve_revision - Gets the revision of the MinGW compiler
510 :: %1 - The return variable for the revision
511 :: %2 - The repository information to use
512 :: %3 - The architecture of the compiler
513 :: %4 - The version of the compiler
514 :: %4 - The threading model of the compiler
515 :: %4 - The exception model of the compiler
516 :: %5 - revision of the MinGW package to use [optional]
531 @set "threading=%~5"
538 @for /f "delims=| tokens=1-6" %%a in (%repository%) do @(
555 :version_compare - Compares two semantic version numbers
556 :: %1 - The return variable:
557 :: - < 0 : if %2 < %3
558 :: - 0 : if %2 == %3
559 :: - > 0 : if %2 > %3
560 :: %2 - The first version to compare
561 :: %3 - The second version to compare
570 @for /f "delims=. tokens=1-6" %%a in ("%lhs%.%rhs%") do @(
572 set result=-1
580 set result=-1
588 set result=-1
605 :print_usage - Prints the usage of the script
606 :: %* - message to print, each argument on it's own line
628 :script_source - Determines if the script was ran from the cli or explorer
629 :: %1 - The return variable [cli|explorer]
638 @for /f "tokens=1-3,*" %%a in ("%cmdcmdline%") do @(
646 if "!arg2:~-1!" neq "!quote!" (
668 :architecture - Finds the system architecture
669 :: %1 - The return variable [i686|x86_64]
681 :md5 - Gets the MD5 checksum for a file
682 :: %1 - The hash
683 :: %2 - The file path
690 @for /f "skip=3 tokens=1,*" %%a in ('powershell Get-FileHash -Algorithm MD5 "'%file_path%'"') do @s…
699 :windows_version - Checks the windows version
700 :: %1 - The windows version
701 :: %2 - The major version number return variable
702 :: %3 - The minor version number return variable
703 :: %4 - The revision version number return variable
718 :find_in_path - Finds a program of file in the PATH
719 :: %1 - return variable of the file path
731 :log_append - Appends another file into the current logging file
732 :: %1 - the file_path to the file to concatenate
738 @set temp_log=%temp%\append-%iso8601%.log
747 :iso8601 - Returns the current time in ISO8601 format
748 :: %1 - the return variable
749 :: %2 - format [extended|basic*]
750 :: iso8601 - contains the resulting timestamp
757 @for /F "skip=1 tokens=1-6" %%g IN ('wmic Path Win32_UTCTime Get Day^,Hour^,Minute^,Month^,Second^,…
767 @set mm=%mm:~-2%
768 @set dd=%dd:~-2%
769 @set hour=%hour:~-2%
770 @set minute=%minute:~-2%
771 @set seconds=%seconds:~-2%
773 set iso8601=%yyyy%-%mm%-%dd%T%hour%:%minute%:%seconds%Z
785 :verbosity - Processes the verbosity parameter '/v[v...]
786 :: %1 - verbosity given on the command line
787 :: logging_level - set to the number of v's
800 :log - Logs a message, depending on verbosity
801 :: %1 - level
802 :: [0-4] for CLI logging
803 :: [5-9] for GUI logging
804 :: %2 - message to print
819 @if %level% geq 5 (
821 set /a "level=level-5"
834 :download - Downloads a file from the internet
835 :: %1 - the url of the file to download
836 :: %2 - the file to download to
837 :: %3 - the MD5 checksum of the file (optional)
855 @set "temp_path=%temp%\download-%iso8601%-%file_name%"
856 @set "log_path=%temp%\download-%iso8601%-log-%file_name%"
858 @powershell Invoke-WebRequest "'%url%'" ^
859 -OutFile "'%temp_path%'" ^
860 -UserAgent [Microsoft.PowerShell.Commands.PSUserAgent]::IE ^