Lines Matching full:-
20 @set "script_folder=%script_folder:~0,-1%"
26 @set dependency_path=%TEMP%\%project%-build-dependencies
70 @set /a "log_keep=log_keep-1"
72 @for /f "skip=%log_keep%" %%f in ('dir /b /o-D /tc %log_folder%') do @(
110 :: -------------------------- Functions start here ----------------------------
112 :main - Main function that performs the build
116 @call :log 6 "------------------------------------"
136 @call :log 6 "------------------------------------"
142 :print_usage - Prints the usage of the script
143 :: %* - message to print, each argument on it's own line
161 :dependencies - Installs any prerequisites for the build
188 :generate - Uses CMake to generate the build files
203 @set "generator_var=-G "MinGW Makefiles^""
209 @set output=%temp%\cmake-%iso8601%.log
214 -DCMAKE_BUILD_TYPE=!build_type! ^
215 -DBUILD_SHARED_LIBS=!build_shared! ^
228 :build - Builds the library
237 @call :find_in_path mingw32_make_executable mingw32-make.exe
240 @call :log 0 "Failed to find mingw32-make"
261 @set output=%temp%\build-%iso8601%.log
276 :install - Installs the built files
287 @set output=%temp%\install-%iso8601%.log
289 "-DCMAKE_INSTALL_PREFIX=%install_path%" ^
290 -P "%build_path%/cmake_install.cmake" ^
302 :script_source - Determines if the script was ran from the cli or explorer
303 :: %1 - The return variable [cli|explorer]
312 @for /f "tokens=1-3,*" %%a in ("%cmdcmdline%") do @(
320 if "!arg2:~-1!" neq "!quote!" (
342 :architecture - Finds the system architecture
343 :: %1 - The return variable [x86|x86_64]
354 :md5 - Gets the MD5 checksum for a file
355 :: %1 - The hash
356 :: %2 - The file path
363 @for /f "skip=3 tokens=1,*" %%a in ('powershell Get-FileHash -Algorithm MD5 "'%file_path%'"') do @s…
372 :windows_version - Checks the windows version
373 :: %1 - The windows version
374 :: %2 - The major version number return variable
375 :: %3 - The minor version number return variable
376 :: %4 - The revision version number return variable
391 :find_in_path - Finds a program of file in the PATH
403 :administrator_check - Checks for administrator priviledges
413 :log_append - Appends another file into the current logging file
414 :: %1 - the file_path to the file to concatenate
420 @set "temp_log=%temp%\append-%iso8601%.log"
429 :iso8601 - Returns the current time in ISO8601 format
430 :: %1 - the return variable
431 :: %2 - format [extended|basic*]
432 :: iso8601 - contains the resulting timestamp
439 @for /F "skip=1 tokens=1-6" %%g IN ('wmic Path Win32_UTCTime Get Day^,Hour^,Minute^,Month^,Second^,…
449 @set mm=%mm:~-2%
450 @set dd=%dd:~-2%
451 @set hour=%hour:~-2%
452 @set minute=%minute:~-2%
453 @set seconds=%seconds:~-2%
455 set iso8601=%yyyy%-%mm%-%dd%T%hour%:%minute%:%seconds%Z
467 :verbosity - Processes the verbosity parameter '/v[v...]
468 :: %1 - verbosity given on the command line
469 :: logging_level - set to the number of v's
482 :log - Logs a message, depending on verbosity
483 :: %1 - level
484 :: [0-4] for CLI logging
485 :: [5-9] for GUI logging
486 :: %2 - message to print
503 set /a "level=level-5"
517 :start_browser - Opens the default browser to a URL
518 :: %1 - the url to open
526 :find_cmake - Finds cmake on the command line or in the registry
527 :: %1 - the cmake file path
533 @call :log 6 "--------------"
536 @for /l %%i in (5,-1,0) do @(
537 @for /l %%j in (9,-1,0) do @(
538 @for /l %%k in (9,-1,0) do @(
558 :cmake - Finds cmake and installs it if necessary
559 :: %1 - the cmake file path
565 @call :log 6 "------------------"
570 @call :install_nsis cmake http://www.cmake.org/files/v%version:~0,3%/cmake-%version%-win32-x86.exe …
585 :mingw - Finds MinGW, installing it if needed
586 :: %1 - the compiler path that should be added to PATH
597 @call :log 6 "------------------"
626 :msbuild - Finds MSBuild
627 :: %1 - the path to MSBuild executable
633 @for /l %%i in (20,-1,4) do @(
634 @for /l %%j in (9,-1,0) do @(
654 :download - Downloads a file from the internet
655 :: %1 - the url of the file to download
656 :: %2 - the file to download to
657 :: %3 - the MD5 checksum of the file (optional)
675 @set temp_path=%temp%\download-%iso8601%-%file_name%
677 @powershell Invoke-WebRequest "%url%" -OutFile %temp_path%
701 :install_msi - Installs a dependency from an Microsoft Installer package (.msi)
702 :: %1 - [string] name of the project to install
703 :: %2 - The location of the .msi, a url must start with 'http://' or file_path
704 :: %3 - The checksum of the msi (optional)
728 @call :log 6 "-------------------------------------"
732 call :log 5 "Right-Click and select 'Run as Administrator'
757 @set msi_log=%temp%\msiexec-%timestamp%.log
784 :install_nsis - Installs a dependency from an Nullsoft Installer package (.exe)
785 :: %1 - [string] name of the project to install
786 :: %2 - The location of the .exe, a url must start with 'http://' or file_path
787 :: %3 - The checksum of the exe (optional)
800 @call :log 6 "-------------------------------------"
804 call :log 5 "Right-Click and select 'Run as Administrator'
853 :reboot - Asks the user if they would like to reboot then stops the script
855 @call :log 6 "-------------------------------------------"