Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
PureAsbestos authored Mar 3, 2020
0 parents commit 1edf8e5
Show file tree
Hide file tree
Showing 6 changed files with 87 additions and 0 deletions.
26 changes: 26 additions & 0 deletions BUILD.BAT
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
@echo off
setlocal


REM #### SET THIS TO YOUR GCC FOLDER IF YOU HAVE GCC ON PATH ####
set IGNORE_DIR=D:\msys64\mingw64\bin\
REM #############################################################


call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\Tools\VsDevCmd.bat" -arch=x64

set BASE_DIR=%CD%
set TOOLS_DIR=%BASE_DIR%\tools

set cmake=%TOOLS_DIR%\cmake\bin\cmake.exe
set ninja=%TOOLS_DIR%\ninja\bin\ninja.exe

cd %BASE_DIR%\aseprite

mkdir build
cd build
%cmake% -Wno-dev -DCMAKE_IGNORE_PATH=%IGNORE_DIR% -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLAF_BACKEND=skia -DSKIA_DIR=%BASE_DIR%\deps\skia -DSKIA_LIBRARY_DIR=%BASE_DIR%\deps\skia\out\Release-x64 -DSKIA_LIBRARY=%BASE_DIR%\deps\skia\out\Release-x64\skia.lib -G Ninja ..
%ninja% aseprite

cd %BASE_DIR%
cmd -k
38 changes: 38 additions & 0 deletions INIT.BAT
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
@echo off
setlocal

set BASE_DIR=%CD%
set TOOLS_DIR=%BASE_DIR%\tools
set CACHEFILE=%TOOLS_DIR%\cache.txt

set /P INIT=<%CACHEFILE%
if /i "%INIT%" NEQ "true" ( goto :main )
set /p response="Already initialized. Would you like to reinitialize (Y/N)? "
if /i "%response%"=="y" (
RD /S /Q aseprite
RD /S /Q deps
) else ( exit /b )

:main
echo true> %CACHEFILE%

set curl=%TOOLS_DIR%\curl\bin\curl.exe
set zip=%TOOLS_DIR%\7zip\bin\7za.exe
set git=%TOOLS_DIR%\git\bin\git.exe

echo Downloading Skia...

mkdir deps
cd deps
mkdir skia
cd skia
%curl% -L https://github.com/aseprite/skia/releases/latest/download/Skia-Windows-Release-x64.zip -o skia.zip
%zip% x skia.zip > NUL
del skia.zip

cd %BASE_DIR%
%git% clone --recursive https://github.com/aseprite/aseprite.git

echo All done.

cmd -k
9 changes: 9 additions & 0 deletions README.TXT
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
This is a build toolchain to download and compile Aseprite and its dependencies on 64-bit Windows. It contains neither source nor binaries of Aseprite or its dependencies, which are copyrighted by their respective owners.

Please use the version in releases which contains all the tools needed by the scripts. Tool binaries included in releases are copyrighted by their respective owners, and I have tried to comply with the respective licenses. Please notify me of any non-compliance by creating an issue.

To perform first-time setup, or start over from scratch, run INIT.BAT
To build, run BUILD.BAT (output is ./aseprite/build/bin)
To update JUST the Aseprite source, run UPDATE.BAT

You must have Visual Studio 2019 installed at "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\" for the build script to work. If it is installed somewhere else, you'll have to change the location in the build script. Additionally, if you have MinGW/gcc installed, you may have to set the IGNORE_DIR in the build script.
6 changes: 6 additions & 0 deletions RESET.BAT
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
@echo off
RD /S /Q aseprite
RD /S /Q deps
echo false> tools\cache.txt

cmd -k
7 changes: 7 additions & 0 deletions UPDATE.BAT
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@echo off
cd aseprite
git pull
git submodule update --init --recursive
cd ..

cmd -k
1 change: 1 addition & 0 deletions tools/cache.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
false

0 comments on commit 1edf8e5

Please sign in to comment.