Compare commits

..

2 Commits

Author SHA1 Message Date
Simon Robertshaw
c0f5534fee Register spec: Wavelength storage & tmp2 storage copied from GameView element description code 2021-06-02 19:07:58 +01:00
Simon Robertshaw
d7a6b25a4b Experiment with generic "register" for life prop
Move PROP_LIFE to LifeSpec register to encode behaviour
2021-06-02 18:44:34 +01:00
857 changed files with 52293 additions and 47066 deletions

1
.github/.gitignore vendored
View File

@ -1,2 +1 @@
build_init.bat
jdk.ini

560
.github/build.sh vendored
View File

@ -1,515 +1,103 @@
#!/usr/bin/env bash
#!/bin/bash
set -euo pipefail
IFS=$'\n\t'
if [[ -z ${BSH_BUILD_PLATFORM-} ]]; then >&2 echo "BSH_BUILD_PLATFORM not set"; exit 1; fi
if [[ -z ${BSH_HOST_ARCH-} ]]; then >&2 echo "BSH_HOST_ARCH not set"; exit 1; fi
if [[ -z ${BSH_HOST_PLATFORM-} ]]; then >&2 echo "BSH_HOST_PLATFORM not set"; exit 1; fi
if [[ -z ${BSH_HOST_LIBC-} ]]; then >&2 echo "BSH_HOST_LIBC not set"; exit 1; fi
if [[ -z ${BSH_STATIC_DYNAMIC-} ]]; then >&2 echo "BSH_STATIC_DYNAMIC not set"; exit 1; fi
if [[ -z ${BSH_DEBUG_RELEASE-} ]]; then >&2 echo "BSH_DEBUG_RELEASE not set"; exit 1; fi
if [[ -z ${RELEASE_NAME-} ]]; then >&2 echo "RELEASE_NAME not set"; exit 1; fi
if [[ -z ${RELEASE_TYPE-} ]]; then >&2 echo "RELEASE_TYPE not set"; exit 1; fi
if [[ -z ${MOD_ID-} ]]; then >&2 echo "MOD_ID not set"; exit 1; fi
if [[ -z ${SEPARATE_DEBUG-} ]]; then >&2 echo "SEPARATE_DEBUG not set"; exit 1; fi
if [[ -z ${PACKAGE_MODE-} ]]; then >&2 echo "PACKAGE_MODE not set"; exit 1; fi
if [[ -z ${ASSET_PATH-} ]]; then >&2 echo "ASSET_PATH not set"; exit 1; fi
if [[ -z ${DEBUG_ASSET_PATH-} ]]; then >&2 echo "DEBUG_ASSET_PATH not set"; exit 1; fi
if [[ -z ${APP_NAME-} ]]; then >&2 echo "APP_NAME not set"; exit 1; fi
if [[ -z ${APP_COMMENT-} ]]; then >&2 echo "APP_COMMENT not set"; exit 1; fi
if [[ -z ${APP_EXE-} ]]; then >&2 echo "APP_EXE not set"; exit 1; fi
if [[ -z ${APP_ID-} ]]; then >&2 echo "APP_ID not set"; exit 1; fi
if [[ -z ${APP_DATA-} ]]; then >&2 echo "APP_DATA not set"; exit 1; fi
if [[ -z ${APP_VENDOR-} ]]; then >&2 echo "APP_VENDOR not set"; exit 1; fi
case $BSH_HOST_ARCH-$BSH_HOST_PLATFORM-$BSH_HOST_LIBC-$BSH_STATIC_DYNAMIC in
x86_64-linux-gnu-static) ;;
x86_64-linux-gnu-dynamic) ;;
x86_64-windows-mingw-static) ;;
x86_64-windows-mingw-dynamic) ;;
x86_64-windows-msvc-static) ;;
x86_64-windows-msvc-dynamic) ;;
x86-windows-msvc-static) ;;
x86-windows-msvc-dynamic) ;;
x86_64-darwin-macos-static) ;;
x86_64-darwin-macos-dynamic) ;;
aarch64-darwin-macos-static) ;;
aarch64-darwin-macos-dynamic) ;;
x86-android-bionic-static) ;;
x86_64-android-bionic-static) ;;
arm-android-bionic-static) ;;
aarch64-android-bionic-static) ;;
wasm32-emscripten-emscripten-static) ;;
*) >&2 echo "configuration $BSH_HOST_ARCH-$BSH_HOST_PLATFORM-$BSH_HOST_LIBC-$BSH_STATIC_DYNAMIC is not supported" && exit 1;;
esac
if [[ $BSH_HOST_PLATFORM == android ]]; then
android_platform=android-31
if [[ -z "${JAVA_HOME_8_X64-}" ]]; then
>&2 echo "JAVA_HOME_8_X64 not set"
if [ -z "${PLATFORM_SHORT-}" ]; then
>&2 echo "PLATFORM_SHORT not set (lin, mac, win)"
exit 1
fi
if [[ -z "${ANDROID_SDK_ROOT-}" ]]; then
>&2 echo "ANDROID_SDK_ROOT not set"
fi
if [ -z "${MACHINE_SHORT-}" ]; then
>&2 echo "MACHINE_SHORT not set (x86_64, i686)"
exit 1
fi
if [[ -z "${ANDROID_NDK_LATEST_HOME-}" ]]; then
>&2 echo "ANDROID_NDK_LATEST_HOME not set"
fi
if [ -z "${TOOLSET_SHORT-}" ]; then
>&2 echo "TOOLSET_SHORT not set (gcc, clang, mingw)"
exit 1
fi
if [ -z "${STATIC_DYNAMIC-}" ]; then
>&2 echo "STATIC_DYNAMIC not set (static, dynamic)"
exit 1
fi
if [ -z "${RELNAME-}" ]; then
>&2 echo "RELNAME not set"
exit 1
fi
if [ -z "${RELTYPE-}" ]; then
>&2 echo "RELTYPE not set"
exit 1
fi
if [ -z "${MOD_ID-}" ]; then
>&2 echo "MOD_ID not set"
exit 1
fi
fi
if [[ -z ${BSH_NO_PACKAGES-} ]]; then
case $BSH_HOST_PLATFORM in
android)
(
export PATH=$ANDROID_SDK_ROOT/cmdline-tools/latest/bin:$ANDROID_SDK_ROOT/tools/bin:$PATH
sdkmanager "platforms;$android_platform"
)
;;
windows)
if [[ $BSH_BUILD_PLATFORM-$BSH_HOST_LIBC == windows-mingw ]]; then
pacman -S --noconfirm --needed mingw-w64-ucrt-x86_64-gcc
if [[ $BSH_STATIC_DYNAMIC == static ]]; then
pacman -S --noconfirm --needed mingw-w64-ucrt-x86_64-{cmake,7zip,jq} patch
if [ -z "${build_sh_init-}" ]; then
if [ $PLATFORM_SHORT == "win" ]; then
for i in C:/Program\ Files\ \(x86\)/Microsoft\ Visual\ Studio/**/**/VC/Auxiliary/Build/vcvarsall.bat; do
vcvarsall_path=$i
done
if [ $MACHINE_SHORT == "x86_64" ]; then
x64_x86=x64
else
pacman -S --noconfirm --needed mingw-w64-ucrt-x86_64-{pkgconf,bzip2,luajit,jsoncpp,curl,SDL2,libpng,meson,fftw,jq}
x64_x86=x86
fi
export PKG_CONFIG=$(which pkg-config.exe)
fi
;;
linux)
sudo apt update
if [[ $BSH_STATIC_DYNAMIC == static ]]; then
sudo apt install libc6-dev libc6-dev-i386
cat << BUILD_INIT_BAT > .github/build_init.bat
@echo off
call "${vcvarsall_path}" ${x64_x86}
bash -c 'build_sh_init=1 ./.github/build.sh'
BUILD_INIT_BAT
./.github/build_init.bat
else
sudo apt install libluajit-5.1-dev libcurl4-openssl-dev libfftw3-dev zlib1g-dev libsdl2-dev libbz2-dev libjsoncpp-dev
build_sh_init=1 ./.github/build.sh
fi
;;
darwin)
brew install pkg-config binutils
if [[ $BSH_STATIC_DYNAMIC != static ]]; then
brew install luajit curl fftw zlib sdl2 bzip2 jsoncpp
fi
;;
emscripten)
git clone https://github.com/emscripten-core/emsdk.git --branch 3.1.30
cd emsdk
./emsdk install latest
./emsdk activate latest
. ./emsdk_env.sh
cd ..
;;
esac
exit 0
fi
function inplace_sed() {
local subst=$1
local path=$2
if [[ $BSH_BUILD_PLATFORM == darwin ]]; then
sed -i "" -e $subst $path
else
sed -i $subst $path
fi
}
if [[ $BSH_HOST_PLATFORM-$BSH_HOST_LIBC == windows-msvc ]]; then
case $BSH_HOST_ARCH in
x86_64) vs_env_arch=x64;;
x86) vs_env_arch=x86;;
esac
VS_ENV_PARAMS=$vs_env_arch$'\t'-vcvars_ver=14.1
. ./.github/vs-env.sh
elif [[ $BSH_HOST_PLATFORM == darwin ]]; then
# may need export SDKROOT=$(xcrun --show-sdk-path --sdk macosx11.1)
CC=clang
CXX=clang++
if [[ $BSH_HOST_ARCH == aarch64 ]]; then
macos_min_ver=11.0
CC+=" -arch arm64"
CXX+=" -arch arm64"
else
macos_min_ver=10.13
CC+=" -arch x86_64"
CXX+=" -arch x86_64"
fi
if [[ $BSH_STATIC_DYNAMIC == static ]]; then
export MACOSX_DEPLOYMENT_TARGET=$macos_min_ver
fi
export CC
export CXX
elif [[ $BSH_HOST_PLATFORM == android ]]; then
case $BSH_HOST_ARCH in
x86_64) android_toolchain_prefix=x86_64-linux-android ; android_system_version=21; android_arch_abi=x86_64 ;;
x86) android_toolchain_prefix=i686-linux-android ; android_system_version=21; android_arch_abi=x86 ;;
aarch64) android_toolchain_prefix=aarch64-linux-android ; android_system_version=21; android_arch_abi=arm64-v8a ;;
arm) android_toolchain_prefix=armv7a-linux-androideabi; android_system_version=21; android_arch_abi=armeabi-v7a;;
esac
android_toolchain_dir=$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64
CC=$android_toolchain_dir/bin/$android_toolchain_prefix$android_system_version-clang
CXX=$android_toolchain_dir/bin/$android_toolchain_prefix$android_system_version-clang++
LD=$android_toolchain_dir/bin/$android_toolchain_prefix-ld
AR=$android_toolchain_dir/bin/llvm-ar
echo $AR
CC+=" -fPIC"
CXX+=" -fPIC"
LD+=" -fPIC"
export CC
export CXX
export LD
export AR
else
export CC=gcc
export CXX=g++
fi
if [[ -d build ]]; then
rm -r build
fi
c_args=
c_link_args=
if [[ $BSH_HOST_PLATFORM-$BSH_HOST_LIBC != windows-msvc ]]; then
c_args+=\'-ffunction-sections\',
c_args+=\'-fdata-sections\',
if [[ $BSH_HOST_PLATFORM == darwin ]]; then
c_link_args+=\'-Wl,-dead_strip\',
else
c_link_args+=\'-Wl,--gc-sections\',
other_flags=$'\t-Dmod_id='
other_flags+=$MOD_ID
bin_suffix=
static_flag=
if [ $STATIC_DYNAMIC == "static" ]; then
static_flag=-Dstatic=prebuilt
if [ $PLATFORM_SHORT == "win" ]; then
other_flags+=$'\t-Db_vscrt=static_from_buildtype'
fi
fi
if [[ $BSH_HOST_PLATFORM-$BSH_STATIC_DYNAMIC == darwin-static ]]; then
c_args+=\'-mmacosx-version-min=$macos_min_ver\',
c_link_args+=\'-mmacosx-version-min=$macos_min_ver\',
fi
meson_configure=meson$'\t'setup
if [[ $BSH_DEBUG_RELEASE == release ]]; then
meson_configure+=$'\t'-Dbuildtype=debugoptimized
fi
if [[ $BSH_HOST_PLATFORM == darwin ]]; then
meson_configure+=$'\t'-Dmanifest_macos_min_ver=$macos_min_ver
else
meson_configure+=$'\t'-Dmanifest_date=$(date --iso-8601)
fi
meson_configure+=$'\t'-Dapp_name=$APP_NAME
meson_configure+=$'\t'-Dapp_comment=$APP_COMMENT
meson_configure+=$'\t'-Dapp_exe=$APP_EXE
meson_configure+=$'\t'-Dapp_id=$APP_ID
meson_configure+=$'\t'-Dapp_data=$APP_DATA
meson_configure+=$'\t'-Dapp_vendor=$APP_VENDOR
meson_configure+=$'\t'-Dstrip=false
meson_configure+=$'\t'-Db_staticpic=false
meson_configure+=$'\t'-Dmod_id=$MOD_ID
case $BSH_HOST_ARCH-$BSH_HOST_PLATFORM-$BSH_HOST_LIBC-$BSH_DEBUG_RELEASE in
x86_64-linux-gnu-debug) ;&
x86_64-windows-mingw-debug) ;&
x86_64-windows-msvc-debug) ;&
x86_64-darwin-macos-debug)
meson_configure+=$'\t'-Dbuild_render=true
meson_configure+=$'\t'-Dbuild_font=true
;;
esac
if [[ $PACKAGE_MODE == nohttp ]]; then
meson_configure+=$'\t'-Dhttp=false
fi
if [[ $PACKAGE_MODE == nolua ]]; then
meson_configure+=$'\t'-Dlua=none
fi
if [[ $PACKAGE_MODE == backendvs ]]; then
meson_configure+=$'\t'-Dbackend=vs
# meson 1.2.3 configures vs projects that bring their own manifest, which conflicts with ours
# TODO: remove this patch once https://github.com/mesonbuild/meson/pull/12472 makes it into a release that we can use
meson_configure+=$'\t'-Dwindows_utf8cp=false
fi
if [[ $BSH_STATIC_DYNAMIC == static ]]; then
meson_configure+=$'\t'-Dstatic=prebuilt
if [[ $BSH_HOST_PLATFORM == windows ]]; then
if [[ $BSH_HOST_LIBC == msvc ]]; then
meson_configure+=$'\t'-Db_vscrt=static_from_buildtype
else
c_link_args+=\'-static\',
c_link_args+=\'-static-libgcc\',
c_link_args+=\'-static-libstdc++\',
fi
elif [[ $BSH_HOST_PLATFORM == linux ]]; then
c_link_args+=\'-static-libgcc\',
c_link_args+=\'-static-libstdc++\',
fi
else
if [[ "$BSH_HOST_PLATFORM-$BSH_HOST_LIBC $BSH_BUILD_PLATFORM" == "windows-mingw windows" ]]; then
meson_configure+=$'\t'-Dworkaround_elusive_bzip2=true
meson_configure+=$'\t'-Dworkaround_elusive_bzip2_include_dir=/ucrt64/include
meson_configure+=$'\t'-Dworkaround_elusive_bzip2_lib_dir=/ucrt64/lib
fi
if [[ $BSH_BUILD_PLATFORM == linux ]]; then
meson_configure+=$'\t'-Dworkaround_elusive_bzip2=true
fi
if [[ $BSH_BUILD_PLATFORM == darwin ]]; then
meson_configure+=$'\t'-Dworkaround_elusive_bzip2=true
meson_configure+=$'\t'-Dworkaround_elusive_bzip2_lib_dir=/usr/local/opt/bzip2/lib
meson_configure+=$'\t'-Dworkaround_elusive_bzip2_include_dir=/usr/local/opt/bzip2/include
meson_configure+=$'\t'-Dworkaround_elusive_bzip2_static=true
if [ $PLATFORM_SHORT == "lin" ]; then
# We use gcc on lin; sadly, gcc + lto + libstdc++ + pthread = undefined reference to
# pthread_create, thanks to weak symbols in libstdc++.so (or something). See
# https://gcc.gnu.org/legacy-ml/gcc-help/2017-03/msg00081.html
other_flags+=$'\t-Db_asneeded=false\t-Dcpp_link_args=-Wl,--no-as-needed'
if [ $STATIC_DYNAMIC == "static" ]; then
other_flags+=$'\t-Dbuild_render=true\t-Dbuild_font=true'
fi
fi
if [[ $BSH_HOST_PLATFORM == linux ]] && [[ $BSH_HOST_ARCH != aarch64 ]]; then
# certain file managers can't run PIEs https://bugzilla.gnome.org/show_bug.cgi?id=737849
meson_configure+=$'\t'-Db_pie=false
c_link_args+=\'-no-pie\',
if [ $PLATFORM_SHORT == "win" ]; then
bin_suffix=$bin_suffix.exe
fi
stable_or_beta=no
if [[ $RELEASE_TYPE == beta ]]; then
meson_configure+=$'\t'-Dbeta=true
stable_or_beta=yes
if [ "$RELTYPE" == "snapshot" ]; then
other_flags+=$'\t-Dsnapshot=true\t-Dsnapshot_id='
other_flags+=`echo $RELNAME | cut -d '-' -f 2` # $RELNAME is snapshot-X
fi
if [[ $RELEASE_TYPE == stable ]]; then
stable_or_beta=yes
fi
if [[ $stable_or_beta == yes ]]; then
xyz=$(echo $RELEASE_NAME | cut -d 'v' -f 2 | cut -d 'b' -f 1) # $RELEASE_NAME is vX.Y.Z or vX.Y.Zb
display_version_major=$(echo $xyz | cut -d '.' -f 1)
display_version_minor=$(echo $xyz | cut -d '.' -f 2)
build_num=$(echo $xyz | cut -d '.' -f 3)
if [[ $MOD_ID != 0 ]]; then
meson_configure+=$'\t'-Ddisplay_version_major=$display_version_major
meson_configure+=$'\t'-Ddisplay_version_minor=$display_version_minor
meson_configure+=$'\t'-Dbuild_num=$build_num
fi
fi
if [[ $RELEASE_TYPE == snapshot ]]; then
build_num=$(echo $RELEASE_NAME | cut -d '-' -f 2) # $RELEASE_NAME is snapshot-X
meson_configure+=$'\t'-Dsnapshot=true
if [[ $MOD_ID != 0 ]]; then
meson_configure+=$'\t'-Dbuild_num=$build_num
fi
fi
if [[ $RELEASE_TYPE == snapshot ]] && [[ $MOD_ID != 0 ]]; then
if [ "$RELTYPE" == "snapshot" ] && [ "$MOD_ID" != "0" ]; then
>&2 echo "mods and snapshots do not mix"
exit 1
fi
if [[ $RELEASE_TYPE == snapshot ]] || [[ $MOD_ID != 0 ]]; then
meson_configure+=$'\t'-Dupdate_server=starcatcher.us/TPT
if [[ $BSH_HOST_PLATFORM == emscripten ]]; then
meson_configure+=$'\t'-Dserver=tptserv.starcatcher.us
meson_configure+=$'\t'-Dstatic_server=tptserv.starcatcher.us/Static
fi
if [ "$RELTYPE" == "stable" ] && [ "$MOD_ID" != "0" ]; then
other_flags+=$'\t-Dsnapshot_id='
other_flags+=`echo $RELNAME | cut -d '.' -f 3` # $RELNAME is vX.Y.Z
fi
if [[ $RELEASE_TYPE != dev ]]; then
meson_configure+=$'\t'-Dignore_updates=false
if [ "$RELTYPE" == "snapshot" ] || [ "$MOD_ID" != "0" ]; then
other_flags+=$'\t-Dupdate_server=starcatcher.us/TPT'
fi
if [[ "$BSH_HOST_PLATFORM-$BSH_HOST_LIBC" == "windows-mingw" ]]; then
meson_configure+=$'\t'--cross-file=.github/mingw-ghactions.ini
# there is some mingw bug that only ever manifests on ghactions which makes MakeIco.exe use tons of memory and fail
# TODO: remove this hack once we figure out how to fix that
meson_configure+=$'\t'-Dwindows_icons=false
if [ "$RELTYPE" != "dev" ]; then
other_flags+=$'\t-Dignore_updates=false'
fi
if [[ $BSH_DEBUG_RELEASE-$BSH_STATIC_DYNAMIC == release-static ]]; then
meson_configure+=$'\t'-Db_lto=true
fi
if [[ $BSH_HOST_PLATFORM-$BSH_HOST_ARCH == darwin-aarch64 ]]; then
meson_configure+=$'\t'--cross-file=.github/macaa64-ghactions.ini
fi
if [[ $BSH_HOST_PLATFORM == emscripten ]]; then
meson_configure+=$'\t'--cross-file=.github/emscripten-ghactions.ini
fi
if [[ $RELEASE_TYPE == tptlibsdev ]] && ([[ $BSH_HOST_PLATFORM-$BSH_HOST_LIBC == windows-msvc ]] || [[ $BSH_STATIC_DYNAMIC == static ]]); then
if [[ -z ${TPTLIBSREMOTE-} ]]; then
if [[ -z "${GITHUB_REPOSITORY_OWNER-}" ]]; then
>&2 echo "GITHUB_REPOSITORY_OWNER not set"
exit 1
fi
tptlibsremote=https://github.com/$GITHUB_REPOSITORY_OWNER/tpt-libs
else
tptlibsremote=$TPTLIBSREMOTE
fi
tptlibsbranch=$(echo $RELEASE_NAME | cut -d '-' -f 2-) # $RELEASE_NAME is tptlibsdev-BRANCH
if [[ -d build-tpt-libs ]] && [[ ${TPTLIBSRESET-} == yes ]]; then
rm -rf build-tpt-libs
fi
if [[ ! -d build-tpt-libs/tpt-libs ]]; then
mkdir -p build-tpt-libs
cd build-tpt-libs
git clone $tptlibsremote --branch $tptlibsbranch --depth 1
cd ..
fi
tpt_libs_vtag=v00000000000000
if [[ ! -f build-tpt-libs/tpt-libs/.ok ]]; then
cd build-tpt-libs/tpt-libs
BSH_VTAG=$tpt_libs_vtag ./.github/build.sh
touch .ok
cd ../../subprojects
for i in tpt-libs-prebuilt-*; do
if [[ -d $i ]]; then
rm -r $i
fi
done
7z x ../build-tpt-libs/tpt-libs/temp/libraries.zip
cd ..
fi
meson_configure+=$'\t'-Dtpt_libs_vtag=$tpt_libs_vtag
fi
if [[ $BSH_HOST_PLATFORM == android ]]; then
android_platform_jar=$ANDROID_SDK_ROOT/platforms/$android_platform/android.jar
if ! [[ -f $android_platform_jar ]]; then
>&2 echo "$android_platform_jar not found"
exit 1
fi
meson_configure+=$'\t'--cross-file=android/cross/$BSH_HOST_ARCH.ini
cat << ANDROID_INI > .github/android-ghactions.ini
[constants]
andriod_ndk_toolchain_bin = '$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin'
andriod_sdk_build_tools = '$ANDROID_SDK_ROOT/build-tools/32.0.0'
[properties]
# android_ndk_toolchain_prefix comes from the correct cross-file in ./android/cross
android_ndk_toolchain_prefix = android_ndk_toolchain_prefix
android_platform = '$android_platform'
android_platform_jar = '$android_platform_jar'
java_runtime_jar = '$JAVA_HOME_8_X64/jre/lib/rt.jar'
[binaries]
# android_ndk_toolchain_prefix comes from the correct cross-file in ./android/cross
c = andriod_ndk_toolchain_bin / (android_ndk_toolchain_prefix + 'clang')
cpp = andriod_ndk_toolchain_bin / (android_ndk_toolchain_prefix + 'clang++')
strip = andriod_ndk_toolchain_bin / 'llvm-strip'
javac = '$JAVA_HOME_8_X64/bin/javac'
jar = '$JAVA_HOME_8_X64/bin/jar'
d8 = andriod_sdk_build_tools / 'd8'
aapt = andriod_sdk_build_tools / 'aapt'
aapt2 = andriod_sdk_build_tools / 'aapt2'
zipalign = andriod_sdk_build_tools / 'zipalign'
apksigner = andriod_sdk_build_tools / 'apksigner'
ANDROID_INI
meson_configure+=$'\t'--cross-file=.github/android-ghactions.ini
fi
meson_configure+=$'\t'-Dc_args=[$c_args]
meson_configure+=$'\t'-Dcpp_args=[$c_args]
meson_configure+=$'\t'-Dc_link_args=[$c_link_args]
meson_configure+=$'\t'-Dcpp_link_args=[$c_link_args]
$meson_configure build
meson -Dbuildtype=release -Db_pie=false -Db_staticpic=false -Db_lto=true $static_flag -Dinstall_check=true $other_flags build
cd build
function verify_version_component() {
local key=$1
local expected=$2
local actual=$(jq -r '.[] | select(.name == "'$key'") | .value' < meson-info/intro-buildoptions.json)
if [[ $actual != $expected ]]; then
>&2 echo "meson option $key expected to be $expected, is instead $actual"
exit 1
fi
}
if [[ $stable_or_beta == yes ]] && [[ $MOD_ID == 0 ]]; then
verify_version_component display_version_major $display_version_major
verify_version_component display_version_minor $display_version_minor
verify_version_component build_num $build_num
verify_version_component upstream_version_major $display_version_major
verify_version_component upstream_version_minor $display_version_minor
verify_version_component upstream_build_num $build_num
fi
if [[ $RELEASE_TYPE == snapshot ]] && [[ $MOD_ID == 0 ]]; then
verify_version_component build_num $build_num
verify_version_component upstream_build_num $build_num
fi
strip=strip
objcopy=objcopy
strip_target=$ASSET_PATH
if [[ $BSH_HOST_PLATFORM == android ]]; then
strip=$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-$strip
objcopy=$ANDROID_NDK_LATEST_HOME/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-$objcopy
strip_target=lib$APP_EXE.so
fi
if [[ $PACKAGE_MODE == appimage ]]; then
# so far this can only happen with $BSH_HOST_PLATFORM-$BSH_HOST_LIBC == linux-gnu, but this may change later
meson configure -Dcan_install=no -Dignore_updates=true -Dbuild_render=false -Dbuild_font=false
strip_target=$APP_EXE
fi
meson_compile=meson$'\t'compile
meson_compile+=$'\t'-v
if [[ $BSH_BUILD_PLATFORM == windows ]] && [[ $PACKAGE_MODE != backendvs ]]; then
set +e
meson_compile+=$'\t'--ninja-args='["-d","keeprsp"]'
$meson_compile
ninja_code=$?
set -e
cat $APP_EXE.exe.rsp
[[ $ninja_code == 0 ]];
echo # rsps don't usually have a newline at the end
if [[ "$BSH_HOST_PLATFORM-$BSH_STATIC_DYNAMIC $BSH_BUILD_PLATFORM" == "windows-dynamic windows" ]]; then
# on windows we provide the dynamic dependencies also; makes sense to check for their presence
# msys ldd works fine but only on windows build machines
if ldd $APP_EXE | grep "not found"; then
exit 1 # ldd | grep will have printed missing deps
fi
fi
else
$meson_compile
fi
if [[ $SEPARATE_DEBUG == yes ]] && [[ $BSH_HOST_PLATFORM-$BSH_HOST_LIBC != windows-msvc ]]; then
$objcopy --only-keep-debug $strip_target $DEBUG_ASSET_PATH
$strip --strip-debug --strip-unneeded $strip_target
$objcopy --add-gnu-debuglink $DEBUG_ASSET_PATH $strip_target
chmod -x $DEBUG_ASSET_PATH
fi
if [[ $BSH_HOST_PLATFORM == android ]]; then
$JAVA_HOME_8_X64/bin/keytool -genkeypair -keystore keystore.jks -alias androidkey -validity 10000 -keyalg RSA -keysize 2048 -keypass bagelsbagels -storepass bagelsbagels -dname "CN=nobody"
meson configure -Dandroid_keystore=$(realpath keystore.jks)
ANDROID_KEYSTORE_PASS=bagelsbagels ninja android/$APP_EXE.apk
mv android/$APP_EXE.apk $APP_EXE.apk
fi
if [[ $PACKAGE_MODE == dmg ]]; then
# so far this can only happen with $BSH_HOST_PLATFORM-$BSH_HOST_LIBC == darwin-macos
appdir=$APP_NAME.app
mkdir $appdir
mkdir $appdir/Contents
cp resources/Info.plist $appdir/Contents/Info.plist
mkdir $appdir/Contents/MacOS
cp $APP_EXE $appdir/Contents/MacOS/$APP_EXE
mkdir $appdir/Contents/Resources
mkdir icon_exe.iconset
cp ../resources/generated_icons/icon_exe_16.png icon_exe.iconset/icon_16x16.png
cp ../resources/generated_icons/icon_exe_32.png icon_exe.iconset/icon_32x32.png
cp ../resources/generated_icons/icon_exe.png icon_exe.iconset/icon_128x128.png
iconutil -c icns icon_exe.iconset
cp icon_exe.icns $appdir/Contents/Resources/icon_exe.icns
mkdir icon_cps.iconset
cp ../resources/generated_icons/icon_cps_16.png icon_cps.iconset/icon_16x16.png
cp ../resources/generated_icons/icon_cps_32.png icon_cps.iconset/icon_32x32.png
cp ../resources/generated_icons/icon_cps.png icon_cps.iconset/icon_128x128.png
iconutil -c icns icon_cps.iconset
cp icon_cps.icns $appdir/Contents/Resources/icon_cps.icns
mkdir dmgroot
mv $appdir dmgroot/$appdir
cp ../LICENSE dmgroot/LICENSE
cp ../README.md dmgroot/README.md
hdiutil create -format UDZO -volname $APP_NAME -fs HFS+ -srcfolder dmgroot -o $ASSET_PATH
elif [[ $PACKAGE_MODE == emscripten ]]; then
tar cvf $ASSET_PATH $APP_EXE.js $APP_EXE.worker.js $APP_EXE.wasm
elif [[ $PACKAGE_MODE == appimage ]]; then
# so far this can only happen with $BSH_HOST_PLATFORM-$BSH_HOST_LIBC == linux-gnu, but this may change later
case $BSH_HOST_ARCH in
aarch64) appimage_arch=aarch64;;
arm) appimage_arch=armhf ;;
x86) appimage_arch=i686 ;;
x86_64) appimage_arch=x86_64 ;;
esac
curl -fsSLo appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-$appimage_arch.AppImage"
curl -fsSLo AppRun "https://github.com/AppImage/AppImageKit/releases/download/continuous/AppRun-$appimage_arch"
chmod +x appimagetool
chmod +x AppRun
appdir=bagels.AppDir # doesn't matter, won't be visible in the resulting appimage
mkdir -p $appdir/usr/bin
mkdir -p $appdir/usr/share/metainfo
mkdir -p $appdir/usr/share/applications
mkdir -p $appdir/usr/share/icons
cp $APP_EXE $appdir/usr/bin/$APP_EXE
mv AppRun $appdir/AppRun
cp ../resources/icon_exe.svg $appdir/$APP_VENDOR-$APP_EXE.svg
cp resources/powder.desktop $appdir/$APP_ID.desktop
cp resources/appdata.xml $appdir/usr/share/metainfo/$APP_ID.appdata.xml
cp $appdir/$APP_VENDOR-$APP_EXE.svg $appdir/usr/share/icons/$APP_VENDOR-$APP_EXE.svg
cp $appdir/$APP_ID.desktop $appdir/usr/share/applications/$APP_ID.desktop
./appimagetool $appdir $ASSET_PATH
ninja
if [ $PLATFORM_SHORT == "lin" ] || [ $PLATFORM_SHORT == "mac" ]; then
strip powder$bin_suffix
fi
cp powder$bin_suffix ..

