mirror of
https://github.com/pepaskopec-blip/Graduately.git
synced 2026-10-27 07:04:35 +00:00
Build from 235436dab0
This commit is contained in:
commit
599d054526
30 changed files with 359 additions and 0 deletions
1
VERSION
Normal file
1
VERSION
Normal file
|
|
@ -0,0 +1 @@
|
|||
235436dab001272b67f56608babac73da8c0dcdc
|
||||
1
VERSION-android
Normal file
1
VERSION-android
Normal file
|
|
@ -0,0 +1 @@
|
|||
235436dab001272b67f56608babac73da8c0dcdc
|
||||
1
VERSION-ios
Normal file
1
VERSION-ios
Normal file
|
|
@ -0,0 +1 @@
|
|||
235436dab001272b67f56608babac73da8c0dcdc
|
||||
1
VERSION-linux
Normal file
1
VERSION-linux
Normal file
|
|
@ -0,0 +1 @@
|
|||
235436dab001272b67f56608babac73da8c0dcdc
|
||||
1
VERSION-macos
Normal file
1
VERSION-macos
Normal file
|
|
@ -0,0 +1 @@
|
|||
235436dab001272b67f56608babac73da8c0dcdc
|
||||
1
VERSION-windows
Normal file
1
VERSION-windows
Normal file
|
|
@ -0,0 +1 @@
|
|||
235436dab001272b67f56608babac73da8c0dcdc
|
||||
BIN
graduately-android.apk
Normal file
BIN
graduately-android.apk
Normal file
Binary file not shown.
BIN
graduately-installer-android.zip
Normal file
BIN
graduately-installer-android.zip
Normal file
Binary file not shown.
BIN
graduately-installer-ios.zip
Normal file
BIN
graduately-installer-ios.zip
Normal file
Binary file not shown.
95
graduately-installer-linux.sh
Executable file
95
graduately-installer-linux.sh
Executable file
|
|
@ -0,0 +1,95 @@
|
|||
#!/bin/sh
|
||||
# Graduately installer for Linux.
|
||||
#
|
||||
# Carries no application of its own. Fastly caches branch-named URLs on
|
||||
# raw.githubusercontent.com, so this script looks up the tip of `builds`
|
||||
# and downloads that commit — not a stale AppImage from the last five minutes.
|
||||
#
|
||||
# Double-click the file (or run: sh graduately-installer-linux.sh).
|
||||
# The app updates itself from then on.
|
||||
|
||||
set -eu
|
||||
|
||||
REPO="pepaskopec-blip/Graduately"
|
||||
BRANCH="builds"
|
||||
ASSET="graduately-linux-x86_64.AppImage"
|
||||
|
||||
DEST_DIR="$HOME/Applications"
|
||||
DEST="$DEST_DIR/graduately.AppImage"
|
||||
DESKTOP_DIR="$HOME/.local/share/applications"
|
||||
ICON_DIR="$HOME/.local/share/icons/hicolor/512x512/apps"
|
||||
|
||||
say() { printf '%s\n' "$*"; }
|
||||
die() {
|
||||
printf '\nError: %s\n' "$*" >&2
|
||||
printf 'Press Enter to close. '
|
||||
read -r _ || true
|
||||
exit 1
|
||||
}
|
||||
|
||||
builds_sha() {
|
||||
curl -fsSL --max-time 20 \
|
||||
"https://github.com/$REPO/commits/$BRANCH.atom" |
|
||||
sed -n 's/.*Commit\/\([0-9a-f]\{40\}\).*/\1/p' |
|
||||
head -n 1
|
||||
}
|
||||
|
||||
say "Installing Graduately"
|
||||
say "---------------------"
|
||||
|
||||
arch=$(uname -m)
|
||||
if [ "$arch" != "x86_64" ]; then
|
||||
die "only x86_64 builds are published, but this machine reports '$arch'.
|
||||
Build from source instead: https://github.com/$REPO"
|
||||
fi
|
||||
|
||||
command -v curl >/dev/null 2>&1 || die "curl was not found. Install it first."
|
||||
|
||||
mkdir -p "$DEST_DIR"
|
||||
|
||||
tmp=$(mktemp -d)
|
||||
trap 'rm -rf "$tmp"' EXIT INT TERM
|
||||
|
||||
say "Looking up the latest build..."
|
||||
sha=$(builds_sha)
|
||||
[ ${#sha} -eq 40 ] || die "could not find the latest build on GitHub."
|
||||
URL="https://raw.githubusercontent.com/$REPO/$sha/$ASSET"
|
||||
LEGACY_URL="https://raw.githubusercontent.com/$REPO/$sha/maturita-linux-x86_64.AppImage"
|
||||
|
||||
say "Downloading build $(printf '%.7s' "$sha")..."
|
||||
if ! curl -fL --progress-bar --max-time 1800 -o "$tmp/$ASSET" "$URL"; then
|
||||
curl -fL --progress-bar --max-time 1800 -o "$tmp/$ASSET" "$LEGACY_URL" ||
|
||||
die "the download failed. Check your internet connection."
|
||||
fi
|
||||
|
||||
say "Installing to $DEST"
|
||||
chmod +x "$tmp/$ASSET"
|
||||
mv -f "$tmp/$ASSET" "$DEST" || die "could not write to $DEST_DIR."
|
||||
|
||||
if (cd "$tmp" && "$DEST" --appimage-extract \
|
||||
'usr/share/icons/hicolor/512x512/apps/maturita.png' >/dev/null 2>&1); then
|
||||
icon="$tmp/squashfs-root/usr/share/icons/hicolor/512x512/apps/maturita.png"
|
||||
if [ -f "$icon" ]; then
|
||||
mkdir -p "$ICON_DIR"
|
||||
cp -f "$icon" "$ICON_DIR/maturita.png"
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p "$DESKTOP_DIR"
|
||||
cat > "$DESKTOP_DIR/maturita.desktop" <<EOF
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Graduately
|
||||
Comment=Practice app for the Czech maturita exam
|
||||
Exec=$DEST
|
||||
Icon=maturita
|
||||
Terminal=false
|
||||
Categories=Education;
|
||||
EOF
|
||||
|
||||
command -v update-desktop-database >/dev/null 2>&1 &&
|
||||
update-desktop-database "$DESKTOP_DIR" >/dev/null 2>&1 || true
|
||||
|
||||
say ""
|
||||
say "Done. Starting the app..."
|
||||
"$DEST" >/dev/null 2>&1 &
|
||||
BIN
graduately-installer-linux.zip
Normal file
BIN
graduately-installer-linux.zip
Normal file
Binary file not shown.
BIN
graduately-installer-macos.zip
Normal file
BIN
graduately-installer-macos.zip
Normal file
Binary file not shown.
84
graduately-installer-windows.cmd
Normal file
84
graduately-installer-windows.cmd
Normal file
|
|
@ -0,0 +1,84 @@
|
|||
@echo off
|
||||
rem Graduately installer for Windows.
|
||||
rem
|
||||
rem Carries no application of its own. Fastly caches branch-named URLs on
|
||||
rem raw.githubusercontent.com, so this script looks up the tip of `builds`
|
||||
rem and downloads that commit — not a stale zip from the last five minutes.
|
||||
rem
|
||||
rem Double-click the file to run it. The app updates itself from then on.
|
||||
|
||||
setlocal EnableDelayedExpansion
|
||||
set "REPO=pepaskopec-blip/Graduately"
|
||||
set "BRANCH=builds"
|
||||
set "ASSET=graduately-windows-x64.zip"
|
||||
set "DEST=%LOCALAPPDATA%\Programs\Graduately"
|
||||
|
||||
echo Installing Graduately
|
||||
echo ---------------------
|
||||
|
||||
where curl >nul 2>&1 || goto :no_tools
|
||||
where tar >nul 2>&1 || goto :no_tools
|
||||
|
||||
set "TMP_DIR=%TEMP%\graduately-installer"
|
||||
rmdir /s /q "%TMP_DIR%" 2>nul
|
||||
mkdir "%TMP_DIR%" || goto :fail_tmp
|
||||
|
||||
echo Looking up the latest build...
|
||||
set "SHA="
|
||||
for /f "usebackq delims=" %%S in (`powershell -NoProfile -ExecutionPolicy Bypass -Command "$r = & curl.exe -fsSL --max-time 20 'https://github.com/%REPO%/commits/%BRANCH%.atom'; if ($r -match 'Commit/([0-9a-f]{40})') { $Matches[1] }"`) do set "SHA=%%S"
|
||||
if not defined SHA goto :fail_download
|
||||
set "URL=https://raw.githubusercontent.com/%REPO%/%SHA%/%ASSET%"
|
||||
set "LEGACY_URL=https://raw.githubusercontent.com/%REPO%/%SHA%/maturita-windows-x64.zip"
|
||||
|
||||
echo Downloading build %SHA:~0,7%...
|
||||
curl -fL --progress-bar --max-time 1800 -o "%TMP_DIR%\%ASSET%" "%URL%"
|
||||
if errorlevel 1 curl -fL --progress-bar --max-time 1800 -o "%TMP_DIR%\%ASSET%" "%LEGACY_URL%" || goto :fail_download
|
||||
|
||||
echo Installing to %DEST%
|
||||
if not exist "%DEST%" mkdir "%DEST%" || goto :fail_dest
|
||||
|
||||
tar -xf "%TMP_DIR%\%ASSET%" -C "%DEST%" || goto :fail_extract
|
||||
|
||||
set "LNK=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Graduately.lnk"
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
|
||||
"$s=(New-Object -ComObject WScript.Shell).CreateShortcut('%LNK%');" ^
|
||||
"$s.TargetPath='%DEST%\graduately.exe';$s.WorkingDirectory='%DEST%';$s.Save()" >nul 2>&1
|
||||
|
||||
rmdir /s /q "%TMP_DIR%" 2>nul
|
||||
|
||||
echo.
|
||||
echo Done. Starting the app...
|
||||
start "" "%DEST%\graduately.exe"
|
||||
exit /b 0
|
||||
|
||||
:no_tools
|
||||
echo.
|
||||
echo Error: this installer needs curl and tar, which come with Windows 10
|
||||
echo version 1803 and later. Please update Windows, or download the zip
|
||||
echo manually from https://github.com/%REPO%/tree/%BRANCH%
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:fail_tmp
|
||||
echo.
|
||||
echo Error: could not create a temporary folder in %TEMP%.
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:fail_download
|
||||
echo.
|
||||
echo Error: the download failed. Check your internet connection.
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:fail_dest
|
||||
echo.
|
||||
echo Error: could not create %DEST%.
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:fail_extract
|
||||
echo.
|
||||
echo Error: the archive could not be unpacked.
|
||||
pause
|
||||
exit /b 1
|
||||
BIN
graduately-installer-windows.zip
Normal file
BIN
graduately-installer-windows.zip
Normal file
Binary file not shown.
BIN
graduately-ios.ipa
Normal file
BIN
graduately-ios.ipa
Normal file
Binary file not shown.
BIN
graduately-linux-x86_64.AppImage
Normal file
BIN
graduately-linux-x86_64.AppImage
Normal file
Binary file not shown.
BIN
graduately-macos-arm64.zip
Normal file
BIN
graduately-macos-arm64.zip
Normal file
Binary file not shown.
BIN
graduately-windows-x64.zip
Normal file
BIN
graduately-windows-x64.zip
Normal file
Binary file not shown.
BIN
maturita-android.apk
Normal file
BIN
maturita-android.apk
Normal file
Binary file not shown.
BIN
maturita-installer-android.zip
Normal file
BIN
maturita-installer-android.zip
Normal file
Binary file not shown.
BIN
maturita-installer-ios.zip
Normal file
BIN
maturita-installer-ios.zip
Normal file
Binary file not shown.
92
maturita-installer-linux.sh
Executable file
92
maturita-installer-linux.sh
Executable file
|
|
@ -0,0 +1,92 @@
|
|||
#!/bin/sh
|
||||
# Graduately installer for Linux.
|
||||
#
|
||||
# Carries no application of its own. Fastly caches branch-named URLs on
|
||||
# raw.githubusercontent.com, so this script looks up the tip of `builds`
|
||||
# and downloads that commit — not a stale AppImage from the last five minutes.
|
||||
#
|
||||
# Double-click the file (or run: sh maturita-installer-linux.sh).
|
||||
# The app updates itself from then on.
|
||||
|
||||
set -eu
|
||||
|
||||
REPO="pepaskopec-blip/Graduately"
|
||||
BRANCH="builds"
|
||||
ASSET="maturita-linux-x86_64.AppImage"
|
||||
|
||||
DEST_DIR="$HOME/Applications"
|
||||
DEST="$DEST_DIR/maturita.AppImage"
|
||||
DESKTOP_DIR="$HOME/.local/share/applications"
|
||||
ICON_DIR="$HOME/.local/share/icons/hicolor/512x512/apps"
|
||||
|
||||
say() { printf '%s\n' "$*"; }
|
||||
die() {
|
||||
printf '\nError: %s\n' "$*" >&2
|
||||
printf 'Press Enter to close. '
|
||||
read -r _ || true
|
||||
exit 1
|
||||
}
|
||||
|
||||
builds_sha() {
|
||||
curl -fsSL --max-time 20 \
|
||||
"https://github.com/$REPO/commits/$BRANCH.atom" |
|
||||
sed -n 's/.*Commit\/\([0-9a-f]\{40\}\).*/\1/p' |
|
||||
head -n 1
|
||||
}
|
||||
|
||||
say "Installing Graduately"
|
||||
say "---------------------"
|
||||
|
||||
arch=$(uname -m)
|
||||
if [ "$arch" != "x86_64" ]; then
|
||||
die "only x86_64 builds are published, but this machine reports '$arch'.
|
||||
Build from source instead: https://github.com/$REPO"
|
||||
fi
|
||||
|
||||
command -v curl >/dev/null 2>&1 || die "curl was not found. Install it first."
|
||||
|
||||
mkdir -p "$DEST_DIR"
|
||||
|
||||
tmp=$(mktemp -d)
|
||||
trap 'rm -rf "$tmp"' EXIT INT TERM
|
||||
|
||||
say "Looking up the latest build..."
|
||||
sha=$(builds_sha)
|
||||
[ ${#sha} -eq 40 ] || die "could not find the latest build on GitHub."
|
||||
URL="https://raw.githubusercontent.com/$REPO/$sha/$ASSET"
|
||||
|
||||
say "Downloading build $(printf '%.7s' "$sha")..."
|
||||
curl -fL --progress-bar --max-time 1800 -o "$tmp/$ASSET" "$URL" ||
|
||||
die "the download failed. Check your internet connection."
|
||||
|
||||
say "Installing to $DEST"
|
||||
chmod +x "$tmp/$ASSET"
|
||||
mv -f "$tmp/$ASSET" "$DEST" || die "could not write to $DEST_DIR."
|
||||
|
||||
if (cd "$tmp" && "$DEST" --appimage-extract \
|
||||
'usr/share/icons/hicolor/512x512/apps/maturita.png' >/dev/null 2>&1); then
|
||||
icon="$tmp/squashfs-root/usr/share/icons/hicolor/512x512/apps/maturita.png"
|
||||
if [ -f "$icon" ]; then
|
||||
mkdir -p "$ICON_DIR"
|
||||
cp -f "$icon" "$ICON_DIR/maturita.png"
|
||||
fi
|
||||
fi
|
||||
|
||||
mkdir -p "$DESKTOP_DIR"
|
||||
cat > "$DESKTOP_DIR/maturita.desktop" <<EOF
|
||||
[Desktop Entry]
|
||||
Type=Application
|
||||
Name=Graduately
|
||||
Comment=Practice app for the Czech maturita exam
|
||||
Exec=$DEST
|
||||
Icon=maturita
|
||||
Terminal=false
|
||||
Categories=Education;
|
||||
EOF
|
||||
|
||||
command -v update-desktop-database >/dev/null 2>&1 &&
|
||||
update-desktop-database "$DESKTOP_DIR" >/dev/null 2>&1 || true
|
||||
|
||||
say ""
|
||||
say "Done. Starting the app..."
|
||||
"$DEST" >/dev/null 2>&1 &
|
||||
BIN
maturita-installer-linux.zip
Normal file
BIN
maturita-installer-linux.zip
Normal file
Binary file not shown.
BIN
maturita-installer-macos.zip
Normal file
BIN
maturita-installer-macos.zip
Normal file
Binary file not shown.
82
maturita-installer-windows.cmd
Normal file
82
maturita-installer-windows.cmd
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
@echo off
|
||||
rem Graduately installer for Windows.
|
||||
rem
|
||||
rem Carries no application of its own. Fastly caches branch-named URLs on
|
||||
rem raw.githubusercontent.com, so this script looks up the tip of `builds`
|
||||
rem and downloads that commit — not a stale zip from the last five minutes.
|
||||
rem
|
||||
rem Double-click the file to run it. The app updates itself from then on.
|
||||
|
||||
setlocal EnableDelayedExpansion
|
||||
set "REPO=pepaskopec-blip/Graduately"
|
||||
set "BRANCH=builds"
|
||||
set "ASSET=maturita-windows-x64.zip"
|
||||
set "DEST=%LOCALAPPDATA%\Programs\Graduately"
|
||||
|
||||
echo Installing Graduately
|
||||
echo ---------------------
|
||||
|
||||
where curl >nul 2>&1 || goto :no_tools
|
||||
where tar >nul 2>&1 || goto :no_tools
|
||||
|
||||
set "TMP_DIR=%TEMP%\maturita-installer"
|
||||
rmdir /s /q "%TMP_DIR%" 2>nul
|
||||
mkdir "%TMP_DIR%" || goto :fail_tmp
|
||||
|
||||
echo Looking up the latest build...
|
||||
set "SHA="
|
||||
for /f "usebackq delims=" %%S in (`powershell -NoProfile -ExecutionPolicy Bypass -Command "$r = & curl.exe -fsSL --max-time 20 'https://github.com/%REPO%/commits/%BRANCH%.atom'; if ($r -match 'Commit/([0-9a-f]{40})') { $Matches[1] }"`) do set "SHA=%%S"
|
||||
if not defined SHA goto :fail_download
|
||||
set "URL=https://raw.githubusercontent.com/%REPO%/%SHA%/%ASSET%"
|
||||
|
||||
echo Downloading build %SHA:~0,7%...
|
||||
curl -fL --progress-bar --max-time 1800 -o "%TMP_DIR%\%ASSET%" "%URL%" || goto :fail_download
|
||||
|
||||
echo Installing to %DEST%
|
||||
if not exist "%DEST%" mkdir "%DEST%" || goto :fail_dest
|
||||
|
||||
tar -xf "%TMP_DIR%\%ASSET%" -C "%DEST%" || goto :fail_extract
|
||||
|
||||
set "LNK=%APPDATA%\Microsoft\Windows\Start Menu\Programs\Graduately.lnk"
|
||||
powershell -NoProfile -ExecutionPolicy Bypass -Command ^
|
||||
"$s=(New-Object -ComObject WScript.Shell).CreateShortcut('%LNK%');" ^
|
||||
"$s.TargetPath='%DEST%\maturita.exe';$s.WorkingDirectory='%DEST%';$s.Save()" >nul 2>&1
|
||||
|
||||
rmdir /s /q "%TMP_DIR%" 2>nul
|
||||
|
||||
echo.
|
||||
echo Done. Starting the app...
|
||||
start "" "%DEST%\maturita.exe"
|
||||
exit /b 0
|
||||
|
||||
:no_tools
|
||||
echo.
|
||||
echo Error: this installer needs curl and tar, which come with Windows 10
|
||||
echo version 1803 and later. Please update Windows, or download the zip
|
||||
echo manually from https://github.com/%REPO%/tree/%BRANCH%
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:fail_tmp
|
||||
echo.
|
||||
echo Error: could not create a temporary folder in %TEMP%.
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:fail_download
|
||||
echo.
|
||||
echo Error: the download failed. Check your internet connection.
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:fail_dest
|
||||
echo.
|
||||
echo Error: could not create %DEST%.
|
||||
pause
|
||||
exit /b 1
|
||||
|
||||
:fail_extract
|
||||
echo.
|
||||
echo Error: the archive could not be unpacked.
|
||||
pause
|
||||
exit /b 1
|
||||
BIN
maturita-installer-windows.zip
Normal file
BIN
maturita-installer-windows.zip
Normal file
Binary file not shown.
BIN
maturita-ios.ipa
Normal file
BIN
maturita-ios.ipa
Normal file
Binary file not shown.
BIN
maturita-linux-x86_64.AppImage
Normal file
BIN
maturita-linux-x86_64.AppImage
Normal file
Binary file not shown.
BIN
maturita-macos-arm64.zip
Normal file
BIN
maturita-macos-arm64.zip
Normal file
Binary file not shown.
BIN
maturita-windows-x64.zip
Normal file
BIN
maturita-windows-x64.zip
Normal file
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue