chore: Add file actions to linux frame

This commit is contained in:
Susmitha Girumala committed 2021-09-02 10:42:45 -04:00
1 parent 2d1475d211
commit fdfa88e089
4 files changed
+38 -18

No files matched your search

+10 -2
View File
@@ -41,6 +41,7 @@ List of available project commands. `yarn run <command-name>`
| ------- | ----------- |
| build:development | Builds the UI in development mode. |
| build | Builds the UI for production. |
| build:desktop:debian | Builds debian based linux artifacts on MacOS. |
| lint | Runs all lint commands. |
| lint:hbs | Lints `hbs` template files. |
| lint:js | Lints `js` files. |
@@ -76,7 +77,6 @@ These environment variables may be used to customized the build.
| `APP_UPDATER_CURRENT_VERSION` | Version of client. |
| `APP_UPDATER_LATEST_VERSION_TAG` | Next version for comparison with current version. |
| `APP_UPDATER_LATEST_VERSION_LOCATION` | Location of app release to use for updating client. Can be a filepath or url. |
| `BUILD_DEBIAN` | Enable to build debian artifacts on MacOS. |
| `BYPASS_CLI_SETUP` | Disable download and extraction of cli. For development use only. |
### Building for Production
@@ -91,12 +91,20 @@ yarn build
```
`BOUNDARY_DESKTOP_SIGNING_IDENTITY` environment variable must be provided
to codesign in production.
to codesign MacOS artifacts in production.
The static production assets are saved into the `dist/` folder.
The Boundary CLI is downloaded and extracted to `electron-app/cli/` folder as part of
packaging. CLI version is defined in `electron-app/config/cli.js`.
To build debian based linux artifacts on MacOS, additional [MacOS tools](https://www.electronforge.io/config/makers/deb) need to be installed before running the following commands from this folder.
```
yarn install
yarn build:production # Build assets
yarn build:desktop:debian # Build app
```
#### Environment Variables
These environment variables may be used to customized the build.
+4 -1
View File
@@ -31,11 +31,14 @@ export default class ApplicationRoute extends Route {
}
/**
* Add OS config on controller
* Add OS config on controller.
* Display OS container actions (minimize, fullscreen, close) for
* Windows and Linux. Not enabled for MacOS.
*/
async setupController(controller) {
controller.set('isMacOS', await this.ipc.invoke('isMacOS'));
controller.set('isWindowsOS', await this.ipc.invoke('isWindowsOS'));
controller.set('showFrameActions', !controller.isMacOS);
}
// =actions
+1 -1
View File
@@ -19,7 +19,7 @@
{{/if}}
<header.utilities as |utilities|>
{{#if this.isWindowsOS}}
{{#if this.showFrameActions}}
<Rose::Button
@iconOnly='cancel-plain'
@style='warning'
@@ -1,6 +1,14 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :
# User --provision-with option to setup machine for either cli or development
# To setup a machine for testing:
# vagrant up --provision-with setup,cli
# To setup a machine for developing desktop client:
# vagrant up --provision-with setup,development
# To destroy machine:
# vagrant destroy -f
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/focal64"
@@ -14,13 +22,10 @@ Vagrant.configure("2") do |config|
vb.memory = "4096"
end
config.vm.provision "shell", inline: <<-SHELL
config.vm.provision "setup", type: "shell", inline: <<-SHELL
sudo apt-get update -y
sudo apt-get upgrade -y
# sudo apt-get install -y --no-install-recommends virtualbox-guest-dkms virtualbox-guest-utils virtualbox-guest-x11 curl
# Setup localhost ssh
# yes | ssh-keygen -b 2048 -t rsa -f /home/vagrant/.ssh/id_rsa -q -N ""
# cat /home/vagrant/.ssh/id_rsa.pub >> /home/vagrant/.ssh/authorized_keys
sudo apt-get install curl
# Add vagrant to administrator group
sudo usermod -aG sudo vagrant
# Add vagrant to shared folder
@@ -28,36 +33,40 @@ Vagrant.configure("2") do |config|
SHELL
# Setup for testing desktop
config.vm.provision "test", type: "shell", inline: <<-SHELL
# Install desktop GUI
config.vm.provision "cli", type: "shell", inline: <<-SHELL
# Install ubuntu desktop GUI
sudo apt-get install -y --no-install-recommends lubuntu-desktop
# Setup boundary cli
sudo apt-get install docker.io -y
sudo groupadd docker
sudo usermod -aG docker vagrant
sudo apt-get install -y unzip
cd /home/vagrant/Desktop
curl https://releases.hashicorp.com/boundary/0.5.0/boundary_0.5.0_linux_amd64.zip -o boundary-cli.zip
unzip boundary-cli.zip
unzip -o boundary-cli.zip -d /home/vagrant/desktop/
# Setup localhost ssh
yes | ssh-keygen -t rsa -N "" -f /home/vagrant/.ssh/id_rsa -C vagrant@ubuntu-focal
cat /home/vagrant/.ssh/id_rsa.pub >> /home/vagrant/.ssh/authorized_keys
sudo chown -R vagrant:vagrant .ssh
# Restart
sudo shutdown -r now
SHELL
# Setup for developing desktop
config.vm.provision "development", type: "shell", inline: <<-SHELL
# Setup node 12 source
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo apt-get remove cmdtest
sudo apt-get install -y npm git
git clone https://github.com/hashicorp/boundary-ui.git /home/vagrant/Desktop/boundary-ui
sudo npm install yarn
# Setup node 12 source
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt-get install -y nodejs
sudo npm install -g yarn
# Install boundary-ui dependencies
cd /home/vagrant/Desktop/boundary-ui
yarn install
SHELL
config.vm.post_up_message = "Login using username/password: vagrant/vagrant.\nBoundary Desktop: /media/sf_vagrant-boundary-desktop-app.\nBoundary CLI: /home/vagrant/Desktop."
config.vm.post_up_message = "Login using username/password: vagrant/vagrant.\nBoundary Desktop Artifacts: /media/sf_vagrant-boundary-desktop-app.\nBoundary CLI: /home/vagrant/desktop/boundary."
end