17 Commits

Author SHA1 Message Date
sgraves 6ca8d859a2 Merge branch 'master' into 1.4.x_branch 2021-09-26 14:22:12 -05:00
sgraves 41de5849fe Updated rep 2021-08-27 19:15:01 -05:00
sgraves 6c1ea68384 added .nvimrc 2021-08-05 21:36:27 -05:00
sgraves 98eae7f88c removed .nvimrc 2021-08-05 21:35:27 -05:00
sgraves a8bc650705 prettier 2021-08-05 14:50:43 -05:00
sgraves 90cc0682e5 eslint 2021-08-05 14:45:37 -05:00
sgraves 33f9ffb393 prettier 2021-08-05 13:41:51 -05:00
sgraves e23c0086c2 prettier 2021-08-04 17:17:16 -05:00
sgraves ce6d96e59b Updated version 2021-08-01 23:13:38 -05:00
sgraves 9847eb74fd Updated version 2021-07-19 08:59:30 -05:00
sgraves 1dbe8fc225 Update CHANGELOG 2021-05-24 21:29:09 -05:00
sgraves ad4e312d7a Remove Linux platform selection 2021-05-24 21:28:26 -05:00
sgraves 9bc5ae99f6 Generic linux support 2021-05-24 21:16:41 -05:00
sgraves 1b8fc0b2fb Merge branch '1.3.x_branch' of bitbucket.org:blockstorage/repertory-ui into 1.3.x_branch 2021-05-20 18:30:42 -05:00
sgraves 2d5b8eee0e Update to development branches 2021-05-20 18:30:21 -05:00
sgraves 1f5610a797 Merged master into 1.3.x_branch 2021-05-20 18:29:51 -05:00
sgraves c7a246aaac Updated version 2021-05-20 18:29:10 -05:00
28 changed files with 304 additions and 537 deletions
+3 -1
View File
@@ -25,6 +25,8 @@
"jest"
],
"rules": {
"prettier/prettier": "warn"
"prettier/prettier": ["warn", {
"endOfLine": "auto"
}]
}
}
-1
View File
@@ -1 +0,0 @@
.vimrc
+7
View File
@@ -0,0 +1,7 @@
set autoread
set path+=.,public/**,src/**,test/**
if has('win32') || has('win64')
let &makeprg="create_dist.cmd"
else
let &makeprg="./create_dist.sh"
endif
-7
View File
@@ -1,7 +0,0 @@
set autoread
set path+=.,public/**,src/**,test/**
if has('win32') || has('win64')
let &makeprg="create_dist.cmd"
else
let &makeprg="./create_dist.sh"
endif
+5
View File
@@ -1,5 +1,10 @@
# Changelog
## 1.4.0
- Remove Linux platform selection
- Removed 'centos7' in favor of generic 'linux'
- Allow switching between repertory 1.3.x and 1.4.x
## 1.3.4
- \#55: Enable 'Activate' release instead of 'Install' in notification pop-up
- \#58: Add authentication support for Skynet premium portals
+6 -6
View File
@@ -12,13 +12,13 @@ Skynet support is considered EXPERIMENTAL. Files added to Skynet should not be c
* ScPrime >=1.4.1.2
## Downloads
* **Repertory UI v1.3.4 Linux
64-bit** [<Download\>](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.3.4_linux_x86_64.AppImage)
* **Repertory UI v1.4.0 Linux
64-bit** [<Download\>](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.4.0_linux_x86_64.AppImage)
* NOTE: Linux distributions require `fuse` and `libfuse` to be installed.
* **Repertory UI v1.3.4 OS X
64-bit** [<Download\>](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.3.4_mac.dmg)
* **Repertory UI v1.3.4 Windows
64-bit** [<Download\>](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.3.4_win.exe)
* **Repertory UI v1.4.0 OS X
64-bit** [<Download\>](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.4.0_mac.dmg)
* **Repertory UI v1.4.0 Windows
64-bit** [<Download\>](https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.4.0_win.exe)
## Supported Platforms
* OS X 64-bit
+1 -1
View File
@@ -26,7 +26,7 @@ if beginsWith darwin "$OSTYPE"; then
JQ_EXEC=jq-osx-amd64
SHA256_EXEC="shasum -a 256 -b"
else
DISTRO_LIST="centos7 solus"
DISTRO_LIST="centos7 linux solus"
OUT_FILE=repertory-ui_${APP_VER}_linux_x86_64.AppImage
BASE64_EXEC="base64 -w0"
JQ_EXEC=jq-linux64
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "repertory-ui",
"version": "1.3.4",
"version": "1.4.0",
"private": true,
"author": "scott.e.graves@protonmail.com",
"description": "GUI for Repertory - Repertory allows you to mount Sia, Skynet, and/or ScPrime storage solutions via FUSE on Linux/OS X or via WinFSP on Windows.",
+1 -1
View File
@@ -23,7 +23,7 @@ elif [ "$IS_ARM" = "1" ] && [ -f /etc/debian_version ]; then
fi
fi
else
DISTNAME=centos7
DISTNAME=linux
DISTVER=
fi
+22 -33
View File
@@ -1,60 +1,49 @@
{
"Locations": {
"centos7": {
"1.3.4": {
"sig": "CQZdxHimuD3li5JcHKJC3zdqNdw18RXFBQ9fgtxXe5FpgPq3bycXrMjmqaJaz25fLPl++e33PSlnzdaC2ede9vrWSfqfB3UG5Vdxxth/YnsqV4YzgGwOed6v9F7YcR2wgts8FpCzy+vokGWu2lI05pCx4ObNgqyvbyGcvGdzgTylhF+MlgSDtXdDV6B1Ba9d+Oj8lh3eA2d7v09ltxavEoiQmrX0ODK9dov9axT3JT/RZTNpAhTSfTT5YUgXmYWYQjZKdwCbFc4k23C1V0SKivB8lQ26Eaaxegwse+Kybar6CzisSkvAlTza9OCo/pxmJ/YedReldyj8pbq7+BweG82JWm8HVl4Y+ppXej69zFtAgcv1QWMYyXmBTfzoKMEUhrH3Brnj3b4ssAG6MKH2Y+lzwhzDYhpNXZ/+jfknFZPaGQ4UgUd1Nf46dPk0Pt+x3tzcweRO6XacfI8e+PNf5YIk+CKxyGjoVJfz1dEAKKg1RL1RXqHPK44MTSrHAIyUPgRNUq6zX23VkfdT4b/IftaIYEEO738wT0nutAtg7RLo2jx6w3hTjDSmh9Wz/szhtS/pP670PycryqH/JaE/5n4lgvSIZN7Inz9WWHbttX54H36usqcEiKr5yoSeOvdIsjWpHguKxasRNbib+Idnhug/Zs8XmshUfwAH3Y+6Wy5dM+IGfuyFpwkfQE2DQmfriyyn2gQf1EJZ6lxuFy1q5vQ9pf3QOaEU72yCu63EEYiXEnPQKgMPkBXxgo6Rp/Nskth0F2XXUYDUPD3lzOJLNMKn3G7ta5EkmZZhrk94pm8X5DpXdxzxFr/lvlWNic5trhWhVtJfci+yxZTI9IiXEfLTck0oYzkpaSxgTvOZ4DklW92xk682F41eNmdo64NwyqeHYS7uvLsJa4aRmRVmsfbY5RuOrDlAmr+yDX9OaISFfhGgByqPlv/5Sm27GFCHFfkvPrUGQWBOFnoRrnr1VZqKr2xRImDUhsP2FNaZJH2E0lBh7P6WmFu2/N1XwJ9w3TX1pwQXGJ/XERSCj7w972VZ8YMj+LHZ4anpZHuY4eL9PAkgwEEpTIqUJuJ2Oj1LGG3GGlT/HrR7tSofybi6+tNsD4egdFZ4HI3+nrPFGbYTQNQzzxXmPnukdP66h4lGGz8bBVT/wezKCK06RrgUKoi+GxcndMnF6JlAzzmiEDh2CXHJsFIr5eDx+pgxbr4Ibz4Mwu9qfeN6fNC+EAkewC1W3f3HoX3oozAT1AobitkT6CV7rHUD4xHWih/7uA+9uuAI2VgxfpfzyvR5H7kd51p63sB1DyvzpB9ssf/E7vxyzQJJhDEOWXUHi0ciMgeElFgJMUI49xzGvJUizV6YmwE=",
"sha256": "ef29a5aad24f9f10cbac3e46b1be334a2f80b184efe0dcc09a5c1fa4526a68f4",
"urls": [
"https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.3.4_linux_x86_64.AppImage"
]
"darwin": {
"1.4.0": {
"sig": "",
"sha256": "",
"urls": []
}
},
"darwin": {
"1.3.4": {
"sig": "BGYvkHV/lP0/6sBdrsO2L3W94oFHduVd8J3DT/SJIXUKRbjLIUGLKwnF27H7gVr1rO1vHQWaNuVaBHQ8guTqh2GAxEFr9w+sFMm0dvnuRndpxcJ4AtVT6j7TiRojPMAPFk9Kd8rNda0jGH9CPG8358K0SNVU61/upi3+zHv4R/KYC47ZK/7R6BWxBUTA1l8/5Q70TE9Kco75j6c8fK8dV6nFfN8rp2mAmxZhmRtV2uFL4OguYhxM6Oba+wxVlq7ywiPjtck4gkYrI9wMvWetK0erI6lwki5YpwEN1tRqDqD2DeKBqsMj5H8kElHMCh+g9Y5DvVIKR1pZdpopgmIQNsfmo/CYgicUvN0ppvyMuLJ/p4PPVIg6ldu6VgjOBXykZIRkZF4TgKsVaDdOpQ6E2Wd4+tERrXwKeP76+3h1RYl4W2NSZ9Lc2wWe3FmK4HKU6jbJ1qy8FsjjxEHs0OJvvYmmEp9bIMtCPZnwf5wR4V2Ht3BScV93mAaWbaykBuWWpXtxiuxw01BZ9w8LAHKJ6BX48wEtz6CAQqF8nc5kDkexsMy2Al2fv3lj+xa5RPjHO/tY4jbUrAn1TCVc98tz+vHbD9TITVkdYcSPNUSMpUANGTvOTQ1CkjOO6pavpMlo96kdLKG+YqK0ERfCQ4YI3V7CjJhEdrkg9ZhLtv7vtyG4WicXBOARaW1OiQFYB48/np/6anKoS2uCDRQdj9vHLyE4C7PwfPKIg+cFCzCMGcvjHrBbGf7PnmSyYFY7PvGcEWylINoWeHquqAGq+N6wTNm+5K/IzmXh+II4dm4f0G15S4gSE/Ux4sIgYADAVXz1uaeARr+EfDOtUjqxAX1Aay1y+1WEFI3L66gszcdpiRsc46gwbYIJ585rVs+FOLNZI6Ak0RawzyZcifCcwaTWGG+kASLyC5XIgayw0hT3qPoZofSasB1RGM3PQ6trz8937RdDK2rQpry01zWsG/Kk+gxI5mZkU2kWgPtUxCPTG6+lLkEY7p9mg/Lo4/8Ze/qlb/xR/9i4+BBqtRRUHJzAsps0K0KicO7+MXB+Sc4hbvXkGFwpFd+JYy/Ry7TVRpiCp8Hdhk9PRtp//Ub1Fun4f7eadTCsbJs7duwKeBhUP0uGP2xo1pyWtFmZLm5ww2g40nEIHy8C5cvadPlN3NTKBZ8lqXqiN6fNtXel+T65vyoVic1FbVYihXSZOmFsJ+7mwDF6ayelAnx9kC0uI0gxpjaZWGPa1ygLWYNkSz4KIO2m5t9NZL6JyVXIRgPvie9rJKAFB2lgxBnkehpQMbU/FgpbzWb0a78OEkAxr4mD7U4WerlVU6jg8xx53tkCSpv35kNwsAOwW7YE+KN8VMW+6j0=",
"sha256": "5bb39cebbb0ccb3d010513d8f2aec11d370d78214a40515a4b484a3c65eb58ad",
"urls": [
"https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.3.4_mac.dmg"
]
"linux": {
"1.4.0": {
"sig": "",
"sha256": "",
"urls": []
}
},
"solus": {
"1.3.4": {
"sig": "CQZdxHimuD3li5JcHKJC3zdqNdw18RXFBQ9fgtxXe5FpgPq3bycXrMjmqaJaz25fLPl++e33PSlnzdaC2ede9vrWSfqfB3UG5Vdxxth/YnsqV4YzgGwOed6v9F7YcR2wgts8FpCzy+vokGWu2lI05pCx4ObNgqyvbyGcvGdzgTylhF+MlgSDtXdDV6B1Ba9d+Oj8lh3eA2d7v09ltxavEoiQmrX0ODK9dov9axT3JT/RZTNpAhTSfTT5YUgXmYWYQjZKdwCbFc4k23C1V0SKivB8lQ26Eaaxegwse+Kybar6CzisSkvAlTza9OCo/pxmJ/YedReldyj8pbq7+BweG82JWm8HVl4Y+ppXej69zFtAgcv1QWMYyXmBTfzoKMEUhrH3Brnj3b4ssAG6MKH2Y+lzwhzDYhpNXZ/+jfknFZPaGQ4UgUd1Nf46dPk0Pt+x3tzcweRO6XacfI8e+PNf5YIk+CKxyGjoVJfz1dEAKKg1RL1RXqHPK44MTSrHAIyUPgRNUq6zX23VkfdT4b/IftaIYEEO738wT0nutAtg7RLo2jx6w3hTjDSmh9Wz/szhtS/pP670PycryqH/JaE/5n4lgvSIZN7Inz9WWHbttX54H36usqcEiKr5yoSeOvdIsjWpHguKxasRNbib+Idnhug/Zs8XmshUfwAH3Y+6Wy5dM+IGfuyFpwkfQE2DQmfriyyn2gQf1EJZ6lxuFy1q5vQ9pf3QOaEU72yCu63EEYiXEnPQKgMPkBXxgo6Rp/Nskth0F2XXUYDUPD3lzOJLNMKn3G7ta5EkmZZhrk94pm8X5DpXdxzxFr/lvlWNic5trhWhVtJfci+yxZTI9IiXEfLTck0oYzkpaSxgTvOZ4DklW92xk682F41eNmdo64NwyqeHYS7uvLsJa4aRmRVmsfbY5RuOrDlAmr+yDX9OaISFfhGgByqPlv/5Sm27GFCHFfkvPrUGQWBOFnoRrnr1VZqKr2xRImDUhsP2FNaZJH2E0lBh7P6WmFu2/N1XwJ9w3TX1pwQXGJ/XERSCj7w972VZ8YMj+LHZ4anpZHuY4eL9PAkgwEEpTIqUJuJ2Oj1LGG3GGlT/HrR7tSofybi6+tNsD4egdFZ4HI3+nrPFGbYTQNQzzxXmPnukdP66h4lGGz8bBVT/wezKCK06RrgUKoi+GxcndMnF6JlAzzmiEDh2CXHJsFIr5eDx+pgxbr4Ibz4Mwu9qfeN6fNC+EAkewC1W3f3HoX3oozAT1AobitkT6CV7rHUD4xHWih/7uA+9uuAI2VgxfpfzyvR5H7kd51p63sB1DyvzpB9ssf/E7vxyzQJJhDEOWXUHi0ciMgeElFgJMUI49xzGvJUizV6YmwE=",
"sha256": "ef29a5aad24f9f10cbac3e46b1be334a2f80b184efe0dcc09a5c1fa4526a68f4",
"urls": [
"https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.3.4_linux_x86_64.AppImage"
]
"1.4.0": {
"sig": "",
"sha256": "",
"urls": []
}
},
"win32": {
"1.3.4": {
"sig": "BbUW6SbAl5pS+WF2kzmy0O8Zw6sdkP1TOP7GS78I+jNLgXzvFodQDsC2dqZclrtcqNvVLIdfHfZeRFYKsrJnEFmZc9Jib3+4rALdhsJY0kRzhgfZkhwydAIuRP/RTXJ4AKh8XgCuxoToPtytslSCgHN5LJmtDQL10naJrvk40n9Pkt0Kjep/8Bj1fc+7WMgtLaKJXiKjGlfax4/2UeMVyqTmkEbRPf9o8w3esfSfRvMwqAN1LnwW4ZbPDLVm1cRh9+BovCKEmVc28LvdtWY0pOios8K5NOI8GcfDmL+a3NsKow1GQPTqEMEa6/z+njdYehVVMeFpA8kI0UKljrQTf4n22BNE1ZzpBOoOCRxcrI4BeG5cy1VhzM7BUm+jaKxY/IuqdLNplXa7VSfRuI1sPVEegmQmDhZCJJXdugVC008UXO8HH731EHUCctMutQTCNLVHg1djyVTtuevQRalXEQMSY+VbAEP1ED3cwfJgwk92ZAVc323IjGNvjeDDlZW5sFUJUYBv94tfy8AWFDk2HnXG5r480fHwrI3ZoZh6cAssiV3OYaLjWUYlQkfWi7fIr43tEIquMxqcuMN+iRfxl+klvQt50xdeE+S/YWMRnixj0h+xSL79f0dryyYofwL924e8U8XSwxGvAPNiADc+VoyRNSqQnPtHn164VOfAPZCaIn8puex9LA5JYEhY9ayB7EW2YVd/Pfp7uI/KAzmngFuKyKG8KVvVE7qF7zSjX222SlweBRLm7f1QPthl0XzVgzzZJ8S1cHPJ//1unOsimQGmPhZDQrnhdFSrtkd2D1kX5dqmTKEx+wiL+Tm8cWFwPvg2nUfWlC9Zytpi9VjpbnczTQLW+JsPB7HOQ4ZYaWaxQATvb3kku3icWv9dY6gWa9Lc9N+gXbGkPV9R+Np0m92m9QA+TDf9HrZwzXLfBjUbfqrMvGhCdznJ9PFflbNQIsDLJeBFdoaHYX88IJIgom60Ef+EjUAhAsvW5A12g+4phENSIg2iv7Ifxc4l8KgtIyjLst9sBdhTDOH3J3Cscd+BxWVLeGjMWoMZ2mU6Bf6ohnO4Ofh9+oqmemHu2rrI3RxOSQF4w9sEv6AtD6C7TG3B+8qFdMic1XkRDxAsNHrwfKOxCytQ89fBH+fzNHRzGys7ADoTH0vm7FR7iADdy83Xt+i+7TK9KvUkR/W5cGgxRHDS1g4SdLetMf/FQ5olbyaW/OiGDtpzipS/Yv3QCMfn4XB3GahMPgLzu0uI9MNXFz9zjwwy0owgzP3Q6+ff3cn8QOIfa0RRLfJgyS71kbcEjHHRehYfuRHNi9/5NMF29irsbAxhWZwncCsoDRJvycwyz6dY+DZHkaDqUv0h8ew=",
"sha256": "8b1e9bd73e11e4f8ef66f417c8735ea48715f41e822d7f77852bf392ac5970c6",
"urls": [
"https://bitbucket.org/blockstorage/repertory-ui/downloads/repertory-ui_1.3.4_win.exe"
]
"1.4.0": {
"sig": "",
"sha256": "",
"urls": []
}
}
},
"Versions": {
"centos7": [
"1.3.4"
],
"darwin": [
"1.3.4"
"1.4.0"
],
"linux": [
"unavailable"
"1.4.0"
],
"solus": [
"1.3.4"
"1.4.0"
],
"unknown": [
"unavailable"
],
"win32": [
"1.3.4"
"1.4.0"
]
}
}
+3 -19
View File
@@ -20,8 +20,7 @@ import {
setNewReleasesAvailable,
} from './redux/actions/release_version_actions';
import ReleaseVersionDisplay from './components/ReleaseVersionDisplay/ReleaseVersionDisplay';
import { displaySelectAppPlatform, saveState } from './redux/actions/common_actions';
import SelectAppPlatform from './containers/SelectAppPlatform/SelectAppPlatform';
import { saveState } from './redux/actions/common_actions';
import Text from './components/UI/Text/Text';
import UpgradeIcon from './components/UpgradeIcon/UpgradeIcon';
import UpgradeUI from './components/UpgradeUI/UpgradeUI';
@@ -40,11 +39,7 @@ class App extends IPCContainer {
componentDidMount() {
const detectUpgrades = () => {
if (this.props.AppPlatform === 'unknown') {
if (this.props.Platform === 'linux') {
this.props.displaySelectAppPlatform(true);
} else {
this.props.notifyError('Operating system is not supported.', true);
}
this.props.notifyError('Operating system is not supported.', true);
} else {
this.props.loadReleases();
}
@@ -163,7 +158,6 @@ class App extends IPCContainer {
!this.props.DisplayInfo &&
!this.props.InstallActive &&
!this.props.RebootRequired &&
!this.props.DisplaySelectAppPlatform &&
!showUpgrade &&
!this.props.DismissNewReleasesAvailable &&
this.props.NewReleasesAvailable.length > 0;
@@ -173,7 +167,6 @@ class App extends IPCContainer {
!this.props.DownloadActive &&
!showNewReleases &&
!this.props.RebootRequired &&
!this.props.DisplaySelectAppPlatform &&
!showUpgrade &&
this.props.DisplayAddEditHost;
@@ -183,7 +176,6 @@ class App extends IPCContainer {
!this.props.DownloadActive &&
!showNewReleases &&
!this.props.RebootRequired &&
!this.props.DisplaySelectAppPlatform &&
!showUpgrade &&
this.props.DisplayImport;
@@ -193,7 +185,6 @@ class App extends IPCContainer {
!this.props.DownloadActive &&
!showNewReleases &&
!this.props.RebootRequired &&
!this.props.DisplaySelectAppPlatform &&
!showUpgrade &&
this.props.DisplayExport;
@@ -227,10 +218,6 @@ class App extends IPCContainer {
const infoDisplay = createModalConditionally(this.props.DisplayInfo, <InfoDetails />, true);
const newReleasesDisplay = createModalConditionally(showNewReleases, <NewReleases />);
const rebootDisplay = createModalConditionally(this.props.RebootRequired, <Reboot />);
const selectAppPlatformDisplay = createModalConditionally(
this.props.DisplaySelectAppPlatform,
<SelectAppPlatform />
);
const upgradeDisplay = createModalConditionally(showUpgrade, <UpgradeUI />);
const importDisplay = createModalConditionally(
showSkynetImport,
@@ -249,7 +236,7 @@ class App extends IPCContainer {
);
let mainContent = [];
if (this.props.DisplaySelectAppPlatform || !this.props.AppReady) {
if (!this.props.AppReady) {
mainContent = (
<Box col={0} colSpan={'remain'} row={10} rowSpan={'remain'}>
<Loading />
@@ -337,7 +324,6 @@ class App extends IPCContainer {
{importDisplay}
{exportDisplay}
{newReleasesDisplay}
{selectAppPlatformDisplay}
{dependencyDisplay}
{upgradeDisplay}
{pinnedManagerDisplay}
@@ -371,7 +357,6 @@ const mapStateToProps = (state) => {
DisplayImport: state.skynet.DisplayImport,
DisplayInfo: state.error.DisplayInfo,
DisplayPinnedManager: state.pinned.DisplayPinnedManager,
DisplaySelectAppPlatform: state.common.DisplaySelectAppPlatform,
DismissNewReleasesAvailable: state.relver.DismissNewReleasesAvailable,
DownloadActive: state.download.DownloadActive,
InstallActive: state.install.InstallActive,
@@ -395,7 +380,6 @@ const mapStateToProps = (state) => {
const mapDispatchToProps = (dispatch) => {
return {
displaySelectAppPlatform: (display) => dispatch(displaySelectAppPlatform(display)),
loadReleases: () => dispatch(loadReleases()),
notifyError: (msg, critical, callback) => dispatch(notifyError(msg, critical, callback)),
saveState: () => dispatch(saveState()),
+4 -7
View File
@@ -26,13 +26,15 @@ exports.DEV_PUBLIC_KEY =
'9wIDAQAB\n' +
'-----END PUBLIC KEY-----';
const _REPERTORY_BRANCH = 'master';
const _REPERTORY_UI_BRANCH = 'master';
const _REPERTORY_BRANCH = '1.4.x_branch';
const _REPERTORY_UI_BRANCH = '1.4.x_branch';
exports.REPERTORY_BRANCH = _REPERTORY_BRANCH;
exports.REPERTORY_UI_BRANCH = _REPERTORY_UI_BRANCH;
exports.RELEASES_URL =
'https://bitbucket.org/blockstorage/repertory/raw/' + _REPERTORY_BRANCH + '/releases_1.4.json';
exports.RELEASES_URL_PREVIOUS =
'https://bitbucket.org/blockstorage/repertory/raw/' + _REPERTORY_BRANCH + '/releases_1.3.json';
exports.UI_RELEASES_URL =
'https://bitbucket.org/blockstorage/repertory-ui/raw/' + _REPERTORY_UI_BRANCH + '/releases.json';
@@ -40,8 +42,6 @@ exports.UI_RELEASES_URL =
exports.LINUX_DETECT_SCRIPT_URL =
'https://bitbucket.org/blockstorage/repertory/raw/' + _REPERTORY_BRANCH + '/detect_linux2.sh';
exports.LINUX_SELECTABLE_PLATFORMS = ['centos7'];
exports.WINFSP_VERSION_NAMES = [
'WinFsp 2019',
'WinFsp 2019.0',
@@ -106,7 +106,6 @@ exports.RELEASE_TYPES = ['Release', 'RC', 'Beta', 'Alpha'];
exports.INSTALL_TYPES = {
Dependency: 'dependency',
Release: 'release',
TestRelease: 'test_release',
Upgrade: 'upgrade',
};
@@ -196,8 +195,6 @@ exports.IPC_Show_Window = 'show_window';
exports.IPC_Set_Config_Values = 'set_config_values';
exports.IPC_Set_Config_Values_Reply = 'set_config_values_reply';
exports.IPC_Set_Linux_AppPlatform = 'IPC_Set_Linux_AppPlatform';
exports.IPC_Shutdown = 'shutdown';
exports.IPC_Skynet_Test_Logon = 'skynet_test_logon';
@@ -1,18 +0,0 @@
.SAPHeading {
color: var(--text_color_error);
text-align: center;
margin-bottom: 4px;
}
.SAPContent {
max-height: 60vh;
width: 255px;
overflow-y: auto;
margin-bottom: var(--default_spacing);
}
.SAPActions {
margin-top: 4px;
display: flex;
flex-direction: row;
}
@@ -1,104 +0,0 @@
import React from 'react';
import './SelectAppPlatform.css';
import axios from 'axios';
import { connect } from 'react-redux';
import * as Constants from '../../constants';
import Box from '../../components/UI/Box/Box';
import Button from '../../components/UI/Button/Button';
import { downloadItem, setAllowDownload } from '../../redux/actions/download_actions';
import DropDown from '../../components/UI/DropDown/DropDown';
import IPCContainer from '../IPCContainer/IPCContainer';
import { notifyError } from '../../redux/actions/error_actions';
import { setInstallTestActive } from '../../redux/actions/install_actions';
class SelectAppPlatform extends IPCContainer {
state = {
Selected: 0,
};
grabLatestRelease = (appPlatform) => {
const errorHandler = (error) => {
this.props.notifyError(error);
this.props.setInstallTestActive(false);
this.props.setAllowDownload(false);
};
axios
.get(Constants.RELEASES_URL)
.then((response) => {
try {
const releases = response.data.Versions.Release[appPlatform];
const latestVersion = releases[releases.length - 1];
const release = response.data.Locations[appPlatform][latestVersion];
this.props.downloadItem(
latestVersion + '.zip',
Constants.INSTALL_TYPES.TestRelease,
release.urls,
false,
latestVersion,
appPlatform
);
} catch (error) {
errorHandler(error);
}
})
.catch((error) => {
errorHandler(error);
});
};
handleTestClicked = () => {
this.props.setInstallTestActive(true);
this.props.setAllowDownload(true);
this.grabLatestRelease(Constants.LINUX_SELECTABLE_PLATFORMS[this.state.Selected]);
};
handleChanged = (e) => {
this.setState({
...this.state,
Selected: Constants.LINUX_SELECTABLE_PLATFORMS.indexOf(e.target.value),
});
};
render() {
return (
<Box dxDark dxStyle={{ padding: 'var(--default_spacing)' }}>
<h1 className={'SAPHeading'}>Select Linux Platform</h1>
<div className={'SAPContent'}>
<p>
Repertory was unable to detect your Linux distribution. Please select one of the
following and click <b>Test</b> to continue:
</p>
</div>
<div className={'SAPActions'}>
<DropDown
changed={this.handleChanged}
disabled={this.props.InstallTestActive}
items={Constants.LINUX_SELECTABLE_PLATFORMS}
selected={Constants.LINUX_SELECTABLE_PLATFORMS[this.state.Selected]}
/>
<Button clicked={this.handleTestClicked} disabled={this.props.InstallTestActive}>
Test
</Button>
</div>
</Box>
);
}
}
const mapStateToProps = (state) => {
return {
InstallTestActive: state.install.InstallTestActive,
};
};
const mapDispatchToProps = (dispatch) => {
return {
downloadItem: (name, type, urls, isWinFSP, testVersion, appPlatform) =>
dispatch(downloadItem(name, type, urls, isWinFSP, testVersion, appPlatform)),
notifyError: (msg) => dispatch(notifyError(msg)),
setAllowDownload: (allow) => dispatch(setAllowDownload(allow)),
setInstallTestActive: (active) => dispatch(setInstallTestActive(active)),
};
};
export default connect(mapStateToProps, mapDispatchToProps)(SelectAppPlatform);
+170 -163
View File
@@ -27,48 +27,48 @@ const _vcRuntimeExists = () => {
: 'HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
];
_execProcessGetOutput(cmd, null, args)
.then((lines) => {
const parseLine = (index) => {
if (index < lines.length) {
const line = lines[index];
if (line.startsWith('HKEY_LOCAL_MACHINE\\')) {
let args2 = JSON.parse(JSON.stringify(args));
args2[1] = 'HKLM\\' + line.substr(19);
args2.push('/v');
args2.push('DisplayName');
args2.push('/t');
args2.push('REG_SZ');
_execProcessGetOutput(cmd, null, args2)
.then((lines) => {
const value = lines[2].trim().substr(args2[3].length).trim().substr(6).trim();
if (
value.includes(
IS_64BIT
? 'Microsoft Visual C++ 2015-2019 Redistributable (x64)'
: 'Microsoft Visual C++ 2015-2019 Redistributable (x32)',
)
) {
vcRuntimeExists = true;
resolve(true);
} else {
parseLine(++index);
}
})
.catch(() => {
.then((lines) => {
const parseLine = (index) => {
if (index < lines.length) {
const line = lines[index];
if (line.startsWith('HKEY_LOCAL_MACHINE\\')) {
let args2 = JSON.parse(JSON.stringify(args));
args2[1] = 'HKLM\\' + line.substr(19);
args2.push('/v');
args2.push('DisplayName');
args2.push('/t');
args2.push('REG_SZ');
_execProcessGetOutput(cmd, null, args2)
.then((lines) => {
const value = lines[2].trim().substr(args2[3].length).trim().substr(6).trim();
if (
value.includes(
IS_64BIT
? 'Microsoft Visual C++ 2015-2019 Redistributable (x64)'
: 'Microsoft Visual C++ 2015-2019 Redistributable (x32)'
)
) {
vcRuntimeExists = true;
resolve(true);
} else {
parseLine(++index);
}
})
.catch(() => {
parseLine(++index);
});
} else {
parseLine(++index);
});
}
} else {
parseLine(++index);
resolve(false);
}
} else {
resolve(false);
}
};
parseLine(0);
})
.catch((err) => {
reject(err);
});
};
parseLine(0);
})
.catch((err) => {
reject(err);
});
}
}
});
@@ -317,13 +317,13 @@ module.exports.cleanupOldReleases = (versionList) => {
if (versionList && versionList.length > 0) {
const dataDir = _getDataDirectory();
const directoryList = fs
.readdirSync(dataDir, { withFileTypes: true })
.filter((dirent) => dirent.isDirectory())
.map((dirent) => dirent);
.readdirSync(dataDir, { withFileTypes: true })
.filter((dirent) => dirent.isDirectory())
.map((dirent) => dirent);
const removeList = directoryList
.filter((dirent) => !versionList.includes(dirent.name))
.map((dirent) => dirent.name);
.filter((dirent) => !versionList.includes(dirent.name))
.map((dirent) => dirent.name);
for (const dir of removeList) {
try {
@@ -391,8 +391,8 @@ module.exports.detectRepertoryMounts = (version, providerList) => {
const args = _getDefaultRepertoryArgs(
provider,
!Constants.PROVIDER_LIST.includes(provider) &&
provider.toLowerCase().startsWith('remote'),
!Constants.PROVIDER_LIST.includes(provider) && provider.toLowerCase().startsWith('s3'),
provider.toLowerCase().startsWith('remote'),
!Constants.PROVIDER_LIST.includes(provider) && provider.toLowerCase().startsWith('s3')
);
args.push('-status');
@@ -438,51 +438,51 @@ module.exports.downloadFile = (url, destination, progressCallback, completeCallb
}
axios
.get(url, {
responseType: 'stream',
})
.then((response) => {
try {
const total = parseInt(response.headers['content-length'], 10);
if (total === 0) {
completeCallback(new Error('No data available for download'));
} else {
const stream = fs.createWriteStream(destination);
.get(url, {
responseType: 'stream',
})
.then((response) => {
try {
const total = parseInt(response.headers['content-length'], 10);
if (total === 0) {
completeCallback(new Error('No data available for download'));
} else {
const stream = fs.createWriteStream(destination);
let downloaded = 0;
response.data.on('data', (chunk) => {
stream.write(Buffer.from(chunk));
downloaded += chunk.length;
if (progressCallback) {
progressCallback(((downloaded / total) * 100.0).toFixed(2));
}
});
response.data.on('end', () => {
stream.end(() => {
if (downloaded === 0) {
completeCallback(new Error('Received 0 bytes'));
} else if (downloaded !== total) {
completeCallback(new Error('Received incorrect number of bytes'));
} else {
completeCallback();
let downloaded = 0;
response.data.on('data', (chunk) => {
stream.write(Buffer.from(chunk));
downloaded += chunk.length;
if (progressCallback) {
progressCallback(((downloaded / total) * 100.0).toFixed(2));
}
});
});
response.data.on('error', (error) => {
stream.end(() => {
completeCallback(error);
response.data.on('end', () => {
stream.end(() => {
if (downloaded === 0) {
completeCallback(new Error('Received 0 bytes'));
} else if (downloaded !== total) {
completeCallback(new Error('Received incorrect number of bytes'));
} else {
completeCallback();
}
});
});
});
response.data.on('error', (error) => {
stream.end(() => {
completeCallback(error);
});
});
}
} catch (error) {
completeCallback(error);
}
} catch (error) {
})
.catch((error) => {
completeCallback(error);
}
})
.catch((error) => {
completeCallback(error);
});
});
};
module.exports.executeAndWait = (command, ignoreResult) => {
@@ -539,9 +539,9 @@ module.exports.executeAsync = (command, args = []) => {
() =>
launchProcess(
count,
setTimeout(() => resolve(), 3000),
setTimeout(() => resolve(), 3000)
),
1000,
1000
);
}
});
@@ -556,9 +556,9 @@ module.exports.executeAsync = (command, args = []) => {
() =>
launchProcess(
count,
setTimeout(() => resolve(), 3000),
setTimeout(() => resolve(), 3000)
),
1000,
1000
);
}
}
@@ -569,7 +569,7 @@ module.exports.executeAsync = (command, args = []) => {
launchProcess(
0,
setTimeout(() => resolve(), 3000),
setTimeout(() => resolve(), 3000)
);
});
};
@@ -785,16 +785,16 @@ module.exports.getMissingDependencies = (dependencies) => {
if (index >= dep.registry.length) {
if (dep.display === 'VC Runtime 2015-2019') {
_vcRuntimeExists()
.then((exists) => {
if (!exists) {
.then((exists) => {
if (!exists) {
missing.push(dep);
}
resolveIfComplete();
})
.catch(() => {
missing.push(dep);
}
resolveIfComplete();
})
.catch(() => {
missing.push(dep);
resolveIfComplete();
});
resolveIfComplete();
});
} else {
missing.push(dep);
resolveIfComplete();
@@ -861,18 +861,18 @@ module.exports.getMissingDependencies = (dependencies) => {
module.exports.grabSkynetFileTree = (version) => {
return new Promise((resolve, reject) => {
_exportAllSkylinks(version)
.then((results) => {
resolve([
{
name: '/',
directory: true,
children: _createTreeNodes(results.success),
},
]);
})
.catch((e) => {
reject(e);
});
.then((results) => {
resolve([
{
name: '/',
directory: true,
children: _createTreeNodes(results.success),
},
]);
})
.catch((e) => {
reject(e);
});
});
};
@@ -1048,53 +1048,53 @@ module.exports.performWindowsUninstall = (names) => {
: 'HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
];
_execProcessGetOutput(cmd, null, args)
.then((lines) => {
const parseLine = (index) => {
if (index < lines.length) {
const line = lines[index];
if (line.startsWith('HKEY_LOCAL_MACHINE\\')) {
let args2 = JSON.parse(JSON.stringify(args));
args2[1] = 'HKLM\\' + line.substr(19);
args2.push('/v');
args2.push('DisplayName');
args2.push('/t');
args2.push('REG_SZ');
_execProcessGetOutput(cmd, null, args2)
.then((lines) => {
const value = lines[2].trim().substr(args2[3].length).trim().substr(6).trim();
if (names.includes(value)) {
const items = line.split('\\');
const productCode = items[items.length - 1];
_executeProcess('msiexec.exe', null, ['/x', productCode, '/norestart'])
.then((code) => {
if (code === 0 || code === 3010 || code === 1641) {
resolve(true);
.then((lines) => {
const parseLine = (index) => {
if (index < lines.length) {
const line = lines[index];
if (line.startsWith('HKEY_LOCAL_MACHINE\\')) {
let args2 = JSON.parse(JSON.stringify(args));
args2[1] = 'HKLM\\' + line.substr(19);
args2.push('/v');
args2.push('DisplayName');
args2.push('/t');
args2.push('REG_SZ');
_execProcessGetOutput(cmd, null, args2)
.then((lines) => {
const value = lines[2].trim().substr(args2[3].length).trim().substr(6).trim();
if (names.includes(value)) {
const items = line.split('\\');
const productCode = items[items.length - 1];
_executeProcess('msiexec.exe', null, ['/x', productCode, '/norestart'])
.then((code) => {
if (code === 0 || code === 3010 || code === 1641) {
resolve(true);
} else {
reject('[' + value + '] uninstall failed: ' + code);
}
})
.catch((err) => {
reject(err);
});
} else {
reject('[' + value + '] uninstall failed: ' + code);
parseLine(++index);
}
})
.catch((err) => {
reject(err);
.catch(() => {
parseLine(++index);
});
} else {
parseLine(++index);
}
})
.catch(() => {
} else {
parseLine(++index);
});
}
} else {
parseLine(++index);
resolve(false);
}
} else {
resolve(false);
}
};
parseLine(0);
})
.catch((err) => {
reject(err);
});
};
parseLine(0);
})
.catch((err) => {
reject(err);
});
}
});
};
@@ -1136,7 +1136,14 @@ module.exports.setConfigValue = (name, value, provider, remote, s3, version) =>
});
};
module.exports.testSkynetLogon = (version, authURL, authUser, authPassword, agentString, apiKey) => {
module.exports.testSkynetLogon = (
version,
authURL,
authUser,
authPassword,
agentString,
apiKey
) => {
return new Promise((resolve, reject) => {
const repertoryExec = _getRepertoryExec(version);
const processOptions = {
@@ -1218,16 +1225,16 @@ module.exports.testRepertoryBinary = (version) => {
return new Promise((resolve, reject) => {
const repertoryExec = _getRepertoryExec(version);
_executeProcess(repertoryExec.cmd, repertoryExec.working, ['-dc'])
.then((code) => {
if (code === 0) {
resolve();
} else {
reject(new Error('Invalid exit code: ' + code));
}
})
.catch((error) => {
reject(error);
});
.then((code) => {
if (code === 0) {
resolve();
} else {
reject(new Error('Invalid exit code: ' + code));
}
})
.catch((error) => {
reject(error);
});
});
};
@@ -1274,7 +1281,7 @@ module.exports.verifySignature = (file, signatureFile, publicKeyFile) => {
} else {
resolve(stdout);
}
},
}
);
};
@@ -1298,7 +1305,7 @@ module.exports.verifySignature = (file, signatureFile, publicKeyFile) => {
}
});
} else {
reject(new Error('Failed to locate \'openssl.exe\''));
reject(new Error("Failed to locate 'openssl.exe'"));
}
});
} else if (os.platform() === 'linux') {
-20
View File
@@ -8,16 +8,6 @@ import { getIPCRenderer } from '../../utils.jsx';
const ipcRenderer = getIPCRenderer();
export const displaySelectAppPlatform = (display) => {
return (dispatch) => {
if (display) {
dispatch(showWindow());
}
dispatch(setDisplaySelectAppPlatform(display));
};
};
export const NOTIFY_APPLICATION_BUSY = 'common/notifyApplicationBusy';
export const notifyApplicationBusy = (busy, transparent) => {
return {
@@ -67,16 +57,6 @@ export const saveState = () => {
export const setAllowMount = createAction('common/setAllowMount');
export const setApplicationReady = createAction('common/setApplicationReady');
export const SET_DISPLAY_SELECT_APPPLATFORM = 'common/displaySelectAppPlatform';
export const setDisplaySelectAppPlatform = (display) => {
return {
type: SET_DISPLAY_SELECT_APPPLATFORM,
payload: display,
};
};
export const setLinuxAppPlatform = createAction('common/setLinuxAppPlatform');
export const setRebootRequired = () => {
return (dispatch) => {
dispatch(showWindow());
+2 -10
View File
@@ -4,12 +4,7 @@ import * as Constants from '../../constants';
import { getIPCRenderer } from '../../utils.jsx';
import { notifyError } from './error_actions';
import {
installAndTestRelease,
installDependency,
installRelease,
installUpgrade,
} from './install_actions';
import { installDependency, installRelease, installUpgrade } from './install_actions';
export const setAllowDownload = createAction('download/setAllowDownload');
@@ -21,7 +16,7 @@ export const setDownloadBegin = (name, type, url) => {
export const setDownloadEnd = createAction('download/setDownloadEnd');
export const setDownloadProgress = createAction('download/setDownloadProgress');
export const downloadItem = (name, type, urls, isWinFSP, testVersion, appPlatform) => {
export const downloadItem = (name, type, urls, isWinFSP) => {
return (dispatch, getState) => {
if (!Array.isArray(urls)) {
urls = [urls];
@@ -36,9 +31,6 @@ export const downloadItem = (name, type, urls, isWinFSP, testVersion, appPlatfor
case Constants.INSTALL_TYPES.Release:
dispatch(installRelease(result.Destination));
break;
case Constants.INSTALL_TYPES.TestRelease:
dispatch(installAndTestRelease(result.Destination, testVersion, appPlatform));
break;
case Constants.INSTALL_TYPES.Upgrade:
// const info =
// this.props.LocationsLookup[this.props.AppPlatform][this.props.VersionLookup[this.props.AppPlatform][0]];
-40
View File
@@ -5,10 +5,8 @@ import { getIPCRenderer, getSelectedVersionFromState } from '../../utils.jsx';
import {
confirmYesNoAction,
displaySelectAppPlatform,
setAllowMount,
setApplicationReady,
setLinuxAppPlatform,
setRebootRequired,
showWindow,
shutdownApplication,
@@ -17,7 +15,6 @@ import { downloadItem, setAllowDownload } from './download_actions';
import { notifyError } from './error_actions';
import { unmountAll } from './mount_actions';
import {
loadReleases,
setActiveRelease,
setInstalledVersion,
setNewReleasesAvailable2,
@@ -157,43 +154,6 @@ export const installDependency = (source, url, isWinFSP) => {
};
};
export const installAndTestRelease = (source, version, appPlatform) => {
return (dispatch, getState) => {
if (ipcRenderer && getState().install.InstallTestActive) {
const extractReleaseComplete = () => {
ipcRenderer.send(Constants.IPC_Delete_File, {
FilePath: source,
});
ipcRenderer.once(Constants.IPC_Test_Release_Reply, (_, arg) => {
if (arg.data.Success) {
ipcRenderer.sendSync(Constants.IPC_Set_Linux_AppPlatform, {
AppPlatform: appPlatform,
});
dispatch(setLinuxAppPlatform(appPlatform));
dispatch(setInstallTestActive(false));
dispatch(displaySelectAppPlatform(false));
dispatch(setAllowDownload(false));
dispatch(loadReleases());
} else {
dispatch(notifyError(arg.data.Error));
dispatch(setInstallTestActive(false));
}
});
ipcRenderer.send(Constants.IPC_Test_Release, {
Version: version,
});
};
ipcRenderer.once(Constants.IPC_Extract_Release_Complete, extractReleaseComplete);
ipcRenderer.send(Constants.IPC_Extract_Release, {
Source: source,
Version: version,
});
}
};
};
export const installReleaseByVersion = (release, version) => {
return (dispatch, getState) => {
const install = () => {
-9
View File
@@ -3,10 +3,8 @@ import {
confirmYesNoAction,
NOTIFY_APPLICATION_BUSY,
notifyRebootRequired,
SET_DISPLAY_SELECT_APPPLATFORM,
setAllowMount,
setApplicationReady,
setLinuxAppPlatform,
} from '../actions/common_actions';
export const createCommonReducer = (platformInfo, version) => {
@@ -19,7 +17,6 @@ export const createCommonReducer = (platformInfo, version) => {
AppReady: false,
DisplayConfirmYesNo: false,
ConfirmTitle: null,
DisplaySelectAppPlatform: false,
Platform: platformInfo.Platform,
RebootRequired: false,
Version: version,
@@ -33,9 +30,6 @@ export const createCommonReducer = (platformInfo, version) => {
action.payload.display && action.payload.data ? action.payload.data.title : null,
};
},
[SET_DISPLAY_SELECT_APPPLATFORM]: (state, action) => {
return { ...state, DisplaySelectAppPlatform: action.payload };
},
[setAllowMount]: (state, action) => {
return { ...state, AllowMount: action.payload };
},
@@ -45,9 +39,6 @@ export const createCommonReducer = (platformInfo, version) => {
AppReady: action.payload,
};
},
[setLinuxAppPlatform]: (state, action) => {
return { ...state, AppPlatform: action.payload };
},
[NOTIFY_APPLICATION_BUSY]: (state, action) => {
return {
...state,
+1 -1
View File
@@ -58,4 +58,4 @@ const addListeners = (ipcMain, { standardIPCReply }) => {
});
};
module.exports = { addListeners };
module.exports = {addListeners};
+1 -1
View File
@@ -43,4 +43,4 @@ const addListeners = (ipcMain, { standardIPCReply }) => {
});
};
module.exports = { addListeners };
module.exports = {addListeners};
+1 -1
View File
@@ -110,4 +110,4 @@ const addListeners = (ipcMain, { standardIPCReply }) => {
});
};
module.exports = { addListeners };
module.exports = {addListeners};
+1 -1
View File
@@ -83,4 +83,4 @@ const addListeners = (ipcMain, { getMainWindow, dialog }) => {
});
};
module.exports = { addListeners };
module.exports = {addListeners};
+1 -1
View File
@@ -42,4 +42,4 @@ const addListeners = (ipcMain, { standardIPCReply }) => {
});
};
module.exports = { addListeners };
module.exports = {addListeners};
+30 -52
View File
@@ -4,17 +4,7 @@ const helpers = require('../../helpers');
const os = require('os');
const path = require('path');
let _platformOverride;
const getPlatformOverride = () => {
return _platformOverride;
};
const setPlatformOverride = (platformOverride) => {
_platformOverride = platformOverride;
};
const addListeners = (ipcMain, { detectScript, saveUiSettings }) => {
const addListeners = (ipcMain, { detectScript }) => {
ipcMain.on(Constants.IPC_Get_Platform, (event) => {
const sendResponse = (appPlatform, platform) => {
event.sender.send(Constants.IPC_Get_Platform_Reply, {
@@ -25,54 +15,42 @@ const addListeners = (ipcMain, { detectScript, saveUiSettings }) => {
const platform = os.platform();
if (platform === 'linux') {
if (_platformOverride && _platformOverride.length > 0) {
sendResponse(_platformOverride, 'linux');
} else {
const scriptFile = path.join(os.tmpdir(), 'repertory_detect_linux.sh');
fs.writeFileSync(scriptFile, detectScript);
const scriptFile = path.join(os.tmpdir(), 'repertory_detect_linux.sh');
fs.writeFileSync(scriptFile, detectScript);
helpers
.executeScript(scriptFile)
.then((data) => {
let appPlatform = data.replace(/(\r\n|\n|\r)/gm, '');
if (appPlatform === 'unknown') {
helpers.downloadFile(Constants.LINUX_DETECT_SCRIPT_URL, scriptFile, null, (err) => {
if (err) {
sendResponse(appPlatform, platform);
} else {
helpers
.executeScript(scriptFile)
.then((data) => {
appPlatform = data.replace(/(\r\n|\n|\r)/gm, '');
sendResponse(appPlatform, platform);
})
.catch(() => {
sendResponse(appPlatform, platform);
});
}
});
} else {
sendResponse(appPlatform, platform);
}
})
.catch(() => {
sendResponse(platform, platform);
});
}
helpers
.executeScript(scriptFile)
.then((data) => {
let appPlatform = data.replace(/(\r\n|\n|\r)/gm, '');
if (appPlatform === 'unknown') {
helpers.downloadFile(Constants.LINUX_DETECT_SCRIPT_URL, scriptFile, null, (err) => {
if (err) {
sendResponse(appPlatform, platform);
} else {
helpers
.executeScript(scriptFile)
.then((data) => {
appPlatform = data.replace(/(\r\n|\n|\r)/gm, '');
sendResponse(appPlatform, platform);
})
.catch(() => {
sendResponse(appPlatform, platform);
});
}
});
} else {
sendResponse(appPlatform, platform);
}
})
.catch(() => {
sendResponse(platform, platform);
});
} else {
sendResponse(platform, platform);
}
});
ipcMain.on(Constants.IPC_Set_Linux_AppPlatform, (event, data) => {
setPlatformOverride(data.AppPlatform);
saveUiSettings();
event.returnValue = true;
});
};
module.exports = {
getPlatformOverride,
setPlatformOverride,
addListeners,
};
+1 -1
View File
@@ -104,4 +104,4 @@ const addListeners = (ipcMain, { getCleanupReleases, standardIPCReply }) => {
});
};
module.exports = { addListeners };
module.exports = {addListeners};
+41 -36
View File
@@ -4,57 +4,62 @@ const helpers = require('../../helpers');
const addListeners = (ipcMain, { standardIPCReply }) => {
ipcMain.on(Constants.IPC_Export_Skylinks, (event, data) => {
helpers
.exportSkylinks(data.Version, data.Paths)
.then((result) => {
standardIPCReply(event, Constants.IPC_Export_Skylinks_Reply, {
Result: result,
.exportSkylinks(data.Version, data.Paths)
.then((result) => {
standardIPCReply(event, Constants.IPC_Export_Skylinks_Reply, {
Result: result,
});
})
.catch((error) => {
standardIPCReply(event, Constants.IPC_Export_Skylinks_Reply, {}, error);
});
})
.catch((error) => {
standardIPCReply(event, Constants.IPC_Export_Skylinks_Reply, {}, error);
});
});
ipcMain.on(Constants.IPC_Grab_Skynet_Tree, (event, data) => {
helpers
.grabSkynetFileTree(data.Version)
.then((result) => {
standardIPCReply(event, Constants.IPC_Grab_Skynet_Tree_Reply, {
Result: result,
.grabSkynetFileTree(data.Version)
.then((result) => {
standardIPCReply(event, Constants.IPC_Grab_Skynet_Tree_Reply, {
Result: result,
});
})
.catch((error) => {
standardIPCReply(event, Constants.IPC_Grab_Skynet_Tree_Reply, {}, error);
});
})
.catch((error) => {
standardIPCReply(event, Constants.IPC_Grab_Skynet_Tree_Reply, {}, error);
});
});
ipcMain.on(Constants.IPC_Import_Skylinks, (event, data) => {
helpers
.importSkylinks(data.Version, data.JsonArray)
.then((result) => {
standardIPCReply(event, Constants.IPC_Import_Skylinks_Reply, {
Result: result,
.importSkylinks(data.Version, data.JsonArray)
.then((result) => {
standardIPCReply(event, Constants.IPC_Import_Skylinks_Reply, {
Result: result,
});
})
.catch((error) => {
standardIPCReply(event, Constants.IPC_Import_Skylinks_Reply, {}, error);
});
})
.catch((error) => {
standardIPCReply(event, Constants.IPC_Import_Skylinks_Reply, {}, error);
});
});
ipcMain.on(Constants.IPC_Skynet_Test_Logon, (event, data) => {
helpers
.testSkynetLogon(data.Version, data.AuthURL, data.AuthUser, data.AuthPassword)
.then((success) => {
if (success) {
standardIPCReply(event, Constants.IPC_Skynet_Test_Logon_Reply, {});
} else {
standardIPCReply(event, Constants.IPC_Skynet_Test_Logon_Reply, {}, 'Logon failed. Please check credentials');
}
})
.catch((error) => {
standardIPCReply(event, Constants.IPC_Skynet_Test_Logon_Reply, {}, error);
});
.testSkynetLogon(data.Version, data.AuthURL, data.AuthUser, data.AuthPassword)
.then((success) => {
if (success) {
standardIPCReply(event, Constants.IPC_Skynet_Test_Logon_Reply, {});
} else {
standardIPCReply(
event,
Constants.IPC_Skynet_Test_Logon_Reply,
{},
'Logon failed. Please check credentials'
);
}
})
.catch((error) => {
standardIPCReply(event, Constants.IPC_Skynet_Test_Logon_Reply, {}, error);
});
});
};
module.exports = { addListeners };
module.exports = {addListeners};
+1 -1
View File
@@ -77,4 +77,4 @@ const addListeners = (ipcMain) => {
});
};
module.exports = { addListeners };
module.exports = {addListeners};
+1 -1
View File
@@ -117,4 +117,4 @@ const addListeners = (ipcMain, { setIsInstalling, unmountAllDrives, standardIPCR
});
};
module.exports = { addListeners };
module.exports = {addListeners};