mirror of
https://github.com/cryptpad/cryptpad.git
synced 2026-09-12 19:49:59 +05:00
Merge branch 'insert-onlyoffice-api' into 2025.6.1-test
This commit is contained in:
commit
026de7f898
@ -23,17 +23,18 @@ main() {
|
||||
|
||||
ask_for_license
|
||||
|
||||
# Remeber the 1st version that is installed. This will help us install only
|
||||
# Remember the 1st version that is installed. This will help us install only
|
||||
# needed OnlyOffice versions in a later version of this script.
|
||||
set_prop oldest_needed_version v1
|
||||
|
||||
mkdir -p "$OO_DIR"
|
||||
install_version v1 4f370beb
|
||||
install_version v2b d9da72fd
|
||||
install_version v4 6ebc6938
|
||||
install_version v5 88a356f0
|
||||
install_version v6 abd8a309
|
||||
install_version v7 e1267803
|
||||
install_old_version v1 4f370beb
|
||||
install_old_version v2b d9da72fd
|
||||
install_old_version v4 6ebc6938
|
||||
install_old_version v5 88a356f0
|
||||
install_old_version v6 abd8a309
|
||||
install_version v7 v7.3.3.60+10 be3c926d534b0c77aa1ed83b170a38b9e56ebbbfd73a1a968f523d63c5ed69ecdb063fad08740812de82c1e79af7309faf67ffdd81b45451adce539192f3414c
|
||||
install_version v8 v8.3.0.83+0 3fbb6f163d1dca1f2c652cfadce4eae928a6a0bbaa97ccf918e4a1b01c9f2e27acf704ae40af30076e7c16f5e9101b58786c63f03d72366a0488387301fdb7aa
|
||||
install_x2t v7.3+1 ab0c05b0e4c81071acea83f0c6a8e75f5870c360ec4abc4af09105dd9b52264af9711ec0b7020e87095193ac9b6e20305e446f2321a541f743626a598e5318c1
|
||||
|
||||
rm -rf "$BUILDS_DIR"
|
||||
@ -167,12 +168,11 @@ ensure_oo_is_downloaded() {
|
||||
fi
|
||||
}
|
||||
|
||||
install_version() {
|
||||
install_old_version() {
|
||||
local DIR=$1
|
||||
local COMMIT=$2
|
||||
local FULL_DIR=$OO_DIR/$DIR
|
||||
local LAST_DIR
|
||||
LAST_DIR=$(pwd)
|
||||
local LAST_DIR=$(pwd)
|
||||
|
||||
local ACTUAL_COMMIT="not installed"
|
||||
if [ -e "$FULL_DIR"/.commit ]; then
|
||||
@ -206,6 +206,40 @@ install_version() {
|
||||
fi
|
||||
}
|
||||
|
||||
install_version() {
|
||||
ensure_command_available curl
|
||||
ensure_command_available sha512sum
|
||||
ensure_command_available unzip
|
||||
|
||||
local DIR=$1
|
||||
local VERSION=$2
|
||||
local HASH=$3
|
||||
local FULL_DIR=$OO_DIR/$DIR
|
||||
local LAST_DIR=$(pwd)
|
||||
|
||||
if [ ! -e "$FULL_DIR"/.version ] || [ "$(cat "$FULL_DIR"/.version)" != "$VERSION" ]; then
|
||||
rm -rf "$FULL_DIR"
|
||||
mkdir -p "$FULL_DIR"
|
||||
|
||||
cd "$FULL_DIR"
|
||||
|
||||
curl "https://github.com/cryptpad/onlyoffice-editor/releases/download/$VERSION/onlyoffice-editor.zip" --location --output "onlyoffice-editor.zip"
|
||||
echo "$HASH onlyoffice-editor.zip" >onlyoffice-editor.zip.sha512
|
||||
if ! sha512sum --check onlyoffice-editor.zip.sha512; then
|
||||
echo "onlyoffice-editor.zip does not match expected checksum"
|
||||
exit 1
|
||||
fi
|
||||
unzip onlyoffice-editor.zip
|
||||
rm onlyoffice-editor.zip*
|
||||
|
||||
echo "$VERSION" >"$FULL_DIR"/.version
|
||||
|
||||
echo "$DIR updated"
|
||||
else
|
||||
echo "$DIR was up to date"
|
||||
fi
|
||||
}
|
||||
|
||||
install_x2t() {
|
||||
local VERSION=$1
|
||||
local HASH=$2
|
||||
@ -233,7 +267,6 @@ install_x2t() {
|
||||
ensure_command_available sha512sum
|
||||
ensure_command_available unzip
|
||||
curl "https://github.com/cryptpad/onlyoffice-x2t-wasm/releases/download/$VERSION/x2t.zip" --location --output x2t.zip
|
||||
# curl "https://github.com/cryptpad/onlyoffice-x2t-wasm/releases/download/v7.3%2B1/x2t.zip" --location --output x2t.zip
|
||||
echo "$HASH x2t.zip" >x2t.zip.sha512
|
||||
if ! sha512sum --check x2t.zip.sha512; then
|
||||
echo "x2t.zip does not match expected checksum"
|
||||
|
||||
@ -134,6 +134,7 @@ var applyHeaderMap = function (res, map) {
|
||||
|
||||
var EXEMPT = [
|
||||
/^\/common\/onlyoffice\/.*\.html.*/,
|
||||
/^\/common\/onlyoffice\/dist\/.*\/sdkjs\/common\/spell\/spell\/spell.js.*/, // OnlyOffice loads spell.wasm in a way that needs unsave-eval
|
||||
/^\/(sheet|presentation|doc)\/inner\.html.*/,
|
||||
/^\/unsafeiframe\/inner\.html.*$/,
|
||||
];
|
||||
|
||||
@ -4,8 +4,10 @@
|
||||
|
||||
(() => {
|
||||
const factory = () => {
|
||||
const version = 8;
|
||||
return {
|
||||
currentVersion: 'v7'
|
||||
currentVersionNumber: version,
|
||||
currentVersion: 'v' + version
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -4,8 +4,10 @@
|
||||
|
||||
(() => {
|
||||
const factory = () => {
|
||||
const version = 8;
|
||||
return {
|
||||
currentVersion: 'v7'
|
||||
currentVersionNumber: version,
|
||||
currentVersion: 'v' + version
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user