Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
f2e641d
Update .travis.yml
probonopd Aug 22, 2016
38e461d
Create appimage.sh
probonopd Aug 22, 2016
79ace21
Update travis.sh
probonopd Aug 22, 2016
e8ffe86
Use the deb that has been generated in this build
probonopd Aug 22, 2016
366ca5e
Set git clone depth to 100
probonopd Aug 22, 2016
0da5206
Fix artifacts search path
probonopd Aug 22, 2016
a1d5148
Do not call appimage.sh from travis.sh but from build.psm1
probonopd Aug 23, 2016
1b9a437
Call appimage.sh from build.psm1
probonopd Aug 23, 2016
d49c595
Add AppImage to linux.md
probonopd Aug 23, 2016
0c7fe08
Add AppImage to linux.md
probonopd Aug 23, 2016
4c57d1c
Add AppImage to linux.md
probonopd Aug 23, 2016
d627b6c
Add AppImage to README.md
probonopd Aug 23, 2016
abfd190
"Many" instead of "most", link to AppImage for more info
probonopd Aug 23, 2016
0ea30ab
"Many" instead of "most" again
probonopd Aug 23, 2016
bb774e2
Copyright and license
probonopd Aug 23, 2016
c9324f7
MIT License for appimage.sh
probonopd Aug 23, 2016
6a49585
Full text of the MIT License is in license_thirdparty_proprietary.txt
probonopd Aug 23, 2016
bf7cba0
Use icon from local repository
probonopd Aug 23, 2016
a18bce7
Clarify license and clean up unused code
probonopd Aug 24, 2016
7476ad0
Update appimage.sh
probonopd Aug 26, 2016
e7ca878
Move AppImage generation to travis.sh
andyleejordan Aug 26, 2016
6b58119
Rename AppImage to "powershell" for package consistency
andyleejordan Aug 26, 2016
b4e1cd7
Clone 1000 commits on Travis CI
andyleejordan Aug 26, 2016
7dc82b4
Mark appimage.sh as executable
andyleejordan Aug 26, 2016
b07c6dd
Merge pull request #1 from andschwa/appimage
probonopd Aug 26, 2016
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
6 changes: 5 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
git:
depth: 1000

language: cpp

branches:
Expand All @@ -12,7 +15,8 @@ dist: trusty

addons:
artifacts:
paths: $(ls powershell*{deb,pkg} | tr "\n" ":")
paths:
- $(ls powershell*{deb,pkg,AppImage} | tr "\n" ":")

install:
- (cd tools && ./download.sh)
Expand Down
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,21 +27,24 @@ You can download and install a PowerShell package for any of the following platf
| Ubuntu 16.04 | [.deb][rl-ubuntu16] | [Instructions][in-ubuntu16] |
| Ubuntu 14.04 | [.deb][rl-ubuntu14] | [Instructions][in-ubuntu14] |
| CentOS 7 | [.rpm][rl-centos] | [Instructions][in-centos] |
| Many Linux distributions | [.AppImage][rl-ai] | [Instructions][in-appimage] |
| OS X 10.11 | [.pkg][rl-osx] | [Instructions][in-osx] |
| Docker | | [Instructions] [in-docker] |
| Docker | | [Instructions][in-docker] |
Copy link
Copy Markdown
Member

@TravisEz13 TravisEz13 Aug 23, 2016

Choose a reason for hiding this comment

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

Thanks for the fix #Closed


[rl-windows10]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/PowerShell_6.0.0.9-alpha.9-win10-x64.msi
[rl-windows81]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/PowerShell_6.0.0.9-alpha.9-win81-x64.msi
[rl-ubuntu16]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb
[rl-ubuntu14]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1ubuntu1.14.04.1_amd64.deb
[rl-centos]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm
[rl-ai]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell-6.0.0-alpha.9-x86_64.AppImage
[rl-osx]: https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell-6.0.0-alpha.9.pkg

[installation]: docs/installation
[in-windows]: docs/installation/windows.md#msi
[in-ubuntu14]: docs/installation/linux.md#ubuntu-1404
[in-ubuntu16]: docs/installation/linux.md#ubuntu-1604
[in-centos]: docs/installation/linux.md#centos-7
[in-appimage]: docs/installation/linux.md#linux-appimage
[in-osx]: docs/installation/linux.md#os-x-1011
[in-docker]: docs/installation/docker.md

