Skip to content

Commit

Permalink
Remove unused wgpu-native binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
theashraf committed Dec 10, 2024
1 parent 37c660d commit aa24c96
Showing 1 changed file with 0 additions and 42 deletions.
42 changes: 0 additions & 42 deletions .mac-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,48 +41,6 @@ check_for() {
fi
}

download_wgpu_binary() {
local arch=$1
local type=$2
local target_dir="${WGPU_DIR}/${arch}"

echo "Downloading ${type}..."
mkdir -p "${target_dir}"
curl -L "https://github.com/gfx-rs/wgpu-native/releases/download/${WGPU_NATIVE_VERSION}/${type}.zip" \
-o "${target_dir}/temp.zip"
unzip -o "${target_dir}/temp.zip" -d "${target_dir}"
rm "${target_dir}/temp.zip"
}

WGPU_DIR="${SCRIPT_DIR}/deps/wgpu-native-binaries"
mkdir -p "${WGPU_DIR}"

if [[ "${TARGET}" == "android" || "${TARGET}" == "all" ]]; then
echo "Downloading wgpu-native prebuilt libraries for Android..."
[[ -d "${WGPU_DIR}" ]] || die "Could not find wgpu-native under ${RED}deps/wgpu-native${NC}!"

(
download_wgpu_binary "aarch64-linux-android" "wgpu-android-aarch64-release"
download_wgpu_binary "armv7-linux-androideabi" "wgpu-android-armv7-release"
download_wgpu_binary "i686-linux-android" "wgpu-android-i686-release"
download_wgpu_binary "x86_64-linux-android" "wgpu-android-x86_64-release"
)
fi

if [[ "${TARGET}" == "apple" || "${TARGET}" == "all" ]]; then
echo "Downloading wgpu-native prebuilt libraries for Apple..."
[[ -d "${WGPU_DIR}" ]] || die "Could not find wgpu-native under ${RED}deps/wgpu-native${NC}!"

(
download_wgpu_binary "aarch64-apple-darwin" "wgpu-macos-aarch64-release"
download_wgpu_binary "x86_64-apple-darwin" "wgpu-macos-x86_64-release"

download_wgpu_binary "aarch64-apple-ios" "wgpu-ios-aarch64-release"
download_wgpu_binary "x86_64-apple-ios" "wgpu-ios-x86_64-simulator-release"
download_wgpu_binary "aarch64-apple-ios-sim" "wgpu-ios-aarch64-simulator-release"
)
fi

check_for xcodebuild
check_for brew "https://brew.sh"
check_for rustup "https://rustup.rs" "\
Expand Down

0 comments on commit aa24c96

Please sign in to comment.