Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ dotnet-uninstall-debian-packages.sh
*.rpm
*.pkg
*.nupkg
*.AppImage

# ignore the telemetry semaphore file
DELETE_ME_TO_DISABLE_CONSOLEHOST_TELEMETRY
Expand Down
16 changes: 6 additions & 10 deletions tools/appimage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
APP=powershell

# Generate status file for use by apt-get; assuming that the recipe uses no newer
# ingredients than what would require more recent dependencies than what we assume
# to be part of the base system
# ingredients that would require more recent dependencies than what we assume to
# be part of the base system
generate_status()
{
mkdir -p ./tmp/archives/
Expand Down Expand Up @@ -385,10 +385,6 @@ cd ./$APP/
# but not using the host system's information about what is
# installed on the system but our own assumptions instead

mkdir -p ./tmp/archives/
mkdir -p ./tmp/lists/partial
touch tmp/pkgcache.bin tmp/srcpkgcache.bin
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case you wonder why they are removed -- same operations are done in the generate_status function called below.


generate_status

echo "deb http://archive.ubuntu.com/ubuntu/ trusty main universe
Expand Down Expand Up @@ -426,14 +422,14 @@ cd ./$APP.AppDir/

find ../*.deb -exec dpkg -x {} . \; || true

rm usr/bin/powershell
rm usr/bin/pwsh
mv opt/microsoft/powershell/*/* usr/bin/

cat > $APP.desktop <<\EOF
[Desktop Entry]
Name=PowerShell
Comment=Microsoft PowerShell
Exec=powershell
Exec=pwsh
Keywords=shell;prompt;command;commandline;cmd;
Icon=powershell
Type=Application
Expand All @@ -450,7 +446,7 @@ cat > ./AppRun <<\EOF
HERE=$(dirname $(readlink -f "${0}"))
export PATH="${HERE}/usr/bin/":$PATH
export LD_LIBRARY_PATH="${HERE}/usr/lib/":$LD_LIBRARY_PATH
exec "${HERE}/usr/bin/powershell.wrapper" "$@"
exec "${HERE}/usr/bin/pwsh.wrapper" "$@"
EOF
chmod a+x ./AppRun

Expand All @@ -468,7 +464,7 @@ VERSION=$(find ../*.deb -name $APP"_*" | head -n 1 | cut -d "~" -f 1 | cut -d "_
echo $VERSION

get_desktopintegration $APP
sed -i -e 's|^echo|# echo|g' usr/bin/$APP.wrapper # Make less verbose
sed -i -e 's|^echo|# echo|g' usr/bin/pwsh.wrapper # Make less verbose

# Go out of AppImage
cd ..
Expand Down