-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
56 changed files
with
2,509 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "third_parties/flat-color-icons"] | ||
path = third_parties/flat-color-icons | ||
url = https://github.com/icons8/flat-color-icons.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@echo off | ||
|
||
:: Validate appveyor's environment | ||
if "%APPVEYOR_BUILD_FOLDER%"=="" ( | ||
echo Please define 'APPVEYOR_BUILD_FOLDER' environment variable. | ||
exit /B 1 | ||
) | ||
|
||
:: Call matching script for windows | ||
call "%APPVEYOR_BUILD_FOLDER%\ci\windows\%~n0.bat" | ||
if %errorlevel% neq 0 exit /b %errorlevel% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@echo off | ||
|
||
:: Validate appveyor's environment | ||
if "%APPVEYOR_BUILD_FOLDER%"=="" ( | ||
echo Please define 'APPVEYOR_BUILD_FOLDER' environment variable. | ||
exit /B 1 | ||
) | ||
|
||
:: Call matching script for windows | ||
call "%APPVEYOR_BUILD_FOLDER%\ci\windows\%~n0.bat" | ||
if %errorlevel% neq 0 exit /b %errorlevel% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@echo off | ||
|
||
:: Validate GitHub CI's environment | ||
if "%GITHUB_WORKSPACE%"=="" ( | ||
echo Please define 'GITHUB_WORKSPACE' environment variable. | ||
exit /B 1 | ||
) | ||
|
||
:: Call matching script for windows | ||
call "%GITHUB_WORKSPACE%\ci\windows\%~n0.bat" | ||
if %errorlevel% neq 0 exit /b %errorlevel% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
@echo off | ||
|
||
:: Validate GitHub CI's environment | ||
if "%GITHUB_WORKSPACE%"=="" ( | ||
echo Please define 'GITHUB_WORKSPACE' environment variable. | ||
exit /B 1 | ||
) | ||
|
||
:: Call matching script for windows | ||
call "%GITHUB_WORKSPACE%\ci\windows\%~n0.bat" | ||
if %errorlevel% neq 0 exit /b %errorlevel% |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
@echo off | ||
|
||
:: Assume that ImageMagick already installed by installation script. | ||
set PATH=%TEMP%\imagemagick;%PATH% | ||
|
||
echo Searching for imagemagick executables in PATH... | ||
where magick.exe | ||
if errorlevel 1 ( | ||
echo File 'magick.exe' not found. Please install imagemagick on system and add the directory to PATH. | ||
exit /B %errorlevel% | ||
) | ||
echo Found imagemagick directory. | ||
echo. | ||
|
||
set TEMP_DIR=%TEMP%\flat-color-icons | ||
set IMAGE_INPUT_DIR=%~dp0..\..\third_parties\flat-color-icons\svg | ||
set IMAGE_OUTPUT_DIR=%~dp0..\..\build\third_parties\flat-color-icons | ||
|
||
:: Create output directory | ||
mkdir "%IMAGE_OUTPUT_DIR%" 1>NUL 2>NUL | ||
mkdir "%TEMP_DIR%" 1>NUL 2>NUL | ||
|
||
:: For each svg icons | ||
echo Converting flat-color-icons svg files to ico format. | ||
echo Searching directory: "%IMAGE_INPUT_DIR%". | ||
setlocal EnableDelayedExpansion | ||
for /f %%f in ('dir /b "%IMAGE_INPUT_DIR%"') do ( | ||
REM echo %%f | ||
call :process_file "%%f" | ||
if !errorlevel! neq 0 echo Failed to process file "%%f". ERRORLEVEL=!errorlevel! && exit /b !errorlevel! | ||
) | ||
endlocal | ||
echo done. | ||
echo. | ||
|
||
echo All flat-color-icons icons converted to ico format. | ||
echo Output directory: "%IMAGE_OUTPUT_DIR%". | ||
echo. | ||
goto :eof | ||
|
||
|
||
|
||
|
||
:process_file | ||
@echo off | ||
|
||
:: echo FILENAME IS %~1 | ||
:: echo INPUT_FILE_PATH IS %IMAGE_INPUT_DIR%\%~1 | ||
:: echo OUTPUT_FILE_PATH IS %IMAGE_OUTPUT_DIR%\%~n1-32.png | ||
|
||
echo Processing file: %~1 | ||
magick -size 16x16 -background none "%IMAGE_INPUT_DIR%\%~1" "%TEMP_DIR%\%~n1-16.png" | ||
if %errorlevel% neq 0 echo Failure to convert svg file to png. ERRORLEVEL=%errorlevel% && exit /b %errorlevel% | ||
magick -size 32x32 -background none "%IMAGE_INPUT_DIR%\%~1" "%TEMP_DIR%\%~n1-32.png" | ||
if %errorlevel% neq 0 echo Failure to convert svg file to png. ERRORLEVEL=%errorlevel% && exit /b %errorlevel% | ||
magick -size 48x48 -background none "%IMAGE_INPUT_DIR%\%~1" "%TEMP_DIR%\%~n1-48.png" | ||
if %errorlevel% neq 0 echo Failure to convert svg file to png. ERRORLEVEL=%errorlevel% && exit /b %errorlevel% | ||
magick -size 64x64 -background none "%IMAGE_INPUT_DIR%\%~1" "%TEMP_DIR%\%~n1-64.png" | ||
if %errorlevel% neq 0 echo Failure to convert svg file to png. ERRORLEVEL=%errorlevel% && exit /b %errorlevel% | ||
|
||
set png_files= | ||
set png_files=%png_files% "%TEMP_DIR%\%~n1-16.png" | ||
set png_files=%png_files% "%TEMP_DIR%\%~n1-32.png" | ||
set png_files=%png_files% "%TEMP_DIR%\%~n1-48.png" | ||
set png_files=%png_files% "%TEMP_DIR%\%~n1-64.png" | ||
|
||
magick %png_files% "%IMAGE_OUTPUT_DIR%\%~n1.ico" | ||
if %errorlevel% neq 0 echo Failure to convert png files to ico. ERRORLEVEL=%errorlevel% && exit /b %errorlevel% | ||
|
||
goto :eof | ||
|
||
|
||
:EOF |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
@echo off | ||
|
||
:: Install ImageMagik. | ||
:: https://github.com/ImageMagick/ImageMagick | ||
:: https://imagemagick.org/script/download.php#windows | ||
|
||
echo Installing ImageMagick... | ||
set IMAGEMAGICK_URL=https://imagemagick.org/script/download.php | ||
set IMAGEMAGICK_FILE=%TEMP%\imagemagick.zip | ||
set IMAGEMAGICK_INSTALL_DIR=%TEMP%\imagemagick | ||
set IMAGEMAGICK_TEMP_FILE=%TEMP%\imagemagick.temp.txt | ||
|
||
echo Searching for a ImageMagick download link from %IMAGEMAGICK_URL%. | ||
powershell -command "(Invoke-WebRequest -Uri $Env:IMAGEMAGICK_URL).links.href | where {$_ -match '-portable-Q16-x64.zip'}">"%IMAGEMAGICK_TEMP_FILE%" | ||
if errorlevel 1 ( | ||
echo Command failed. Unable to check for ImageMagick latest portable version binaries. | ||
exit /B %errorlevel% | ||
) | ||
set /p IMAGEMAGICK_URL=<"%IMAGEMAGICK_TEMP_FILE%" | ||
echo Found download url: %IMAGEMAGICK_URL% | ||
if [%IMAGEMAGICK_URL%] == [] exit /B 1 | ||
echo. | ||
|
||
:: Check that 7zip is installed | ||
echo Searching for 7zip executable... | ||
set PATH=C:\Program Files\7-Zip;%PATH% | ||
where 7z.exe 1>NUL 2>NUL | ||
if errorlevel 1 ( | ||
echo Error: 7zip not installed on system. | ||
exit /B %errorlevel% | ||
) | ||
echo 7zip found. | ||
echo. | ||
|
||
:: Download installer | ||
echo Downloading %IMAGEMAGICK_URL%... | ||
python -c "import urllib.request; import os; urllib.request.urlretrieve(os.getenv('IMAGEMAGICK_URL'),os.getenv('IMAGEMAGICK_FILE'));" | ||
if errorlevel 1 ( | ||
echo Command failed. Unable to download ImageMagick binaries. | ||
exit /B %errorlevel% | ||
) | ||
if NOT EXIST "%IMAGEMAGICK_FILE%" ( | ||
echo Download failed. The file '%IMAGEMAGICK_FILE%' is not found. | ||
exit /B %errorlevel% | ||
) | ||
echo done. | ||
echo. | ||
|
||
:: Extracting | ||
mkdir %TEMP%\imagemagick 1>NUL 2>NUL | ||
echo Extracting content to installation directory... | ||
REM WARNING. THE FOLLOWING COMMAND EXACT ALL FILES IN THE ARCHIVE TO THE SAME LOCATION DISREGARDING INTERNAL DIRECTORY STRUCTURE!! | ||
7z e %IMAGEMAGICK_FILE% -o%IMAGEMAGICK_INSTALL_DIR% -aoa | ||
if errorlevel 1 ( | ||
echo Failed to decompress ImageMagick binary installer. | ||
exit /B %errorlevel% | ||
) | ||
echo done. | ||
echo. | ||
|
||
:: Searching for imagemagick executable | ||
echo Searching for imagemagick executable... | ||
set PATH=%IMAGEMAGICK_INSTALL_DIR%;%PATH% | ||
where magick.exe 1>NUL 2>NUL | ||
if errorlevel 1 ( | ||
echo Error: ImageMagick not installed on system. | ||
exit /B %errorlevel% | ||
) | ||
echo ImageMagick found. | ||
echo. | ||
|
||
echo ImageMagick was installed on the system without error. | ||
echo. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Good Boy License | ||
|
||
To be used with whatever your mom would approve of : | ||
|
||
Permitted Use: | ||
- Download | ||
- Change | ||
- Fork on GitHub | ||
|
||
Prohibited Use: | ||
- No tattoos | ||
- No touching food with unwashed hands | ||
- No exchanging for drugs | ||
|
||
License: https://icons8.com/good-boy-license | ||
Sources: https://github.com/icons8/flat-color-icons |
Binary file not shown.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
@echo off | ||
|
||
:: Assume that ImageMagick already installed by installation script. | ||
set PATH=%TEMP%\imagemagick;%PATH% | ||
|
||
echo Searching for imagemagik executables in PATH... | ||
where magick.exe | ||
if errorlevel 1 ( | ||
echo File 'magick.exe' not found. Please install imagemagik on system and add the directory to PATH. | ||
exit /B %errorlevel% | ||
) | ||
echo Found imagemagik directory. | ||
echo. | ||
|
||
call :process_file "0.2.0.svg" | ||
pause | ||
goto :eof | ||
|
||
|
||
:process_file | ||
echo Generate pngs... | ||
magick -background none -size 16x16 "%~1" "%~dpn1-16.png" | ||
magick -background none -size 32x32 "%~1" "%~dpn1-32.png" | ||
magick -background none -size 48x48 "%~1" "%~dpn1-48.png" | ||
magick -background none -size 64x64 "%~1" "%~dpn1-64.png" | ||
|
||
echo Override generated 16x16 icon with the legacy 16x16 icon. | ||
magick -background none "0.2.0-16x16-legacy.ico" "%~dpn1-16.png" | ||
|
||
echo Generate ico... | ||
set png_files= | ||
set png_files=%png_files% "%~dpn1-16.png" | ||
set png_files=%png_files% "%~dpn1-32.png" | ||
set png_files=%png_files% "%~dpn1-48.png" | ||
set png_files=%png_files% "%~dpn1-64.png" | ||
magick %png_files% "%~dpn1.ico" | ||
|
||
echo Generated "%~dpn1.ico". | ||
echo. | ||
|
||
echo Deleting png (intermediate files). | ||
del %png_files% | ||
|
||
goto :eof | ||
|
||
:eof |
Binary file not shown.
Oops, something went wrong.