Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NEW SCRIPT #8

Open
wants to merge 21 commits into
base: main
Choose a base branch
from
Open
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
200 changes: 199 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,202 @@ Aside from these lines, all the other code in this repository has been written b

## Usage

It's recommended to use the `blend-settings` UI, instead of the `blend` CLI.
It's recommended to use the `blend-settings` UI, instead of the `blend` CLI.

Both methods require `podman` as a dependency.
## new script

clone repo

enter new folder

mark script nonarchinstall as executable

run script nonarchinstall.sh as sudo

sudo ./nonarchinstall

## Building Manually

To build manually, you are going to need the following dependencies:

pacman fakeroot git binutils npm electron(maunaully downloaded from github, see later) bzip2 make gcc wget curl systemd

Install the dependentcies from your package manager except for electron

i.e sudo dnf install pacman fakeroot git binutils npm bzip2 make gcc wget curl systemd

Clone the repo for building blend:

`git clone https://github.com/blend-os/blend-pkg`

Download electron from https://github.com/electron/electron/releases/latest

Extract the zip and rename it to electron22

Navigate to Downloads:

`cd Downloads`

Copy it to /usr/lib (on mutable systems):

`sudo cp electron22 -R /usr/lib`

On immutable systems, you will need to edit the pkgbuild in blend-pkg to set a different directory

Go to blend-pkg directory:

`cd blend-pkg`

Edit the file with the editor of choice:

`<text editor> PKGBUILD`

Edit the line to your correct directory:

`electronVer="$(sed s/^v// /usr/lib/electron${_electronversion}/version)"`

i.e on silverblue /var/usrlocal/lib/electron

Navigate back to home:

`cd && cd Downloads`

Then copy the content to the selected directory

`sudo cp electron22 -R /var/usrlocal`

Navigate back to the blend-pkg folder:

`cd && cd blend-pkg`

### Installing blend in Arch

Install `podman`:

`sudo pacman -S podman`

Build the package:

`makepkg -si`

Execute `/etc/profile.d/blend.sh` to set the path.

Navigate to the following location:

`cd /etc/profile.d/blend.sh`

Make the script executable:

`chmod +x blend.sh`

Run the script:

`./blend.sh`

Enable the blend-files service:

`cd /usr/lib/systemd/user`

`systemctl --user enable blend-files.service`


##Non Arch

Proceed building the app with

makepkg --nodeps

Once that is done, head over to #Installation

## Prebuilts

Download the two tar files under releases

Mutable systems install npm from your distros repo

Then use npm install electron -g

Head to # Installation

Immutable systems use below instructions for electron

Download electron from https://github.com/electron/electron/releases/download/v24.2.0/electron-v24.2.0-linux-x64.zip

Extract the zip and rename it to electron22

Go to where you downloaded it

cd Downloads

Copy it to overlay for /usr/lib; in silverblue its /var/usrlocal/lib

sudo cp electron22 -R /var/usrlocal/lib

Head to # Installation

## Installation

Install podman from your distro's repo.

Extract the new tar files to the their own folders

e.g. (blend-git... and blend-settings-git...)

Create a new folder named workspaceBlend

copy all the contents of the extracted tar files to workspaceBlend; merge the folders and skip the replace(dont need buildinfo,mtree or pkginfo)

(so each extracted tar has its own usr directory, so copying that to workpaceBlend will merge them)

Here comes another split

On mutable distros,copy the usr folder to /usr and the etc folder to /etc; merge the folders

Enter workspaceBlend

cd workspaceBlend

sudo cp usr -R /usr

sudo cp etc -R /etc

On immutable distros, rename the /usr folder to what you need based on the overlay filesystem setup you have

On silverblue you would rename to usrlocal and copy to /var/usrlocal; merge the folders

sudo cp usrlocal -R /var/usrlocal

Do the same with /etc if you need

You dont need to on Silverblue though so proceed as normal.

sudo cp etc -R /etc

run the /etc/profile.d/blend.sh to set the path

Go to location

cd /etc/profile.d/blend.sh

Set the sh as executable

chmod +x blend.sh

Run the script

./blend.sh

Enable the blend-files service

cd /usr/lib/systemd/user

systemctl --user enable blend-files.service


Thats the main Install, some goodies below

To start on log in add the following to .bash_profile


blend start-containers
9 changes: 9 additions & 0 deletions blend
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,15 @@ command_map = {'enter': enter_container,
'list-containers': list_containers,
'start-containers': start_containers,
'sync': sync_blends,
'get-distro': get_distro,
'check-container': check_container,
'check-container-status': check_container_status,
'install': install_blend,
'remove': remove_blend,
'search': search_blend,
'show': show_blend,
'update': update_blends,
'enter-container': enter_container,
'help': 'help',
'version': 'version'}
parser.add_argument('command', choices=command_map.keys(),
Expand Down
37 changes: 37 additions & 0 deletions nonarchinstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
DESTINATION=/usr
FOLDERNAME=usr
OVERLAY=
if ! [ $(id -u) = 0 ]; then
echo "The script need to be run as root." >&2
exit 1
fi

if [ $SUDO_USER ]; then
real_user=$SUDO_USER
else
real_user=$(whoami)
fi

curl -s https://api.github.com/repos/electron/electron/releases/latest \
| grep "browser_download_url.*electron-.*-linux-x64.zip" \
| cut -d : -f 2,3 \
| tr -d \" \
| wget -qi -
unzip -q -o '*electron*.zip' -d electron22
sudo -u ${real_user} git clone https://github.com/blend-os/blend-pkg
sudo cp -R electron22 ${OVERLAY}${DESTINATION}/lib/
cd blend-pkg
sudo -u ${real_user} makepkg --nodeps
for f in *.tar.gz; do \
tar xzf "$f"; \
done
mv usr -Tf blendWorkspace
mv blendWorkspace -Tf ${FOLDERNAME}
sudo cp -RT ${FOLDERNAME} ${OVERLAY}${DESTINATION}
sudo cp -RT etc /etc
cd /etc/profile.d
chmod +x blend.sh
sudo -u ${real_user} ./blend.sh
cd ${OVERLAY}${DESTINATION}/lib/systemd/user
ls
sudo -u ${real_user} systemctl --user enable blend-files.service