mirror of
https://github.com/tauri-apps/rust-xcode-plugin.git
synced 2026-01-31 00:45:21 +01:00
35 lines
1006 B
Bash
Executable File
35 lines
1006 B
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -x
|
|
|
|
# Create plug-ins directory if it doesn't exist
|
|
plugins_dir=~/Library/Developer/Xcode/Plug-ins/
|
|
if [ ! -d "$plugins_dir" ]; then
|
|
mkdir $plugins_dir
|
|
fi
|
|
|
|
# Copy the IDE Plugin to the plug-ins directory
|
|
|
|
cp -r Plug-ins/Rust.ideplugin $plugins_dir
|
|
|
|
#Get the selected Xcode.app's path
|
|
xcode_path=$(xcode-select -p)
|
|
xcode_path=$(dirname $xcode_path)
|
|
|
|
# Get Specifications directory
|
|
spec_dir="${xcode_path}/SharedFrameworks/SourceModel.framework/Versions/A/Resources/LanguageSpecifications"
|
|
|
|
# Copy the language specification to the specs directory
|
|
cp Specifications/Rust.xclangspec $spec_dir
|
|
#cp Specifications/Rust.xcspec $spec_dir
|
|
|
|
# Get language metadata directory
|
|
metadata_dir="${xcode_path}/SharedFrameworks/SourceModel.framework/Versions/A/Resources/LanguageMetadata"
|
|
|
|
# Copy the source code language plist to the metadata directory
|
|
cp Xcode.SourceCodeLanguage.Rust.plist $metadata_dir
|
|
|
|
defaults read ${xcode_path}/Info DVTPlugInCompatibilityUUID
|
|
|
|
echo "Please restart Xcode"
|