Expand Down
29 changes: 27 additions & 2 deletions docs/installation/linux.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ Package installation instructions
=================================

Supports [Ubuntu 14.04][u14], [Ubuntu 16.04][u16],
[CentOS 7][cos], and [OS X 10.11][osx].
[CentOS 7][cos], [many Linux distributions (AppImage)][lai], and [OS X 10.11][osx].
All packages are available on our GitHub [releases][] page.

Once the package is installed, run `powershell` from a terminal.

[u14]: #ubuntu-1404
[u16]: #ubuntu-1604
[cos]: #centos-7
[lai]: #linux-appimage
[osx]: #os-x-1011

Ubuntu 14.04
Expand Down Expand Up @@ -46,7 +47,6 @@ sudo dpkg -i powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb

[Ubuntu 16.04]: http://releases.ubuntu.com/16.04/


CentOS 7
========

Expand All @@ -64,6 +64,31 @@ sudo yum install powershell-6.0.0_alpha.9-1.el7.centos.x86_64.rpm

[CentOS 7]: https://www.centos.org/download/

Linux AppImage
==============

> Please note that we do have an alpha.9 AppImage,
> this is preparation for alpha.10!

Using a recent Linux distribution for the Intel x86_64 architecture,
download the AppImage `powershell-6.0.0-alpha.9-x86_64.AppImage`
from the [releases][] page onto the Linux machine.

Then execute the following in the terminal:

```
chmod a+x powershell-6.0.0-alpha.9-x86_64.AppImage
./powershell-6.0.0-alpha.9-x86_64.AppImage
```

