AppFlowy/frontend/scripts/install_dev_env/install_windows.sh

113 lines
3.5 KiB
Bash
Raw Normal View History

feat: support publish document (#5576) * feat: support a event for getting encoded collab of document * feat: support publish view and unpublish views * feat: publish page to the web * chore: refacotor share bloc * feat: call the publish event * feat: support publish view and unpublish views * feat: integrate publish api * feat: integrate unpublish api * feat: fetch the publish info to show the publish status * feat: support publish interfaces * fix: lint error * fix: modified web server * fix: some style * fix: some style * fix: some style * fix: some style * fix: some style * fix: some style * fix: some style * fix: some style * fix: some style * fix: update codes * fix: update codes * fix: update codes * fix: update codes * fix: update codes * chore: refactor publish bloc * fix: some style * fix: some style * fix: some style * fix: some style * fix: some style * fix: some style * fix: the name is too long to publish * chore: change color * fix: some style * fix: some style * feat: refacotor share menu UI * fix: some style * fix: lint * fix: some style * feat: refacotor export-as * fix: some style * chore: refactor share menu colors * fix: rust ci * fix: some style * fix: some style * fix: deploy * fix: deploy * fix: deploy * fix: deploy * fix: deploy * fix: deploy * fix: deploy * fix: deploy * fix: deploy * fix: deploy * fix: deploy * fix: deploy * fix: bugs * fix: bugs * fix: bugs * fix: bugs * fix: bugs * fix: bugs * fix: bugs * fix: bugs * fix: bugs * fix: bugs * fix: bugs * fix: bugs * fix: bugs * fix: bugs * fix: bugs * fix: bugs * fix: rerelease * fix: deploy * fix: deploy * fix: deploy * fix: deploy * fix: deploy * fix: deploy * fix: deploy * fix: og image * fix: support copy button * fix: support copy button * fix: support copy button * chore: add a params * feat: use default publish name * chore: update copy * feat: show a confirm deletion dialog if the deleted page contains published page * feat: add copy toast in publish tab * fix: to 404 fix: to 404 fix: to 404 fix: the error to 404 * feat: unpublish the page auto when moving it to another space * feat: improve confirm deletion dialog * feat: show unpublish error * chore: use beta.appflowy.com * feat: disable publish in non-apppflowy-cloud user mode * fix: modified bullted icon style * fix: the dark mode color * fix: save the dark mode in local storage * fix: text color * chore: make bash script more portable (#5679) * fix: title longer * chore: move the files and modified the en * chore: update deploy.sh * chore: modified Dockerfile * chore: modified server.cjs to server.js * chore: modifed server.js to server.ts * chore: replace publish url * chore: remove todo list hover * chore: show confirm dialog before deleting page * fix: unpublish the pages before deleting * fix: table cell bg color * fix: callout icon * fix: list number * fix: emoji * fix: number icon * fix: callout icon position * fix: add margin bottom * fix: code block * fix: support scroll for breadcrumbs * fix: the breadcrumb doesn't update after moving page * fix: 0705 issues * fix: update publish status afer deleting page * chore: add hover effect for visit site button * fix: remove puiblish url text field enable border color * chore: update delete page copy * chore: enable debug category * fix: only render sidebar if the spaces are ready * fix: the breadcrumb doesn't update after moving page * fix: auto code * fix: add emoji * fix: add emoji * fix: favicon * fix: cypress test * fix: remove deploy ci * fix: default url * chore: revert launch.json * fix: docker ci * fix: change favicon * fix: flutter integration test * feat: add hover effect to share menu * chore: add a checkmark if the page has been published * chore: revert space deletion --------- Co-authored-by: Lucas.Xu <lucas.xu@appflowy.io> Co-authored-by: Zack <speed2exe@live.com.sg>
2024-07-08 05:45:57 +00:00
#!/usr/bin/env bash
YELLOW="\e[93m"
GREEN="\e[32m"
RED="\e[31m"
ENDCOLOR="\e[0m"
printMessage() {
printf "${YELLOW}AppFlowy : $1${ENDCOLOR}\n"
}
printSuccess() {
printf "${GREEN}AppFlowy : $1${ENDCOLOR}\n"
}
printError() {
printf "${RED}AppFlowy : $1${ENDCOLOR}\n"
}
# Note: This script does not install applications which are installed by the package manager. There are too many package managers out there.
# Install Rust
if ! rustc --version; then
printMessage "The Rust programming language is required to compile AppFlowy."
printMessage "It has not been detected on your system."
read -p "$(printSuccess "Do you want to install Rust? [y/N]") " installrust
if [ ${installrust^^} == "Y" ]; then
printMessage "Installing Rust."
if ! curl --proto '=https' --tlsv1.2 -sSf https://win.rustup.rs/x86_64 -o rustup-init.exe; then
printError "Failed to download the Rust installer"
exit 1
fi
start "Rust Installer" rustup-init.exe
read -p "$(printSuccess "Press enter when Rust installation is done") " isDone
rm rustup-init.exe
2022-07-28 01:09:59 +00:00
$USERPROFILE/.cargo/bin/rustup toolchain install stable
$USERPROFILE/.cargo/bin/rustup default stable
else
printMessage "Skipping Rust installation."
fi
else
printSuccess "Rust has been detected on your system, so Rust installation has been skipped"
fi
printMessage "Setting up Flutter"
# Get the current Flutter version
FLUTTER_VERSION=$(flutter --version | grep -oP 'Flutter \K\S+')
# Check if the current version is 3.22.0
if [ "$FLUTTER_VERSION" = "3.22.0" ]; then
echo "Flutter version is already 3.22.0"
else
# Get the path to the Flutter SDK
FLUTTER_PATH=$(which flutter)
FLUTTER_PATH=${FLUTTER_PATH%/bin/flutter}
current_dir=$(pwd)
cd $FLUTTER_PATH
# Use git to checkout version 3.22.0 of Flutter
git checkout 3.22.0
# Get back to current working directory
cd "$current_dir"
echo "Switched to Flutter version 3.22.0"
fi
2022-07-29 03:04:46 +00:00
# Add pub cache and cargo to PATH
2022-07-28 01:09:59 +00:00
powershell '[Environment]::SetEnvironmentVariable("PATH", $Env:PATH + ";" + $Env:LOCALAPPDATA + "\Pub\Cache\Bin", [EnvironmentVariableTarget]::User)'
2022-07-29 03:04:46 +00:00
powershell '[Environment]::SetEnvironmentVariable("PATH", $Env:PATH + ";" + $Env:USERPROFILE + "\.cargo\bin", [EnvironmentVariableTarget]::User)'
2022-07-28 01:09:59 +00:00
# Enable linux desktop
flutter config --enable-windows-desktop
# Fix any problems reported by flutter doctor
flutter doctor
# Add the githooks directory to your git configuration
printMessage "Setting up githooks."
git config core.hooksPath .githooks
# Install go-gitlint
printMessage "Installing go-gitlint."
GOLINT_FILENAME="go-gitlint_1.1.0_windows_x86_64.tar.gz"
if curl --proto '=https' --tlsv1.2 -sSfL https://github.com/llorllale/go-gitlint/releases/download/1.1.0/${GOLINT_FILENAME} -o ${GOLINT_FILENAME}; then
tar -zxv --directory .githooks/. -f ${GOLINT_FILENAME} gitlint.exe
rm ${GOLINT_FILENAME}
else
printError "Failed to install go-gitlint"
fi
2022-07-28 01:09:59 +00:00
# Change to the frontend directory
cd frontend
# Install cargo make
printMessage "Installing cargo-make."
2022-07-24 19:34:55 +00:00
$USERPROFILE/.cargo/bin/cargo install --force cargo-make
2022-07-28 01:09:59 +00:00
# Install duckscript
printMessage "Installing duckscript."
$USERPROFILE/.cargo/bin/cargo install --force duckscript_cli
# Enable vcpkg integration
# Note: Requires admin
2022-07-28 01:09:59 +00:00
printMessage "Setting up vcpkg."
vcpkg integrate install
# Check prerequisites
printMessage "Checking prerequisites."
PATH="$PATH;$LOCALAPPDATA\Pub\Cache\bin" bash -c '$USERPROFILE/.cargo/bin/cargo make appflowy-flutter-deps-tools'