Skip to content

Commit

Permalink
3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
aokellermann committed Dec 11, 2023
1 parent 12b5dc9 commit 416b153
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 49 deletions.
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.20.2
20.8.0
Binary file added logo.ico
Binary file not shown.
Binary file added logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 6 additions & 3 deletions notion-repackaged.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@
#

# Version of the original Notion App installer to repackage
export NOTION_VERSION=2.2.1
export NOTION_VERSION=3.0.0

# Revision of the current version
export NOTION_REPACKAGED_REVISION=1

# The md5sum hash of the downloaded .exe for the installer
export NOTION_DOWNLOAD_HASH=a26b4fa3e1e8c05ca530de66da69f7cb
export NOTION_DOWNLOAD_HASH=a0d687989346bc1b16d620a0af0f3642

# The commit of notion-enhancer/desktop to target
export NOTION_ENHANCER_DESKTOP_COMMIT=8ec6094caf27fefacf2c8fdd28481d86cad398a9
export NOTION_ENHANCER_DESKTOP_COMMIT=a88c45cc80f0cfd83f205ddfbbca695f50db16ef

# not supported for 3.x.x yet
export NOTION_REPACKAGED_AIO_SKIP_ENHANCED=true
10 changes: 0 additions & 10 deletions patches/no-sandbox-flag.patch

This file was deleted.

12 changes: 0 additions & 12 deletions patches/remove-postinstall.patch

This file was deleted.

1 change: 1 addition & 0 deletions scripts/build-locally.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ fi
pushd "${NOTION_REPACKAGED_EDITION_SRCDIR}" > /dev/null

log "Installing dependencies..."
export SKIP_POSTINSTALL=true
npm install

log "Running patch-package"
Expand Down
27 changes: 4 additions & 23 deletions scripts/extract-src.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,9 @@ log "Extracting asar..."
asar extract "${NOTION_EXTRACTED_APP_NAME}/resources/app.asar" "${NOTION_EXTRACTED_APP_NAME}/resources/app"

log "Copying original app resources..."
mkdir -p "${NOTION_VANILLA_SRC_NAME}"
cp -r "${NOTION_EXTRACTED_APP_NAME}/resources/app/"* "${NOTION_VANILLA_SRC_NAME}"
cp -r "${NOTION_EXTRACTED_APP_NAME}/resources/app/" "${NOTION_VANILLA_SRC_NAME}"
rm "${NOTION_VANILLA_SRC_NAME}"/icon*
cp $WORKSPACE_DIR/logo.png "${NOTION_VANILLA_SRC_NAME}"/icon.png

export NOTION_REPACKAGED_VERSION_REV="${NOTION_VERSION}-${NOTION_REPACKAGED_REVISION}"

Expand All @@ -47,21 +48,6 @@ log "Patching and cleaning source"

rm -r node_modules

# behave like windows for OS other than Mac (Windows and Linux)
sed -i 's|process.platform === "win32"|process.platform !== "darwin"|g' main/main.js

# fix for issues #37, #65 of notion-repackaged (temporary fix)
sed -i 's|sqliteServerEnabled: true|sqliteServerEnabled: false|g' renderer/preload.js

# fix for issue #63 of notion-repackaged
sed -i 's|error.message.indexOf("/opt/notion-app/app.asar") !== -1|process.platform === "linux"|g' main/autoUpdater.js

# fix for issue #46 of notion-repackaged
patch -p0 --binary -N -r- < "${WORKSPACE_DIR}/patches/no-sandbox-flag.patch"

# postinstall doesn't actually exist
patch -p0 --binary -N -r- < "${WORKSPACE_DIR}/patches/remove-postinstall.patch"

find . -type f -name "*.js.map" -exec rm {} +

log "Adapting package.json including fixes..."
Expand All @@ -71,16 +57,11 @@ jq \
--arg repo "${NOTION_REPACKAGED_REPO}" \
--arg author "${NOTION_REPACKAGED_AUTHOR}" \
--arg version "${NOTION_REPACKAGED_VERSION_REV}" \
'.dependencies.cld="2.7.0" |
.name="notion-app" |
'.name="notion-app" |
.homepage=$homepage |
.repository=$repo |
.author=$author |
.version=$version' \
package.json | sponge package.json

log "Converting app icon to png..."

convert "icon.ico[0]" "icon.png"

popd > /dev/null

0 comments on commit 416b153

Please sign in to comment.