fix: fix most PATH-related issues

This commit is contained in:
Poly-Pixel 2022-07-27 18:09:59 -07:00
parent 85850af541
commit 7eb7fad336

View File

@ -37,8 +37,8 @@ if ! rustc --version; then
start "Rust Installer" rustup-init.exe
read -p "$(printSuccess "Press enter when Rust installation is done") " isDone
rm rustup-init.exe
rustup toolchain install stable
rustup default stable
$USERPROFILE/.cargo/bin/rustup toolchain install stable
$USERPROFILE/.cargo/bin/rustup default stable
else
printMessage "Skipping Rust installation."
fi
@ -50,6 +50,9 @@ fi
printMessage "Setting up Flutter"
flutter channel stable
# Add pub cache to PATH
powershell '[Environment]::SetEnvironmentVariable("PATH", $Env:PATH + ";" + $Env:LOCALAPPDATA + "\Pub\Cache\Bin", [EnvironmentVariableTarget]::User)'
# Enable linux desktop
flutter config --enable-windows-desktop
@ -60,17 +63,6 @@ flutter doctor
printMessage "Setting up githooks."
git config core.hooksPath .githooks
# Change to the frontend directory
cd frontend
# Install cargo make
printMessage "Installing cargo-make."
cargo install --force cargo-make
# Install duckscript
printMessage "Installing duckscript."
cargo install --force duckscript_cli
# Install go-gitlint
printMessage "Installing go-gitlint."
GOLINT_FILENAME="go-gitlint_1.1.0_windows_x86_64.tar.gz"
@ -81,10 +73,22 @@ else
printError "Failed to install go-gitlint"
fi
# Change to the frontend directory
cd frontend
# Install cargo make
printMessage "Installing cargo-make."
#$USERPROFILE/.cargo/bin/cargo install --force cargo-make
# Install duckscript
printMessage "Installing duckscript."
$USERPROFILE/.cargo/bin/cargo install --force duckscript_cli
# Enable vcpkg integration
# Note: Requires admin
printMessage "Setting up vcpkg."
vcpkg integrate install
# Check prerequisites
printMessage "Checking prerequisites."
cargo make flowy_dev
$USERPROFILE/.cargo/bin/cargo make flowy_dev