master 6e3672eab1e8 cached
12 files
12.3 KB
3.8k tokens
1 requests
Download .txt
Repository: haxpor/aseprite-macos-buildsh
Branch: master
Commit: 6e3672eab1e8
Files: 12
Total size: 12.3 KB

Directory structure:
gitextract_qd71miwl/

├── .gitignore
├── Aseprite.app/
│   ├── Contents/
│   │   ├── Info.plist
│   │   ├── MacOS/
│   │   │   └── applet
│   │   ├── PkgInfo
│   │   └── Resources/
│   │       ├── Scripts/
│   │       │   └── main.scpt
│   │       ├── applet.icns
│   │       ├── applet.rsrc
│   │       └── description.rtfd/
│   │           └── TXT.rtf
│   └── Icon
├── LICENSE
├── README.md
└── aseprite.sh

================================================
FILE CONTENTS
================================================

================================================
FILE: .gitignore
================================================
aseprite/
deps/


================================================
FILE: Aseprite.app/Contents/Info.plist
================================================
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
	<key>CFBundleAllowMixedLocalizations</key>
	<true/>
	<key>CFBundleDevelopmentRegion</key>
	<string>English</string>
	<key>CFBundleExecutable</key>
	<string>applet</string>
	<key>CFBundleIconFile</key>
	<string>applet</string>
	<key>CFBundleIdentifier</key>
	<string>com.apple.ScriptEditor.id.Aseprite</string>
	<key>CFBundleInfoDictionaryVersion</key>
	<string>6.0</string>
	<key>CFBundleName</key>
	<string>Aseprite</string>
	<key>CFBundlePackageType</key>
	<string>APPL</string>
	<key>CFBundleShortVersionString</key>
	<string>1.0</string>
	<key>CFBundleSignature</key>
	<string>aplt</string>
	<key>LSMinimumSystemVersionByArchitecture</key>
	<dict>
		<key>x86_64</key>
		<string>10.6</string>
	</dict>
	<key>LSRequiresCarbon</key>
	<true/>
	<key>WindowState</key>
	<dict>
		<key>bundleDividerCollapsed</key>
		<true/>
		<key>bundlePositionOfDivider</key>
		<real>0.0</real>
		<key>dividerCollapsed</key>
		<false/>
		<key>eventLogLevel</key>
		<integer>2</integer>
		<key>name</key>
		<string>ScriptWindowState</string>
		<key>positionOfDivider</key>
		<real>157</real>
		<key>savedFrame</key>
		<string>214 69 700 672 0 0 1280 777 </string>
		<key>selectedTab</key>
		<string>result</string>
	</dict>
</dict>
</plist>


================================================
FILE: Aseprite.app/Contents/PkgInfo
================================================
APPLaplt

================================================
FILE: Aseprite.app/Contents/Resources/description.rtfd/TXT.rtf
================================================
{\rtf1\ansi\ansicpg1252\cocoartf1539\cocoasubrtf120
{\fonttbl}
{\colortbl;\red255\green255\blue255;}
{\*\expandedcolortbl;;}
}

================================================
FILE: Aseprite.app/Icon
================================================


================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2017 Wasin Thonkaew

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
# aseprite-macos-buildsh
Automated script to create latest release (whatever it will be either development snapshot commit, beta, or release) of Aseprite for macOS

Update : Added support x64 Architecture build for SKIA on MacOS

Project is updated against aseprite v.1.2.10 build workflow.

# Pre-Requisite

You need

