diff --git a/dist/build/README.md b/dist/build/README.md deleted file mode 100644 index b1b4f0f..0000000 --- a/dist/build/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Build with Docker - -- [Build with Docker](#build-with-docker) - - [Prerequisites](#prerequisites) - - [Build](#build) - ---- - -## Prerequisites - -- Docker - -## Build - -1. Build x86_64 - - this will build termscp for: - - - Linux x86_64 Deb packages - - Linux x86_64 RPM packages - - Windows x86_64 MSVC packages - - ```sh - - ``` diff --git a/dist/build/aarch64_centos7/Dockerfile b/dist/build/aarch64_centos7/Dockerfile deleted file mode 100644 index ba94119..0000000 --- a/dist/build/aarch64_centos7/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM centos:centos7 as builder - -WORKDIR /usr/src/ -# Install dependencies -RUN yum -y install \ - git \ - gcc \ - pkgconfig \ - gcc \ - make \ - dbus-devel \ - libsmbclient-devel \ - bash \ - rpm-build -# Install rust -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rust.sh && \ - chmod +x /tmp/rust.sh && \ - /tmp/rust.sh -y -# Clone repository -RUN git clone https://github.com/veeso/termscp.git -# Set workdir to termscp -WORKDIR /usr/src/termscp/ -# Install cargo rpm -RUN source $HOME/.cargo/env && cargo install cargo-rpm - -ENTRYPOINT ["tail", "-f", "/dev/null"] diff --git a/dist/build/aarch64_debian10/Dockerfile b/dist/build/aarch64_debian10/Dockerfile deleted file mode 100644 index c6a74ba..0000000 --- a/dist/build/aarch64_debian10/Dockerfile +++ /dev/null @@ -1,51 +0,0 @@ -FROM debian:buster - -WORKDIR /usr/src/ -# Install dependencies -RUN apt update && apt install -y \ - git \ - gcc \ - pkg-config \ - libdbus-1-dev \ - build-essential \ - libsmbclient-dev \ - libgit2-dev \ - build-essential \ - pkg-config \ - libbsd-dev \ - libcap-dev \ - libcups2-dev \ - libgnutls28-dev \ - libicu-dev \ - libjansson-dev \ - libkeyutils-dev \ - libldap2-dev \ - zlib1g-dev \ - libpam0g-dev \ - libacl1-dev \ - libarchive-dev \ - flex \ - bison \ - libntirpc-dev \ - libtracker-sparql-3.0-dev \ - libglib2.0-dev \ - libdbus-1-dev \ - libsasl2-dev \ - libunistring-dev \ - bash \ - curl \ - cpanminus && \ - cpanm Parse::Yapp::Driver; - -# Install rust -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rust.sh && \ - chmod +x /tmp/rust.sh && \ - /tmp/rust.sh -y -# Clone repository -RUN git clone https://github.com/veeso/termscp.git -# Set workdir to termscp -WORKDIR /usr/src/termscp/ -# Install cargo deb -RUN . $HOME/.cargo/env && cargo install cargo-deb - -ENTRYPOINT ["tail", "-f", "/dev/null"] diff --git a/dist/build/freebsd.sh b/dist/build/freebsd.sh deleted file mode 100755 index 70e812d..0000000 --- a/dist/build/freebsd.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/sh - -if [ -z "$1" ]; then - echo "Usage: freebsd.sh " - exit 1 -fi - -VERSION=$1 - -set -e # Don't fail - -# Go to root dir -cd ../../ -# Check if in correct directory -if [ ! -f Cargo.toml ]; then - echo "Please start freebsd.sh from dist/build/ directory" - exit 1 -fi - -# Build release -cargo build --release && cargo strip -# Make pkg -cd target/release/ -PKG="termscp-v${VERSION}-x86_64-unknown-freebsd.tar.gz" -tar czf $PKG termscp -sha256sum $PKG -# Calc sha256 of exec and copy to path -HASH=`sha256sum termscp | cut -d ' ' -f1` -sudo cp termscp /usr/local/bin/termscp -mkdir -p ../../dist/pkgs/freebsd/ -mv $PKG ../../dist/pkgs/freebsd/$PKG -cd ../../dist/pkgs/freebsd/ -rm manifest -echo -e "name: \"termscp\"" > manifest -echo -e "version: $VERSION" >> manifest -echo -e "origin: veeso/termscp" >> manifest -echo -e "comment: \"A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/Kube/S3/WebDAV\"" >> manifest -echo -e "desc: <> manifest - -exit $? diff --git a/dist/build/linux-aarch64.sh b/dist/build/linux-aarch64.sh deleted file mode 100755 index 4d53e59..0000000 --- a/dist/build/linux-aarch64.sh +++ /dev/null @@ -1,52 +0,0 @@ -#!/bin/bash - -if [ -z "$1" ]; then - echo "Usage: $0 [branch] [--no-cache]" - exit 1 -fi - -VERSION=$1 - -if [ -z "$2" ]; then - BRANCH=$VERSION -else - BRANCH=$2 -fi - -CACHE="" - -if [ "$3" == "--no-cache" ]; then - CACHE="--no-cache" -fi - -# names -ARM64_DEB_NAME="termscp-arm64_deb" - -docker run --rm --privileged multiarch/qemu-user-static --reset -p yes - -set -e # Don't fail - -# Create pkgs directory -cd .. -PKGS_DIR=$(pwd)/pkgs -cd - -mkdir -p ${PKGS_DIR}/ -# Build aarch64_deb -cd aarch64_debian10/ -docker buildx build --platform linux/arm64 $CACHE --build-arg branch=${BRANCH} --tag $ARM64_DEB_NAME . -cd - -mkdir -p ${PKGS_DIR}/deb/ -mkdir -p ${PKGS_DIR}/aarch64-unknown-linux-gnu/ -docker run --name "$ARM64_DEB_NAME" -d "$ARM64_DEB_NAME" || docker start "$ARM64_DEB_NAME" -docker exec -it "$ARM64_DEB_NAME" bash -c ". \$HOME/.cargo/env && git fetch origin && git checkout origin/$BRANCH && cargo build --release --features smb-vendored && cargo deb" -docker cp ${ARM64_DEB_NAME}:/usr/src/termscp/target/debian/termscp_${VERSION}-1_arm64.deb ${PKGS_DIR}/deb/termscp_${VERSION}_arm64.deb -docker cp ${ARM64_DEB_NAME}:/usr/src/termscp/target/release/termscp ${PKGS_DIR}/aarch64-unknown-linux-gnu/ -docker stop "$ARM64_DEB_NAME" -# Make tar.gz -cd ${PKGS_DIR}/aarch64-unknown-linux-gnu/ -tar cvzf termscp-v${VERSION}-aarch64-unknown-linux-gnu.tar.gz termscp -echo "Sha256 (homebrew aarch64): $(sha256sum termscp-v${VERSION}-aarch64-unknown-linux-gnu.tar.gz)" -rm termscp -cd - - -exit $? diff --git a/dist/build/linux-x86_64.sh b/dist/build/linux-x86_64.sh deleted file mode 100755 index c84b0de..0000000 --- a/dist/build/linux-x86_64.sh +++ /dev/null @@ -1,50 +0,0 @@ -#!/bin/bash - -if [ -z "$1" ]; then - echo "Usage: $0 [branch] [--no-cache]" - exit 1 -fi - -VERSION=$1 - -if [ -z "$2" ]; then - BRANCH=$VERSION -else - BRANCH=$2 -fi - -CACHE="" - -if [ "$3" == "--no-cache" ]; then - CACHE="--no-cache" -fi - -# names -X86_64_DEB_NAME="termscp-x86_64_deb" - -set -e # Don't fail - -# Create pkgs directory -cd .. -PKGS_DIR=$(pwd)/pkgs -cd - -mkdir -p ${PKGS_DIR}/ -# Build x86_64_deb -cd x86_64_debian12/ -docker build $CACHE --build-arg branch=${BRANCH} --tag "$X86_64_DEB_NAME" . -cd - -mkdir -p ${PKGS_DIR}/deb/ -mkdir -p ${PKGS_DIR}/x86_64-unknown-linux-gnu/ -docker run --name "$X86_64_DEB_NAME" -d "$X86_64_DEB_NAME" || docker start "$X86_64_DEB_NAME" -docker exec -it "$X86_64_DEB_NAME" bash -c ". \$HOME/.cargo/env && git fetch origin && git checkout origin/$BRANCH && cargo build --release --features smb-vendored && cargo deb" -docker cp ${X86_64_DEB_NAME}:/usr/src/termscp/target/debian/termscp_${VERSION}-1_amd64.deb ${PKGS_DIR}/deb/termscp_${VERSION}_amd64.deb -docker cp ${X86_64_DEB_NAME}:/usr/src/termscp/target/release/termscp ${PKGS_DIR}/x86_64-unknown-linux-gnu/ -docker stop "$X86_64_DEB_NAME" -# Make tar.gz -cd ${PKGS_DIR}/x86_64-unknown-linux-gnu/ -tar cvzf termscp-v${VERSION}-x86_64-unknown-linux-gnu.tar.gz termscp -echo "Sha256 x86_64 (homebrew): $(sha256sum termscp-v${VERSION}-x86_64-unknown-linux-gnu.tar.gz)" -rm termscp -cd - - -exit $? diff --git a/dist/build/macos.sh b/dist/build/macos.sh deleted file mode 100755 index 6871f9d..0000000 --- a/dist/build/macos.sh +++ /dev/null @@ -1,110 +0,0 @@ -#!/bin/sh - -make_pkg() { - ARCH=$1 - VERSION=$2 - TARGET_DIR="$3" - if [ -z "$TARGET_DIR" ]; then - TARGET_DIR=target/release/ - fi - ROOT_DIR=$(pwd) - cd "$TARGET_DIR" - PKG="termscp-v${VERSION}-${ARCH}-apple-darwin.tar.gz" - tar czf "$PKG" termscp - HASH=$(sha256sum "$PKG") - mkdir -p "${ROOT_DIR}/dist/pkgs/macos/" - mv "$PKG" "${ROOT_DIR}/dist/pkgs/macos/$PKG" - cd - - echo "$HASH" -} - -detect_platform() { - local platform - platform="$(uname -s | tr '[:upper:]' '[:lower:]')" - - case "${platform}" in - linux) platform="linux" ;; - darwin) platform="macos" ;; - freebsd) platform="freebsd" ;; - esac - - printf '%s' "${platform}" -} - -detect_arch() { - local arch - arch="$(uname -m | tr '[:upper:]' '[:lower:]')" - - case "${arch}" in - amd64) arch="x86_64" ;; - armv*) arch="arm" ;; - arm64) arch="aarch64" ;; - esac - - # `uname -m` in some cases mis-reports 32-bit OS as 64-bit, so double check - if [ "${arch}" = "x86_64" ] && [ "$(getconf LONG_BIT)" -eq 32 ]; then - arch="i686" - elif [ "${arch}" = "aarch64" ] && [ "$(getconf LONG_BIT)" -eq 32 ]; then - arch="arm" - fi - - printf '%s' "${arch}" -} - -if [ -z "$1" ]; then - echo "Usage: macos.sh " - exit 1 -fi - -PLATFORM="$(detect_platform)" -ARCH="$(detect_arch)" - -if [ "$PLATFORM" != "macos" ]; then - echo "macos build is only available on MacOs systems" - exit 1 -fi - -VERSION=$1 -export BUILD_ROOT -BUILD_ROOT="$(pwd)/../../" - -set -e # Don't fail - -# Go to root dir -cd ../../ -# Check if in correct directory -if [ ! -f Cargo.toml ]; then - echo "Please start macos.sh from dist/build/ directory" - exit 1 -fi - -# Build release (x86_64) -X86_TARGET="" -X86_TARGET_DIR="" -if [ "$ARCH" = "x86_64" ]; then - X86_TARGET="--target x86_64-apple-darwin" - X86_TARGET_DIR="target/x86_64-apple-darwin/release/" -fi -cargo build --release $X86_TARGET -# Make pkg -X86_64_HASH=$(make_pkg "x86_64" "$VERSION" $X86_TARGET_DIR) -RET_X86_64=$? - -ARM64_TARGET="" -ARM64_TARGET_DIR="" -if [ "$ARCH" = "aarch64" ] || [ "$ARCH" = "arm64" ]; then - ARM64_TARGET="--target aarch64-apple-darwin" - ARM64_TARGET_DIR="target/aarch64-apple-darwin/release/" -fi -cd "$BUILD_ROOT" -# Build ARM64 pkg -cargo build --release $ARM64_TARGET -# Make pkg -ARM64_HASH=$(make_pkg "arm64" "$VERSION" $ARM64_TARGET_DIR) -RET_ARM64=$? - -echo "x86_64 hash: $X86_64_HASH" -echo "arm64 hash: $ARM64_HASH" - -[ "$RET_ARM64" -eq 0 ] && [ "$RET_X86_64" -eq 0 ] -exit $? diff --git a/dist/build/windows.ps1 b/dist/build/windows.ps1 deleted file mode 100755 index 8fffdf2..0000000 --- a/dist/build/windows.ps1 +++ /dev/null @@ -1,20 +0,0 @@ -$ErrorActionPreference = 'Stop'; - -if ($args.Count -eq 0) { - Write-Output "Usage: windows.ps1 " - exit 1 -} - -$version = $args[0] - -# Go to root directory -Set-Location ..\..\ -# Build -cargo build --release -# Make zip -$zipName = "termscp-v$version-x86_64-pc-windows-msvc.zip" -Set-Location .\target\release\ -Compress-Archive -Force termscp.exe $zipName -# Get checksum -Get-FileHash $zipName -Move-Item $zipName .\..\..\dist\pkgs\windows\$zipName diff --git a/dist/build/x86_64_centos7/Dockerfile b/dist/build/x86_64_centos7/Dockerfile deleted file mode 100644 index ba94119..0000000 --- a/dist/build/x86_64_centos7/Dockerfile +++ /dev/null @@ -1,26 +0,0 @@ -FROM centos:centos7 as builder - -WORKDIR /usr/src/ -# Install dependencies -RUN yum -y install \ - git \ - gcc \ - pkgconfig \ - gcc \ - make \ - dbus-devel \ - libsmbclient-devel \ - bash \ - rpm-build -# Install rust -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rust.sh && \ - chmod +x /tmp/rust.sh && \ - /tmp/rust.sh -y -# Clone repository -RUN git clone https://github.com/veeso/termscp.git -# Set workdir to termscp -WORKDIR /usr/src/termscp/ -# Install cargo rpm -RUN source $HOME/.cargo/env && cargo install cargo-rpm - -ENTRYPOINT ["tail", "-f", "/dev/null"] diff --git a/dist/build/x86_64_debian12/Dockerfile b/dist/build/x86_64_debian12/Dockerfile deleted file mode 100644 index 9319f71..0000000 --- a/dist/build/x86_64_debian12/Dockerfile +++ /dev/null @@ -1,54 +0,0 @@ -FROM debian:bookworm - -WORKDIR /usr/src/ -# Install dependencies -RUN apt update && apt install -y \ - git \ - gcc \ - pkg-config \ - libdbus-1-dev \ - build-essential \ - libsmbclient-dev \ - libgit2-dev \ - build-essential \ - pkg-config \ - libbsd-dev \ - libcap-dev \ - libcups2-dev \ - libgnutls28-dev \ - libgnutls30 \ - libicu-dev \ - libjansson-dev \ - libkeyutils-dev \ - libldap2-dev \ - zlib1g-dev \ - libpam0g-dev \ - libacl1-dev \ - libarchive-dev \ - libssl-dev \ - flex \ - bison \ - libntirpc-dev \ - libglib2.0-dev \ - libdbus-1-dev \ - libsasl2-dev \ - libunistring-dev \ - bash \ - curl \ - cpanminus && \ - cpanm Parse::Yapp::Driver; - -# Install rust -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > /tmp/rust.sh && \ - chmod +x /tmp/rust.sh && \ - /tmp/rust.sh -y && \ - . $HOME/.cargo/env && \ - cargo version -# Clone repository -RUN git clone https://github.com/veeso/termscp.git -# Set workdir to termscp -WORKDIR /usr/src/termscp/ -# Install cargo deb -RUN . $HOME/.cargo/env && cargo install cargo-deb - -ENTRYPOINT ["tail", "-f", "/dev/null"] diff --git a/dist/chocolatey/README.md b/dist/chocolatey/README.md new file mode 100644 index 0000000..3d195a1 --- /dev/null +++ b/dist/chocolatey/README.md @@ -0,0 +1,8 @@ +# Chocolatey How To + +Just: + +1. Calculate the SHA256 checksum for the latest release of ZIP files both for aarch64 and x86_64 versions. +2. Update checksums in `tools/chocolateyinstall.ps1` +3. run `choco pack` +4. run `choco push termscp.$VERSION.nupkg --source https://push.chocolatey.org/` diff --git a/dist/chocolatey/termscp.nuspec b/dist/chocolatey/termscp.nuspec new file mode 100644 index 0000000..2d7e4cf --- /dev/null +++ b/dist/chocolatey/termscp.nuspec @@ -0,0 +1,58 @@ + + + + + termscp + 1.0.0 + termSCP + Christian Visintin + Christian Visintin + https://veeso.github.io/termscp/ + Christian Visintin (C) 2024 + https://github.com/veeso/TermSCP/blob/main/LICENSE + https://rawcdn.githack.com/veeso/termscp/c3e5663cf45c4d6a7b50c8b15f89683a2e01b829/assets/images/termscp-512.png + true + https://github.com/veeso/termscp/tree/main/src + https://github.com/veeso/termscp + https://github.com/veeso/termscp/blob/main/CHANGELOG.md + https://docs.rs/termscp + https://github.com/veeso/termscp/issues + termscp winscp rust rust-lang rust-crate scp ssh-client ssh sftp-client ftp-client ftps utility terminal-app terminal command-line-utility command-line-tool tui-rs winscp sftp + A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/Kube/WebDAV/S3 + +## About TermSCP + +Termscp is a feature rich terminal file transfer and explorer, with support for SCP/SFTP/FTP/S3. So basically is a terminal utility with an TUI to connect to a remote server to retrieve and upload files and to interact with the local file system. It is **Linux**, **MacOS**, **BSD** and **Windows** compatible and supports SFTP, SCP, FTP and FTPS. + +Features: + +- 📁 Different communication protocols + - SFTP + - Kube + - WebDAV + - SCP + - FTP and FTPS + - S3 + - SMB +- 🖥 Explore and operate on the remote and on the local machine file system with a handy UI + - Create, remove, rename, search, view and edit files +- ⭐ Connect to your favourite hosts through built-in bookmarks and recent connections +- 📝 View and edit text files with your favourite text editor +- 💁 SFTP/SCP authentication through SSH keys and username/password +- 🐧 Compatible with Windows, Linux, BSD and MacOS +- ✏ Customizable + - Themes + - Custom file explorer format + - Customizable text editor + - Customizable file sorting +- 🔐 Save your password in your operating system key vault +- 🦀 Rust-powered +- 🤝 Easy to extend with new file transfers protocols +- 👀 Developed keeping an eye on performance +- 🦄 Frequent awesome updates + + + + + + \ No newline at end of file diff --git a/dist/chocolatey/tools/chocolateyinstall.ps1 b/dist/chocolatey/tools/chocolateyinstall.ps1 new file mode 100644 index 0000000..6af73b4 --- /dev/null +++ b/dist/chocolatey/tools/chocolateyinstall.ps1 @@ -0,0 +1,25 @@ +$ErrorActionPreference = 'Stop'; +$toolsDir = "$(Split-Path -parent $MyInvocation.MyCommand.Definition)" + +# Detect arch: PROCESSOR_ARCHITECTURE is "ARM64" on ARM, "AMD64" on x64 +$is_arm64 = $env:PROCESSOR_ARCHITECTURE -eq 'ARM64' -or $env:PROCESSOR_ARCHITEW6432 -eq 'ARM64' + +if ($is_arm64) { + $url = 'https://github.com/veeso/termscp/releases/download/v1.0.0/termscp-v1.0.0-msvc.zip' + $checksum = 'f6ad6c62f1578562f9af4bcee93bd4cc429cb52219c3636359b008db8789587e' +} else { + $url = 'https://github.com/veeso/termscp/releases/download/v1.0.0/termscp-v1.0.0-x86_64-pc-windows-msvc.zip' + $checksum = 'd7796081b6f67b82acfa94557aa6852d12a33daab3cca6490660b20e42752005' +} + +$packageArgs = @{ + packageName = $env:ChocolateyPackageName + fileType = 'EXE' + url = $url + unzipLocation = $toolsDir + softwareName = 'termscp*' + checksum = $checksum + checksumType = 'sha256' + validExitCodes = @(0, 3010, 1641) +} +Install-ChocolateyZipPackage @packageArgs diff --git a/dist/deb.sh b/dist/deb.sh deleted file mode 100755 index 82b64c4..0000000 --- a/dist/deb.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -echo "Installing cargo-deb..." -cargo install cargo-deb -if [ ! -f "Cargo.toml" ]; then - echo "Yout must be in the project root directory" - exit 1 -fi -echo "Running cargo-deb" -cargo deb -exit $? diff --git a/dist/rpm.sh b/dist/rpm.sh deleted file mode 100755 index ff79572..0000000 --- a/dist/rpm.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -which rpmbuild > /dev/null -if [ $? -ne 0 ]; then - echo "You must install rpmbuild on your machine" -fi -echo "Installing cargo-rpm..." -cargo install cargo-rpm -if [ ! -f "Cargo.toml" ]; then - echo "Yout must be in the project root directory" - exit 1 -fi -echo "Running cargo-rpm" -cargo rpm init -cargo rpm build -exit $?