The [AppImage][] lets you run PowerShell without installing it.
It is a portable application that bundles PowerShell and its dependencies
(including .NET Core's system dependencies) into one cohesive package.
This package works independently of the user's Linux distribution,
and is a single binary.

[appimage]: http://appimage.org/

OS X 10.11
==========

Expand Down
23 changes: 22 additions & 1 deletion license_thirdparty_proprietary.txt
Original file line number Diff line number Diff line change
Expand Up @@ -720,4 +720,25 @@ EFFET JURIDIQUE. Le présent contrat décrit certains droits juridiques. Vous po
prévus par les lois de votre pays. Le présent contrat ne modifie pas les droits que vous confèrent les lois
de votre pays si celles-ci ne le permettent pas.


The following components are governed by the MIT license, a copy of which appears
below the list of components:
------------------------------------------------------
tools/appimage.sh
------------------------------------------------------
Copyright (c) 2016 Simon Peter
All rights reserved.
MIT License
Permission is hereby granted, free of charge, to any person obtaining a copy of this
software and associated documentation files (the "Software"), to deal in the Software
without restriction, including without limitation the rights to use, copy, modify,
merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be included in all copies
or substantial portions of the Software.
THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE
OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
141 changes: 141 additions & 0 deletions tools/appimage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
#!/bin/bash

# This code is based on an example recipe from the AppImage project,
# https://github.com/probonopd/AppImages/blob/master/recipes/powershell/Recipe
# Copyright (c) 2016 Simon Peter
# The license of this code and of https://github.com/probonopd/AppImages/raw/master/functions.sh
# is the MIT License, see https://github.com/probonopd/AppImages/blob/master/LICENSE
#
# Generate AppImage, http://appimage.org
#
# The resulting PowerShell AppImage is known to run on
# CentOS-7.0-1406-x86_64-GnomeLive.iso
# CentOS-7-x86_64-LiveGNOME-1511.iso
# Chromixium-1.5-amd64.iso
# Fedora-Live-Workstation-x86_64-22-3.iso
# Fedora-Live-Workstation-x86_64-23-10.iso
# SL-72-x86_64-2016-02-03-LiveDVDgnome.iso
# debian-live-8.0.0-amd64-xfce-desktop+nonfree.iso
# debian-live-8.4.0-amd64-gnome-desktop.iso
# elementary_OS_0.3_freya_amd64.iso
# kali-linux-2.0-amd64.iso
# kali-linux-2016.1-amd64.iso
# kubuntu-14.04.4-desktop-amd64.iso
# kubuntu-15.04-desktop-amd64.iso
# kubuntu-16.04-desktop-amd64.iso
# linuxmint-17.3-cinnamon-64bit.iso
# neon-devedition-gitunstable-20160814-0806-amd64.iso
# netrunner-17-64bit.iso
# ubuntu-14.04.1-desktop-amd64.iso
# ubuntu-16.04-desktop-amd64.iso
# ubuntu-gnome-16.04-desktop-amd64.iso
# ubuntu-mate-16.04-desktop-amd64.iso
# xubuntu-16.04-desktop-amd64.iso

APP=powershell

mkdir -p ./$APP/$APP.AppDir/usr/lib

cd ./$APP/

wget -q https://github.com/probonopd/AppImages/raw/master/functions.sh -O ./functions.sh
Copy link
Copy Markdown
Member

@TravisEz13 TravisEz13 Aug 23, 2016

Choose a reason for hiding this comment

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

Please add a link the the license, mention the license type, and the copyright.

And add it to here: https://github.com/PowerShell/PowerShell/blob/master/license_thirdparty_proprietary.txt #Pending

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I was saying here you should mention that functions.sh is covered by the MIT license, and the copyright it is covered under.


In reply to: 75963644 [](ancestors = 75963644)

. ./functions.sh

# We get this app and almost all its dependencies via apt-get
# 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

generate_status

echo "deb http://archive.ubuntu.com/ubuntu/ trusty main universe
" > sources.list

OPTIONS="-o Debug::NoLocking=1
-o APT::Cache-Limit=125829120
-o Dir::Etc::sourcelist=./sources.list
-o Dir::State=./tmp
-o Dir::Cache=./tmp
-o Dir::State::status=./status
-o Dir::Etc::sourceparts=-
-o APT::Get::List-Cleanup=0
-o APT::Get::AllowUnauthenticated=1
-o Debug::pkgProblemResolver=true
-o Debug::pkgDepCache::AutoInstall=true
-o APT::Install-Recommends=0
-o APT::Install-Suggests=0
"

cp ../powershell_*_amd64.deb .

# Add local repository so that we can install deb files
# that were downloaded outside of a repository
dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz
echo "deb file:$(readlink -e $PWD) ./" >> sources.list

apt-get $OPTIONS update

URLS=$(apt-get $OPTIONS -y install --print-uris $APP | cut -d "'" -f 2 | grep -e "^http")

wget -c $URLS

cd ./$APP.AppDir/

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

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

cat > $APP.desktop <<\EOF
[Desktop Entry]
Name=PowerShell
Comment=Microsoft PowerShell
Exec=powershell
Keywords=shell;prompt;command;commandline;cmd;
Icon=powershell
Type=Application
Categories=System;TerminalEmulator;
StartupNotify=true
Terminal=true
EOF

cp ../../assets/Powershell_256.png $APP.png

cat > ./AppRun <<\EOF
#!/bin/sh
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" "$@"
EOF
chmod a+x ./AppRun

move_lib
mv ./usr/lib/x86_64-linux-gnu/* ./usr/lib/ # AppRun sets Qt env here

mv ./usr/lib/pulseaudio/*.so usr/lib/ || true

mv usr/local/share/man usr/share/

delete_blacklisted
rm -rf ./etc/ ./home/ ./lib/ || true
rm -r opt/ usr/lib/x86_64-linux-gnu/ usr/lib64 usr/share/

VERSION=$(find ../*.deb -name $APP"_*" | head -n 1 | cut -d "~" -f 1 | cut -d "_" -f 2 | cut -d "-" -f 1-2 | sed -e 's|1%3a||g')
echo $VERSION

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

# Go out of AppImage
cd ..

ARCH="x86_64"
generate_appimage

cp ../out/*AppImage ..

cd ..
4 changes: 3 additions & 1 deletion tools/travis.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
set -x
set -ex
ulimit -n 4096
# Only build packages for branches, not pull requests
if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then
powershell -c "Import-Module ./build.psm1; Start-PSBootstrap -Package; Start-PSBuild -CrossGen; Start-PSPackage; Start-PSPester; Start-PSxUnit"
# Generate AppImage
./tools/appimage.sh
else
powershell -c "Import-Module ./build.psm1; Start-PSBootstrap; Start-PSBuild -CrossGen; Start-PSPester; Start-PSxUnit"
fi