mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-23 11:16:39 +00:00
chore: don't compress binaries/libraries with upx (#1188)
upx allows to reduce the package size by some mega bytes, but also considerably slows down the application start time. This commit ditches upx, since we can re-gain those benefits (and even increase them) by other means (e.g: minifying JavaScript). See: https://github.com/resin-io/etcher/issues/1138 Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This commit is contained in:
parent
58f30494b4
commit
254da05964
@ -26,7 +26,6 @@ install:
|
|||||||
- ps: Install-Product node $env:nodejs_version x64
|
- ps: Install-Product node $env:nodejs_version x64
|
||||||
- npm install -g bower rimraf asar
|
- npm install -g bower rimraf asar
|
||||||
- choco install nsis -version 2.51
|
- choco install nsis -version 2.51
|
||||||
- choco install upx
|
|
||||||
- choco install jq
|
- choco install jq
|
||||||
- set PATH=C:\Program Files (x86)\Windows Kits\8.1\bin\x86;%PATH%
|
- set PATH=C:\Program Files (x86)\Windows Kits\8.1\bin\x86;%PATH%
|
||||||
- set PATH=C:\Program Files (x86)\NSIS;%PATH%
|
- set PATH=C:\Program Files (x86)\NSIS;%PATH%
|
||||||
|
@ -11,7 +11,6 @@ Prerequisites
|
|||||||
|
|
||||||
- [NodeJS](https://nodejs.org) (at least v6)
|
- [NodeJS](https://nodejs.org) (at least v6)
|
||||||
- [Bower](http://bower.io)
|
- [Bower](http://bower.io)
|
||||||
- [UPX](http://upx.sourceforge.net)
|
|
||||||
- [Python](https://www.python.org)
|
- [Python](https://www.python.org)
|
||||||
- [jq](https://stedolan.github.io/jq/)
|
- [jq](https://stedolan.github.io/jq/)
|
||||||
- [Asar](https://github.com/electron/asar)
|
- [Asar](https://github.com/electron/asar)
|
||||||
|
@ -16,7 +16,6 @@ RUN apt-get update && apt-get install -y \
|
|||||||
python \
|
python \
|
||||||
python-pip \
|
python-pip \
|
||||||
python-dev \
|
python-dev \
|
||||||
upx \
|
|
||||||
unzip \
|
unzip \
|
||||||
wget \
|
wget \
|
||||||
xvfb \
|
xvfb \
|
||||||
|
@ -16,7 +16,6 @@ RUN apt-get update && apt-get install -y \
|
|||||||
python \
|
python \
|
||||||
python-pip \
|
python-pip \
|
||||||
python-dev \
|
python-dev \
|
||||||
upx \
|
|
||||||
unzip \
|
unzip \
|
||||||
wget \
|
wget \
|
||||||
xvfb \
|
xvfb \
|
||||||
|
@ -16,7 +16,6 @@ RUN apt-get update && apt-get install -y \
|
|||||||
python \
|
python \
|
||||||
python-pip \
|
python-pip \
|
||||||
python-dev \
|
python-dev \
|
||||||
upx \
|
|
||||||
unzip \
|
unzip \
|
||||||
wget \
|
wget \
|
||||||
xvfb \
|
xvfb \
|
||||||
|
@ -25,7 +25,6 @@ if [[ "$OS" != "Msys" ]]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
./scripts/build/check-dependency.sh upx
|
|
||||||
./scripts/build/check-dependency.sh unzip
|
./scripts/build/check-dependency.sh unzip
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
@ -117,8 +116,6 @@ RCEDIT="$ARGV_DOWNLOAD_DIRECTORY/rcedit.exe"
|
|||||||
--set-product-version "$ARGV_VERSION" \
|
--set-product-version "$ARGV_VERSION" \
|
||||||
--set-icon "$ARGV_ICON"
|
--set-icon "$ARGV_ICON"
|
||||||
|
|
||||||
upx -9 "$ARGV_OUTPUT/*.dll"
|
|
||||||
|
|
||||||
cp "$ARGV_ASAR" "$ARGV_OUTPUT/resources/app.asar"
|
cp "$ARGV_ASAR" "$ARGV_OUTPUT/resources/app.asar"
|
||||||
|
|
||||||
if [ -d "$ARGV_ASAR.unpacked" ]; then
|
if [ -d "$ARGV_ASAR.unpacked" ]; then
|
||||||
|
@ -19,8 +19,6 @@
|
|||||||
set -u
|
set -u
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
./scripts/build/check-dependency.sh upx
|
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
echo "Usage: $0"
|
echo "Usage: $0"
|
||||||
echo ""
|
echo ""
|
||||||
@ -85,21 +83,6 @@ cp "$ARGV_ICON" "$ARGV_OUTPUT/$APPDIR_ICON_FILENAME.png"
|
|||||||
mkdir -p "$ARGV_OUTPUT/usr/bin"
|
mkdir -p "$ARGV_OUTPUT/usr/bin"
|
||||||
cp -rf "$ARGV_PACKAGE"/* "$ARGV_OUTPUT/usr/bin"
|
cp -rf "$ARGV_PACKAGE"/* "$ARGV_OUTPUT/usr/bin"
|
||||||
|
|
||||||
# Compress binaries
|
|
||||||
upx -9 "$ARGV_OUTPUT/usr/bin/$ARGV_BINARY"
|
|
||||||
|
|
||||||
# upx fails with an error if .so are not executables
|
|
||||||
chmod +x "$ARGV_OUTPUT"/usr/bin/*.so*
|
|
||||||
|
|
||||||
# UPX fails for some reason with some other so libraries
|
|
||||||
# other than libnode.so in the x86 build
|
|
||||||
if [ "$ARGV_ARCHITECTURE" == "x86" ]; then
|
|
||||||
upx -9 "$ARGV_OUTPUT"/usr/bin/libnode.so
|
|
||||||
|
|
||||||
else
|
|
||||||
upx -9 "$ARGV_OUTPUT"/usr/bin/*.so*
|
|
||||||
fi
|
|
||||||
|
|
||||||
APPIMAGES_TAG=6
|
APPIMAGES_TAG=6
|
||||||
APPIMAGES_GITHUB_RAW_BASE_URL=https://raw.githubusercontent.com/probonopd/AppImageKit/$APPIMAGES_TAG
|
APPIMAGES_GITHUB_RAW_BASE_URL=https://raw.githubusercontent.com/probonopd/AppImageKit/$APPIMAGES_TAG
|
||||||
APPIMAGES_GITHUB_RELEASE_BASE_URL=https://github.com/probonopd/AppImageKit/releases/download/$APPIMAGES_TAG
|
APPIMAGES_GITHUB_RELEASE_BASE_URL=https://github.com/probonopd/AppImageKit/releases/download/$APPIMAGES_TAG
|
||||||
|
Loading…
x
Reference in New Issue
Block a user