View File

@ -1,4 +0,0 @@
set -euo pipefail
IFS=$'\t\n'
gh release create --draft --verify-tag --title $RELEASE_NAME $GITHUB_REF_NAME

View File

@ -1,11 +0,0 @@
[binaries]
c = 'emcc'
cpp = 'em++'
strip = 'emstrip'
ar = 'emar'
[host_machine]
system = 'emscripten'
cpu_family = 'wasm32'
cpu = 'wasm32'
endian = 'little'

2
.github/get-release-info.sh vendored Executable file
View File

@ -0,0 +1,2 @@
value=`cat release_url/release_url.txt`
echo ::set-output name=upload_url::$value

19
.github/get-type.py vendored Normal file
View File

@ -0,0 +1,19 @@
import re
import sys
ref = sys.argv[1]
match_stable = re.match(r'refs/tags/v([0-9]+)\.([0-9]+)\.([0-9]+)', ref)
match_snapshot = re.match(r'refs/tags/snapshot-([0-9]+)', ref)
if match_stable:
print('::set-output name=TYPE::stable')
print('::set-output name=NAME::v%s.%s.%s' % (match_stable.group(1), match_stable.group(2), match_stable.group(3)))
elif match_snapshot:
print('::set-output name=TYPE::snapshot')
print('::set-output name=NAME::snapshot-%s' % match_snapshot.group(1))
else:
print('::set-output name=TYPE::dev')
print('::set-output name=NAME::dev')
with open('.github/mod_id.txt') as f:
print('::set-output name=MOD_ID::' + f.read())

7
.github/invoke-vcvarsall.bat vendored Normal file
View File

@ -0,0 +1,7 @@
@echo off
call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86
echo ::set-env name=PATH::%PATH%
echo ::set-env name=CC::cl
echo ::set-env name=CXX::cl
exit

View File

@ -1,11 +0,0 @@
[binaries]
c = [ 'clang', '-arch', 'arm64' ]
cpp = [ 'clang++', '-arch', 'arm64' ]
objcpp = [ 'clang++', '-arch', 'arm64' ]
strip = 'strip'
[host_machine]
system = 'darwin'
cpu_family = 'aarch64'
cpu = 'armv8'
endian = 'little'

View File

@ -1,14 +0,0 @@
[constants]
prefix = 'x86_64-w64-mingw32'
[binaries]
c = prefix + '-gcc'
cpp = prefix + '-g++'
strip = prefix + '-strip'
windres = prefix + '-windres'
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'

216
.github/prepare.py vendored
View File

@ -1,216 +0,0 @@
import datetime
import json
import os
import re
import subprocess
import sys
ref = os.getenv('GITHUB_REF')
event_name = os.getenv('GITHUB_EVENT_NAME')
publish_hostport = os.getenv('PUBLISH_HOSTPORT')
def set_output(key, value):
with open(os.getenv('GITHUB_OUTPUT'), 'a') as f:
f.write(f"{key}={value}\n")
match_stable = re.fullmatch(r'refs/tags/v([0-9]+)\.([0-9]+)\.([0-9]+)', ref)
match_beta = re.fullmatch(r'refs/tags/v([0-9]+)\.([0-9]+)\.([0-9]+)b', ref)
match_snapshot = re.fullmatch(r'refs/tags/snapshot-([0-9]+)', ref)
match_tptlibsdev = re.fullmatch(r'refs/heads/tptlibsdev-(.*)', ref)
match_alljobs = re.fullmatch(r'refs/heads/(.*)-alljobs', ref)
do_release = False
do_priority = 10
if event_name == 'pull_request':
do_priority = 0
if match_stable:
release_type = 'stable'
release_name = 'v%s.%s.%s' % (match_stable.group(1), match_stable.group(2), match_stable.group(3))
do_release = True
do_priority = 0
elif match_beta:
release_type = 'beta'
release_name = 'v%s.%s.%sb' % (match_beta.group(1), match_beta.group(2), match_beta.group(3))
do_release = True
do_priority = 0
elif match_snapshot:
release_type = 'snapshot'
release_name = 'snapshot-%s' % match_snapshot.group(1)
do_release = True
do_priority = 0
elif match_tptlibsdev:
release_type = 'tptlibsdev'
release_name = 'tptlibsdev-%s' % match_tptlibsdev.group(1)
do_priority = 0
else:
release_type = 'dev'
release_name = 'dev'
if match_alljobs:
do_priority = 0
do_publish = publish_hostport and do_release
set_output('release_type', release_type)
set_output('release_name', release_name)
subprocess.run([ 'meson', 'setup', '-Dprepare=true', 'build-prepare' ], check = True)
build_options = {}
with open('build-prepare/meson-info/intro-buildoptions.json') as f:
for option in json.loads(f.read()):
build_options[option['name']] = option['value']
if int(build_options['mod_id']) == 0 and os.path.exists('.github/mod_id.txt'):
with open('.github/mod_id.txt') as f:
build_options['mod_id'] = f.read()
if int(build_options['mod_id']) == 0:
if release_type == 'stable':
pass
elif release_type == 'beta':
build_options['app_name' ] += ' Beta'
build_options['app_comment'] += ' - Beta'
build_options['app_exe' ] += 'beta'
build_options['app_id' ] += 'beta'
elif release_type == 'snapshot':
build_options['app_name' ] += ' Snapshot'
build_options['app_comment'] += ' - Snapshot'
build_options['app_exe' ] += 'snapshot'
build_options['app_id' ] += 'snapshot'
else:
build_options['app_name' ] += ' Dev'
build_options['app_comment'] += ' - Dev'
build_options['app_exe' ] += 'dev'
build_options['app_id' ] += 'dev'
set_output('mod_id' , build_options['mod_id' ])
set_output('app_name' , build_options['app_name' ])
set_output('app_comment', build_options['app_comment'])
set_output('app_exe' , build_options['app_exe' ])
set_output('app_id' , build_options['app_id' ])
set_output('app_data' , build_options['app_data' ])
set_output('app_vendor' , build_options['app_vendor' ])
app_exe = build_options['app_exe']
app_name = build_options['app_name']
app_name_slug = re.sub('[^A-Za-z0-9]', '_', app_name)
build_matrix = []
publish_matrix = []
# consider disabling line wrapping to edit this monstrosity
for arch, platform, libc, statdyn, bplatform, runson, suffix, publish, artifact, dbgsuffix, mode, starcatcher, dbgrel, priority in [
( 'x86_64', 'linux', 'gnu', 'static', 'linux', 'ubuntu-20.04', '', False, False, None, None, None, 'debug', 0 ), # priority = 0: static debug build
( 'x86_64', 'linux', 'gnu', 'static', 'linux', 'ubuntu-20.04', '', True, True, '.dbg', None, 'x86_64-lin-gcc-static', 'release', 10 ),
( 'x86_64', 'linux', 'gnu', 'static', 'linux', 'ubuntu-20.04', '', False, True, '.dbg', 'appimage', None, 'release', 0 ), # priority = 0: appimage release
( 'x86_64', 'linux', 'gnu', 'dynamic', 'linux', 'ubuntu-20.04', '', False, False, None, None, None, 'debug', 10 ),
( 'x86_64', 'linux', 'gnu', 'dynamic', 'linux', 'ubuntu-20.04', '', False, False, None, 'nohttp', None, 'debug', 10 ),
( 'x86_64', 'linux', 'gnu', 'dynamic', 'linux', 'ubuntu-20.04', '', False, False, None, 'nolua', None, 'debug', 10 ),
( 'x86_64', 'linux', 'gnu', 'dynamic', 'linux', 'ubuntu-20.04', '', False, False, None, None, None, 'release', 10 ),
# ( 'x86_64', 'windows', 'mingw', 'static', 'linux', 'ubuntu-20.04', '', False, False, None, None, None, 'debug', 10 ), # ubuntu-20.04 doesn't have windows TLS headers somehow and I haven't yet figured out how to get them; worse, it's a different toolchain
# ( 'x86_64', 'windows', 'mingw', 'static', 'linux', 'ubuntu-20.04', '', False, True, '.dbg', None, None, 'release', 10 ), # ubuntu-20.04 doesn't have windows TLS headers somehow and I haven't yet figured out how to get them; worse, it's a different toolchain
# ( 'x86_64', 'windows', 'mingw', 'dynamic', 'linux', 'ubuntu-20.04', '', False, False, None, None, None, 'debug', 10 ), # ubuntu-20.04 doesn't have ucrt64-capable mingw >_>
# ( 'x86_64', 'windows', 'mingw', 'dynamic', 'linux', 'ubuntu-20.04', '', False, False, None, None, None, 'release', 10 ), # ubuntu-20.04 doesn't have ucrt64-capable mingw >_>
( 'x86_64', 'windows', 'mingw', 'static', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug', 0 ), # priority = 0: static debug build
( 'x86_64', 'windows', 'mingw', 'static', 'windows', 'windows-2019', '.exe', False, True, '.dbg', None, None, 'release', 10 ),
( 'x86_64', 'windows', 'mingw', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug', 10 ),
( 'x86_64', 'windows', 'mingw', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'release', 10 ),
( 'x86_64', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug', 0 ), # priority = 0: static debug build
( 'x86_64', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', True, True, '.pdb', None,'x86_64-win-msvc-static', 'release', 10 ),
( 'x86_64', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug', 10 ),
# ( 'x86_64', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, 'backendvs', None, 'debug', 0 ), # priority = 0: backend=vs build
( 'x86_64', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'release', 10 ),
( 'x86', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug', 0 ), # priority = 0: static debug build
( 'x86', 'windows', 'msvc', 'static', 'windows', 'windows-2019', '.exe', True, True, '.pdb', None, 'i686-win-msvc-static', 'release', 10 ),
( 'x86', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'debug', 10 ),
( 'x86', 'windows', 'msvc', 'dynamic', 'windows', 'windows-2019', '.exe', False, False, None, None, None, 'release', 10 ),
( 'x86_64', 'darwin', 'macos', 'static', 'darwin', 'macos-12', '.dmg', False, False, None, 'dmg', None, 'debug', 0 ), # priority = 0: static debug build
( 'x86_64', 'darwin', 'macos', 'static', 'darwin', 'macos-12', '.dmg', True, True, None, 'dmg', 'x86_64-mac-gcc-static', 'release', 10 ), # I have no idea how to separate debug info on macos
( 'x86_64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-12', '.dmg', False, False, None, 'dmg', None, 'debug', 10 ),
( 'x86_64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-12', '.dmg', False, False, None, 'dmg', None, 'release', 10 ),
( 'aarch64', 'darwin', 'macos', 'static', 'darwin', 'macos-12', '.dmg', False, False, None, 'dmg', None, 'debug', 0 ), # priority = 0: static debug build
( 'aarch64', 'darwin', 'macos', 'static', 'darwin', 'macos-12', '.dmg', True, True, None, 'dmg', 'arm64-mac-gcc-static', 'release', 10 ),
# ( 'aarch64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-12', '.dmg', False, False, None, 'dmg', None, 'debug', 10 ), # macos-11.0 is x86_64 and I haven't yet figured out how to get homebrew to install aarch64 libs on x86_64
# ( 'aarch64', 'darwin', 'macos', 'dynamic', 'darwin', 'macos-12', '.dmg', False, False, None, 'dmg', None, 'release', 10 ), # macos-11.0 is x86_64 and I haven't yet figured out how to get homebrew to install aarch64 libs on x86_64
( 'x86', 'android', 'bionic', 'static', 'linux', 'ubuntu-20.04', '.apk', False, False, None, None, None, 'debug', 0 ), # priority = 0: rarely used debug build
( 'x86', 'android', 'bionic', 'static', 'linux', 'ubuntu-20.04', '.apk', True, True, '.dbg', None, 'i686-and-gcc-static', 'release', 10 ),
( 'x86_64', 'android', 'bionic', 'static', 'linux', 'ubuntu-20.04', '.apk', False, False, None, None, None, 'debug', 0 ), # priority = 0: rarely used debug build
( 'x86_64', 'android', 'bionic', 'static', 'linux', 'ubuntu-20.04', '.apk', True, True, '.dbg', None, 'x86_64-and-gcc-static', 'release', 10 ),
( 'arm', 'android', 'bionic', 'static', 'linux', 'ubuntu-20.04', '.apk', False, False, None, None, None, 'debug', 0 ), # priority = 0: rarely used debug build
( 'arm', 'android', 'bionic', 'static', 'linux', 'ubuntu-20.04', '.apk', True, True, '.dbg', None, 'arm-and-gcc-static', 'release', 10 ),
( 'aarch64', 'android', 'bionic', 'static', 'linux', 'ubuntu-20.04', '.apk', False, False, None, None, None, 'debug', 0 ), # priority = 0: rarely used debug build
( 'aarch64', 'android', 'bionic', 'static', 'linux', 'ubuntu-20.04', '.apk', True, True, '.dbg', None, 'arm64-and-gcc-static', 'release', 10 ),
( 'wasm32', 'emscripten', 'emscripten', 'static', 'linux', 'ubuntu-20.04', '.tar', False, False, None, None, None, 'debug', 0 ), # priority = 0: rarely used debug build
( 'wasm32', 'emscripten', 'emscripten', 'static', 'linux', 'ubuntu-20.04', '.tar', True, True, None, 'emscripten', 'wasm32-ems-static', 'release', 10 ), # I have no idea how to separate debug info on emscripten
]:
if priority < do_priority:
continue
job_name = f'build'
if starcatcher:
job_name += f'+target=starcatcher-{starcatcher}'
else:
job_name += f'+target={arch}-{platform}-{libc}-{statdyn}-{dbgrel}'
if mode:
job_name += f'+mode={mode}'
if bplatform != platform:
job_name += f'+bplatform={bplatform}'
if not mode:
mode = 'default'
separate_debug = True
if not dbgsuffix:
dbgsuffix = 'BOGUS'
separate_debug = False
if not starcatcher:
starcatcher = 'BOGUS'
if publish:
assert artifact
if dbgrel != 'release':
assert not publish
assert not artifact
asset_path = f'{app_exe}{suffix}'
asset_name = f'{app_exe}-{release_name}-{arch}-{platform}-{libc}{suffix}'
debug_asset_path = f'{app_exe}{dbgsuffix}'
debug_asset_name = f'{app_exe}-{release_name}-{arch}-{platform}-{libc}{dbgsuffix}'
if mode == 'appimage':
asset_path = f'{app_name_slug}-{arch}.AppImage'
asset_name = f'{app_name_slug}-{arch}.AppImage'
debug_asset_path = f'{app_name_slug}-{arch}.AppImage.dbg'
debug_asset_name = f'{app_name_slug}-{arch}.AppImage.dbg'
starcatcher_name = f'powder-{release_name}-{starcatcher}{suffix}'
msys2_bash = (bplatform == 'windows' and libc == 'mingw')
shell = 'bash'
if msys2_bash:
shell = 'msys2 {0}'
build_matrix.append({
'bsh_build_platform': bplatform, # part of the unique portion of the matrix
'bsh_host_arch': arch, # part of the unique portion of the matrix
'bsh_host_platform': platform, # part of the unique portion of the matrix
'bsh_host_libc': libc, # part of the unique portion of the matrix
'bsh_static_dynamic': statdyn, # part of the unique portion of the matrix
'bsh_debug_release': dbgrel, # part of the unique portion of the matrix
'runs_on': runson,
'force_msys2_bash': msys2_bash and 'yes' or 'no',
'package_suffix': suffix,
'package_mode': mode,
'publish': publish and 'yes' or 'no',
'artifact': artifact and 'yes' or 'no',
'separate_debug': separate_debug and 'yes' or 'no',
'asset_path': asset_path,
'asset_name': asset_name,
'debug_asset_path': debug_asset_path,
'debug_asset_name': debug_asset_name,
'job_name': job_name,
'shell': shell,
})
if publish:
publish_matrix.append({
'bsh_build_platform': bplatform, # part of the unique portion of the matrix
'bsh_host_arch': arch, # part of the unique portion of the matrix
'bsh_host_platform': platform, # part of the unique portion of the matrix
'bsh_host_libc': libc, # part of the unique portion of the matrix
'bsh_static_dynamic': statdyn, # part of the unique portion of the matrix
'asset_path': asset_path,
'asset_name': asset_name,
'starcatcher_name': starcatcher_name,
})
set_output('build_matrix', json.dumps({ 'include': build_matrix }))
set_output('publish_matrix', json.dumps({ 'include': publish_matrix }))
set_output('do_release', do_release and 'yes' or 'no')
set_output('do_publish', do_publish and 'yes' or 'no')

View File

@ -1,20 +1,5 @@
#!/usr/bin/env bash
#!/bin/sh
set -euo pipefail
IFS=$'\n\t'
cat << NETRC > ~/.netrc
machine $(echo $PUBLISH_HOSTPORT | cut -d ':' -f 1)
login $PUBLISH_USERNAME
password $PUBLISH_PASSWORD
NETRC
chmod 660 ~/.netrc
mountpoint=ftpmnt
mkdir $mountpoint
curlftpfs "$PUBLISH_HOSTPORT" $mountpoint -o ssl,ciphers='ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-GCM-SHA256:TLS_AES_256_GCM_SHA384:TLS_CHACHA20_POLY1305_SHA256:TLS_AES_128_GCM_SHA256:TLS_AES_128_CCM_8_SHA256:TLS_AES_128_CCM_SHA256'
if [[ -z ${PUBLISH_ACCESSCHECK-} ]]; then
cp $PUBLISH_FILENAME $mountpoint/${PUBLISH_DIRECTORY:-.}/
fi
fusermount -u $mountpoint
rmdir $mountpoint
cd "$STARCATCHER_PUBLISH_FILENAME"
mv "$1" "$STARCATCHER_PUBLISH_FILENAME"
LFTP_PASSWORD=$STARCATCHER_PUBLISH_PASSWORD lftp -c "open --user '$STARCATCHER_PUBLISH_USERNAME' --env-password -e 'set ftp:ssl-protect-data true; set ssl:verify-certificate false; put \"$STARCATCHER_PUBLISH_FILENAME\";' ftp://$STARCATCHER_PUBLISH_HOSTPORT"

View File

@ -1,10 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
curl "https://starcatcher.us/TPT/perform-release.lua?mod=$MOD_ID&type=$RELEASE_TYPE&name=$RELEASE_NAME&commit=$GITHUB_SHA" > perform_release
if ! grep "Release complete" < perform_release > /dev/null; then
cat perform_release
exit 1
fi

View File

@ -1,12 +0,0 @@
set -euo pipefail
IFS=$'\t\n'
temp=.temp
mkdir $temp
cp $ASSET_PATH $temp/$ASSET_NAME
(
cd $temp
gh release upload $GITHUB_REF_NAME $ASSET_NAME
)
rm -r $temp
echo browser_download_url=https://github.com/$GITHUB_REPOSITORY/releases/download/$GITHUB_REF_NAME/$ASSET_NAME >> $GITHUB_OUTPUT

31
.github/vs-env.sh vendored
View File

@ -1,31 +0,0 @@
set -euo pipefail
IFS=$'\t\n'
IFS=$'\t\n\r'
for i in $("$(env | grep '^ProgramFiles(x86)=' | cut -d = -f 2-)/Microsoft Visual Studio/Installer/vswhere.exe" \
-sort \
-prerelease \
-requiresAny \
-requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 \
-requires Microsoft.VisualStudio.Workload.WDExpress \
-products \* \
-utf8 \
-property installationPath); do
if ! [ -z ${VS_ENV_FILTER-} ]; then
if ! echo $i | grep $VS_ENV_FILTER >/dev/null; then
continue
fi
fi
vs_install_dir=$i
break
done
IFS=$'\t\n'
for i in $(MSYS_NO_PATHCONV=1 cmd /c "$vs_install_dir\\VC\\Auxiliary\\Build\\vcvarsall.bat" $VS_ENV_PARAMS \& env \& exit /b); do
set +e
export "$i" 2>/dev/null
echo $i | grep ERROR
set -e
done
cl

View File

@ -7,176 +7,191 @@ on:
tags:
- 'v*.*'
- 'snapshot-*'
- 'tptlibsdev-*'
pull_request:
branches:
- '*'
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
do_release: ${{ steps.prepare.outputs.do_release }}
build_matrix: ${{ steps.prepare.outputs.build_matrix }}
publish_matrix: ${{ steps.prepare.outputs.publish_matrix }}
release_type: ${{ steps.prepare.outputs.release_type }}
release_name: ${{ steps.prepare.outputs.release_name }}
mod_id: ${{ steps.prepare.outputs.mod_id }}
app_name: ${{ steps.prepare.outputs.app_name }}
app_comment: ${{ steps.prepare.outputs.app_comment }}
app_exe: ${{ steps.prepare.outputs.app_exe }}
app_id: ${{ steps.prepare.outputs.app_id }}
app_data: ${{ steps.prepare.outputs.app_data }}
app_vendor: ${{ steps.prepare.outputs.app_vendor }}
do_publish: ${{ steps.prepare.outputs.do_publish }}
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- run: python -m pip install meson==1.2.3 ninja # TODO: go back to using latest meson once https://github.com/mesonbuild/meson/pull/12544 is live
- id: prepare
run: python ./.github/prepare.py
env:
PUBLISH_HOSTPORT: ${{ secrets.STARCATCHER_PUBLISH_HOSTPORT }}
GITHUB_REF: ${{ github.ref }}
- if: steps.prepare.outputs.do_publish == 'yes'
run: sudo apt update && sudo apt install curlftpfs && bash -c './.github/starcatcher-publish.sh'
env:
PUBLISH_HOSTPORT: ${{ secrets.STARCATCHER_PUBLISH_HOSTPORT }}
PUBLISH_USERNAME: ${{ secrets.STARCATCHER_PUBLISH_USERNAME }}
PUBLISH_PASSWORD: ${{ secrets.STARCATCHER_PUBLISH_PASSWORD }}
PUBLISH_ACCESSCHECK: yes
- if: steps.prepare.outputs.do_release == 'yes'
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
RELEASE_NAME: ${{ steps.prepare.outputs.release_name }}
run: bash -c './.github/create-release.sh'
build:
runs-on: ${{ matrix.runs_on }}
name: ${{ matrix.job_name }}
needs: [prepare]
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.prepare.outputs.build_matrix) }}
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- if: matrix.force_msys2_bash == 'yes'
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
path-type: strict
cache: true
# this list doesn't have to mirror the one in build.sh perfectly
# but the packages listed here get cached properly and take less time to install
install: >-
git
curl
mingw-w64-ucrt-x86_64-gcc
mingw-w64-ucrt-x86_64-pkgconf
mingw-w64-ucrt-x86_64-bzip2
mingw-w64-ucrt-x86_64-luajit
mingw-w64-ucrt-x86_64-jsoncpp
mingw-w64-ucrt-x86_64-curl
mingw-w64-ucrt-x86_64-SDL2
mingw-w64-ucrt-x86_64-libpng
mingw-w64-ucrt-x86_64-meson
mingw-w64-ucrt-x86_64-python
mingw-w64-ucrt-x86_64-python-pip
mingw-w64-ucrt-x86_64-fftw
mingw-w64-ucrt-x86_64-cmake
mingw-w64-ucrt-x86_64-7zip
mingw-w64-ucrt-x86_64-jq
patch
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- if: matrix.force_msys2_bash != 'yes'
uses: actions/setup-python@v5
with:
python-version: '3.10'
- if: matrix.force_msys2_bash != 'yes'
run: python -m pip install meson==1.2.3 ninja # TODO: go back to using latest meson once https://github.com/mesonbuild/meson/pull/12544 is live
- if: matrix.bsh_build_platform == 'darwin'
run: brew install bash coreutils
- run: bash -c './.github/build.sh'
env:
BSH_HOST_ARCH: ${{ matrix.bsh_host_arch }}
BSH_HOST_PLATFORM: ${{ matrix.bsh_host_platform }}
BSH_HOST_LIBC: ${{ matrix.bsh_host_libc }}
BSH_STATIC_DYNAMIC: ${{ matrix.bsh_static_dynamic }}
BSH_BUILD_PLATFORM: ${{ matrix.bsh_build_platform }}
BSH_DEBUG_RELEASE: ${{ matrix.bsh_debug_release }}
RELEASE_NAME: ${{ needs.prepare.outputs.release_name }}
RELEASE_TYPE: ${{ needs.prepare.outputs.release_type }}
MOD_ID: ${{ needs.prepare.outputs.mod_id }}
APP_NAME: ${{ needs.prepare.outputs.app_name }}
APP_COMMENT: ${{ needs.prepare.outputs.app_comment }}
APP_EXE: ${{ needs.prepare.outputs.app_exe }}
APP_ID: ${{ needs.prepare.outputs.app_id }}
APP_DATA: ${{ needs.prepare.outputs.app_data }}
APP_VENDOR: ${{ needs.prepare.outputs.app_vendor }}
SEPARATE_DEBUG: ${{ matrix.separate_debug }}
PACKAGE_MODE: ${{ matrix.package_mode }}
ASSET_PATH: ${{ matrix.asset_path }}
DEBUG_ASSET_PATH: ${{ matrix.debug_asset_path }}
- if: needs.prepare.outputs.do_release == 'yes' && matrix.publish == 'yes' # TODO-NTL: ship licenses
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ASSET_PATH: build/${{ matrix.asset_path }}
ASSET_NAME: ${{ matrix.asset_name }}
run: bash -c './.github/upload-release-asset.sh'
- if: needs.prepare.outputs.do_release == 'yes' && matrix.publish == 'yes' && matrix.separate_debug == 'yes'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ASSET_PATH: build/${{ matrix.debug_asset_path }}
ASSET_NAME: ${{ matrix.debug_asset_name }}
run: bash -c './.github/upload-release-asset.sh'
- uses: actions/upload-artifact@v4
if: matrix.artifact == 'yes'
with:
path: build/${{ matrix.asset_path }}
name: ${{ matrix.asset_name }}
- uses: actions/upload-artifact@v4
if: matrix.artifact == 'yes' && matrix.separate_debug == 'yes'
with:
path: build/${{ matrix.debug_asset_path }}
name: ${{ matrix.debug_asset_name }}
publish:
runs-on: ubuntu-latest
needs: [build, prepare]
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.prepare.outputs.publish_matrix) }}
if: needs.prepare.outputs.do_publish == 'yes'
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: ${{ matrix.asset_name }}
- run: mv ${{ matrix.asset_path }} ${{ matrix.starcatcher_name }}
- run: sudo apt update && sudo apt install curlftpfs && bash -c './.github/starcatcher-publish.sh'
env:
PUBLISH_HOSTPORT: ${{ secrets.STARCATCHER_PUBLISH_HOSTPORT }}
PUBLISH_USERNAME: ${{ secrets.STARCATCHER_PUBLISH_USERNAME }}
PUBLISH_PASSWORD: ${{ secrets.STARCATCHER_PUBLISH_PASSWORD }}
PUBLISH_DIRECTORY: ${{ secrets.STARCATCHER_PUBLISH_DIRECTORY }}
PUBLISH_FILENAME: ${{ matrix.starcatcher_name }}
release:
runs-on: ubuntu-latest
needs: [build, publish, prepare]
if: needs.prepare.outputs.do_publish == 'yes'
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- run: ./.github/starcatcher-release.sh
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- id: get_type
run: python3 ./.github/get-type.py ${{ github.ref }}
- id: create_release
if: steps.get_type.outputs.TYPE != 'dev'
uses: actions/create-release@v1
env:
RELEASE_NAME: ${{ needs.prepare.outputs.release_name }}
RELEASE_TYPE: ${{ needs.prepare.outputs.release_type }}
MOD_ID: ${{ needs.prepare.outputs.mod_id }}
GITHUB_SHA: ${{ github.sha }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ steps.get_type.outputs.NAME }}
draft: true
prerelease: false
- run: echo "${{ steps.create_release.outputs.upload_url }}" > release_url.txt
- uses: actions/upload-artifact@v1
with:
name: release_url
path: release_url.txt
build:
runs-on: ${{ matrix.os }}
needs: [release]
strategy:
matrix:
# | lin-x86_64 | mac-x86_64 | win-x86_64 | lin-i686 | mac-i686 | win-i686 |
# --------------+------------+------------+------------+------------+------------+------------+
# gcc-static | | | NO | NO | NO | NO |
# msvc-static | NO | NO | | NO | NO | |
# mingw-static | NO | NO | NO | NO | NO | NO [1] |
# gcc-dynamic | | | NO | NO | NO | NO |
# msvc-dynamic | NO | NO | | NO | NO | |
# mingw-dynamic | NO | NO | NO | NO | NO | NO |
#
# [1] I don't currently care enough about mingw to figure out how to do this.
# Please keep this matrix in sync with the other one in this file, see the ### blocks.
#########################################################
############# BEGIN BLOCK FOR COPYING BELOW #############
#########################################################
platform_short: [lin, mac, win]
toolset_short: [gcc, msvc, mingw]
machine_short: [x86_64, i686]
static_dynamic: [static, dynamic]
exclude:
- toolset_short: mingw
- machine_short: i686
platform_short: lin
- machine_short: i686
platform_short: mac
- toolset_short: msvc
platform_short: lin
- toolset_short: msvc
platform_short: mac
- toolset_short: gcc
platform_short: win
#########################################################
############## END BLOCK FOR COPYING BELOW ##############
#########################################################
include:
- platform_short: lin
os: ubuntu-latest
suffix: ''
- platform_short: mac
os: macos-latest
suffix: ''
- platform_short: win
os: windows-latest
suffix: '.exe'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- id: get_type
run: python3 ./.github/get-type.py ${{ github.ref }}
- uses: actions/download-artifact@v1
with:
name: release_url
- id: get_release_info
if: steps.get_type.outputs.TYPE != 'dev'
run: bash -c "./.github/get-release-info.sh" ## gg github, this is terrible
- if: matrix.platform_short == 'mac'
uses: Homebrew/actions/setup-homebrew@master
- if: matrix.platform_short == 'mac'
run: brew install pkg-config
- if: matrix.platform_short == 'mac' && matrix.static_dynamic != 'static'
run: brew install luajit curl fftw zlib sdl2
- if: matrix.platform_short == 'lin' && matrix.static_dynamic != 'static'
run: sudo apt update && sudo apt install libluajit-5.1-dev libcurl4-openssl-dev libfftw3-dev zlib1g-dev libsdl2-dev
- run: python3 -m pip install meson ninja
- run: bash -c './.github/build.sh'
env:
PLATFORM_SHORT: ${{ matrix.platform_short }}
MACHINE_SHORT: ${{ matrix.machine_short }}
TOOLSET_SHORT: ${{ matrix.toolset_short }}
STATIC_DYNAMIC: ${{ matrix.static_dynamic }}
RELNAME: ${{ steps.get_type.outputs.NAME }}
RELTYPE: ${{ steps.get_type.outputs.TYPE }}
MOD_ID: ${{ steps.get_type.outputs.MOD_ID }}
- uses: actions/upload-release-asset@v1
if: steps.get_type.outputs.TYPE != 'dev' && matrix.static_dynamic == 'static'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.get_release_info.outputs.upload_url }}
asset_path: powder${{ matrix.suffix }}
asset_name: powder-${{ steps.get_type.outputs.NAME }}-${{ matrix.machine_short }}-${{ matrix.platform_short }}-${{ matrix.toolset_short }}-${{ matrix.static_dynamic }}${{ matrix.suffix }}
asset_content_type: application/zip
- uses: actions/upload-artifact@v2
if: matrix.static_dynamic == 'static'
with:
path: powder${{ matrix.suffix }}
name: powder-${{ steps.get_type.outputs.NAME }}-${{ matrix.machine_short }}-${{ matrix.platform_short }}-${{ matrix.toolset_short }}-${{ matrix.static_dynamic }}${{ matrix.suffix }}
starcatcher-upload:
runs-on: ubuntu-latest
needs: [build]
if: startsWith(github.ref, 'refs/tags/') # not a perfect match but get-type.py takes care of this in job build
strategy:
matrix:
#########################################################
############# BEGIN BLOCK COPIED FROM ABOVE #############
#########################################################
platform_short: [lin, mac, win]
toolset_short: [gcc, msvc, mingw]
machine_short: [x86_64, i686]
static_dynamic: [static, dynamic]
exclude:
- toolset_short: mingw
- machine_short: i686
platform_short: lin
- machine_short: i686
platform_short: mac
- toolset_short: msvc
platform_short: lin
- toolset_short: msvc
platform_short: mac
- toolset_short: gcc
platform_short: win
#########################################################
############## END BLOCK COPIED FROM ABOVE ##############
#########################################################
- static_dynamic: dynamic
include:
- platform_short: lin
suffix: ''
- platform_short: mac
suffix: ''
- platform_short: win
suffix: '.exe'
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- id: get_type
run: python3 ./.github/get-type.py ${{ github.ref }}
- uses: actions/download-artifact@v1
with:
name: powder-${{ steps.get_type.outputs.NAME }}-${{ matrix.machine_short }}-${{ matrix.platform_short }}-${{ matrix.toolset_short }}-${{ matrix.static_dynamic }}${{ matrix.suffix }}
- run: sudo apt update && sudo apt install lftp
- if: steps.get_type.outputs.TYPE != 'dev' && matrix.static_dynamic == 'static'
run: bash -c './.github/starcatcher-publish.sh powder${{ matrix.suffix }}'
env:
STARCATCHER_PUBLISH_HOSTPORT: ${{ secrets.STARCATCHER_PUBLISH_HOSTPORT }}
STARCATCHER_PUBLISH_USERNAME: ${{ secrets.STARCATCHER_PUBLISH_USERNAME }}
STARCATCHER_PUBLISH_PASSWORD: ${{ secrets.STARCATCHER_PUBLISH_PASSWORD }}
STARCATCHER_PUBLISH_FILENAME: powder-${{ steps.get_type.outputs.NAME }}-${{ matrix.machine_short }}-${{ matrix.platform_short }}-${{ matrix.toolset_short }}-${{ matrix.static_dynamic }}${{ matrix.suffix }}
starcatcher-release:
runs-on: ubuntu-latest
needs: [starcatcher-upload]
if: startsWith(github.ref, 'refs/tags/') # not a perfect match but get-type.py takes care of this in job build
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.8'
- id: get_type
run: python3 ./.github/get-type.py ${{ github.ref }}
- run: curl "https://starcatcher.us/TPT/perform-release.lua?mod=${{ steps.get_type.outputs.MOD_ID }}&type=${{ steps.get_type.outputs.TYPE }}&name=${{ steps.get_type.outputs.NAME }}&commit=${{ github.sha }}" | grep "Release complete"