* Xcode
* [CMake](http://www.cmake.org/) (3.4 or greater)
* [Ninja](https://ninja-build.org/) build system
* Python 2.x ([version 3](https://github.com/haxpor/aseprite-macos-buildsh/issues/2) didn't work)

For Xcode, you need to install it by downloading [here](https://developer.apple.com/download/). After successfully installed, execute `xcode-select --install` to install its toolchain, then finally follow along as dialog popup shows up.

Now you're ready to use this script.

# How to Build

Just execute `bash aseprite.sh`. Then open `Aseprite` application.

If the script asks for root password, enter it. This is to be able to execute command to properly set environment path variable. It's safe, the script never try to do anything beside trying to build the app successfully.

## Command line Configuration

In case you want to install aseprite to different path, or your `xcode-select` is not set properly, you can use either `--sdk-root` and `--target` to properly set things up before building.

* `--sdk-root`

	To set your latest macOS SDK root as part of Xcode toolchain. By default it will query current prefix-value from `xcode-select` and append it with `/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk`. But in case, it doesn't work or `xcode-select` didn't do the work, you can use this option to manually specify it.

* `--target`

	To set you target path to install aseprite. By default it will be at `/Applications` but some users might want it differently. In case you use this parameter, please see [#3](https://github.com/haxpor/aseprite-macos-buildsh/issues/3).

So for example, you will execute

```
bash aseprite.sh --sdk-root /Volumes/Slave/Applications/Xcode8.3/Xcode.app/Contents/Developer --target ~/slave/Applications
```
**note** if you use `--target`, please see [#3](https://github.com/haxpor/aseprite-macos-buildsh/issues/3).

Normal, barebone version with no parameters.

```shell
bash aseprite.sh
```

With custom parameters to specify SDK_ROOT and TARGET
```shell
bash aseprite.sh --sdk-root /Volumes/Slave/Applications/YourCustomDir/Xcode.app/Contents/Developer --target ~/YourCustomDir/Appliations
```

# Behind the Scene

The script will proceed with following
* Clone down Aseprite and Skia repository, and its dependencies required to bulid Aseprite.
* Compile and build dependencies
* Clone down Aseprite repository, then compile and build for latest release as tagged on Github (can be either beta or release version)
* Created `.app` bundle at `~/Applications`

> `Aseprite.app` is pre-created bundle file to wrap soon-to-be-built Aseprite. It contains script to execute an aseprite binary file with default executable path at `~/Applications/Aseprite/aseprite`. Such bundle file is created with macOS's Script Editor application.

# Notes

## for building v1.2.9

* If you previously clone any dependencies, the script will know and will instead try to update it from upstream for you. So you're ensured that it will operate on the most latest __release state__ version of Aseprite.
* Updated version of Aseprite might break cloned dependencies's build workflow especially error about `CC` or `CXX` environment variables are not set to correct path. If this is a case, it's likely that you re-build on previously compiled source code of dependencies in which `cmake` still keeps the old configurations used in successful compile. To resolve the problem, remove the whole build folder namedly `aseprite` then start it all over again. 
* ~~In case you want to build older version of Aseprite, take a look at [Releases](https://github.com/haxpor/aseprite-macos-buildsh/releases) section then find a corresponding target version of Aseprite you look for.~~ - won't work, will stick to latest version only

# Support Aseprite

Aseprite is cool. It is free if you build it by yourself like you did above, or you can purchase it at [official website](https://www.aseprite.org/) to avoid spending effort in manual build process.

# Credits

This automated build script gathers information from Aseprite's [INSTALL.md](https://github.com/aseprite/aseprite/blob/master/INSTALL.md) on how to build, and sum it up together as automated script you're using here.

# License
[MIT](https://github.com/haxpor/aseprite-macos-buildsh/blob/master/LICENSE), Wasin Thonkaew


================================================
FILE: aseprite.sh
================================================
#!/bin/bash
#
# Script to automate building latest release of Aseprite (it can be release or beta build)
# This is for macOS build version.

POSTFIXPATH_SDKROOT=Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.3.sdk
CCPATH_TOOLCHAIN=Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
CXXPATH_TOOLCHAIN=Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
SDK_ROOT=`xcode-select -p`
TARGET="/Applications"

# temporary value for returned value from function
TEMP_RET=""

# find value of target param --xxx if there's any, if not then TEMP_RET will still be empty "", else it will contain value from finding
# param 1 - parameter key name
# param 2 - program list of param, usually is $@
# return 1 if it found, and TEMP_RET is set, otherwise return 0. TEMP_RET will be always set to "" (empty) at the beginning of this function.
function findValueOfParam() {
	# set empty to temporary return variable first
	TEMP_RET=""

	count=$#
	argv=($@)

	for (( i=1; i<count; i++ )); do
		if [ ${argv[i]} = "$1" ]; then
			TEMP_RET=${argv[i+1]}
			return 0
		fi
	done

	return 1
}

# check if there's any input parameters
if [ $(($# % 2)) -ne 0 ]; then
	echo "Missing some parameter value"
	exit 1
fi

# set the input argument
if [ "$#" -ne 0 ]; then
	# if only one parameter
	findValueOfParam "--sdk-root" $@

	if [ $? -eq 0 ]; then
		# orvewrite set sdk-root
		SDK_ROOT=$TEMP_RET

		# set to xcode-select as well
		sudo xcode-select -s "$SDK_ROOT"
		echo "Set SDK_ROOT to $SDK_ROOT"
	fi
	
	findValueOfParam "--target" $@
	if [ $? -eq 0 ]; then
		# orvewrite set sdk-root
		TARGET=$TEMP_RET
		echo "Set TARGET to $TARGET"
	fi
fi

# check if aseprite directory exists, so we has no need to clone from repository again
if [ ! -d aseprite ]; then
	git clone --recursive https://github.com/aseprite/aseprite.git
fi

# change to aseprite directory
cd aseprite

# checkout master branch
git checkout master

# clear the current dirty state of git repository
git reset --hard
git clean -fd

# fetch all the update down
git fetch --all
git pull
git submodule update --init --recursive

# compile skia
cd ..
# check to create deps directory if not exist
if [ ! -d deps ]; then
	mkdir deps
fi
cd deps

# check if depot_tools is already cloned
if [ ! -d depot_tools ]; then
	git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git
fi

# check if skia is already cloned
if [ ! -d skia ]; then
	git clone https://github.com/aseprite/skia.git
fi

# clear the dirty state of both repositories
cd depot_tools
git reset --hard
git clean -fd
git fetch --all
git pull

# change dir back
cd ../

cd skia
git reset --hard
git clean -fd
git fetch --all
git pull

# change dir back
cd ../

# continue the operation
export PATH="${PWD}/depot_tools:${PATH}"
cd skia

# get proper skia's branch to compile
SKIA_BRANCH=$(curl "https://raw.githubusercontent.com/aseprite/aseprite/master/INSTALL.md" | grep "aseprite-m[0-9][0-9]" | sed -n '1p' | perl -n -e '/(aseprite-m\d\d)/ && print $1')
git checkout $SKIA_BRANCH

python tools/git-sync-deps
gn gen out/Release-x64 --args="is_debug=false is_official_build=true skia_use_system_expat=false skia_use_system_icu=false skia_use_system_libjpeg_turbo=false skia_use_system_libpng=false skia_use_system_libwebp=false skia_use_system_zlib=false skia_use_sfntly=false skia_use_freetype=true skia_use_harfbuzz=true skia_pdf_subset_harfbuzz=true skia_use_system_freetype2=false skia_use_system_harfbuzz=false target_cpu=\"x64\" extra_cflags=[\"-stdlib=libc++\", \"-mmacosx-version-min=10.9\"] extra_cflags_cc=[\"-frtti\"]"
ninja -C out/Release-x64 skia modules

cd ../../

# compile aseprite
cd aseprite
# create build dir (if needed)
if [ ! -d build ]; then
	mkdir build
fi
cd build

# prepare environment variables
export CC="$SDK_ROOT/$CCPATH_TOOLCHAIN"
export CXX="$SDK_ROOT/$CXXPATH_TOOLCHAIN"

# checkout the latest tag (release or beta)
git checkout `git describe --tags`
cmake \
  -DCMAKE_BUILD_TYPE=RelWithDebInfo \
  -DCMAKE_OSX_ARCHITECTURES=x86_64 \
  -DCMAKE_OSX_DEPLOYMENT_TARGET=10.9 \
  -DCMAKE_OSX_SYSROOT="$SDK_ROOT/$POSTFIXPATH_SDKROOT" \
  -DLAF_OS_BACKEND=skia \
  -DSKIA_DIR="${PWD}/../../deps/skia" \
  -DSKIA_LIBRARY_DIR="${PWD}/../../deps/skia/out/Release-x64" \
  -DSKIA_LIBRARY="${PWD}/../../deps/skia/out/Release-x64/libskia.a" \
  -G Ninja \
  .. && \
ninja aseprite # when finish, build file will be at aseprite/build/bin

# if everything went fine then do final operations
if [ $? -eq 0 ]; then
	# remove existing Aseprite if installed
	if [ -d "$TARGET/Aseprite" ]; then
		rm -rf "$TARGET/Aseprite"
	fi
	# move result to default ~/Applications
	mv bin "$TARGET/Aseprite"
  # check to create target directory
  if [ -d "$TARGET/Aseprite.app" ]; then
    # if found then copy all the contents of our template .app instead
    # this is to avoid risking removing any user' files the app might created
    echo "Target Aseprite.app directory found, copying contents of template .app to target location instead"
	  # copy application bundle to result
	  cp -Rp ../../Aseprite.app/* "$TARGET/Aseprite.app/"
    echo "All done"
  else
    # if not, then just copy the whole template .app directory to target
    echo "Copying template .app to target location"
	  # copy application bundle to result
	  cp -Rp ../../Aseprite.app "$TARGET/Aseprite.app"
    echo "All done"
  fi
else
  echo "Something went wrong"
fi
Download .txt
gitextract_qd71miwl/

├── .gitignore
├── Aseprite.app/
│   ├── Contents/
│   │   ├── Info.plist
│   │   ├── MacOS/
│   │   │   └── applet
│   │   ├── PkgInfo
│   │   └── Resources/
│   │       ├── Scripts/
│   │       │   └── main.scpt
│   │       ├── applet.icns
│   │       ├── applet.rsrc
│   │       └── description.rtfd/
│   │           └── TXT.rtf
│   └── Icon
├── LICENSE
├── README.md
└── aseprite.sh
Condensed preview — 12 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (14K chars).
[
  {
    "path": ".gitignore",
    "chars": 16,
    "preview": "aseprite/\ndeps/\n"
  },
  {
    "path": "Aseprite.app/Contents/Info.plist",
    "chars": 1394,
    "preview": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<!DOCTYPE plist PUBLIC \"-//Apple//DTD PLIST 1.0//EN\" \"http://www.apple.com/DTDs/P"
  },
  {
    "path": "Aseprite.app/Contents/PkgInfo",
    "chars": 8,
    "preview": "APPLaplt"
  },
  {
    "path": "Aseprite.app/Contents/Resources/description.rtfd/TXT.rtf",
    "chars": 126,
    "preview": "{\\rtf1\\ansi\\ansicpg1252\\cocoartf1539\\cocoasubrtf120\n{\\fonttbl}\n{\\colortbl;\\red255\\green255\\blue255;}\n{\\*\\expandedcolortb"
  },
  {
    "path": "Aseprite.app/Icon\r",
    "chars": 0,
    "preview": ""
  },
  {
    "path": "LICENSE",
    "chars": 1071,
    "preview": "MIT License\n\nCopyright (c) 2017 Wasin Thonkaew\n\nPermission is hereby granted, free of charge, to any person obtaining a "
  },
  {
    "path": "README.md",
    "chars": 4634,
    "preview": "# aseprite-macos-buildsh\nAutomated script to create latest release (whatever it will be either development snapshot comm"
  },
  {
    "path": "aseprite.sh",
    "chars": 5352,
    "preview": "#!/bin/bash\n#\n# Script to automate building latest release of Aseprite (it can be release or beta build)\n# This is for m"
  }
]

// ... and 4 more files (download for full content)

About this extraction

This page contains the full source code of the haxpor/aseprite-macos-buildsh GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 12 files (12.3 KB), approximately 3.8k tokens. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!