3
.gitignore vendored
View File

@ -90,5 +90,4 @@ screenshot_*
*.opensdf
*.sdf
/font/
compile_commands.json
ignore/

View File

@ -1,4 +1,4 @@
The Powder Toy - April 2024
The Powder Toy - February 2020
==========================
Get the latest version [from the Powder Toy website](https://powdertoy.co.uk/Download.html).
@ -10,7 +10,7 @@ Have you ever wanted to blow something up? Or maybe you always dreamt of operati
The Powder Toy is a free physics sandbox game, which simulates air pressure and velocity, heat, gravity and a countless number of interactions between different substances! The game provides you with various building materials, liquids, gases and electronic components which can be used to construct complex machines, guns, bombs, realistic terrains and almost anything else. You can then mine them and watch cool explosions, add intricate wirings, play with little stickmen or operate your machine. You can browse and play thousands of different saves made by the community or upload your own we welcome your creations!
There is a Lua API you can automate your work or even make plugins for the game. The Powder Toy is free and the source code is distributed under the GNU General Public License, so you can modify the game yourself or help with development.
There is a Lua API you can automate your work or even make plugins for the game. The Powder Toy is free and the source code is distributed under the GNU General Public License, so you can modify the game yourself or help with development. TPT is compiled using scons.
Build instructions
===========================================================================
@ -25,7 +25,7 @@ Thanks
* Skresanov Savely
* cracker64
* Catelite
* Victoria Hoyle
* Bryan Hoyle
* Nathan Cousins
* jacksonmj
* Felix Wallin
@ -45,11 +45,10 @@ Libraries and other assets used
* [FFTW](http://fftw.org/)
* [JsonCpp](https://github.com/open-source-parsers/jsoncpp)
* [libcurl](https://curl.se/libcurl/)
* [libpng](http://www.libpng.org/pub/png/libpng.html)
* [Lua](https://www.lua.org/)
* [LuaJIT](https://luajit.org/)
* [LuaSocket](http://w3.impa.br/~diego/software/luasocket/)
* [Mallangche](https://github.com/JammPark/Mallangche)
* [mbedtls](https://www.trustedfirmware.org/projects/mbed-tls/)
* [SDL](https://libsdl.org/)
* [zlib](https://www.zlib.net/)
@ -58,6 +57,7 @@ Instructions
Click on the elements with the mouse and draw in the field, like in MS Paint. The rest of the game is learning what happens next.
Controls
===========================================================================
@ -82,7 +82,6 @@ Controls
| I | Invert Pressure and Velocity map |
| W | Cycle gravity modes (use with Ctrl when STK2 is out) |
| Y | Cycle air modes |
| Ctrl + E | Cycle edge modes |
| B | Enter decoration editor menu |
| Ctrl + B | Toggle decorations on/off |
| N | Toggle Newtonian Gravity on/off |
@ -108,13 +107,14 @@ Controls
| Shift + R | Horizontal mirror for selected area when pasting stamps |
| Ctrl + Shift + R | Vertical mirror for selected area when pasting stamps |
| R | Rotate selected area counterclockwise when pasting stamps |
| F11 | Toggle fullscreen |
Command Line
---------------------------------------------------------------------------
| Command | Description | Example |
| --------------------- | ------------------------------------------------ | --------------------------------------------|
| --------------------- | ------------------------------------------------ | --------------------------------- |
| `scale:SIZE` | Change window scale factor | `scale:2` |
| `kiosk` | Fullscreen mode | |
| `proxy:SERVER[:PORT]` | Proxy server to use | `proxy:wwwcache.lancs.ac.uk:8080` |
@ -122,7 +122,4 @@ Command Line
| `ddir DIRECTORY` | Directory used for saving stamps and preferences | |
| `ptsave:SAVEID` | Open online save, used by ptsave: URLs | `ptsave:2198` |
| `disable-network` | Disables internet connections | |
| `disable-bluescreen` | Disable bluescreen handler | |
| `redirect` | Redirects output to stdout.txt / stderr.txt | |
| `cafile:CAFILE` | Set certificate bundle path | `cafile:/etc/ssl/certs/ca-certificates.crt` |
| `capath:CAPATH` | Set certificate directory path | `capath:/etc/ssl/certs` |

View File

@ -1,69 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
package="@APPID@"
android:versionCode="@BUILD_NUM@"
android:versionName="@DISPLAY_VERSION_MAJOR@.@DISPLAY_VERSION_MINOR@.@BUILD_NUM@"
android:installLocation="auto"
>
<uses-sdk
android:minSdkVersion="21"
android:targetSdkVersion="30"
/>
<uses-feature
android:glEsVersion="0x00020000"
/>
<uses-feature
android:name="android.hardware.touchscreen"
android:required="false"
/>
<uses-feature
android:name="android.hardware.bluetooth"
android:required="false"
/>
<uses-feature
android:name="android.hardware.gamepad"
android:required="false"
/>
<uses-feature
android:name="android.hardware.usb.host"
android:required="false"
/>
<uses-feature
android:name="android.hardware.type.pc"
android:required="false"
/>
@ANDROID_PERMISSIONS@
<application
android:label="@string/app_name"
android:icon="@mipmap/ic_launcher"
android:allowBackup="true"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:hardwareAccelerated="true"
@ANDROID_PROPERTIES@
>
<activity
android:name=".PowderActivity"
android:screenOrientation="landscape"
android:label="@string/app_name"
android:alwaysRetainTaskState="true"
android:launchMode="singleInstance"
android:configChanges="layoutDirection|locale|orientation|uiMode|screenLayout|screenSize|smallestScreenSize|keyboard|keyboardHidden|navigation"
android:preferMinimalPostProcessing="true"
android:exported="true"
>
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
<!-- <intent-filter>
<action android:name="android.hardware.usb.action.USB_DEVICE_ATTACHED" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter> -->
</activity>
</application>
</manifest>

View File

@ -1,42 +0,0 @@
package @APPID@;
import org.libsdl.app.SDLActivity;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.util.Enumeration;
import java.io.IOException;
import java.util.Base64;
public class PowderActivity extends SDLActivity
{
public static String getCertificateBundle()
{
String allPems = "";
try {
KeyStore ks = KeyStore.getInstance("AndroidCAStore");
if (ks != null) {
ks.load(null, null);
Enumeration<String> aliases = ks.aliases();
while (aliases.hasMoreElements()) {
String alias = (String)aliases.nextElement();
java.security.cert.X509Certificate cert = (java.security.cert.X509Certificate)ks.getCertificate(alias);
allPems += "-----BEGIN CERTIFICATE-----\n" + Base64.getMimeEncoder().encodeToString(cert.getEncoded()) + "\n-----END CERTIFICATE-----\n";;
}
}
} catch (IOException e) {
e.printStackTrace();
return "";
} catch (KeyStoreException e) {
e.printStackTrace();
return "";
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
return "";
} catch (java.security.cert.CertificateException e) {
e.printStackTrace();
return "";
}
return allPems;
}
}

View File

@ -1,26 +0,0 @@
import os
import os.path
import subprocess
import sys
(
script,
zipalign,
build_dir,
unsigned_name,
unaligned_name,
) = sys.argv
unaligned_path = os.path.join(build_dir, unaligned_name)
unsigned_path = os.path.join(build_dir, unsigned_name)
if os.path.exists(unsigned_path):
os.remove(unsigned_path)
if subprocess.run([
zipalign,
'-f', '4',
unaligned_path,
unsigned_path,
]).returncode:
sys.exit(1)

View File

@ -1,104 +0,0 @@
import os
import os.path
import shutil
import subprocess
import sys
(
script,
d8,
aapt,
aapt2,
source_dir,
build_dir,
private_name,
unaligned_name,
sha_name,
android_jar,
sdl_jar,
powder_jar,
tpt_arch,
debug_release,
manifest_xml,
*resources,
) = sys.argv
if tpt_arch == 'x86':
android_arch = 'x86'
if tpt_arch == 'arm':
android_arch = 'armeabi-v7a'
if tpt_arch == 'aarch64':
android_arch = 'arm64-v8a'
if tpt_arch == 'x86_64':
android_arch = 'x86_64'
sha_packaged_name = 'libpowder.so'
manifest_path = os.path.join(build_dir, manifest_xml)
sha_path = os.path.join(build_dir, sha_name)
unaligned_path = os.path.join(build_dir, unaligned_name)
private_dir = os.path.join(build_dir, private_name)
arch_dir = os.path.join(private_dir, 'lib', android_arch)
sha_lib_path = os.path.join(arch_dir, sha_packaged_name)
flat_dir = os.path.join(private_dir, 'flat')
if os.path.exists(arch_dir):
shutil.rmtree(arch_dir)
os.makedirs(arch_dir)
if os.path.exists(sha_lib_path):
os.remove(sha_lib_path)
if os.path.exists(unaligned_path):
os.remove(unaligned_path)
if os.path.exists(flat_dir):
shutil.rmtree(flat_dir)
os.makedirs(flat_dir)
if subprocess.run([
aapt2,
'compile',
'-o', os.path.join(private_dir, 'flat'),
*resources,
], cwd = build_dir).returncode:
sys.exit(1)
aapt2_link_inputs = []
for root, dirs, files in os.walk(flat_dir):
for name in files:
if name.endswith(".flat"):
aapt2_link_inputs.append(os.path.join(root, name))
if subprocess.run([
aapt2,
'link',
'-o', unaligned_path,
'-I', android_jar,
'--manifest', manifest_path,
*aapt2_link_inputs,
]).returncode:
sys.exit(1)
shutil.copy(sha_path, sha_lib_path)
if subprocess.run([
aapt,
'add',
unaligned_path,
os.path.join('lib', android_arch, sha_packaged_name),
], cwd = private_dir).returncode:
sys.exit(1)
if subprocess.run([
d8,
os.path.join(build_dir, sdl_jar),
os.path.join(build_dir, powder_jar),
'--' + debug_release,
'--lib', android_jar,
'--min-api', '21',
], cwd = private_dir).returncode:
sys.exit(1)
if subprocess.run([
aapt,
'add',
unaligned_path,
'classes.dex',
], cwd = private_dir).returncode:
sys.exit(1)

View File

@ -1,8 +0,0 @@
[constants]
android_ndk_toolchain_prefix = 'aarch64-linux-android21-'
[host_machine]
system = 'android'
cpu_family = 'aarch64'
cpu = 'armv8'
endian = 'little'

View File

@ -1,8 +0,0 @@
[constants]
android_ndk_toolchain_prefix = 'armv7a-linux-androideabi21-'
[host_machine]
system = 'android'
cpu_family = 'arm'
cpu = 'armv7a'
endian = 'little'

View File

@ -1,8 +0,0 @@
[constants]
android_ndk_toolchain_prefix = 'i686-linux-android21-'
[host_machine]
system = 'android'
cpu_family = 'x86'
cpu = 'i686'
endian = 'little'

View File

@ -1,8 +0,0 @@
[constants]
android_ndk_toolchain_prefix = 'x86_64-linux-android21-'
[host_machine]
system = 'android'
cpu_family = 'x86_64'
cpu = 'amd64'
endian = 'little'

View File

@ -1,272 +0,0 @@
#!/usr/bin/env bash
# mainly based on https://www.sh-zam.com/2019/05/debugging-krita-on-android.html
set -euo pipefail
IFS=$'\n\t'
function get_buildoption() {
jq -r '.[] | select(.name == "'$1'") | .value' < meson-info/intro-buildoptions.json
}
function get_cpp_compiler() {
jq -r '.[] | select(.name == "'$1'") | .target_sources.[] | select(.language == "cpp") | .compiler.[]' < meson-info/intro-targets.json
}
# customize
default_app_id=uk.co.powdertoy.tpt
default_app_exe=powder
default_lldb_server=/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/lib/clang/17/lib/linux/aarch64/lldb-server
default_lldb_client=/opt/android-ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/lldb.sh
in_build_site=no
if which jq >/dev/null && [[ -f meson-info/intro-buildoptions.json ]]; then
>&2 echo "[+] pwd is a build site, auto-detecting parameters"
in_build_site=yes
default_app_id=$(get_buildoption app_id)
default_app_exe=$(get_buildoption app_exe)
found_lldb=no
compiler_path=$(get_cpp_compiler $default_app_exe)
for line in $compiler_path; do
# iterate over the command array (might be for example [ "ccache", "aarch64-linux-android21-clang++" ])
if (echo $line | grep toolchains && basename $line | grep android | grep clang++) >/dev/null; then
arch=$(basename $line | cut -d '-' -f 1)
default_lldb_server=$(realpath $(dirname $line)/../lib/clang/*/lib/linux/$arch/lldb-server)
default_lldb_client=$(realpath $(dirname $line)/lldb.sh)
found_lldb=yes
fi
done
if [[ $found_lldb != yes ]]; then
>&2 echo "[-] cannot determine LLDB paths from compiler command array:"
for line in $compiler_path; do
>&2 echo "[-] - $line"
done
exit 1
fi
>&2 echo "[+] APP_ID: $default_app_id"
>&2 echo "[+] APP_EXE: $default_app_exe"
>&2 echo "[+] LLDB_SERVER: $default_lldb_server"
>&2 echo "[+] LLDB_CLIENT: $default_lldb_client"
else
>&2 echo "[+] pwd is not a build site, not auto-detecting parameters"
fi
app_id=${APP_ID:-$default_app_id}
app_exe=${APP_EXE:-$default_app_exe}
lldb_server=${LLDB_SERVER:-$default_lldb_server}
lldb_server_port=${LLDB_SERVER_PORT:-9998}
jdb_port=${JDB_PORT:-13456}
lldb_client=${LLDB_CLIENT:-$default_lldb_client}
meson=${MESON:-meson}
adb=${ADB:-adb}
jdb=${JDB:-jdb}
# don't customize unless necessary
app_activity=${APP_ACTIVITY:-PowderActivity}
lldb_server_staging=${LLDB_SERVER_STAGING:-/data/local/tmp/lldb-server}
lldb_server_remote=${LLDB_SERVER_REMOTE:-lldb-server}
pidof_retry_count=${PIDOF_RETRY_COUNT:-20}
pidof_retry_delay=${PIDOF_RETRY_DELAY:-0.1}
function check_which() {
if ! which $1 >/dev/null; then
>&2 echo "[-] can't run $1"
return 1
fi
}
function check_env() {
if ! [[ -f $lldb_server ]]; then
>&2 echo "[-] $lldb_server doesn't exist"
return 1
fi
check_which $lldb_client
check_which $adb
check_which $jdb
}
function check_adb() {
$adb shell whoami >/dev/null
}
function maybe_install_app() {
if [[ $in_build_site != yes ]]; then
return 0
fi
android_keystore=$(get_buildoption android_keystore)
android_keyalias=$(get_buildoption android_keyalias)
if [[ -z ${ANDROID_KEYSTORE_PASS-} ]]; then
>&2 echo "[-] ANDROID_KEYSTORE_PASS not set"
>&2 echo
>&2 cat << HELP
The current directory seems to be a build site, but ANDROID_KEYSTORE_PASS is not set, so android/$app_exe.apk cannot be invoked. If you don't have a keystore yet, create one with:
ANDROID_KEYSTORE_PASS=bagelsbagels keytool -genkey \\
-keystore $android_keystore \\
-alias $android_keyalias \\
-storepass:env ANDROID_KEYSTORE_PASS \\
-keypass:env ANDROID_KEYSTORE_PASS \\
-dname CN=bagels
Then try again with:
ANDROID_KEYSTORE_PASS=bagelsbagels $0
Naturally, replace bagelsbagels with an appropriate password.
HELP
exit 1
fi
>&2 echo "[+] meson compiling android/$app_exe.apk"
if ! $meson compile sign-apk; then
>&2 echo "[-] failed"
return 1
fi
>&2 echo "[+] adb installing android/$app_exe.apk"
if ! $adb install android/$app_exe.apk; then
>&2 echo "[-] failed"
return 1
fi
}
function check_debuggable() {
$adb shell run-as $app_id whoami >/dev/null
}
function find_lldb_server() {
$adb shell run-as $app_id pgrep $lldb_server_remote >/dev/null
}
function kill_lldb_server() {
if ! $adb shell run-as $app_id pkill $lldb_server_remote; then
>&2 echo "[-] failed"
return 1
fi
}
function adb_forward() {
>&2 echo "[+] adb forwarding tcp:$jdb_port jdwp:$pid"
if ! ($adb forward tcp:$jdb_port jdwp:$pid | grep $jdb_port >/dev/null); then
>&2 echo "[+] failed"
return 1
fi
}
function adb_unforward() {
$adb forward --remove tcp:$jdb_port
}
function undo_current_adb_forward() {
>&2 echo "[+] adb un-forwarding orphaned tcp:$jdb_port"
adb_unforward
}
function maybe_undo_previous_adb_forward() {
if $adb forward --list | grep tcp:$jdb_port; then
>&2 echo "[+] adb un-forwarding orphaned tcp:$jdb_port"
adb_unforward
fi
}
function maybe_kill_previous_lldb_server() {
if find_lldb_server; then
>&2 echo "[+] killing orphaned $lldb_server_remote"
kill_lldb_server
fi
}
function kill_current_lldb_server() {
>&2 echo "[+] killing $lldb_server_remote"
kill_lldb_server
}
function start_app() {
>&2 echo "[+] starting $app_id/.$app_activity"
set +e
$adb shell am start -D -n "$app_id/.$app_activity" >/dev/null
set -e
local i
local maybe_pid
local pidof_result
for ((i = 0; i <= $pidof_retry_count; i++)); do
set +e
maybe_pid=$($adb shell pidof $app_id)
pidof_result=$?
set -e
if [[ $pidof_result == 0 ]]; then
pid=$maybe_pid
break
fi
sleep $pidof_retry_delay
done
if [[ -z ${pid-} ]]; then
>&2 echo "[-] failed"
return 1
fi
echo $pid
}
function jdb_attach() {
>&2 echo "[+] attaching jdb in the background"
$jdb -attach localhost:$jdb_port >/dev/null 2>/dev/null &
disown $!
# at some point jdb exits because it doesn't have an stdin... fine by me
}
function maybe_deploy_lldb_server() {
if ! $adb shell [[ -f $lldb_server_staging ]]; then
>&2 echo "[+] $lldb_server_remote not present on host, deploying"
if ! ($adb push $lldb_server $lldb_server_staging && $adb shell chmod +x $lldb_server_staging); then
>&2 echo "[-] failed"
fi
fi
}
function start_lldb_server() {
if ! $adb shell run-as $app_id pgrep $lldb_server_remote >/dev/null; then
>&2 echo "[+] $lldb_server_remote not running on host, starting"
$adb shell run-as $app_id cp $lldb_server_staging /data/data/$app_id/$lldb_server_remote
$adb shell run-as $app_id ./$lldb_server_remote platform --server --listen "*:$lldb_server_port" >/dev/null 2>/dev/null &
disown $!
if ! $adb shell run-as $app_id pgrep $lldb_server_remote >/dev/null; then
>&2 echo "[-] failed"
return 1
fi
fi
}
function start_lldb() {
local pid=$1
>&2 echo "[+] starting $lldb_client"
local lldb_init=$(mktemp)
cat - << LLDB_INIT > $lldb_init
platform select remote-android
platform connect connect://localhost:$lldb_server_port
attach $pid
continue
LLDB_INIT
local lldb_status
set +e
$lldb_client --source $lldb_init
lldb_status=$?
set -e
>&2 echo "[+] $lldb_client exited with status $lldb_status"
rm $lldb_init
}
check_env
check_adb
maybe_install_app
check_debuggable
maybe_kill_previous_lldb_server
maybe_undo_previous_adb_forward
if [[ ${1-} == clean ]]; then
>&2 echo "[+] done"
exit 0
fi
maybe_deploy_lldb_server
start_lldb_server
pid=$(start_app)
adb_forward
jdb_attach
start_lldb $pid
kill_current_lldb_server
undo_current_adb_forward
>&2 echo "[+] done"

View File

@ -1,25 +0,0 @@
import os
import os.path
import subprocess
import sys
(
script,
adb,
build_dir,
phony,
apk_name,
) = sys.argv
apk_path = os.path.join(build_dir, apk_name)
phony_path = os.path.join(build_dir, phony)
if os.path.exists(phony_path):
os.remove(phony_path)
if subprocess.run([
adb,
'install',
apk_path,
]).returncode:
sys.exit(1)

View File

@ -1,105 +0,0 @@
android_manifest_xml = configure_file(
input: 'AndroidManifest.template.xml',
output: 'AndroidManifest.xml',
configuration: conf_data,
)
powder_jar_sources = configure_file(
input: 'PowderActivity.template.java',
output: 'PowderActivity.java',
configuration: conf_data,
)
subdir('res')
python3 = find_program('python3')
android_platform_jar = meson.get_external_property('android_platform_jar')
java_runtime_jar = meson.get_external_property('java_runtime_jar')
android_keystore = get_option('android_keystore')
sdl_jar = tpt_libs.get_variable('sdl_jar')
powder_jar = custom_target(
'powder-jar',
output: app_exe + '.jar',
command: [
python3,
files('powder-jar.py'),
find_program('javac'),
find_program('jar'),
meson.current_source_dir(),
meson.project_build_root(),
'@PRIVATE_DIR@',
'@OUTPUT@',
android_platform_jar,
java_runtime_jar,
sdl_jar,
is_debug ? 'debug' : 'release',
powder_jar_sources,
],
)
unaligned_apk = custom_target(
'build-apk',
output: app_exe + '.unaligned.apk',
input: powder_sha,
command: [
python3,
files('build-apk.py'),
find_program('d8'),
find_program('aapt'),
find_program('aapt2'),
meson.current_source_dir(),
meson.project_build_root(),
'@PRIVATE_DIR@',
'@OUTPUT@',
'@INPUT@',
android_platform_jar,
sdl_jar,
powder_jar,
host_arch,
is_debug ? 'debug' : 'release',
android_manifest_xml,
android_resources,
],
)
unsigned_apk = custom_target(
'align-apk',
output: app_exe + '.unsigned.apk',
input: unaligned_apk,
command: [
python3,
files('align-apk.py'),
find_program('zipalign'),
meson.project_build_root(),
'@OUTPUT@',
'@INPUT@',
],
)
signed_apk = custom_target(
'sign-apk',
output: app_exe + '.apk',
input: unsigned_apk,
command: [
python3,
files('sign-apk.py'),
find_program('apksigner'),
meson.project_build_root(),
'@OUTPUT@',
'@INPUT@',
android_keystore,
get_option('android_keyalias'),
],
)
adb = find_program('adb', required: false)
if adb.found()
install_apk = custom_target(
'install-apk',
input: signed_apk,
output: 'install-apk',
command: [ python3, files('install-apk.py'), adb, meson.project_build_root(), '@OUTPUT@', '@INPUT@' ],
)
custom_target(
'run-apk',
input: [ signed_apk, install_apk ],
build_always_stale: true,
output: 'run-apk',
command: [ python3, files('run-apk.py'), adb, meson.project_build_root(), '@OUTPUT@', '@INPUT0@', app_id ],
)
endif

View File

@ -1,54 +0,0 @@
import os
import os.path
import shutil
import subprocess
import sys
(
script,
javac,
jar,
source_dir,
build_dir,
private_name,
powder_jar_name,
android_jar,
java_runtime,
sdl_jar,
debug_release,
*javac_sources,
) = sys.argv
powder_jar_path = os.path.join(build_dir, powder_jar_name)
private_dir = os.path.join(build_dir, private_name)
class_dir = os.path.join(private_dir, 'class')
if os.path.exists(powder_jar_path):
os.remove(powder_jar_path)
if os.path.exists(class_dir):
shutil.rmtree(class_dir)
os.makedirs(class_dir)
if subprocess.run([
javac,
'-d', class_dir,
'-source', '1.8',
'-target', '1.8',
'-bootclasspath', java_runtime,
'-classpath', os.pathsep.join([ android_jar, sdl_jar ]),
*javac_sources,
], cwd = build_dir).returncode:
sys.exit(1)
jar_inputs = []
for root, dirs, files in os.walk(class_dir):
for name in files:
if name.endswith(".class"):
jar_inputs.append(os.path.relpath(os.path.join(root, name), start = class_dir))
if subprocess.run([
jar,
'cMf',
powder_jar_path,
*jar_inputs,
], cwd = class_dir).returncode:
sys.exit(1)

View File

@ -1,7 +0,0 @@
android_resources = files(
'values/colors.xml',
'values/styles.xml',
)
subdir('values')
subdir('mipmap-mdpi')

View File

@ -1 +0,0 @@
android_resources += fs.copyfile(rendered_icons['icon_exe'], 'ic_launcher.png')

View File

@ -1,6 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="colorPrimary">#3F51B5</color>
<color name="colorPrimaryDark">#303F9F</color>
<color name="colorAccent">#FF4081</color>
</resources>

View File

@ -1,5 +0,0 @@
android_resources += configure_file(
input: 'strings.template.xml',
output: 'strings.xml',
configuration: conf_data,
)

View File

@ -1,3 +0,0 @@
<resources>
<string name="app_name">@APPNAME@</string>
</resources>

View File

@ -1,4 +0,0 @@
<resources>
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
</style>
</resources>

View File

@ -1,25 +0,0 @@
import os
import os.path
import subprocess
import sys
(
script,
adb,
build_dir,
phony,
apk_name,
app_id,
) = sys.argv
apk_path = os.path.join(build_dir, apk_name)
if subprocess.run([
adb,
'shell',
'am',
'start',
'--activity-clear-top',
'-n', app_id + '/.PowderActivity',
]).returncode:
sys.exit(1)

View File

@ -1,35 +0,0 @@
import os
import os.path
import subprocess
import sys
(
script,
apksigner,
build_dir,
apk_name,
unsigned_name,
android_keystore,
android_keyalias,
) = sys.argv
if 'ANDROID_KEYSTORE_PASS' not in os.environ:
print('ANDROID_KEYSTORE_PASS not set')
sys.exit(1)
unsigned_path = os.path.join(build_dir, unsigned_name)
apk_path = os.path.join(build_dir, apk_name)
if os.path.exists(apk_path):
os.remove(apk_path)
if subprocess.run([
apksigner,
'sign',
'--ks', android_keystore,
'--ks-key-alias', android_keyalias,
'--ks-pass', 'env:ANDROID_KEYSTORE_PASS',
'--out', apk_path,
unsigned_path,
]).returncode:
sys.exit(1)

View File

@ -1,25 +0,0 @@
[constants]
andriod_ndk_toolchain_bin = '/opt/android-sdk/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin'
[properties]
# only needed if you want to run the custom target powder_apk (powder.apk)
# android_ndk_toolchain_prefix comes from the correct cross-file in ./android/cross
android_ndk_toolchain_prefix = android_ndk_toolchain_prefix
android_platform = 'android-30'
android_platform_jar = '/opt/android-sdk/platforms/' + android_platform + '/android.jar'
java_runtime_jar = '/usr/lib/jvm/java-8-openjdk/jre/lib/rt.jar'
[binaries]
c = andriod_ndk_toolchain_bin / (android_ndk_toolchain_prefix + 'clang')
# c = [ 'ccache', andriod_ndk_toolchain_bin / (android_ndk_toolchain_prefix + 'clang') ]
cpp = andriod_ndk_toolchain_bin / (android_ndk_toolchain_prefix + 'clang++')
# cpp = [ 'ccache', andriod_ndk_toolchain_bin / (android_ndk_toolchain_prefix + 'clang++') ]
strip = andriod_ndk_toolchain_bin / 'llvm-strip'
# only needed if you want to run the custom target powder_apk (powder.apk)
javac = '/usr/lib/jvm/java-8-openjdk/bin/javac'
jar = '/usr/lib/jvm/java-8-openjdk/bin/jar'
d8 = '/opt/android-sdk/build-tools/32.0.0/d8'
aapt = '/opt/android-sdk/build-tools/32.0.0/aapt'
aapt2 = '/opt/android-sdk/build-tools/32.0.0/aapt2'
zipalign = '/opt/android-sdk/build-tools/32.0.0/zipalign'
apksigner = '/opt/android-sdk/build-tools/32.0.0/apksigner'

View File

@ -1,11 +0,0 @@
[binaries]
c = [ 'clang', '-arch', 'arm64' ]
cpp = [ 'clang++', '-arch', 'arm64' ]
objcpp = [ 'clang++', '-arch', 'arm64' ]
strip = 'strip'
[host_machine]
system = 'darwin'
cpu_family = 'aarch64'
cpu = 'armv8'
endian = 'little'

View File

@ -1,14 +0,0 @@
[constants]
prefix = 'x86_64-w64-mingw32'
[binaries]
c = prefix + '-gcc'
cpp = prefix + '-g++'
strip = prefix + '-strip'
windres = prefix + '-windres'
[host_machine]
system = 'windows'
cpu_family = 'x86_64'
cpu = 'x86_64'
endian = 'little'

61
data/IntroText.h Normal file
View File

@ -0,0 +1,61 @@
#pragma once
#include "Config.h"
const char *const introTextData =
"\blThe Powder Toy - Version " MTOS(SAVE_VERSION) "." MTOS(MINOR_VERSION) " - https://powdertoy.co.uk, irc.libera.chat #powder\n"
"\xEE\x81\xA9\xEE\x81\xA9\xEE\x81\xA9\xEE\x81\xA9\xEE\x81\xA9\xEE\x81\xA9\xEE\x81\xA9\xEE\x81\xA9\xEE\x81\xA9\xEE\x81\xA9\xEE\x81\xA9\xEE\x81\xA9\xEE\x81\xA9\xEE\x81\xA9\xEE\x81\xA9\xEE\x81\xA9\xEE\x81\xA9\xEE\x81\xA9\xEE\x81\xA9\n"
"\n"
"\bgControl+C/V/X are Copy, Paste and cut respectively.\n"
"\bgTo choose a material, hover over one of the icons on the right, it will show a selection of elements in that group.\n"
"\bgPick your material from the menu using mouse left/right buttons.\n"
"Draw freeform lines by dragging your mouse left/right button across the drawing area.\n"
"Shift+drag will create straight lines of particles.\n"
"Ctrl+drag will result in filled rectangles.\n"
"Ctrl+Shift+click will flood-fill a closed area.\n"
"Use the mouse scroll wheel, or '[' and ']', to change the tool size for particles.\n"
"Middle click or Alt+Click to \"sample\" the particles.\n"
"Ctrl+Z will act as Undo.\n"
"\n\boUse 'Z' for a zoom tool. Click to make the drawable zoom window stay around. Use the wheel to change the zoom strength.\n"
"The spacebar can be used to pause physics. Use 'F' to step ahead by one frame.\n"
"Use 'S' to save parts of the window as 'stamps'. 'L' loads the most recent stamp, 'K' shows a library of stamps you saved.\n"
"Use 'P' to take a screenshot and save it into the current directory.\n"
"Use 'H' to toggle the HUD. Use 'D' to toggle debug mode in the HUD.\n"
"\n"
"Contributors: \bgStanislaw K Skowronek (Designed the original Powder Toy),\n"
"\bgSimon Robertshaw, Skresanov Savely, cracker64, Catelite, Bryan Hoyle, Nathan Cousins, jacksonmj,\n"
"\bgFelix Wallin, Lieuwe Mosch, Anthony Boot, Me4502, MaksProg, jacob1, mniip, LBPHacker\n"
"\n"
#ifndef BETA
"\bgTo use online features such as saving, you need to register at: \brhttps://powdertoy.co.uk/Register.html\n"
#else
"\brThis is a BETA, you cannot save things publicly. If you are planning on publishing any saves, use the release version\n"
#endif
"\n"
"\bt" MTOS(SAVE_VERSION) "." MTOS(MINOR_VERSION) "." MTOS(BUILD_NUM) " " IDENT_PLATFORM
#ifdef SNAPSHOT
" SNAPSHOT " MTOS(SNAPSHOT_ID)
#elif MOD_ID > 0
" MODVER " MTOS(SNAPSHOT_ID)
#endif
#ifdef X86
" X86"
#endif
#ifdef X86_SSE
" X86_SSE"
#endif
#ifdef X86_SSE2
" X86_SSE2"
#endif
#ifdef X86_SSE3
" X86_SSE3"
#endif
#ifdef LUACONSOLE
" LUACONSOLE"
#endif
#ifdef GRAVFFT
" GRAVFFT"
#endif
#ifdef REALISTIC
" REALISTIC"
#endif
;

89
data/Shaders.h Normal file
View File

@ -0,0 +1,89 @@
#pragma once
const char *const fireFragment = "#version 120\n\
uniform sampler2D fireAlpha;\
void main () {\
vec4 texColor = texture2D(fireAlpha, gl_PointCoord);\
gl_FragColor = vec4(gl_Color.rgb, texColor.a*gl_Color.a);\
}";
const char *const fireVertex = "#version 120\n\
void main(void)\
{\
gl_Position = ftransform();;\
gl_FrontColor = gl_Color;\
}";
const char *const lensFragment = "#version 120\n\
uniform sampler2D pTex;\
uniform sampler2D tfX;\
uniform sampler2D tfY;\
uniform float xres;\
uniform float yres;\
void main () {\
vec4 transformX = texture2D(tfX, vec2(gl_TexCoord[0].s, -gl_TexCoord[0].t));\
vec4 transformY = -texture2D(tfY, vec2(gl_TexCoord[0].s, -gl_TexCoord[0].t));\
transformX.r /= xres;\
transformY.g /= yres;\
vec4 texColor = vec4(\
texture2D(pTex, gl_TexCoord[0].st-vec2(transformX.r*0.75, transformY.g*0.75)).r,\
texture2D(pTex, gl_TexCoord[0].st-vec2(transformX.r*0.875, transformY.g*0.875)).g,\
texture2D(pTex, gl_TexCoord[0].st-vec2(transformX.r, transformY.g)).b,\
1.0\
);\
gl_FragColor = texColor;\
}";
const char *const lensVertex = "#version 120\n\
void main(void)\
{\
gl_TexCoord[0] = gl_MultiTexCoord0;\
gl_Position = ftransform();;\
gl_FrontColor = gl_Color;\
}";
const char *const airVFragment = "#version 120\n\
uniform sampler2D airX;\
uniform sampler2D airY;\
uniform sampler2D airP;\
void main () {\
vec4 texX = texture2D(airX, gl_TexCoord[0].st);\
vec4 texY = texture2D(airY, gl_TexCoord[0].st);\
vec4 texP = texture2D(airP, gl_TexCoord[0].st);\
gl_FragColor = vec4(abs(texX.r)/2.0, texP.b/2.0, abs(texY.g)/2.0, 1.0);\
}";
const char *const airVVertex = "#version 120\n\
void main(void)\
{\
gl_TexCoord[0] = gl_MultiTexCoord0;\
gl_Position = ftransform();;\
gl_FrontColor = gl_Color;\
}";
const char *const airPFragment = "#version 120\n\
uniform sampler2D airX;\
uniform sampler2D airY;\
uniform sampler2D airP;\
void main () {\
vec4 texP = texture2D(airP, gl_TexCoord[0].st);\
gl_FragColor = vec4(max(texP.b/2.0, 0), 0, abs(min(texP.b/2.0, 0)), 1.0);\
}";
const char *const airPVertex = "#version 120\n\
void main(void)\
{\
gl_TexCoord[0] = gl_MultiTexCoord0;\
gl_Position = ftransform();;\
gl_FrontColor = gl_Color;\
}";
const char *const airCFragment = "#version 120\n\
uniform sampler2D airX;\
uniform sampler2D airY;\
uniform sampler2D airP;\
void main () {\
vec4 texX = texture2D(airX, gl_TexCoord[0].st);\
vec4 texY = texture2D(airY, gl_TexCoord[0].st);\
vec4 texP = texture2D(airP, gl_TexCoord[0].st);\
gl_FragColor = vec4(max(texP.b/2.0, 0), 0, abs(min(texP.b/2.0, 0)), 1.0) + vec4(abs(texX.r)/8.0, abs(texX.r)/8.0, abs(texX.r)/8.0, 1.0) + vec4(abs(texY.g)/8.0, abs(texY.g)/8.0, abs(texY.g)/8.0, 1.0);\
}";
const char *const airCVertex = "#version 120\n\
void main(void)\
{\
gl_TexCoord[0] = gl_MultiTexCoord0;\
gl_Position = ftransform();;\
gl_FrontColor = gl_Color;\
}";

BIN
data/font.bz2 Normal file

Binary file not shown.

24
data/hmap.cpp Normal file

File diff suppressed because one or more lines are too long

24
data/hmap.h Normal file
View File

@ -0,0 +1,24 @@
/**
* Powder Toy - Heatmap Data
*
* Copyright (c) 2010 Simon Robertshaw
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#pragma once
extern const unsigned char color_data[];
//extern const char plasma_data[];
extern const unsigned char hflm_data[];
extern const unsigned char firw_data[];

4118
data/icon.cpp Normal file

File diff suppressed because it is too large Load Diff

22
data/icon.h Normal file
View File

@ -0,0 +1,22 @@
/**
* Powder Toy - Main source
*
* Copyright (c) 2008 - 2010 Stanislaw Skowronek.
* Copyright (c) 2010 Simon Robertshaw
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#pragma once
extern const unsigned char app_icon[];

310
data/icondoc.h Normal file
View File

@ -0,0 +1,310 @@
/**
* Powder Toy - Main source
*
* Copyright (c) 2008 - 2010 Stanislaw Skowronek.
* Copyright (c) 2010 Simon Robertshaw
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#pragma once
const unsigned char icon_doc_32_png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x20, 0x08, 0x06, 0x00, 0x00, 0x00, 0x73, 0x7a, 0x7a,
0xf4, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
0x00, 0x06, 0x62, 0x4b, 0x47, 0x44, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0xa0, 0xbd, 0xa7, 0x93,
0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, 0x0b, 0x13,
0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 0x00, 0x07, 0x74, 0x49, 0x4d, 0x45, 0x07, 0xdb, 0x04,
0x06, 0x11, 0x21, 0x0c, 0xfc, 0x0b, 0x2f, 0xdf, 0x00, 0x00, 0x04, 0x65, 0x49, 0x44, 0x41, 0x54,
0x58, 0xc3, 0xb5, 0x96, 0x7f, 0x4c, 0xd4, 0x65, 0x1c, 0xc7, 0x5f, 0xcf, 0x73, 0xdf, 0xe3, 0x7e,
0x90, 0x8b, 0x98, 0xb8, 0x36, 0x12, 0xb8, 0x38, 0x69, 0x03, 0x4c, 0x64, 0xec, 0x6a, 0xa2, 0xd3,
0xb5, 0x74, 0x78, 0x4c, 0x42, 0x33, 0x51, 0xda, 0x5c, 0xe3, 0x97, 0x72, 0x79, 0xcc, 0x5c, 0xfd,
0x53, 0xcb, 0x50, 0x69, 0x93, 0xda, 0x9a, 0x3a, 0x0d, 0x0d, 0x99, 0xf3, 0x9f, 0x3b, 0x98, 0x89,
0x72, 0x14, 0x64, 0xb2, 0x62, 0x2b, 0x56, 0xad, 0x56, 0x20, 0xbf, 0x06, 0x3a, 0xe1, 0x1c, 0x8b,
0xed, 0x86, 0x89, 0x77, 0x96, 0x7f, 0x30, 0xf6, 0xed, 0x0f, 0xb9, 0x1b, 0xe6, 0x1d, 0x7c, 0x39,
0xe8, 0xb3, 0x3d, 0x7b, 0xbe, 0xcf, 0xb3, 0xef, 0xf3, 0x7c, 0x5f, 0xcf, 0xfb, 0xf3, 0xe3, 0xf9,
0x0a, 0x9e, 0xb4, 0xd5, 0x40, 0x0a, 0x0b, 0x37, 0x3f, 0x30, 0x0a, 0x78, 0x17, 0xb2, 0x48, 0x09,
0x33, 0x97, 0x52, 0x52, 0x52, 0xe2, 0x11, 0x42, 0xa0, 0xaa, 0x2a, 0x42, 0x08, 0x80, 0xd0, 0xb3,
0xaa, 0xaa, 0xa1, 0x17, 0x55, 0x55, 0x45, 0x55, 0x55, 0xcc, 0x66, 0x33, 0x05, 0x05, 0x05, 0x3e,
0xa7, 0xd3, 0x59, 0x73, 0xf3, 0xe6, 0xcd, 0xd6, 0x19, 0x90, 0xa8, 0x01, 0xa4, 0x10, 0x82, 0xce,
0xce, 0x4e, 0x4d, 0x1b, 0x5c, 0xe8, 0xed, 0x61, 0x6f, 0x7a, 0x26, 0x89, 0x89, 0x89, 0x2b, 0xda,
0xdb, 0xdb, 0x3f, 0xcd, 0xcb, 0xcb, 0xd3, 0xdf, 0xba, 0x75, 0xab, 0x59, 0x2b, 0x84, 0x0c, 0x33,
0xa7, 0x9f, 0x7d, 0xca, 0xf9, 0xec, 0xfc, 0xa9, 0xd3, 0x08, 0x21, 0x68, 0x68, 0x68, 0xc0, 0xe7,
0xf3, 0x19, 0x3a, 0x3a, 0x3a, 0x6a, 0xad, 0x56, 0xeb, 0x0e, 0xad, 0x6e, 0x94, 0x91, 0x14, 0xd0,
0xd2, 0x00, 0xba, 0xea, 0xeb, 0x11, 0x42, 0x30, 0x35, 0x35, 0x45, 0x57, 0x57, 0x17, 0x89, 0x89,
0x89, 0x4a, 0x5b, 0x5b, 0x5b, 0xad, 0xc5, 0x62, 0x79, 0x5d, 0x0b, 0x84, 0x24, 0x4a, 0xeb, 0x77,
0x55, 0x86, 0x20, 0x84, 0x10, 0x48, 0x29, 0x19, 0x1e, 0x1e, 0x46, 0x4a, 0x49, 0x52, 0x52, 0x92,
0xd2, 0xda, 0xda, 0x7a, 0x5c, 0x0b, 0x44, 0xd4, 0x00, 0x19, 0xc5, 0x75, 0xa1, 0x8f,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, 0xd9, 0xc4, 0x0a, 0xf6, 0xbf, 0xb5, 0x93, 0x31, 0x9d, 0x0e, 0xef, 0xf8, 0x9f, 0x74,
0x7b, 0x5a, 0x90, 0xf9, 0x0e, 0x3e, 0xa9, 0x85, 0xcf, 0xbf, 0xfe, 0x0a, 0x23, 0x0f, 0xc9, 0xb1,
0xbd, 0xc4, 0xda, 0xbb, 0x3f, 0xa2, 0xa6, 0xa6, 0xd1, 0x5d, 0xf2, 0x13, 0x6d, 0x97, 0x2f, 0x87,
0x4f, 0xcf, 0x30, 0x73, 0x2f, 0x03, 0x99, 0x80, 0x69, 0x89, 0xff, 0x53, 0x1e, 0x02, 0x7d, 0xc0,
0xcf, 0xf3, 0x01, 0x98, 0x81, 0x65, 0x33, 0xfd, 0x52, 0xda, 0x3f, 0x40, 0x60, 0xa6, 0x0f, 0xd9,
0xbf, 0x2f, 0x89, 0x69, 0x46, 0x25, 0x68, 0x1c, 0x6f, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e,
0x44, 0xae, 0x42, 0x60, 0x82
};
const unsigned char icon_doc_16_png[] = {
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff,
0x61, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xae, 0xce, 0x1c, 0xe9, 0x00, 0x00,
0x00, 0x06, 0x62, 0x4b, 0x47, 0x44, 0x00, 0xff, 0x00, 0xff, 0x00, 0xff, 0xa0, 0xbd, 0xa7, 0x93,
0x00, 0x00, 0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0b, 0x13, 0x00, 0x00, 0x0b, 0x13,
0x01, 0x00, 0x9a, 0x9c, 0x18, 0x00, 0x00, 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xf3, 0x8b, 0x81, 0x99, 0x19,
0xdc, 0x5f, 0x6f, 0x64, 0x57, 0x57, 0x78, 0xb3, 0xbb, 0xe9, 0xa9, 0x54, 0xa8, 0x54, 0x3f, 0xa8,
0xde, 0xde, 0xd1, 0xed, 0xf1, 0x34, 0xa2, 0x98, 0xbe, 0xf3, 0x08, 0xe0, 0x01, 0xba, 0x00, 0x37,
0xe0, 0x00, 0x3a, 0x0c, 0x6d, 0xa0, 0x02, 0x94, 0x81, 0x77, 0xe0, 0x45, 0x29, 0x75, 0x0e, 0xf0,
0x0d, 0xff, 0x1c, 0x7a, 0x37, 0x5c, 0xfd, 0x46, 0xdf, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e,
0x44, 0xae, 0x42, 0x60, 0x82
};
const unsigned char icon_desktop_48_png[] = {
0x89, 0x50, 0x4E, 0x47, 0x0D, 0x0A, 0x1A, 0x0A, 0x00, 0x00, 0x00, 0x0D, 0x49, 0x48, 0x44, 0x52,
0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x08, 0x06, 0x00, 0x00, 0x00, 0x57, 0x02, 0xF9,
0x87, 0x00, 0x00, 0x00, 0x01, 0x73, 0x52, 0x47, 0x42, 0x00, 0xAE, 0xCE, 0x1C, 0xE9, 0x00, 0x00,
0x00, 0x04, 0x67, 0x41, 0x4D, 0x41, 0x00, 0x00, 0xB1, 0x8F, 0x0B, 0xFC, 0x61, 0x05, 0x00, 0x00,
0x00, 0x09, 0x70, 0x48, 0x59, 0x73, 0x00, 0x00, 0x0E, 0xC3, 0x00, 0x00, 0x0E, 0xC3, 0x01, 0xC7,
0x6F, 0xA8, 0x64, 0x00, 0x00, 0x0A, 0x20, 0x49, 0x44, 0x41, 0x54, 0x68, 0x43, 0xED, 0x99, 0x7B,
0x8C, 0x54, 0xE5, 0x19, 0x87, 0xF7, 0x32, 0xB7, 0x9D, 0x85, 0x55, 0xA0, 0x08, 0x08, 0x08, 0x42,
0x65, 0x97,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0xB5, 0x09, 0x5C, 0x85, 0x13, 0xF8, 0x1F, 0x36, 0x17, 0x75, 0x31, 0x45, 0xB2, 0x22, 0x02, 0x00,
0x00, 0x00, 0x00, 0x49, 0x45, 0x4E, 0x44, 0xAE, 0x42, 0x60, 0x82
};

28
data/images.cpp Normal file

File diff suppressed because one or more lines are too long

23
data/images.h Normal file
View File

@ -0,0 +1,23 @@
/**
* Powder Toy - Images
*
* Copyright (c) 2008 - 2010 Stanislaw Skowronek.
* Copyright (c) 2010 Simon Robertshaw.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA
*/
#pragma once
extern const unsigned char save_to_server_image[];
extern const unsigned char save_to_disk_image[];

10
data/meson.build Normal file
View File

@ -0,0 +1,10 @@
data_files = files(
'hmap.cpp',
'icon.cpp',
'images.cpp',
)
data_files += to_array.process('font.bz2', extra_args: 'compressed_font_data')
powder_files += data_files
render_files += data_files
font_files += data_files

View File

@ -6,7 +6,7 @@ import re
import argparse
CP_MAX = 0x10FFFF
FONT_CPP = "resources/font.bz2"
FONT_CPP = "data/font.bz2"
FONT_HEIGHT = 12
@ -16,9 +16,8 @@ class ReadBDFError(RuntimeError):
class FontTool:
def __init__(self, file):
self.file = file
with open(self.file, 'rb') as font_cpp:
def __init__(self):
with open(FONT_CPP, 'rb') as font_cpp:
font_cpp_data = bz2.decompress(font_cpp.read())
i = 0
self.code_points = [False for _ in range(CP_MAX + 2)]
@ -37,7 +36,7 @@ class FontTool:
l.append((i >> 8) & 0xFF)
l.append((i >> 16) & 0xFF)
l += data
with open(self.file, 'wb') as font_cpp:
with open(FONT_CPP, 'wb') as font_cpp:
font_cpp.write(bz2.compress(bytes(l)))
def pack(cp_matrix):
@ -74,17 +73,6 @@ class FontTool:
bits -= 2
return cp_matrix
def dump(self, i, print):
lut = [' ', '░░', '▒▒', '▓▓']
if self.code_points[i]:
print('code point %i (%c)' % (i, i))
print('')
for l in [''.join([lut[ch] for ch in row]) for row in FontTool.unpack(self.code_points[i])]:
print(l)
print('')
else:
print('code point %i (%c) is not available' % (i, i))
class RawReader:
def __init__(self, path):
@ -186,8 +174,6 @@ class BDFReader:
if not startchar:
global_dw = char_dw
def pad_str(s, pad, n):
return s + pad * (n - len(s))
if __name__ == "__main__":
@ -215,25 +201,21 @@ structures laid out as follows:
* the width in pixels of the character being described;
* width times %i brightness levels between 0 and 3, a row-major matrix.""")
remove = command.add_parser("remove", help="Remove a range of characters")
remove = command.add_parser("remove", help="Remove")
remove.add_argument("first", metavar="FIRST", type=int)
remove.add_argument("last", metavar="LAST", type=int, default=None, nargs="?", help="Defaults to FIRST")
copy = command.add_parser("copy", help="Copy a range of characters to another range")
copy = command.add_parser("copy", help="Copy")
copy.add_argument("dest", metavar="DSTFIRST", type=int)
copy.add_argument("first", metavar="SRCFIRST", type=int)
copy.add_argument("last", metavar="SRCLAST", type=int, default=None, nargs="?", help="Defaults to SRCFIRST")
inspect = command.add_parser("inspect", help="Inspect a range of characters")
inspect = command.add_parser("inspect", help="Inspect")
inspect.add_argument("first", metavar="FIRST", type=int)
inspect.add_argument("last", metavar="LAST", type=int, default=None, nargs="?", help="Defaults to FIRST")
diff = command.add_parser("diff", help="Prints subranges that changed between the current and an external font file")
diff.add_argument("external", metavar="EXTERNAL", help="External font.bz2")
args = parser.parse_args()
if 'first' in args:
cp_first = args.first
if args.last is None:
cp_last = cp_first
@ -243,7 +225,7 @@ structures laid out as follows:
print('invalid range')
exit(1)
ft = FontTool(FONT_CPP)
ft = FontTool()
if args.command == "addbdf":
xoffs = args.xoffs
@ -268,23 +250,12 @@ structures laid out as follows:
ft.code_points[i + (args.dest - cp_first)] = ft.code_points[i]
ft.commit()
elif args.command == 'inspect':
lut = [' ', '░░', '▒▒', '▓▓']
for i in range(cp_first, cp_last + 1):
ft.dump(i, print)
elif args.command == 'diff':
pad_to = 50
eft = FontTool(args.external)
for i in range(0, CP_MAX + 1):
if eft.code_points[i] != ft.code_points[i]:
cur = []
def add_cur(line):
global cur
cur.append(line)
ft.dump(i, add_cur)
ext = []
def add_ext(line):
global ext
ext.append(line)
eft.dump(i, add_ext)
print('#' * (2 * pad_to + 7))
for j in range(max(len(cur), len(ext))):
print('# ' + pad_str(j < len(cur) and cur[j] or '', ' ', pad_to) + ' # ' + pad_str(j < len(ext) and ext[j] or '', ' ', pad_to) + ' #')
if ft.code_points[i]:
print('code point %i (%c)' % (i, i))
print('')
print('\n'.join([''.join([lut[ch] for ch in row]) for row in FontTool.unpack(ft.code_points[i])]))
print('')
else:
print('code point %i (%c) is not available' % (i, i))

View File

@ -1,292 +1,206 @@
project(
'the-powder-toy',
[ 'c', 'cpp' ],
version: 'the.cake.is.a.lie',
default_options: [
'c_std=c99',
'cpp_std=c++17',
'cpp_rtti=false',
'build.c_std=c99', # used by to_array
'build.cpp_std=c++17', # used by to_array
'build.cpp_rtti=false', # used by to_array
],
meson_version: '>=0.64.0',
)
project('the-powder-toy', [ 'c', 'cpp' ], version: 'the.cake.is.a.lie', default_options: [
'cpp_std=c++11',
])
if get_option('prepare')
# we're being run by prepare.py in a ghactions workflow only to determine the values of options; exit early
subdir_done()
endif
fs = import('fs')
to_array = generator(
executable('toarray', sources: 'resources/ToArray.cpp', native: true),
import('python').find_installation('python3'),
output: [ '@PLAINNAME@.cpp', '@PLAINNAME@.h' ],
arguments: [ '@OUTPUT0@', '@OUTPUT1@', '@INPUT@', '@EXTRA_ARGS@' ]
arguments: [ join_paths(meson.current_source_dir(), 'to_array.py'), '@BUILD_DIR@', '@OUTPUT0@', '@OUTPUT1@', '@INPUT@', '@EXTRA_ARGS@' ]
)
render_icons_with_inkscape = get_option('render_icons_with_inkscape')
inkscape = find_program('inkscape', required: render_icons_with_inkscape)
cpp_compiler = meson.get_compiler('cpp')
c_compiler = meson.get_compiler('c')
conf_data = configuration_data()
conf_data.set('CURL_STATICLIB', false)
conf_data.set('ZLIB_WINAPI', false)
is_x86 = host_machine.cpu_family() in [ 'x86', 'x86_64' ]
is_64bit = host_machine.cpu_family() in [ 'aarch64', 'x86_64' ]
is_msvc = c_compiler.get_id() in [ 'msvc' ]
copt_x86 = host_machine.cpu_family() in [ 'x86_64', 'x86' ]
copt_64bit = host_machine.cpu_family() in [ 'x86_64', 'aarch64' ]
copt_msvc = cpp_compiler.get_id() in [ 'msvc' ]
host_arch = host_machine.cpu_family()
host_platform = host_machine.system()
# educated guesses follow, PRs welcome
if c_compiler.get_id() in [ 'msvc' ]
if host_platform != 'windows'
error('this seems fishy')
endif
host_libc = 'msvc'
elif c_compiler.get_id() in [ 'gcc' ] and host_platform == 'windows'
host_libc = 'mingw'
elif host_platform in [ 'darwin' ]
host_libc = 'macos'
elif host_platform in [ 'emscripten' ]
host_platform = 'emscripten'
host_libc = 'emscripten'
elif host_platform in [ 'android' ]
host_platform = 'android'
host_libc = 'bionic'
if cpp_compiler.get_id() in [ 'msvc' ]
copt_compiler = 'msvc'
elif cpp_compiler.get_id() in [ 'gcc', 'clang' ]
copt_compiler = 'gcc'
else
if host_platform != 'linux'
# TODO: maybe use 'default' in place of 'linux', or use something other than host_platform where details such as desktop integration are concerned
warning('host platform is not linux but we will pretend that it is')
host_platform = 'linux'
endif
host_libc = 'gnu'
warning('unsupported compiler: ' + cpp_compiler.get_id() + '; you are on your own')
copt_compiler = 'gcc'
endif
static_variant = get_option('static')
if static_variant != 'prebuilt' and host_platform == 'android'
warning('only prebuilt libs are supported for android')
static_variant = 'prebuilt'
endif
if static_variant == 'system' and host_platform == 'windows' and host_libc == 'msvc'
warning('no way to find system libs for msvc on windows')
static_variant = 'prebuilt'
endif
is_static = static_variant != 'none'
is_debug = get_option('optimization') in [ '0', 'g' ]
app_exe = get_option('app_exe')
tpt_libs_static = 'none'
if static_variant == 'prebuilt'
tpt_libs_static = 'static'
endif
if static_variant == 'none' and host_platform == 'windows' and host_libc == 'msvc'
tpt_libs_static = 'dynamic'
endif
tpt_libs_debug = is_debug ? 'debug' : 'release'
tpt_libs_variant = '@0@-@1@-@2@-@3@'.format(host_arch, host_platform, host_libc, tpt_libs_static)
tpt_libs_vtag = get_option('tpt_libs_vtag')
if tpt_libs_vtag == ''
tpt_libs_vtag = 'v20240112165024'
endif
if tpt_libs_static != 'none'
if tpt_libs_variant not in [
'x86_64-linux-gnu-static',
'x86_64-windows-mingw-static',
'x86_64-windows-msvc-static',
'x86_64-windows-msvc-dynamic',
'x86-windows-msvc-static',
'x86-windows-msvc-dynamic',
'x86_64-darwin-macos-static',
'aarch64-darwin-macos-static',
'x86-android-bionic-static',
'x86_64-android-bionic-static',
'arm-android-bionic-static',
'aarch64-android-bionic-static',
'wasm32-emscripten-emscripten-static',
]
error('no prebuilt @0@ libraries are currently provided'.format(tpt_libs_variant))
endif
tpt_libs = subproject('tpt-libs-prebuilt-@0@-@1@-@2@'.format(tpt_libs_variant, tpt_libs_debug, tpt_libs_vtag))
if host_machine.cpu_family() in [ 'x86_64' ]
copt_architecture = 'x86_64'
elif host_machine.cpu_family() in [ 'x86' ]
copt_architecture = 'i686'
else
if get_option('workaround_elusive_bzip2')
bzip2_lib_name = get_option('workaround_elusive_bzip2_lib_name')
bzip2_include_name = get_option('workaround_elusive_bzip2_include_name')
bzip2_lib_dir = get_option('workaround_elusive_bzip2_lib_dir')
bzip2_include_dir = include_directories(get_option('workaround_elusive_bzip2_include_dir'))
bzip2_static = get_option('workaround_elusive_bzip2_static')
meson.override_dependency('bzip2', declare_dependency(
dependencies: c_compiler.find_library(
bzip2_lib_name,
has_headers: bzip2_include_name,
dirs: bzip2_lib_dir,
header_include_directories: bzip2_include_dir,
static: bzip2_static,
),
include_directories: bzip2_include_dir,
))
endif
warning('unsupported architecture: ' + host_machine.cpu_family() + '; you are on your own')
copt_architecture = 'i686'
endif
x86_sse_level_str = get_option('x86_sse')
if x86_sse_level_str == 'auto'
x86_sse_level = 20
if not is_x86 or not is_64bit or host_platform == 'darwin' or (is_64bit and is_msvc)
x86_sse_level = 0
endif
elif x86_sse_level_str == 'sse3'
x86_sse_level = 30
elif x86_sse_level_str == 'sse2'
x86_sse_level = 20
elif x86_sse_level_str == 'sse'
x86_sse_level = 10
elif x86_sse_level_str == 'none'
x86_sse_level = 0
if host_machine.system() in [ 'linux', 'freebsd' ]
copt_platform = 'lin'
elif host_machine.system() in [ 'windows' ]
copt_platform = 'win'
elif host_machine.system() in [ 'darwin' ]
copt_platform = 'mac'
else
warning('unsupported platform: ' + host_machine.system() + '; you are on your own')
copt_platform = 'lin'
endif
lua_variant = get_option('lua')
if lua_variant == 'auto'
if host_platform == 'emscripten'
lua_variant = 'lua5.2'
else
lua_variant = 'luajit'
endif
endif
if lua_variant == 'luajit' and host_platform == 'emscripten'
error('luajit does not work with emscripten')
endif
if lua_variant == 'none'
lua_dep = []
elif lua_variant == 'lua5.1' or lua_variant == 'lua5.2'
lua_dep = dependency(lua_variant + '-c++', static: is_static, required: false)
if not lua_dep.found()
if not get_option('workaround_noncpp_lua')
error('your system @0@ is not compatible with C++, configure with -Dworkaround_noncpp_lua=true to disable this error'.format(lua_variant))
endif
lua_dep = dependency(lua_variant, static: is_static)
endif
elif lua_variant == 'luajit'
lua_dep = dependency('luajit', static: is_static)
if get_option('ogli') or get_option('oglr')
error('OpenGL features are currently unavailable')
endif
enable_http = get_option('http')
if host_platform == 'android'
android_ndk_toolchain_prefix = meson.get_external_property('android_ndk_toolchain_prefix')
android_platform = meson.get_external_property('android_platform')
tpt_libs_android_toolchain_prefix = tpt_libs.get_variable('android_toolchain_prefix')
tpt_libs_android_system_version = tpt_libs.get_variable('android_system_version')
tpt_libs_android_platform = tpt_libs.get_variable('android_platform')
if '@0@@1@-'.format(tpt_libs_android_toolchain_prefix, tpt_libs_android_system_version) != android_ndk_toolchain_prefix
error('tpt-libs android toolchain mismatch')
uopt_static = get_option('static')
use_tpt_libs = 'no'
tpt_libs_vtag = 'v20210409104352'
if uopt_static == 'system'
if copt_platform == 'win'
error('no way to find static system libraries on windows')
endif
if tpt_libs_android_platform != android_platform
error('tpt-libs android platform mismatch')
elif uopt_static == 'prebuilt'
use_tpt_libs = 'static'
else
if copt_platform == 'win'
use_tpt_libs = 'dynamic'
endif
endif
curl_dep = []
if enable_http and host_platform != 'emscripten'
curl_dep = dependency('libcurl', static: is_static)
if use_tpt_libs != 'no'
nope = false
if copt_architecture == 'i686' and (copt_platform != 'win' or copt_compiler != 'msvc')
nope = true
endif
if copt_architecture == 'x86_64' and (copt_platform == 'lin' or copt_platform == 'mac') and copt_compiler != 'gcc'
nope = true
endif
if copt_architecture == 'x86_64' and copt_platform == 'win' and copt_compiler == 'gcc'
nope = true
endif
quad_compiler = copt_compiler
if use_tpt_libs == 'dynamic' and copt_platform == 'win'
# DLLs should be compatible with anything, right?
quad_compiler = 'msvc'
endif
quad = '@0@-@1@-@2@-@3@'.format(copt_architecture, copt_platform, quad_compiler, use_tpt_libs)
if nope
error('no prebuilt @0@ libraries are currently provided'.format(quad))
endif
tpt_libs = subproject('tpt-libs-prebuilt-@0@-@1@'.format(quad, tpt_libs_vtag))
endif
uopt_native = get_option('native')
uopt_x86_sse = get_option('x86_sse')
if uopt_x86_sse == 'auto'
uopt_x86_sse_level = 20
elif uopt_x86_sse == 'sse3'
uopt_x86_sse_level = 30
elif uopt_x86_sse == 'sse2'
uopt_x86_sse_level = 20
elif uopt_x86_sse == 'sse'
uopt_x86_sse_level = 10
elif uopt_x86_sse == 'none'
uopt_x86_sse_level = 0
endif
if not copt_x86 or uopt_native
uopt_x86_sse_level = 0
endif
uopt_lua = get_option('lua')
if uopt_lua == 'luajit'
lua_opt_dep = [ use_tpt_libs != 'no' ? tpt_libs.get_variable('luajit_dep') : dependency('luajit', static: uopt_static == 'system') ]
elif uopt_lua == 'lua5.2'
lua_opt_dep = [ use_tpt_libs != 'no' ? tpt_libs.get_variable('lua52_dep') : dependency('lua5.2-c++', static: uopt_static == 'system') ]
elif uopt_lua == 'lua5.1'
lua_opt_dep = [ use_tpt_libs != 'no' ? tpt_libs.get_variable('lua51_dep') : dependency('lua5.1-c++', static: uopt_static == 'system') ]
else
lua_opt_dep = []
endif
uopt_http = get_option('http')
if uopt_http
curl_opt_dep = [ use_tpt_libs != 'no' ? tpt_libs.get_variable('libcurl_dep') : dependency('libcurl', static: uopt_static == 'system') ]
else
curl_opt_dep = []
endif
uopt_fftw = get_option('gravfft')
if uopt_fftw
fftw_opt_dep = [ use_tpt_libs != 'no' ? tpt_libs.get_variable('fftw_dep') : dependency('fftw3f', static: uopt_static == 'system') ]
else
fftw_opt_dep = []
endif
threads_dep = dependency('threads')
zlib_dep = use_tpt_libs != 'no' ? tpt_libs.get_variable('zlib_dep') : dependency('zlib', static: uopt_static == 'system')
sdl2_dep = use_tpt_libs != 'no' ? tpt_libs.get_variable('sdl2_dep') : dependency('sdl2', static: uopt_static == 'system')
project_link_args = []
project_c_args = []
project_cpp_args = []
fftw_dep = dependency('fftw3f', static: is_static)
threads_dep = dependency('threads')
if host_platform == 'emscripten'
zlib_dep = []
png_dep = []
sdl2_dep = []
bzip2_dep = []
project_link_args += [
'--no-heap-copy',
'-s', 'WASM=1',
'-s', 'ALLOW_MEMORY_GROWTH=1',
'-s', 'FORCE_FILESYSTEM=1',
'-s', 'EXIT_RUNTIME=0',
'-s', 'EXPORTED_RUNTIME_METHODS=ccall,cwrap',
'-s', 'FS_DEBUG',
'-s', 'MODULARIZE',
'-s', 'EXPORT_NAME=create_' + app_exe,
'-Wl,-u,_emscripten_run_callback_on_thread',
'-lidbfs.js',
]
emcc_args = [
'-s', 'USE_SDL=2',
'-s', 'USE_BZIP2=1',
'-s', 'USE_LIBPNG',
'-s', 'USE_ZLIB=1',
'-s', 'DISABLE_EXCEPTION_CATCHING=0',
]
if is_debug
project_link_args += [ '--source-map-base=./' ]
emcc_args += [ '-gsource-map' ]
if copt_msvc
if uopt_x86_sse_level >= 30
message('SSE3 configured to be enabled but unavailable in msvc')
uopt_x86_sse_level = 20
endif
project_link_args += emcc_args
project_c_args += emcc_args
project_cpp_args += emcc_args
else
zlib_dep = dependency('zlib', static: is_static)
png_dep = dependency('libpng16', static: is_static)
sdl2_dep = dependency('sdl2', static: is_static)
bzip2_dep = dependency('bzip2', static: is_static)
endif
json_dep = dependency('jsoncpp', static: is_static)
if is_msvc
if x86_sse_level >= 30
warning('SSE3 configured to be enabled but unavailable in msvc')
x86_sse_level = 20
endif
if is_64bit and x86_sse_level > 0
warning('SSE explicitly configured but unavailable in msvc targeting 64-bit machines')
x86_sse_level = 0
if uopt_native
message('local machine optimization configured to be enabled but unavailable in msvc')
uopt_native = false
endif
args_msvc = [
'/GS',
'/D_SCL_SECURE_NO_WARNINGS',
'/DUNICODE',
'/D_UNICODE',
'-D_SCL_SECURE_NO_WARNINGS',
]
if x86_sse_level >= 20
if copt_64bit
message('SSE explicitly configured but unavailable in msvc targeting 64-bit machines')
else
if uopt_x86_sse_level >= 20
args_msvc += [ '/arch:SSE2' ]
elif x86_sse_level >= 10
elif uopt_x86_sse_level >= 10
args_msvc += [ '/arch:SSE' ]
endif
if not is_debug
endif
if get_option('debug')
project_link_args += [
'/NODEFAULTLIB:MSVCRT',
]
else
args_msvc += [
'/Oy-',
'/fp:fast',
'/GL',
]
project_link_args += [
'/OPT:REF',
'/OPT:ICF',
'/LTCG',
]
endif
project_c_args += args_msvc
project_cpp_args += args_msvc
else
args_ccomp = []
if host_platform == 'darwin' and x86_sse_level > 0
args_ccomp = [ '-U__STRICT_ANSI__', '-Wno-unused-result' ]
if copt_platform == 'mac'
if uopt_x86_sse_level >= 0
message('SSE level explicitly configured but unavailable on macosx')
x86_sse_level = 0
uopt_x86_sse_level = 0
endif
if x86_sse_level >= 30
if uopt_native
message('local machine optimization configured to be enabled but unavailable on macosx')
uopt_native = false
endif
else
if uopt_x86_sse_level >= 30
args_ccomp += [ '-msse3' ]
elif x86_sse_level >= 20
endif
if uopt_x86_sse_level >= 20
args_ccomp += [ '-msse2' ]
elif x86_sse_level >= 10
endif
if uopt_x86_sse_level >= 10
args_ccomp += [ '-msse' ]
endif
if host_platform == 'windows'
args_ccomp += [
'-DUNICODE',
'-D_UNICODE',
]
if uopt_native
args_ccomp += [ '-march=native' ]
endif
if not is_debug
endif
if not get_option('debug')
args_ccomp += [
'-ftree-vectorize',
'-funsafe-math-optimizations',
@ -294,191 +208,137 @@ else
'-fomit-frame-pointer',
]
endif
if host_platform == 'android'
if not is_64bit
args_ccomp += [ '-U_FILE_OFFSET_BITS' ]
if copt_platform == 'mac' and uopt_static == 'prebuilt'
args_ccomp += [ '-mmacosx-version-min=10.9' ]
project_link_args += [ '-mmacosx-version-min=10.9' ]
endif
# android doesn't ship libc++_shared.so, so we might as well link it statically;
# the alternative would be to grab libc++_shared.so from the NDK and ship it with
# the app alongside libpowder.so, and possibly add it to SDL's list of libraries to load
project_link_args += [ '-static-libstdc++' ]
if copt_platform == 'lin' and not get_option('b_pie') and get_option('workaround_gcc_no_pie') # nice one, meson
project_link_args += [ '-no-pie' ]
endif
project_c_args += args_ccomp + [
'-Wno-implicit-fallthrough',
'-Wno-missing-field-initializers',
'-Wno-unused-result',
'-Wno-unused-parameter',
]
project_cpp_args += args_ccomp + [
'-Wno-invalid-offsetof',
'-Wno-unused-result',
'-Wno-missing-field-initializers',
'-Wno-unused-parameter',
]
project_c_args += args_ccomp
project_cpp_args += args_ccomp + [ '-Wno-invalid-offsetof' ]
endif
if host_platform == 'windows'
args_ccomp_win = [ '-D_WIN32_WINNT=0x0501', '-DNOMINMAX' ]
windows_mod = import('windows')
if is_static
args_ccomp_win += [ '-DCURL_STATICLIB' ]
if host_arch == 'x86_64'
args_ccomp_win += [ '-DZLIB_WINAPI' ]
endif
endif
if tpt_libs_static == 'dynamic'
foreach input_output_condition : tpt_libs.get_variable('config_dlls')
dll_input = input_output_condition[0]
dll_output = input_output_condition[1]
dll_condition = input_output_condition[2]
do_copy = false
if dll_condition == 'all'
do_copy = true
elif dll_condition == 'lua=' + lua_variant
do_copy = true
endif
if do_copy
fs.copyfile(dll_input, dll_output)
endif
endforeach
endif
if copt_platform == 'win'
other_dep = tpt_libs.get_variable('other_dep')
args_ccomp_win = [ '-D_WIN32_WINNT=0x0501' ]
project_c_args += args_ccomp_win
project_cpp_args += args_ccomp_win
windows_mod = import('windows')
if uopt_static != 'none'
conf_data.set('CURL_STATICLIB', true)
if copt_architecture == 'x86_64'
conf_data.set('ZLIB_WINAPI', true)
endif
else
foreach input_and_output : tpt_libs.get_variable('config_dlls')
configure_file(input: input_and_output[0], output: input_and_output[1], copy: true)
endforeach
endif
endif
project_inc = include_directories([ 'src', 'resources' ])
if copt_platform == 'mac' and uopt_lua == 'luajit'
project_link_args += [
'-pagezero_size', '10000',
'-image_base', '100000000',
]
endif
if host_platform == 'windows'
ident_platform = is_64bit ? 'WIN64' : 'WIN32'
elif host_platform == 'linux'
ident_platform = is_64bit ? 'LIN64' : 'LIN32'
elif host_platform == 'darwin'
ident_platform = host_arch == 'aarch64' ? 'MACOSARM' : 'MACOSX'
project_inc = include_directories([ 'src', 'data', 'resources' ])
conf_data.set('LIN', copt_platform == 'lin')
conf_data.set('WIN', copt_platform == 'win')
conf_data.set('MACOSX', copt_platform == 'mac')
conf_data.set('X86', copt_x86)
conf_data.set('X86_SSE3', uopt_x86_sse_level >= 30)
conf_data.set('X86_SSE2', uopt_x86_sse_level >= 20)
conf_data.set('X86_SSE', uopt_x86_sse_level >= 10)
conf_data.set('NATIVE', uopt_native)
conf_data.set('_64BIT', copt_64bit)
conf_data.set('OGLI', get_option('ogli'))
conf_data.set('OGLR', get_option('oglr'))
conf_data.set('PIX32OGL', get_option('ogli'))
conf_data.set('BETA', get_option('beta'))
conf_data.set('NO_INSTALL_CHECK', not get_option('install_check'))
conf_data.set('IGNORE_UPDATES', get_option('ignore_updates'))
conf_data.set('MOD_ID', get_option('mod_id'))
conf_data.set('DEBUG', get_option('debug'))
conf_data.set('SNAPSHOT', get_option('snapshot'))
conf_data.set('SNAPSHOT_ID', get_option('snapshot_id'))
conf_data.set('SERVER', '"' + get_option('server') + '"')
conf_data.set('STATICSERVER', '"' + get_option('static_server') + '"')
if get_option('update_server') != ''
conf_data.set('UPDATESERVER', '"' + get_option('update_server') + '"')
else
ident_platform = 'UNKNOWN'
conf_data.set('UPDATESERVER', false)
endif
project_deps = []
data_files = []
powder_deps = []
project_export_dynamic = false
resources_files = []
subdir('src')
subdir('data')
subdir('resources')
powder_files += data_files
render_files += data_files
font_files += data_files
if host_platform == 'emscripten'
project_link_args += [
'-o', app_exe + '.js', # so we get a .wasm, and a .js
]
endif
if get_option('export_lua_symbols')
if is_static and lua_variant != 'none' and not project_export_dynamic
if host_platform == 'windows'
error('Lua symbols are currently impossible to export correctly on Windows')
elif c_compiler.has_link_argument('-Wl,--export-dynamic-symbol')
project_link_args += [
'-Wl,--export-dynamic-symbol=lua_*',
'-Wl,--export-dynamic-symbol=luaL_*',
'-Wl,--export-dynamic-symbol=luaopen_*',
]
else
warning('your linker does not support -Wl,--export-dynamic-symbol so Meson will be instructed to export all symbols in order to enable loading Lua shared modules, which may blow up the size of the resulting binary')
project_export_dynamic = true
endif
endif
endif
if get_option('build_powder')
powder_deps += project_deps + [
powder_deps = [
threads_dep,
zlib_dep,
png_dep,
sdl2_dep,
lua_dep,
curl_dep,
fftw_dep,
bzip2_dep,
json_dep,
lua_opt_dep,
curl_opt_dep,
fftw_opt_dep,
]
if host_platform == 'android'
powder_sha = shared_library(
app_exe,
sources: powder_files,
include_directories: project_inc,
c_args: project_c_args,
cpp_args: project_cpp_args,
link_args: project_link_args,
dependencies: powder_deps,
)
subdir('android')
else
executable(
app_exe,
sources: powder_files,
include_directories: project_inc,
c_args: project_c_args,
cpp_args: project_cpp_args,
win_subsystem: is_debug ? 'console' : 'windows',
link_args: project_link_args,
dependencies: powder_deps,
export_dynamic: project_export_dynamic,
install: true,
)
if copt_platform == 'win'
powder_deps += other_dep
endif
executable(
'powder',
sources: powder_files,
include_directories: [ project_inc, powder_inc ],
c_args: project_c_args,
cpp_args: project_cpp_args,
cpp_pch: 'pch/pch_cpp.h',
gui_app: true,
link_args: project_link_args,
dependencies: powder_deps,
)
endif
if get_option('build_render')
if host_platform == 'emscripten'
error('render does not target emscripten')
endif
render_deps = project_deps + [
render_deps = [
threads_dep,
zlib_dep,
bzip2_dep,
json_dep,
png_dep,
]
render_link_args = project_link_args
if host_platform == 'linux' and is_static
render_link_args += [ '-static' ]
endif
executable(
'render',
sources: render_files,
include_directories: project_inc,
include_directories: [ project_inc, render_inc ],
c_args: project_c_args,
cpp_args: project_cpp_args,
link_args: render_link_args,
cpp_pch: 'pch/pch_cpp.h',
link_args: project_link_args,
dependencies: render_deps,
export_dynamic: project_export_dynamic,
)
endif
if get_option('build_font')
if host_platform == 'emscripten'
error('font does not target emscripten')
endif
font_deps = project_deps + [
font_deps = [
threads_dep,
zlib_dep,
png_dep,
sdl2_dep,
bzip2_dep,
json_dep,
]
if copt_platform == 'win'
font_deps += other_dep
endif
executable(
'font',
sources: font_files,
include_directories: project_inc,
include_directories: [ project_inc, font_inc ],
c_args: project_c_args,
cpp_args: project_cpp_args,
cpp_pch: 'pch/pch_cpp.h',
gui_app: true,
link_args: project_link_args,
dependencies: font_deps,
export_dynamic: project_export_dynamic,
)
endif

View File

@ -18,11 +18,10 @@ option(
description: 'Don\'t show notifications about available updates'
)
option(
'can_install',
type: 'combo',
choices: [ 'no', 'yes', 'yes_check', 'auto' ],
value: 'auto',
description: 'Disable (\'no\') or enable (\'yes\') setting up file and URL associations, or even offer to do it at startup (\'yes_check\')'
'install_check',
type: 'boolean',
value: false,
description: 'Do install check on startup'
)
option(
'http',
@ -30,6 +29,12 @@ option(
value: true,
description: 'Enable HTTP via libcurl'
)
option(
'gravfft',
type: 'boolean',
value: true,
description: 'Enable FFT gravity via libfftw3'
)
option(
'snapshot',
type: 'boolean',
@ -37,46 +42,11 @@ option(
description: 'Snapshot build'
)
option(
'display_version_major',
'snapshot_id',
type: 'integer',
min: 0,
value: 98,
description: 'Major component of the display version, should more or less map to the MINOR version in semantic versioning'
)
option(
'display_version_minor',
type: 'integer',
min: 0,
value: 2,
description: 'Minor component of the display version, should more or less map to the PATCH version in semantic versioning'
)
option(
'build_num',
type: 'integer',
min: 0,
value: 365,
description: 'Build number, should be strictly monotonously increasing across public releases'
)
option(
'upstream_version_major',
type: 'integer',
min: 0,
value: 98,
description: 'Major component of the upstream display version, mod owners should not change this but merge upstream changes to it'
)
option(
'upstream_version_minor',
type: 'integer',
min: 0,
value: 2,
description: 'Minor component of the upstream display version, mod owners should not change this but merge upstream changes to it'
)
option(
'upstream_build_num',
type: 'integer',
min: 0,
value: 365,
description: 'Upstream build number, mod owners should not change this but merge upstream changes to it'
value: 199,
description: 'Snapshot ID, only relevant if \'snapshot\' is true'
)
option(
'mod_id',
@ -88,10 +58,17 @@ option(
option(
'lua',
type: 'combo',
choices: [ 'none', 'lua5.1', 'lua5.2', 'luajit', 'auto' ],
value: 'auto',
choices: [ 'none', 'lua5.1', 'lua5.2', 'luajit' ],
value: 'luajit',
description: 'Lua library to use'
)
option(
'ssl',
type: 'combo',
choices: [ 'openssl' ],
value: 'openssl',
description: 'SSL library to use'
)
option(
'x86_sse',
type: 'combo',
@ -99,6 +76,24 @@ option(
value: 'auto',
description: 'Enable SSE (available only on x86)'
)
option(
'native',
type: 'boolean',
value: false,
description: 'Build with optimizations specific to the local machine, may not run on other machines, overrides \'x86_sse\''
)
option(
'ogli',
type: 'boolean',
value: false,
description: 'Enable OpenGL interface rendering (currently defunct)'
)
option(
'oglr',
type: 'boolean',
value: false,
description: 'Enable OpenGL particle rendering (currently defunct)'
)
option(
'build_powder',
type: 'boolean',
@ -133,181 +128,11 @@ option(
'update_server',
type: 'string',
value: '',
description: 'Update server, only used by snapshots and mods, see \'snapshot\' and \'mod_id\''
description: 'Update server, only used by snapshots and mods, see \'snapshot_id\' and \'mod_id\''
)
option(
'workaround_noncpp_lua',
type: 'boolean',
value: false,
description: 'Allow linking against a non-C++ system Lua'
)
option(
'workaround_elusive_bzip2',
'workaround_gcc_no_pie',
type: 'boolean',
value: true,
description: 'acquire bzip2 dependency with find_library'
)
option(
'workaround_elusive_bzip2_lib_name',
type: 'string',
value: 'bz2',
description: 'bzip2 library name, see \'workaround_elusive_bzip2\''
)
option(
'workaround_elusive_bzip2_lib_dir',
type: 'string',
value: '/usr/lib/x86_64-linux-gnu',
description: 'bzip2 library directory, see \'workaround_elusive_bzip2\''
)
option(
'workaround_elusive_bzip2_include_name',
type: 'string',
value: 'bzlib.h',
description: 'bzip2 header name, see \'workaround_elusive_bzip2\''
)
option(
'workaround_elusive_bzip2_include_dir',
type: 'string',
value: '/usr/include',
description: 'bzip2 header directory, see \'workaround_elusive_bzip2\''
)
option(
'workaround_elusive_bzip2_static',
type: 'boolean',
value: false,
description: 'bzip2 static setting, see \'workaround_elusive_bzip2\''
)
option(
'tpt_libs_vtag',
type: 'string',
value: '',
description: 'tpt-libs vtag override, only used for tpt-libs development'
)
option(
'android_keystore',
type: 'string',
value: '',
description: 'Path to Java keystore for signing an APK, only used for Android development'
)
option(
'android_keyalias',
type: 'string',
value: 'androidkey',
description: 'Signing key alias for signing an APK, only used for Android development'
)
option(
'app_name',
type: 'string',
value: 'The Powder Toy',
description: 'App name, used for desktop integration and the window title, change if you work on a mod'
)
option(
'app_comment',
type: 'string',
value: 'Physics sandbox game',
description: 'App comment, used for desktop integration, change if you work on a mod'
)
option(
'app_exe',
type: 'string',
value: 'powder',
description: 'App executable name, used for desktop integration, change if you work on a mod'
)
option(
'app_id',
type: 'string',
value: 'uk.co.powdertoy.tpt',
description: 'App ID, a D-Bus well-known name, used for desktop integration, change if you work on a mod'
)
option(
'app_data',
type: 'string',
value: 'The Powder Toy',
description: 'App data directory name, do not change even if you work on a mod, only if you know what you are doing'
)
option(
'app_vendor',
type: 'string',
value: 'powdertoy',
description: 'App vendor prefix, used for desktop integration, do not change even if you work on a mod, only if you know what you are doing'
)
option(
'enforce_https',
type: 'boolean',
value: true,
description: 'Enforce encrypted HTTP traffic, may be disabled for debugging'
)
option(
'secure_ciphers_only',
type: 'boolean',
value: false,
description: 'Use only secure ciphers for encrypted HTTP traffic, please review cipher list before enabling'
)
option(
'prepare',
type: 'boolean',
value: false,
description: 'Used by ghactions workflows, not useful otherwise'
)
option(
'render_icons_with_inkscape',
type: 'feature',
value: 'disabled',
description: 'Render icons with Inkscape (inkscape binary needs to be in PATH)'
)
option(
'resolve_vcs_tag',
type: 'combo',
choices: [ 'no', 'static_release_only', 'yes' ],
value: 'static_release_only',
description: 'Enable VCS tag resolution, introduces an always-stale custom target'
)
option(
'manifest_copyright',
type: 'string',
value: 'Copyright © 2008-2011 Stanislaw K Skowrenek, Copyright © 2011-2023 Simon Robertshaw, Copyright © 2016-2023 jacob1',
description: 'Copyright string, don\'t take too seriously, subject to change'
)
option(
'manifest_macos_min_ver',
type: 'string',
value: '',
description: 'MacOS minimum allowed platform version string, used by ghactions workflows, not useful otherwise'
)
option(
'manifest_date',
type: 'string',
value: '',
description: 'Build date string, used by ghactions workflows, not useful otherwise'
)
option(
'platform_clipboard',
type: 'boolean',
value: true,
description: 'Enable platform clipboard, allows copying simulation data between different windows'
)
option(
'use_bluescreen',
type: 'combo',
choices: [ 'no', 'yes', 'auto' ],
value: 'auto',
description: 'Show blue error screen upon unhandled signals and exceptions'
)
option(
'windows_icons',
type: 'boolean',
value: true,
description: 'Add icon resources to the executable on Windows'
)
option(
'windows_utf8cp',
type: 'boolean',
value: true,
description: 'Ask Windows nicely for UTF-8 as the codepage'
)
option(
'export_lua_symbols',
type: 'boolean',
value: false,
description: 'Export Lua symbols to enable loading of Lua shared modules'
description: 'Pass -no-pie to gcc manually to work around meson\'s -Db_pie=false doing nothing'
)

94
pch/pch_cpp.h Normal file
View File

@ -0,0 +1,94 @@
#include "Config.h"
#include "common/Format.h"
#include "common/Singleton.h"
#include "common/String.h"
#include "common/tpt-compat.h"
#include "common/tpt-inline.h"
#include "common/tpt-minmax.h"
#include "common/tpt-rand.h"
#include "common/tpt-rand.h"
#include <algorithm>
#include <array>
#include <atomic>
#include <cassert>
#include <cfloat>
#include <climits>
#include <cmath>
#include <condition_variable>
#include <csignal>
#include <cstdarg>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <ctime>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <mutex>
#include <numeric>
#include <ostream>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <string>
#include <thread>
#include <typeinfo>
#include <type_traits>
#include <utility>
#include <vector>
#include <errno.h>
#include <fcntl.h>
#include <fftw3.h>
#include <float.h>
#include <math.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#ifndef WIN
# include <sys/param.h>
# include <sys/poll.h>
# include <sys/socket.h>
# include <sys/stat.h>
# include <sys/time.h>
# include <sys/types.h>
# include <sys/un.h>
#endif
#ifdef WIN
# include <shlobj.h>
# include <shlwapi.h>
# include <windows.h>
# include <winsock.h>
#endif
#include <curl/curl.h>
#include <bson/BSON.h>
#include <json/json-forwards.h>
#include <json/json.h>
#include <zlib.h>
#if !defined(FONTEDITOR) && !defined(RENDERER) && defined(LUACONSOLE)
# include "lua/LuaCompat.h"
#endif
#include "SDLCompat.h"

View File

@ -1,70 +0,0 @@
<?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>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLSchemes</key>
<array>
<string>ptsave</string>
</array>
<key>CFBundleURLName</key>
<string>Powder Toy Save URL</string>
</dict>
</array>
<key>CFBundleName</key>
<string>@APPNAME@</string>
<key>CFBundleIconFile</key>
<string>icon_exe.icns</string>
<key>NSHumanReadableCopyright</key>
<string>@MANIFEST_COPYRIGHT@</string>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleDocumentTypes</key>
<array>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>stm</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>icon_cps.icns</string>
<key>CFBundleTypeName</key>
<string>Powder Toy Save</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
<dict>
<key>CFBundleTypeExtensions</key>
<array>
<string>cps</string>
</array>
<key>CFBundleTypeIconFile</key>
<string>icon_cps.icns</string>
<key>CFBundleTypeName</key>
<string>Powder Toy Stamp</string>
<key>CFBundleTypeRole</key>
<string>Viewer</string>
</dict>
</array>
<key>CFBundleExecutable</key>
<string>@APPEXE@</string>
<key>CFBundleIdentifier</key>
<string>@APPID@</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>@DISPLAY_VERSION_MAJOR@.@DISPLAY_VERSION_MINOR@</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>@DISPLAY_VERSION_MAJOR@.@DISPLAY_VERSION_MINOR@ (build @BUILD_NUM@)</string>
<key>LSMinimumSystemVersion</key>
<string>@MANIFEST_MACOS_MIN_VER@</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

View File

@ -1,137 +0,0 @@
#include <cstdint>
#include <cstring>
#include <fstream>
#include <iostream>
#include <string>
#include <vector>
static void writeU32LE(uint8_t *dest, uint32_t value)
{
dest[0] = uint8_t( value & 0xFF);
dest[1] = uint8_t((value >> 8) & 0xFF);
dest[2] = uint8_t((value >> 16) & 0xFF);
dest[3] = uint8_t((value >> 24) & 0xFF);
}
static uint32_t readU32BE(const uint8_t *src)
{
return uint32_t(src[3]) |
(uint32_t(src[2]) << 8) |
(uint32_t(src[1]) << 16) |
(uint32_t(src[0]) << 24);
}
int main(int argc, char *argv[])
{
if (argc < 3)
{
std::cerr << "usage: " << argv[0] << " OUTPUT INPUT..." << std::endl;
exit(1);
}
auto images = argc - 2;
if (images > 255)
{
std::cerr << "too many images specified" << std::endl;
exit(1);
}
std::string outputPath = argv[1];
std::ofstream output(outputPath, std::ios::binary);
auto outputFailure = [&outputPath](std::string action) {
std::cerr << "failed to " << action << " " << outputPath << ": " << strerror(errno) << std::endl;
exit(1);
};
if (!output)
{
outputFailure("open");
}
std::vector<char> header(6 + images * 16, 0);
auto writeHeader = [&header, &output, &outputFailure]() {
output.seekp(0, std::ios_base::beg);
output.write(&header[0], header.size());
if (!output)
{
outputFailure("write");
}
};
writeHeader(); // make space for header
auto *headerU8 = reinterpret_cast<uint8_t *>(&header[0]);
headerU8[2] = 1;
headerU8[4] = images;
for (auto image = 0; image < images; ++image)
{
std::string inputPath = argv[2 + image];
std::ifstream input(inputPath, std::ios::binary);
auto inputFailure = [&inputPath](std::string action) {
std::cerr << "failed to " << action << " " << inputPath << ": " << strerror(errno) << std::endl;
exit(1);
};
auto imageFailure = [&inputPath](std::string failure) {
std::cerr << "failed to process " << inputPath << ": " << failure << std::endl;
exit(1);
};
if (!input)
{
inputFailure("open");
}
std::vector<char> buf;
input.seekg(0, std::ios_base::end);
buf.resize(input.tellg());
input.seekg(0, std::ios_base::beg);
input.read(&buf[0], buf.size());
if (!input)
{
inputFailure("read");
}
auto *bufU8 = reinterpret_cast<uint8_t *>(&buf[0]);
if (buf.size() < 0x21 ||
readU32BE(&bufU8[0]) != UINT32_C(0x89504E47) ||
readU32BE(&bufU8[4]) != UINT32_C(0x0D0A1A0A) ||
bufU8[0x18] != 8 ||
bufU8[0x19] != 6)
{
imageFailure("not a 32bpp RGBA PNG");
}
auto writeOffset = output.tellp();
output.write(&buf[0], buf.size());
if (!output)
{
outputFailure("write");
}
auto width = readU32BE(&bufU8[0x10]);
auto height = readU32BE(&bufU8[0x14]);
if (width == 256)
{
width = 0;
}
if (width > 255)
{
imageFailure("width exceeds U8 limit");
}
if (height == 256)
{
height = 0;
}
if (height > 255)
{
imageFailure("height exceeds U8 limit");
}
auto *entryU8 = headerU8 + 6 + image * 16;
entryU8[0] = width;
entryU8[1] = height;
entryU8[4] = 1;
entryU8[6] = 32;
if (buf.size() > UINT32_MAX)
{
imageFailure("data size exceeds U32 limit");
}
writeU32LE(&entryU8[8], uint32_t(buf.size()));
if (writeOffset > UINT32_MAX)
{
std::cerr << "output data size exceeds U32 limit" << std::endl;
exit(1);
}
writeU32LE(&entryU8[12], uint32_t(writeOffset));
}
writeHeader(); // actually write it out
return 0;
}

View File

@ -1,52 +0,0 @@
#include <fstream>
int main(int argc, char *argv[])
{
if (argc != 5)
{
return 1;
}
auto *outputCppPath = argv[1];
auto *outputHPath = argv[2];
auto *inputAnyPath = argv[3];
auto *symbolName = argv[4];
std::ifstream inputAny(inputAnyPath, std::ios::binary);
std::ofstream outputCpp(outputCppPath);
if (!outputCpp)
{
return 2;
}
outputCpp << "#include \"" << outputHPath << "\"\nconst unsigned char " << symbolName << "[] = { ";
auto dataLen = 0U;
while (true)
{
char ch;
inputAny.read(&ch, 1);
if (inputAny.eof())
{
break;
}
if (!inputAny)
{
return 3;
}
outputCpp << (unsigned int)(unsigned char)(ch) << ", ";
dataLen += 1;
}
outputCpp << " }; const unsigned int " << symbolName << "_size = " << dataLen << ";\n";
if (!outputCpp)
{
return 4;
}
std::ofstream outputH(outputHPath);
if (!outputH)
{
return 5;
}
outputH << "#pragma once\nextern const unsigned char " << symbolName << "[]; extern const unsigned int " << symbolName << "_size;\n";
if (!outputH)
{
return 6;
}
return 0;
}

View File

@ -1,34 +0,0 @@
<?xml version="1.0"?>
<component type="desktop">
<id>@APPID@</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0</project_license>
<name>@APPNAME@</name>
<summary>@APPCOMMENT@</summary>
<content_rating type="oars-1.1">
<content_attribute id="social-chat">moderate</content_attribute>
</content_rating>
<launchable type="desktop-id">@APPID@.desktop</launchable>
<description>
<p>
Have you ever wanted to blow something up? Or maybe you always dreamt of operating an atomic power plant? Do you have a will to develop your own CPU? The Powder Toy lets you to do all of these, and even more!
</p>
<p>
The Powder Toy is a free physics sandbox game, which simulates air pressure and velocity, heat, gravity and a countless number of interactions between different substances! The game provides you with various building materials, liquids, gases and electronic components which can be used to construct complex machines, guns, bombs, realistic terrains and almost anything else. You can then mine them and watch cool explosions, add intricate wirings, play with little stickmen or operate your machine. You can browse and play thousands of different saves made by the community or upload your own we welcome your creations!
</p>
<p>
There is a Lua API you can automate your work or even make plugins for the game. The Powder Toy is free and the source code is distributed under the GNU General Public License, so you can modify the game yourself or help with development.
</p>
</description>
<screenshots>
<screenshot>
<image>https://powdertoy.co.uk/Themes/Next/Design/Images/Screen2.png</image>
</screenshot>
</screenshots>
<url type="homepage">https://powdertoy.co.uk/</url>
<url type="bugtracker">https://github.com/The-Powder-Toy/The-Powder-Toy/issues</url>
<url type="help">https://powdertoy.co.uk/Wiki/W/Main_Page.html</url>
<releases>
<release date="@MANIFEST_DATE@" version="@DISPLAY_VERSION_MAJOR@.@DISPLAY_VERSION_MINOR@.@BUILD_NUM@" />
</releases>
</component>

BIN
resources/document.icns Normal file

Binary file not shown.

BIN
resources/document.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

View File

@ -1,9 +0,0 @@
We keep these icons here to make it possible to build TPT without Inkscape. If
you have Inkscape and want to change the game's icons, edit the SVGs in the
parent directory and configure your build sites with
`-Drender_icons_with_inkscape=true`.
The GitHub Actions workflows currently do not use Inkscape and use these icons
instead, so once you are satisfied with the state of the SVGs, replace these
icons with the ones in your build site in the same subdirectory and make a new
commit.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 563 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 644 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.8 KiB

BIN
resources/icon.icns Executable file

Binary file not shown.

BIN
resources/icon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

View File

@ -0,0 +1,16 @@
import sys
from PIL import Image
image = Image.open(sys.argv[1])
output = ""
formatted = []
for pixel in image.getdata():
formatted.extend("0x{0:02X}".format(byte) for byte in pixel)
for i in range(len(formatted)/16 + 1):
print(", ".join(formatted[i*16:(i+1)*16]) + ",")
"""with open(sys.argv[1], "rb") as icon:
icondata = icon.read()
output = ["0x{0:02X}".format(ord(byte)) for byte in icondata]
for line in range(len(output)/16+1):
print(", ".join(output[line*16:(line+1)*16])+",")"""

Binary file not shown.

View File

@ -0,0 +1,117 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="1024"
height="1024"
viewBox="0 0 270.93334 270.93333"
version="1.1"
id="svg8"
inkscape:version="0.91 r13725"
sodipodi:docname="icon_pile_gradient.svg"
inkscape:export-filename="/home/lbphacker/temp/tpt-logo/icon_circle.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<defs
id="defs2">
<linearGradient
inkscape:collect="always"
id="linearGradient5602">
<stop
style="stop-color:#ff7a4c;stop-opacity:1"
offset="0"
id="stop5604" />
<stop
style="stop-color:#ffff4a;stop-opacity:1"
offset="1"
id="stop5606" />
</linearGradient>
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter5229"
x="-0.099935167"
width="1.1998703"
y="-0.091193162"
height="1.1823863">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="7.6262206"
id="feGaussianBlur5231" />
</filter>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient5602"
id="linearGradient5608"
x1="623.16376"
y1="313.71109"
x2="835.82587"
y2="100.99124"
gradientUnits="userSpaceOnUse" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.3535534"
inkscape:cx="218.91161"
inkscape:cy="713.0457"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="false"
units="px"
inkscape:window-width="1366"
inkscape:window-height="705"
inkscape:window-x="-4"
inkscape:window-y="-4"
inkscape:window-maximized="1"
inkscape:snap-global="false"
showguides="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-bottom="0"
fit-margin-right="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-594.1217,-81.893738)">
<g
id="g5610">
<path
transform="matrix(1.1416809,0,0,1.1416809,-103.36921,-12.109215)"
inkscape:connector-curvature="0"
id="path950"
d="m 729.5891,100.64025 a 6.8536343,6.8536343 0 0 0 -6.8539,6.85333 6.8536343,6.8536343 0 0 0 6.8539,6.85384 6.8536343,6.8536343 0 0 0 6.8533,-6.85384 6.8536343,6.8536343 0 0 0 -6.8533,-6.85333 z m 0,27.34045 c -3.7851,0 -6.8534,3.06823 -6.8534,6.85333 l 0,14.43478 c 0,3.78508 3.0683,6.85384 6.8534,6.85384 3.7851,0 6.8538,-3.06876 6.8538,-6.85384 l 0,-14.43478 c 0,-3.7851 -3.0687,-6.85333 -6.8538,-6.85333 z m 26.5585,18.38389 a 6.8536343,6.8536343 0 0 0 -6.8538,6.85384 6.8536343,6.8536343 0 0 0 6.8538,6.85333 6.8536343,6.8536343 0 0 0 6.8539,-6.85333 6.8536343,6.8536343 0 0 0 -6.8539,-6.85384 z m -62.3124,22.72367 a 6.8536343,6.8536343 0 0 0 -6.8539,6.85333 6.8536343,6.8536343 0 0 0 6.8539,6.85385 6.8536343,6.8536343 0 0 0 6.8538,-6.85385 6.8536343,6.8536343 0 0 0 -6.8538,-6.85333 z m 35.7544,0.66715 a 6.8536343,6.8536343 0 0 0 -6.8539,6.85384 6.8536343,6.8536343 0 0 0 6.8539,6.85385 6.8536343,6.8536343 0 0 0 6.8533,-6.85385 6.8536343,6.8536343 0 0 0 -6.8533,-6.85384 z m -0.1886,27.342 c -3.3028,0.0484 -6.4566,1.38153 -8.7928,3.71656 l -78.8505,78.85152 c -7.9961,8.00073 -2.3327,21.6754 8.9788,21.67982 l 157.7032,0 c 11.312,-0.003 16.9767,-13.67855 8.9802,-21.67982 l -78.8515,-78.85152 c -2.4281,-2.42693 -5.7354,-3.76761 -9.168,-3.71656 z m 0.7482,8.51369 0,0 c 0.4485,0 0.8969,0.044 1.3385,0.13074 1.4334,0.202 2.8158,0.85351 3.9181,1.95595 l 74.9995,74.99956 c 2.6995,2.6994 2.6995,7.07622 0,9.77563 -2.699,2.69939 -7.0755,2.69939 -9.7751,0 l -70.3275,-70.32749 -11.8003,11.80031 c -2.6993,2.69937 -7.076,2.6993 -9.7756,0 -2.6992,-2.69951 -2.6988,-7.07626 0,-9.77563 l 16.5344,-16.53439 c 1.3498,-1.34968 3.1186,-2.02467 4.8875,-2.02468 z m 55.2437,1.29294 a 6.8536343,6.8536343 0 0 0 -6.8533,6.85385 6.8536343,6.8536343 0 0 0 6.8533,6.85333 6.8536343,6.8536343 0 0 0 6.8538,-6.85333 6.8536343,6.8536343 0 0 0 -6.8538,-6.85385 z m -115.8803,12.52999 a 6.8536343,6.8536343 0 0 0 -6.8538,6.85384 6.8536343,6.8536343 0 0 0 6.8538,6.85333 6.8536343,6.8536343 0 0 0 6.8534,-6.85333 6.8536343,6.8536343 0 0 0 -6.8534,-6.85384 z m 27.0614,18.73839 a 6.8536343,6.8536343 0 0 1 6.8534,6.85333 6.8536343,6.8536343 0 0 1 -6.8534,6.85384 6.8536343,6.8536343 0 0 1 -6.8538,-6.85384 6.8536343,6.8536343 0 0 1 6.8538,-6.85333 z m -27.4784,26.01701 a 6.8536343,6.8536343 0 0 1 6.8538,6.85333 6.8536343,6.8536343 0 0 1 -6.8538,6.85385 6.8536343,6.8536343 0 0 1 -6.8533,-6.85385 6.8536343,6.8536343 0 0 1 6.8533,-6.85333 z"
style="opacity:0.90700001;fill:#000000;fill-opacity:1;stroke:none;stroke-width:13.70695019;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter5229)" />
<path
style="opacity:1;fill:url(#linearGradient5608);fill-opacity:1;stroke:#4d361f;stroke-width:3.96875027;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;fill-rule:nonzero"
d="m 729.58874,102.78984 a 7.8246635,7.8246635 0 0 0 -7.82496,7.82432 7.8246635,7.8246635 0 0 0 7.82496,7.82489 7.8246635,7.8246635 0 0 0 7.82429,-7.82489 7.8246635,7.8246635 0 0 0 -7.82429,-7.82432 z m 0,31.21407 c -4.32137,0 -7.82439,3.50293 -7.82439,7.82431 l 0,16.47992 c 0,4.32136 3.50302,7.8249 7.82439,7.8249 4.32138,0 7.82486,-3.50354 7.82486,-7.8249 l 0,-16.47992 c 0,-4.32138 -3.50348,-7.82431 -7.82486,-7.82431 z m 30.32135,20.98853 a 7.8246635,7.8246635 0 0 0 -7.82486,7.82491 7.8246635,7.8246635 0 0 0 7.82486,7.82431 7.8246635,7.8246635 0 0 0 7.82496,-7.82431 7.8246635,7.8246635 0 0 0 -7.82496,-7.82491 z m -71.14088,25.94318 a 7.8246635,7.8246635 0 0 0 -7.82497,7.82432 7.8246635,7.8246635 0 0 0 7.82497,7.82491 7.8246635,7.8246635 0 0 0 7.82485,-7.82491 7.8246635,7.8246635 0 0 0 -7.82485,-7.82432 z m 40.82011,0.76168 a 7.8246635,7.8246635 0 0 0 -7.82497,7.82489 7.8246635,7.8246635 0 0 0 7.82497,7.82492 7.8246635,7.8246635 0 0 0 7.82428,-7.82492 7.8246635,7.8246635 0 0 0 -7.82428,-7.82489 z m -0.21533,31.21584 c -3.77074,0.0553 -7.37137,1.57726 -10.03856,4.24312 l -90.02211,90.02327 c -9.129,9.1343 -2.6632,24.7464 10.25092,24.75145 l 180.04673,0 c 12.91469,-0.004 19.38198,-15.61654 10.25253,-24.75145 l -90.02326,-90.02327 c -2.77211,-2.77078 -6.54799,-4.30141 -10.46693,-4.24312 z m 0.85421,9.71992 0,0 c 0.51205,0 1.02398,0.0503 1.52815,0.14926 1.63648,0.23062 3.21474,0.97444 4.47322,2.23307 l 85.62549,85.62556 c 3.08197,3.08186 3.08197,8.07879 0,11.16066 -3.0814,3.08183 -8.07797,3.08183 -11.16005,0 l -80.29156,-80.29155 -13.47218,13.47219 c -3.08173,3.08181 -8.07853,3.08173 -11.16061,0 -3.08163,-3.08199 -3.08117,-8.07884 0,-11.16066 l 18.877,-18.87699 c 1.54104,-1.5409 3.56045,-2.31153 5.57997,-2.31154 z m 63.07068,1.47613 a 7.8246635,7.8246635 0 0 0 -7.82428,7.8249 7.8246635,7.8246635 0 0 0 7.82428,7.82432 7.8246635,7.8246635 0 0 0 7.82486,-7.82432 7.8246635,7.8246635 0 0 0 -7.82486,-7.8249 z m -132.29832,14.30524 a 7.8246635,7.8246635 0 0 0 -7.82486,7.8249 7.8246635,7.8246635 0 0 0 7.82486,7.82432 7.8246635,7.8246635 0 0 0 7.82439,-7.82432 7.8246635,7.8246635 0 0 0 -7.82439,-7.8249 z m 30.89547,21.39326 a 7.8246635,7.8246635 0 0 1 7.8244,7.82432 7.8246635,7.8246635 0 0 1 -7.8244,7.8249 7.8246635,7.8246635 0 0 1 -7.82484,-7.8249 7.8246635,7.8246635 0 0 1 7.82484,-7.82432 z m -31.37155,29.70312 a 7.8246635,7.8246635 0 0 1 7.82484,7.82432 7.8246635,7.8246635 0 0 1 -7.82484,7.82491 7.8246635,7.8246635 0 0 1 -7.82428,-7.82491 7.8246635,7.8246635 0 0 1 7.82428,-7.82432 z"
id="path952"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 111 KiB

View File

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="1024"
height="1024"
viewBox="0 0 270.93334 270.93333"
version="1.1"
id="svg8"
inkscape:version="0.92.3 (2405546, 2018-03-11)"
sodipodi:docname="icon_circle.svg"
inkscape:export-filename="/home/lbphacker/temp/tpt-logo/icon_circle.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96">
<defs
id="defs2">
<filter
inkscape:collect="always"
style="color-interpolation-filters:sRGB"
id="filter5229"
x="-0.099935167"
width="1.1998703"
y="-0.091193162"
height="1.1823863">
<feGaussianBlur
inkscape:collect="always"
stdDeviation="7.6262206"
id="feGaussianBlur5231" />
</filter>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="0.66"
inkscape:cx="328.01066"
inkscape:cy="553.26531"
inkscape:document-units="px"
inkscape:current-layer="g986"
showgrid="false"
units="px"
inkscape:window-width="1920"
inkscape:window-height="982"
inkscape:window-x="0"
inkscape:window-y="24"
inkscape:window-maximized="1"
inkscape:snap-global="false"
showguides="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-bottom="0"
fit-margin-right="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-594.1217,-81.893738)">
<g
id="g986">
<circle
r="135.46667"
cy="217.36041"
cx="729.58838"
id="circle948"
style="opacity:1;fill:#ffd090;fill-opacity:1;stroke:none;stroke-width:1.74795687;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<path
transform="matrix(0.91722511,0,0,0.91722511,60.391628,16.637154)"
inkscape:connector-curvature="0"
id="path950"
d="m 729.5891,100.64025 a 6.8536343,6.8536343 0 0 0 -6.8539,6.85333 6.8536343,6.8536343 0 0 0 6.8539,6.85384 6.8536343,6.8536343 0 0 0 6.8533,-6.85384 6.8536343,6.8536343 0 0 0 -6.8533,-6.85333 z m 0,27.34045 c -3.7851,0 -6.8534,3.06823 -6.8534,6.85333 v 14.43478 c 0,3.78508 3.0683,6.85384 6.8534,6.85384 3.7851,0 6.8538,-3.06876 6.8538,-6.85384 v -14.43478 c 0,-3.7851 -3.0687,-6.85333 -6.8538,-6.85333 z m 26.5585,18.38389 a 6.8536343,6.8536343 0 0 0 -6.8538,6.85384 6.8536343,6.8536343 0 0 0 6.8538,6.85333 6.8536343,6.8536343 0 0 0 6.8539,-6.85333 6.8536343,6.8536343 0 0 0 -6.8539,-6.85384 z m -62.3124,22.72367 a 6.8536343,6.8536343 0 0 0 -6.8539,6.85333 6.8536343,6.8536343 0 0 0 6.8539,6.85385 6.8536343,6.8536343 0 0 0 6.8538,-6.85385 6.8536343,6.8536343 0 0 0 -6.8538,-6.85333 z m 35.7544,0.66715 a 6.8536343,6.8536343 0 0 0 -6.8539,6.85384 6.8536343,6.8536343 0 0 0 6.8539,6.85385 6.8536343,6.8536343 0 0 0 6.8533,-6.85385 6.8536343,6.8536343 0 0 0 -6.8533,-6.85384 z m -0.1886,27.342 c -3.3028,0.0484 -6.4566,1.38153 -8.7928,3.71656 l -78.8505,78.85152 c -7.9961,8.00073 -2.3327,21.6754 8.9788,21.67982 h 157.7032 c 11.312,-0.003 16.9767,-13.67855 8.9802,-21.67982 l -78.8515,-78.85152 c -2.4281,-2.42693 -5.7354,-3.76761 -9.168,-3.71656 z m 0.7482,8.51369 v 0 c 0.4485,0 0.8969,0.044 1.3385,0.13074 1.4334,0.202 2.8158,0.85351 3.9181,1.95595 l 74.9995,74.99956 c 2.6995,2.6994 2.6995,7.07622 0,9.77563 -2.699,2.69939 -7.0755,2.69939 -9.7751,0 l -70.3275,-70.32749 -11.8003,11.80031 c -2.6993,2.69937 -7.076,2.6993 -9.7756,0 -2.6992,-2.69951 -2.6988,-7.07626 0,-9.77563 l 16.5344,-16.53439 c 1.3498,-1.34968 3.1186,-2.02467 4.8875,-2.02468 z m 55.2437,1.29294 a 6.8536343,6.8536343 0 0 0 -6.8533,6.85385 6.8536343,6.8536343 0 0 0 6.8533,6.85333 6.8536343,6.8536343 0 0 0 6.8538,-6.85333 6.8536343,6.8536343 0 0 0 -6.8538,-6.85385 z m -115.8803,12.52999 a 6.8536343,6.8536343 0 0 0 -6.8538,6.85384 6.8536343,6.8536343 0 0 0 6.8538,6.85333 6.8536343,6.8536343 0 0 0 6.8534,-6.85333 6.8536343,6.8536343 0 0 0 -6.8534,-6.85384 z m 27.0614,18.73839 a 6.8536343,6.8536343 0 0 1 6.8534,6.85333 6.8536343,6.8536343 0 0 1 -6.8534,6.85384 6.8536343,6.8536343 0 0 1 -6.8538,-6.85384 6.8536343,6.8536343 0 0 1 6.8538,-6.85333 z m -27.4784,26.01701 a 6.8536343,6.8536343 0 0 1 6.8538,6.85333 6.8536343,6.8536343 0 0 1 -6.8538,6.85385 6.8536343,6.8536343 0 0 1 -6.8533,-6.85385 6.8536343,6.8536343 0 0 1 6.8533,-6.85333 z"
style="opacity:0.90700001;fill:#000000;fill-opacity:1;stroke:none;stroke-width:13.70695019;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;filter:url(#filter5229)" />
<path
style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:12.57235909;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 729.58907,108.94692 a 6.2863255,6.2863255 0 0 0 -6.28657,6.28605 6.2863255,6.2863255 0 0 0 6.28657,6.28651 6.2863255,6.2863255 0 0 0 6.28602,-6.28651 6.2863255,6.2863255 0 0 0 -6.28602,-6.28605 z m 0,25.07735 c -3.47179,0 -6.28611,2.81425 -6.28611,6.28604 v 13.23995 c 0,3.47177 2.81432,6.28651 6.28611,6.28651 3.47179,0 6.28648,-2.81474 6.28648,-6.28651 v -13.23995 c 0,-3.47179 -2.81469,-6.28604 -6.28648,-6.28604 z m 24.36013,16.86216 a 6.2863255,6.2863255 0 0 0 -6.28648,6.28652 6.2863255,6.2863255 0 0 0 6.28648,6.28604 6.2863255,6.2863255 0 0 0 6.28657,-6.28604 6.2863255,6.2863255 0 0 0 -6.28657,-6.28652 z m -57.1545,20.84272 a 6.2863255,6.2863255 0 0 0 -6.28657,6.28605 6.2863255,6.2863255 0 0 0 6.28657,6.28652 6.2863255,6.2863255 0 0 0 6.28648,-6.28652 6.2863255,6.2863255 0 0 0 -6.28648,-6.28605 z m 32.79483,0.61193 a 6.2863255,6.2863255 0 0 0 -6.28657,6.28651 6.2863255,6.2863255 0 0 0 6.28657,6.28653 6.2863255,6.2863255 0 0 0 6.28602,-6.28653 6.2863255,6.2863255 0 0 0 -6.28602,-6.28651 z m -0.17299,25.07877 c -3.02941,0.0444 -5.92215,1.26717 -8.06497,3.40892 l -72.32366,72.32459 c -7.33423,7.33848 -2.13961,19.88123 8.23558,19.88528 h 144.64933 c 10.37565,-0.003 15.57146,-12.54631 8.23687,-19.88528 l -72.32458,-72.32459 c -2.22711,-2.22604 -5.26065,-3.45575 -8.40912,-3.40892 z m 0.68627,7.80897 v 0 c 0.41138,0 0.82266,0.0404 1.22771,0.11992 1.31475,0.18528 2.58272,0.78286 3.59378,1.79404 l 68.79142,68.79148 c 2.47605,2.47596 2.47605,6.49049 0,8.96646 -2.47559,2.47594 -6.48983,2.47594 -8.96597,0 l -64.50615,-64.50614 -10.82353,10.82354 c -2.47586,2.47593 -6.49028,2.47586 -8.96642,0 -2.47578,-2.47606 -2.47541,-6.49053 0,-8.96646 l 15.16576,-15.16575 c 1.23807,-1.23796 2.86046,-1.85708 4.48294,-1.85709 z m 50.67091,1.18592 a 6.2863255,6.2863255 0 0 0 -6.28602,6.28652 6.2863255,6.2863255 0 0 0 6.28602,6.28605 6.2863255,6.2863255 0 0 0 6.28648,-6.28605 6.2863255,6.2863255 0 0 0 -6.28648,-6.28652 z M 674.4854,217.90756 a 6.2863255,6.2863255 0 0 0 -6.28648,6.28651 6.2863255,6.2863255 0 0 0 6.28648,6.28605 6.2863255,6.2863255 0 0 0 6.28611,-6.28605 6.2863255,6.2863255 0 0 0 -6.28611,-6.28651 z m 24.82139,17.18732 a 6.2863255,6.2863255 0 0 1 6.28611,6.28605 6.2863255,6.2863255 0 0 1 -6.28611,6.28651 6.2863255,6.2863255 0 0 1 -6.28647,-6.28651 6.2863255,6.2863255 0 0 1 6.28647,-6.28605 z m -25.20387,23.86345 a 6.2863255,6.2863255 0 0 1 6.28647,6.28605 6.2863255,6.2863255 0 0 1 -6.28647,6.28652 6.2863255,6.2863255 0 0 1 -6.28602,-6.28652 6.2863255,6.2863255 0 0 1 6.28602,-6.28605 z"
id="path952"
inkscape:connector-curvature="0" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

File diff suppressed because it is too large Load Diff

Before

Width:  |  Height:  |  Size: 255 KiB

View File

@ -1,533 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="64"
height="64"
viewBox="0 0 16.933331 16.933331"
version="1.1"
id="svg5"
inkscape:version="1.2.2 (b0a8486541, 2022-12-01)"
sodipodi:docname="icon_exe.svg"
inkscape:export-filename="icon.png"
inkscape:export-xdpi="192"
inkscape:export-ydpi="192"
xml:space="preserve"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"><sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="1"
inkscape:showpageshadow="0"
inkscape:pageopacity="0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#ffffff"
inkscape:document-units="px"
showgrid="false"
inkscape:zoom="16.970563"
inkscape:cx="57.422963"
inkscape:cy="24.188945"
inkscape:window-width="1280"
inkscape:window-height="1054"
inkscape:window-x="1297"
inkscape:window-y="26"
inkscape:window-maximized="0"
inkscape:current-layer="layer7" /><defs
id="defs2"><linearGradient
id="linearGradient10317"><stop
style="stop-color:#f5ffff;stop-opacity:1;"
offset="0"
id="stop10311" /><stop
style="stop-color:#f5ffff;stop-opacity:1;"
offset="0.58129495"
id="stop10313" /><stop
style="stop-color:#f5ffff;stop-opacity:0;"
offset="1"
id="stop10315" /></linearGradient><linearGradient
id="linearGradient7451"><stop
style="stop-color:#f5ffff;stop-opacity:0.98309183;"
offset="0"
id="stop7445" /><stop
style="stop-color:#f5ffff;stop-opacity:0.65823293;"
offset="0.44851306"
id="stop7447" /><stop
style="stop-color:#f5ffff;stop-opacity:0;"
offset="1"
id="stop7449" /></linearGradient><linearGradient
id="linearGradient7331"><stop
style="stop-color:#f5ffff;stop-opacity:1;"
offset="0"
id="stop7325" /><stop
style="stop-color:#f5ffff;stop-opacity:1;"
offset="0.37253886"
id="stop7327" /><stop
style="stop-color:#f5ffff;stop-opacity:0;"
offset="1"
id="stop7329" /></linearGradient><linearGradient
id="linearGradient6957"><stop
style="stop-color:#f5ffff;stop-opacity:1;"
offset="0"
id="stop6951" /><stop
style="stop-color:#f5ffff;stop-opacity:1;"
offset="0.61608356"
id="stop6953" /><stop
style="stop-color:#f5ffff;stop-opacity:0;"
offset="1"
id="stop6955" /></linearGradient><linearGradient
id="linearGradient6573"><stop
style="stop-color:#f5ff08;stop-opacity:1;"
offset="0"
id="stop6567" /><stop
style="stop-color:#f5ff08;stop-opacity:0.823915;"
offset="0.62599742"
id="stop6569" /><stop
style="stop-color:#f5ff08;stop-opacity:0;"
offset="1"
id="stop6571" /></linearGradient><linearGradient
id="linearGradient6175"><stop
style="stop-color:#f5ff08;stop-opacity:0.47854495;"
offset="0"
id="stop6169" /><stop
style="stop-color:#f5ff08;stop-opacity:0.29862821;"
offset="0.67936534"
id="stop6171" /><stop
style="stop-color:#f5ff08;stop-opacity:0;"
offset="1"
id="stop6173" /></linearGradient><linearGradient
id="linearGradient5893"><stop
style="stop-color:#f5ff08;stop-opacity:0.71252441;"
offset="0"
id="stop5887" /><stop
style="stop-color:#f5ff08;stop-opacity:0.5904839;"
offset="0.67936534"
id="stop5889" /><stop
style="stop-color:#f5ff08;stop-opacity:0;"
offset="1"
id="stop5891" /></linearGradient><linearGradient
id="linearGradient5757"><stop
style="stop-color:#f5ff08;stop-opacity:1;"
offset="0"
id="stop5751" /><stop
style="stop-color:#f5ff08;stop-opacity:1;"
offset="0.75665909"
id="stop5753" /><stop
style="stop-color:#f5ff08;stop-opacity:0;"
offset="1"
id="stop5755" /></linearGradient><linearGradient
id="linearGradient5685"><stop
style="stop-color:#f5ff08;stop-opacity:1;"
offset="0"
id="stop5679" /><stop
style="stop-color:#f5ff08;stop-opacity:1;"
offset="0.63781762"
id="stop5681" /><stop
style="stop-color:#f5ff08;stop-opacity:0;"
offset="1"
id="stop5683" /></linearGradient><linearGradient
id="linearGradient5619"><stop
style="stop-color:#f5ff08;stop-opacity:1;"
offset="0"
id="stop5613" /><stop
style="stop-color:#f5ff08;stop-opacity:1;"
offset="0.73820531"
id="stop5615" /><stop
style="stop-color:#f5ff08;stop-opacity:0;"
offset="1"
id="stop5617" /></linearGradient><linearGradient
id="linearGradient5441"><stop
style="stop-color:#f5ff08;stop-opacity:0.89862061;"
offset="0"
id="stop5435" /><stop
style="stop-color:#f5ff08;stop-opacity:0.72535044;"
offset="0.62599742"
id="stop5437" /><stop
style="stop-color:#f5ff08;stop-opacity:0;"
offset="1"
id="stop5439" /></linearGradient><linearGradient
id="linearGradient1452"><stop
style="stop-color:#f50008;stop-opacity:1;"
offset="0"
id="stop1446" /><stop
style="stop-color:#f50008;stop-opacity:1;"
offset="0.7918601"
id="stop1448" /><stop
style="stop-color:#f50008;stop-opacity:0;"
offset="1"
id="stop1450" /></linearGradient><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient1452"
id="radialGradient522"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.78484331,0,0,0.78747227,696.44887,-323.11915)"
cx="85.568382"
cy="110.37487"
fx="85.568382"
fy="110.37487"
r="80.962494" /><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient1452"
id="radialGradient524"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.8981104,0,0,0.76442481,749.97364,-321.90886)"
cx="85.568382"
cy="110.37487"
fx="85.568382"
fy="110.37487"
r="80.962494" /><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6573"
id="radialGradient526"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.63729372,0,0,0.41448086,723.17431,-328.11791)"
cx="85.568382"
cy="110.37487"
fx="85.568382"
fy="110.37487"
r="80.962494" /><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient5619"
id="radialGradient528"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.44694866,0,0,0.65155251,787.10411,-304.51482)"
cx="85.568382"
cy="110.37487"
fx="85.568382"
fy="110.37487"
r="80.962494" /><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient5619"
id="radialGradient530"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.44694866,0,0,0.40774632,806.63991,-285.18279)"
cx="85.568382"
cy="110.37487"
fx="85.568382"
fy="110.37487"
r="80.962494" /><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient5685"
id="radialGradient532"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.31040892,0,0,0.40774632,771.18902,-267.79397)"
cx="85.568382"
cy="110.37487"
fx="85.568382"
fy="110.37487"
r="80.962494" /><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient5757"
id="radialGradient534"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.61485849,0,0,0.48365086,699.42828,-280.26845)"
cx="85.568382"
cy="110.37487"
fx="85.568382"
fy="110.37487"
r="80.962494" /><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient5893"
id="radialGradient536"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.18217879,0,0,0.57948295,785.06567,-317.57229)"
cx="85.568382"
cy="110.37487"
fx="85.568382"
fy="110.37487"
r="80.962494" /><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6175"
id="radialGradient538"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.17110206,0,0,0.57948295,813.03511,-347.11197)"
cx="85.568382"
cy="110.37487"
fx="85.568382"
fy="110.37487"
r="80.962494" /><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6175"
id="radialGradient540"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.65699536,0,0,0.23041338,805.19531,-234.77302)"
cx="85.568382"
cy="110.37487"
fx="85.568382"
fy="110.37487"
r="80.962494" /><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6175"
id="radialGradient542"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.65699536,0,0,0.23041338,673.99742,-230.76895)"
cx="85.568382"
cy="110.37487"
fx="85.568382"
fy="110.37487"
r="80.962494" /><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient5441"
id="radialGradient544"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.44694866,0,0,0.46338383,720.63883,-314.42592)"
cx="85.568382"
cy="110.37487"
fx="85.568382"
fy="110.37487"
r="80.962494" /><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient6957"
id="radialGradient546"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.81417897,0,0,0.30393809,713.08122,-253.70655)"
cx="85.568382"
cy="110.37487"
fx="85.568382"
fy="110.37487"
r="80.962494" /><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient10317"
id="radialGradient548"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.37560777,0,0,0.52796713,798.71131,-289.99247)"
cx="85.568382"
cy="110.37487"
fx="85.568382"
fy="110.37487"
r="80.962494" /><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient7331"
id="radialGradient550"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.51429536,0,0,0.55006434,705.69388,-287.70068)"
cx="85.568382"
cy="110.37487"
fx="85.568382"
fy="110.37487"
r="80.962494" /><radialGradient
inkscape:collect="always"
xlink:href="#linearGradient7451"
id="radialGradient552"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.51429536,0,0,0.55006434,726.67823,-322.63777)"
cx="85.568382"
cy="110.37487"
fx="85.568382"
fy="110.37487"
r="80.962494" /></defs><g
inkscape:groupmode="layer"
id="layer7"
inkscape:label="icon"><rect
style="opacity:1;fill:#cccccc;stroke-width:0.0500064;stroke-linecap:square;stroke-dasharray:none"
id="rect9549"
width="16.933332"
height="13.229165"
x="0"
y="1.8520831" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 16.139581,13.493748 v 0.529167 h 0.529166 v -0.529167 z"
id="path2369" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 16.139581,12.699998 v 0.529167 h 0.529166 v -0.529167 z"
id="path2367" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 16.139581,11.906248 v 0.529167 h 0.529166 v -0.529167 z"
id="path2365" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 16.139581,11.112498 v 0.529167 h 0.529166 v -0.529167 z"
id="path2363" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 16.139581,10.318749 v 0.529166 h 0.529166 v -0.529166 z"
id="path2361" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 16.139581,9.5249987 v 0.5291663 h 0.529166 V 9.5249987 Z"
id="path2359" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 16.139581,8.7312488 v 0.5291666 h 0.529166 V 8.7312488 Z"
id="path2357" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 16.139581,6.0854158 v 2.3812497 h 0.529166 V 6.0854158 Z"
id="path2355" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 16.139581,5.2916659 v 0.5291666 h 0.529166 V 5.2916659 Z"
id="path2353" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 16.139581,4.497916 v 0.5291666 h 0.529166 V 4.497916 Z"
id="path2351" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 16.139581,3.7041662 v 0.5291665 h 0.529166 V 3.7041662 Z"
id="path2349" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 16.139581,2.9104163 v 0.5291666 h 0.529166 V 2.9104163 Z"
id="rect14444" /><rect
style="opacity:1;fill:#666666;stroke-width:0.0500064;stroke-linecap:square;stroke-dasharray:none"
id="rect15056"
width="1.0583332"
height="0.52916658"
x="15.610415"
y="2.1166663" /><rect
style="opacity:1;fill:#666666;stroke-width:0.0500064;stroke-linecap:square;stroke-dasharray:none"
id="rect15468"
width="1.0583332"
height="0.52916658"
x="14.287498"
y="2.1166663" /><rect
style="opacity:1;fill:#666666;stroke-width:0.0500064;stroke-linecap:square;stroke-dasharray:none"
id="rect15470"
width="1.0583332"
height="0.52916658"
x="12.964582"
y="2.1166663" /><rect
style="opacity:1;fill:#999999;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
id="rect15882"
width="3.9687495"
height="0.52916658"
x="0.26458329"
y="2.1166663" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 14.287498,-16.139581 h 0.529167 v -0.529167 h -0.529167 z"
transform="rotate(90)"
id="path2231" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 14.287498,-15.345831 h 0.529167 v -0.529167 h -0.529167 z"
transform="rotate(90)"
id="path2229" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 14.287498,-14.552081 h 0.529167 v -0.529167 h -0.529167 z"
transform="rotate(90)"
id="path2227" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 14.287498,-11.641665 h 0.529167 v -2.645833 h -0.529167 z"
transform="rotate(90)"
id="path2225" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 14.287498,-5.8208325 h 0.529167 v -5.5562495 h -0.529167 z"
transform="rotate(90)"
id="path2223" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 14.287498,-4.7624993 h 0.529167 v -0.7937499 h -0.529167 z"
transform="rotate(90)"
id="path2221" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 14.287498,-1.8520831 h 0.529167 V -4.497916 h -0.529167 z"
transform="rotate(90)"
id="path2219" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 14.287498,-1.0583332 h 0.529167 v -0.5291666 h -0.529167 z"
transform="rotate(90)"
id="path2217" /><path
style="opacity:1;fill:#000000;stroke-width:0.0500063;stroke-linecap:square;stroke-dasharray:none"
d="m 14.287498,-0.2645833 h 0.529167 v -0.52916659 h -0.529167 z"
transform="rotate(90)"
id="rect16090" /></g><g
id="g1799"
transform="matrix(0.9833263,0,0,0.93331382,-31.070772,-23.035828)"
style="stroke-width:1.04385"><rect
style="fill:#000000;fill-opacity:1;stroke-width:0.445374;stroke-linecap:square"
id="rect486"
width="135.46664"
height="101.59999"
x="753.36902"
y="-330.61847"
inkscape:label="rect-bg"
transform="matrix(0.1171875,0,0,0.1171875,-56.418761,66.544469)"
mask="none" /><path
id="rect488"
mask="none"
style="fill:url(#radialGradient522);fill-opacity:1;stroke-width:0.445431;stroke-linecap:square;stroke-dasharray:none"
inkscape:label="rect-red"
d="m 725.48004,-288.15082 v 101.59998 h 101.67054 v -101.59998 z"
transform="matrix(0.1171875,0,0,0.1171875,-53.150408,61.568041)" /><path
id="rect490"
mask="none"
style="fill:url(#radialGradient524);fill-opacity:1;stroke-width:0.445431;stroke-linecap:square;stroke-dasharray:none"
inkscape:label="rect-red"
d="m 754.10795,-288.15082 v 101.59998 h 106.83874 v -101.59998 z"
transform="matrix(0.1171875,0,0,0.1171875,-53.150408,61.568041)" /><path
id="rect492"
mask="none"
style="fill:url(#radialGradient526);fill-opacity:1;stroke-width:0.445431;stroke-linecap:square;stroke-dasharray:none"
inkscape:label="rect-yellow"
d="m 726.11063,-288.15082 v 39.33912 h 103.1919 v -39.33912 z"
transform="matrix(0.1171875,0,0,0.1171875,-53.150408,61.568041)" /><path
id="rect494"
mask="none"
style="fill:url(#radialGradient528);fill-opacity:1;stroke-width:0.44543;stroke-linecap:square;stroke-dasharray:none"
inkscape:label="rect-yellow"
d="m 789.16083,-285.35065 v 98.79981 h 71.78586 v -98.79981 z"
transform="matrix(0.1171875,0,0,0.1171875,-53.150408,61.568041)" /><path
id="rect496"
mask="none"
style="fill:url(#radialGradient530);fill-opacity:1;stroke-width:0.44543;stroke-linecap:square;stroke-dasharray:none"
inkscape:label="rect-yellow"
d="m 808.70031,-273.18864 v 66.02235 h 52.24638 v -66.02235 z"
transform="matrix(0.1171875,0,0,0.1171875,-53.150408,61.568041)" /><path
id="rect498"
mask="none"
style="fill:url(#radialGradient532);fill-opacity:1;stroke-width:0.44543;stroke-linecap:square;stroke-dasharray:none"
inkscape:label="rect-yellow"
d="m 772.61997,-255.80111 v 66.02236 h 50.262 v -66.02236 z"
transform="matrix(0.1171875,0,0,0.1171875,-53.150408,61.568041)" /><path
id="rect500"
mask="none"
style="fill:url(#radialGradient534);fill-opacity:1;stroke-width:0.44543;stroke-linecap:square;stroke-dasharray:none"
inkscape:label="rect-yellow"
d="m 725.48004,-266.04489 v 78.31666 h 76.3411 v -78.31666 z"
transform="matrix(0.1171875,0,0,0.1171875,-53.150408,61.568041)" /><path
id="rect502"
mask="none"
style="fill:url(#radialGradient536);fill-opacity:1;stroke-width:0.44543;stroke-linecap:square;stroke-dasharray:none"
inkscape:label="rect-yellow"
d="m 785.90646,-288.15082 v 81.45637 h 29.49662 v -81.45637 z"
transform="matrix(0.1171875,0,0,0.1171875,-53.150408,61.568041)" /><path
id="rect504"
mask="none"
style="fill:url(#radialGradient538);fill-opacity:1;stroke-width:0.44543;stroke-linecap:square;stroke-dasharray:none"
inkscape:label="rect-yellow"
d="m 813.8244,-288.15082 v 51.91565 h 27.70629 v -51.91565 z"
transform="matrix(0.1171875,0,0,0.1171875,-53.150408,61.568041)" /><path
id="rect506"
mask="none"
style="fill:url(#radialGradient540);fill-opacity:1;stroke-width:0.445429;stroke-linecap:square;stroke-dasharray:none"
inkscape:label="rect-yellow"
d="m 808.21965,-227.99781 v 37.31065 h 52.72704 v -37.31065 z"
transform="matrix(0.1171875,0,0,0.1171875,-53.150408,61.568041)" /><path
id="rect508"
mask="none"
style="fill:url(#radialGradient542);fill-opacity:1;stroke-width:0.445429;stroke-linecap:square;stroke-dasharray:none"
inkscape:label="rect-yellow"
d="m 725.48004,-223.99378 v 37.31065 h 57.9261 v -37.31065 z"
transform="matrix(0.1171875,0,0,0.1171875,-53.150408,61.568041)" /><path
id="rect510"
mask="none"
style="fill:url(#radialGradient544);fill-opacity:1;stroke-width:0.445431;stroke-linecap:square;stroke-dasharray:none"
inkscape:label="rect-yellow"
d="m 725.48004,-288.15082 v 62.38874 h 69.58982 v -62.38874 z"
transform="matrix(0.1171875,0,0,0.1171875,-53.150408,61.568041)" /><path
id="rect512"
mask="none"
style="fill:url(#radialGradient546);fill-opacity:1;stroke-width:0.445431;stroke-linecap:square;stroke-dasharray:none"
inkscape:label="rect-white"
d="m 725.48004,-244.76798 v 49.2169 h 123.18557 v -49.2169 z"
transform="matrix(0.1171875,0,0,0.1171875,-53.150408,61.568041)" /><path
id="rect514"
mask="none"
style="fill:url(#radialGradient548);fill-opacity:1;stroke-width:0.445431;stroke-linecap:square;stroke-dasharray:none"
inkscape:label="rect-white"
d="m 800.4409,-274.46305 v 85.49128 h 60.50579 v -85.49128 z"
transform="matrix(0.1171875,0,0,0.1171875,-53.150408,61.568041)" /><path
id="rect516"
mask="none"
style="fill:url(#radialGradient550);fill-opacity:1;stroke-width:0.445431;stroke-linecap:square;stroke-dasharray:none"
inkscape:label="rect-white"
d="m 725.48004,-271.52176 v 84.97092 h 65.85919 v -84.97092 z"
transform="matrix(0.1171875,0,0,0.1171875,-53.150408,61.568041)" /><path
id="rect518"
mask="none"
style="fill:url(#radialGradient552);fill-opacity:1;stroke-width:0.445431;stroke-linecap:square;stroke-dasharray:none"
inkscape:label="rect-white"
d="m 729.04751,-288.15082 v 70.7628 h 83.27759 v -70.7628 z"
transform="matrix(0.1171875,0,0,0.1171875,-53.150408,61.568041)" /></g></svg>

Before

Width:  |  Height:  |  Size: 23 KiB

View File

@ -1,120 +1,11 @@
rendered_icons_optionally_from_svg = {
'icon_exe' : { 'png': 'icon_exe.png' , 'svg': 'icon_exe.svg', 'width': '256', 'height': '256' },
'icon_exe_48': { 'png': 'icon_exe_48.png', 'svg': 'icon_exe.svg', 'width': '48', 'height': '48' },
'icon_exe_32': { 'png': 'icon_exe_32.png', 'svg': 'icon_exe.svg', 'width': '32', 'height': '32' },
'icon_exe_16': { 'png': 'icon_exe_16.png', 'svg': 'icon_exe.svg', 'width': '16', 'height': '16' },
'icon_cps' : { 'png': 'icon_cps.png' , 'svg': 'icon_cps.svg', 'width': '256', 'height': '256' },
'icon_cps_48': { 'png': 'icon_cps_48.png', 'svg': 'icon_cps.svg', 'width': '48', 'height': '48' },
'icon_cps_32': { 'png': 'icon_cps_32.png', 'svg': 'icon_cps.svg', 'width': '32', 'height': '32' },
'icon_cps_16': { 'png': 'icon_cps_16.png', 'svg': 'icon_cps.svg', 'width': '16', 'height': '16' },
}
rendered_icons = {}
if render_icons_with_inkscape.allowed()
foreach key, info : rendered_icons_optionally_from_svg
rendered_icons += { key: custom_target(
key + '-from-svg',
output: info['png'],
command: [
inkscape,
'--export-area-page',
'--export-type', 'png',
'--export-filename', '@OUTPUT@',
'--export-width', info['width'],
'--export-height', info['height'],
files(info['svg']),
],
) }
endforeach
else
foreach key, info : rendered_icons_optionally_from_svg
rendered_icons += { key: files('generated_icons/' + info['png']) }
endforeach
endif
resources_files += files(
'icon.ico',
'document.ico',
)
if host_platform == 'windows'
windows_icons = get_option('windows_icons')
windows_utf8cp = get_option('windows_utf8cp')
rc_conf_depends = []
rc_conf_depend_files = [
'resource.h',
]
icon_exe_ico_path = ''
icon_cps_ico_path = ''
winutf8_xml_path = ''
if windows_icons
make_ico = executable('makeico', sources: 'MakeIco.cpp', native: true)
generated_win_icos = {}
win_icos = {
'icon_exe': [ 'icon_exe', 'icon_exe_48', 'icon_exe_32', 'icon_exe_16' ],
'icon_cps': [ 'icon_cps', 'icon_cps_48', 'icon_cps_32', 'icon_cps_16' ],
}
foreach key, icons : win_icos
command = [
make_ico,
'@OUTPUT@',
]
foreach ikey : icons
command += [ rendered_icons[ikey] ]
endforeach
generated_win_icos += { key: custom_target(
key + '-ico',
output: key + '.ico',
command: command,
) }
endforeach
rc_conf_depends += [
generated_win_icos['icon_exe'],
generated_win_icos['icon_cps'],
]
icon_exe_ico_path = join_paths(meson.current_build_dir(), 'icon_exe.ico')
icon_cps_ico_path = join_paths(meson.current_build_dir(), 'icon_cps.ico')
endif
if windows_utf8cp
rc_conf_depend_files += [
'winutf8.xml',
]
winutf8_xml_path = join_paths(meson.current_source_dir(), 'winutf8.xml')
endif
rc_conf_data = configuration_data()
rc_conf_data.merge_from(conf_data)
rc_conf_data.set('HAVE_ICONS', windows_icons ? 1 : 0)
rc_conf_data.set('HAVE_UTF8CP', windows_utf8cp ? 1 : 0)
rc_conf_data.set('RESOUCE_H', join_paths(meson.current_source_dir(), 'resource.h'))
rc_conf_data.set('WINUTF8_XML', winutf8_xml_path)
rc_conf_data.set('ICON_EXE_ICO', icon_exe_ico_path)
rc_conf_data.set('ICON_CPS_ICO', icon_cps_ico_path)
if copt_platform == 'win'
powder_files += windows_mod.compile_resources(
configure_file(
input: 'powder-res.template.rc',
output: 'powder-res.rc',
configuration: rc_conf_data,
),
depends: rc_conf_depends,
depend_files: rc_conf_depend_files,
)
elif host_platform == 'darwin'
configure_file(
input: 'Info.template.plist',
output: 'Info.plist',
configuration: conf_data,
)
elif host_platform == 'linux'
data_files += to_array.process(rendered_icons['icon_exe'], extra_args: 'icon_exe_png')
data_files += to_array.process(rendered_icons['icon_cps'], extra_args: 'icon_cps_png')
data_files += to_array.process('save.xml', extra_args: 'save_xml')
data_files += to_array.process(configure_file(
input: 'powder.template.desktop',
output: 'powder.desktop',
configuration: conf_data,
), extra_args: 'powder_desktop')
configure_file(
input: 'appdata.template.xml',
output: 'appdata.xml',
configuration: conf_data,
'powder-res.rc',
depend_files: [ resources_files, 'resource.h' ],
)
endif
data_files += to_array.process('save_local.png', extra_args: 'save_local_png')
data_files += to_array.process('save_online.png', extra_args: 'save_online_png')
data_files += to_array.process('font.bz2', extra_args: 'compressed_font_data')

4
resources/powder-res.rc Normal file
View File

@ -0,0 +1,4 @@
#include "resource.h"
IDI_ICON ICON DISCARDABLE "icon.ico"
IDI_DOC_ICON ICON DISCARDABLE "document.ico"

View File

@ -1,40 +0,0 @@
#pragma code_page(65001) // UTF-8
#include "@RESOUCE_H@"
#include <winuser.h>
#include <winver.h>
#include <ntdef.h>
#define HAVE_ICONS @HAVE_ICONS@
#define HAVE_UTF8CP @HAVE_UTF8CP@
#if HAVE_ICONS
IDI_ICON ICON DISCARDABLE "@ICON_EXE_ICO@"
IDI_DOC_ICON ICON DISCARDABLE "@ICON_CPS_ICO@"
#endif
#if HAVE_UTF8CP
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "@WINUTF8_XML@"
#endif
VS_VERSION_INFO VERSIONINFO
FILEVERSION @DISPLAY_VERSION_MAJOR@,@DISPLAY_VERSION_MINOR@,0,@BUILD_NUM@
PRODUCTVERSION @DISPLAY_VERSION_MAJOR@,@DISPLAY_VERSION_MINOR@,0,@BUILD_NUM@
{
BLOCK "StringFileInfo"
{
BLOCK "040904b0"
{
VALUE "CompanyName", "https://powdertoy.co.uk/\0"
VALUE "FileDescription", "@APPNAME@\0"
VALUE "FileVersion", "@DISPLAY_VERSION_MAJOR@.@DISPLAY_VERSION_MINOR@.0.@BUILD_NUM@\0"
VALUE "OriginalFilename", "@APPEXE@.exe\0"
VALUE "LegalCopyright", "@MANIFEST_COPYRIGHT@\0"
VALUE "ProductName", "@APPCOMMENT@\0"
VALUE "ProductVersion", "@DISPLAY_VERSION_MAJOR@.@DISPLAY_VERSION_MINOR@.0.@BUILD_NUM@\0"
VALUE "InternalName", "@APPID@\0"
}
}
BLOCK "VarFileInfo"
{
VALUE "Translation", 0x409, 65001
}
}

View File

@ -0,0 +1,30 @@
<?xml version="1.0" encoding="UTF-8" ?>
<component type="desktop">
<id>uk.co.powdertoy.tpt</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0</project_license>
<name>Powder Toy</name>
<summary>Physics sandbox game</summary>
<content_rating type="oars-1.1">
<content_attribute id="social-chat">moderate</content_attribute>
</content_rating>
<launchable type="desktop-id">powder.desktop</launchable>
<description>
<p>
The Powder Toy is a free physics sandbox game, which simulates air pressure and velocity, heat, gravity and a countless number of interactions between different substances! The game provides you with various building materials, liquids, gases and electronic components which can be used to construct complex machines, guns, bombs, realistic terrains and almost anything else. You can then mine them and watch cool explosions, add intricate wirings, play with little stickmen or operate your machine. You can browse and play thousands of different saves made by the community or upload your own - we welcome your creations!
</p>
</description>
<screenshots>
<screenshot>
<image>http://powdertoy.co.uk/Themes/Next/Design/Images/Screen2.png</image>
</screenshot>
</screenshots>
<url type="homepage">https://powdertoy.co.uk/</url>
<url type="bugtracker">https://github.com/The-Powder-Toy/The-Powder-Toy/issues</url>
<url type="help">https://powdertoy.co.uk/Wiki/W/Main_Page.html</url>
<releases>
<release date="2019-02-21" version="94.1" />
</releases>
</component>

9
resources/powder.desktop Normal file
View File

@ -0,0 +1,9 @@
[Desktop Entry]
Version=1.0
Encoding=UTF-8
Name=Powder Toy
Comment=Physics sandbox game
Exec=powder
Icon=powder
Type=Application
Categories=Game;Simulation;

View File

@ -1,8 +0,0 @@
[Desktop Entry]
Name=@APPNAME@
Type=Application
Comment=@APPCOMMENT@
MimeType=application/vnd.powdertoy.save;x-scheme-handler/ptsave;
Categories=Game;Simulation;
Exec=@APPEXE@ %u
Icon=@APPVENDOR@-@APPEXE@

View File

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
<mime-type type="application/vnd.powdertoy.save">
<comment>Powder Toy save</comment>
<glob pattern="*.cps"/>

View File

@ -1,3 +1,5 @@
#define LUASCRIPT 256
#define IDI_ICON 101
#define IDI_DOC_ICON 102

Some files were not shown because too many files have changed in this diff Show More