Compare commits
11 Commits
upgrade-el
...
develop
Author | SHA1 | Date | |
---|---|---|---|
346bb99326 | |||
8bf5a9c4b9 | |||
97247483f9 | |||
56732e585d | |||
c03aefc66a | |||
68461367c8 | |||
ef57e28dab | |||
53431deba9 | |||
e606a06a5d | |||
9bf744d46f | |||
32c474969d |
51
.drone.yml
Normal file
51
.drone.yml
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
---
|
||||||
|
pipeline:
|
||||||
|
test:
|
||||||
|
image: node:6-alpine
|
||||||
|
commands:
|
||||||
|
- apk add --no-cache firefox-esr
|
||||||
|
- npm install
|
||||||
|
- npm test
|
||||||
|
package-64:
|
||||||
|
pull: true
|
||||||
|
group: package
|
||||||
|
image: bornholm/drone-tamarin:latest
|
||||||
|
dest_dir: packages
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
package-32:
|
||||||
|
pull: true
|
||||||
|
group: package
|
||||||
|
image: bornholm/drone-tamarin:latest
|
||||||
|
arch: i386
|
||||||
|
dest_dir: packages
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock
|
||||||
|
deploy:
|
||||||
|
pull: true
|
||||||
|
image: bornholm/drone-sftp:latest
|
||||||
|
# Génération des commandes d'upload SFTP via script Bash
|
||||||
|
sftp_commands_script: |
|
||||||
|
ls packages/*.deb | xargs -I '{}' echo "put '{}' packages-available/"
|
||||||
|
secrets:
|
||||||
|
- source: packages_sftp_host
|
||||||
|
target: plugin_host
|
||||||
|
- source: packages_sftp_user
|
||||||
|
target: plugin_username
|
||||||
|
- source: packages_sftp_password
|
||||||
|
target: plugin_password
|
||||||
|
notify:
|
||||||
|
image: drillster/drone-email
|
||||||
|
from: drone@cadoles.com
|
||||||
|
skip_verify: true
|
||||||
|
secrets:
|
||||||
|
- source: cadoles_email_port
|
||||||
|
target: plugin_port
|
||||||
|
- source: cadoles_email_host
|
||||||
|
target: plugin_host
|
||||||
|
- source: cadoles_email_user
|
||||||
|
target: plugin_username
|
||||||
|
- source: cadoles_email_password
|
||||||
|
target: plugin_password
|
||||||
|
when:
|
||||||
|
status: [ success, failure ]
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ build
|
|||||||
nwjs
|
nwjs
|
||||||
my-profile.json
|
my-profile.json
|
||||||
js-compiled
|
js-compiled
|
||||||
|
/packages
|
||||||
|
10
.tamarin/prebuild
Executable file
10
.tamarin/prebuild
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o pipefail
|
||||||
|
set -e
|
||||||
|
|
||||||
|
# Install NodeJS into the container
|
||||||
|
apt-get update
|
||||||
|
apt-get install --yes --no-install-recommends curl ca-certificates
|
||||||
|
curl --silent --location https://deb.nodesource.com/setup_6.x | bash -
|
||||||
|
apt-get install --yes nodejs
|
@ -1,3 +1,3 @@
|
|||||||
project_version=0.0.2
|
project_version=1.0.0
|
||||||
project_name=pitaya
|
project_name=pitaya
|
||||||
no_version_suffix=no
|
no_version_suffix=no
|
||||||
|
8
Makefile
8
Makefile
@ -8,11 +8,11 @@ endif
|
|||||||
|
|
||||||
all: build
|
all: build
|
||||||
|
|
||||||
|
clean:
|
||||||
|
rm -rf node_modules
|
||||||
|
rm -rf dist
|
||||||
|
|
||||||
build:
|
build:
|
||||||
apt-get update
|
|
||||||
apt-get install --yes --no-install-recommends curl ca-certificates
|
|
||||||
curl --silent --location https://deb.nodesource.com/setup_6.x | bash -
|
|
||||||
apt-get install --yes nodejs
|
|
||||||
npm install --ignore-scripts
|
npm install --ignore-scripts
|
||||||
ARCH=$(ELECTRON_ARCH) npm run build
|
ARCH=$(ELECTRON_ARCH) npm run build
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
<style>h1 > img { vertical-align: bottom; }</style>
|
<style>h1 > img { vertical-align: bottom; }</style>
|
||||||
|
|
||||||
#  Pitaya
|
#  Pitaya [](https://drone.cadol.es/Cadoles/pitaya-launcher)
|
||||||
|
|
||||||
Lanceur d'application pour GNU/Linux
|
Lanceur d'application pour GNU/Linux
|
||||||
|
|
||||||
|
1
debian/control
vendored
1
debian/control
vendored
@ -10,4 +10,5 @@ Vcs-Browser: https://forge.cadoles.com/wpetit/pitaya
|
|||||||
|
|
||||||
Package: pitaya
|
Package: pitaya
|
||||||
Architecture: any
|
Architecture: any
|
||||||
|
Depends: libgconf-2-4
|
||||||
Description: Lanceur d'application pour GNU/Linux
|
Description: Lanceur d'application pour GNU/Linux
|
||||||
|
15
package.json
15
package.json
@ -4,7 +4,7 @@
|
|||||||
"private": "true",
|
"private": "true",
|
||||||
"main": "main.js",
|
"main": "main.js",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"electron": "^1.6.5",
|
"electron": "^1.6.7",
|
||||||
"electron-packager": "^8.6.0",
|
"electron-packager": "^8.6.0",
|
||||||
"node-jsx": "^0.13.3",
|
"node-jsx": "^0.13.3",
|
||||||
"nodeunit": "^0.9.1",
|
"nodeunit": "^0.9.1",
|
||||||
@ -15,7 +15,7 @@
|
|||||||
"start": "./node_modules/.bin/electron .",
|
"start": "./node_modules/.bin/electron .",
|
||||||
"compile": "./node_modules/.bin/jsx -x js --no-cache-dir src dist",
|
"compile": "./node_modules/.bin/jsx -x js --no-cache-dir src dist",
|
||||||
"clean": "rm -rf dist/* build/*",
|
"clean": "rm -rf dist/* build/*",
|
||||||
"package": "./node_modules/.bin/electron-packager ./ pitaya --out=./build --app-version 0.0.0 --version=1.6.5 --prune --ignore='/res(/|$)' --ignore='/debian(/|$)' --ignore='/scripts(/|$)' --ignore='/build(/|$)' --ignore='/test(/|$)' --ignore='/electron-packager(/|$)' --ignore='/electron-tmp-.+(/|$)' --platform=linux --overwrite",
|
"package": "./node_modules/.bin/electron-packager ./ pitaya --out=./build --app-version 0.0.0 --electron-version=1.6.7 --prune --ignore='/res(/|$)' --ignore='/debian(/|$)' --ignore='/scripts(/|$)' --ignore='/build(/|$)' --ignore='/test(/|$)' --ignore='/electron-packager(/|$)' --ignore='/electron-tmp-.+(/|$)' --platform=linux --overwrite",
|
||||||
"build": "npm run clean && npm run compile && npm run package -- --arch=$ARCH"
|
"build": "npm run clean && npm run compile && npm run package -- --arch=$ARCH"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
@ -25,11 +25,12 @@
|
|||||||
"glob": "^5.0.14",
|
"glob": "^5.0.14",
|
||||||
"ini": "^1.3.4",
|
"ini": "^1.3.4",
|
||||||
"lodash": "^3.10.1",
|
"lodash": "^3.10.1",
|
||||||
"react": "^0.14.0",
|
"react": "^15.5.0",
|
||||||
"react-addons-css-transition-group": "^0.14.0",
|
"react-addons-css-transition-group": "^15.5.2",
|
||||||
"react-addons-update": "^0.14.2",
|
"react-addons-update": "^15.5.2",
|
||||||
"react-dnd": "^1.1.5",
|
"react-dnd": "^2.3.0",
|
||||||
"react-dom": "^0.14.0",
|
"react-dnd-html5-backend": "^2.3.0",
|
||||||
|
"react-dom": "^15.5.4",
|
||||||
"react-redux": "^2.0.0",
|
"react-redux": "^2.0.0",
|
||||||
"recursive-iterator": "^2.0.0",
|
"recursive-iterator": "^2.0.0",
|
||||||
"redux": "^2.0.0",
|
"redux": "^2.0.0",
|
||||||
|
@ -8,7 +8,7 @@ var ProfileMenu = require('./profile-menu.js');
|
|||||||
|
|
||||||
var actions = require('../../store/actions');
|
var actions = require('../../store/actions');
|
||||||
var DragDropContext = require('react-dnd').DragDropContext;
|
var DragDropContext = require('react-dnd').DragDropContext;
|
||||||
var HTML5Backend = require('react-dnd/modules/backends/HTML5');
|
var HTML5Backend = require('react-dnd-html5-backend');
|
||||||
|
|
||||||
var EditView = React.createClass({
|
var EditView = React.createClass({
|
||||||
|
|
||||||
|
@ -104,10 +104,16 @@ var LauncherView = React.createClass({
|
|||||||
|
|
||||||
var el = evt.currentTarget;
|
var el = evt.currentTarget;
|
||||||
el.classList.add('pulse');
|
el.classList.add('pulse');
|
||||||
|
let startAnim = Date.now();
|
||||||
|
let endAnim = startAnim + 2000;
|
||||||
this.props.dispatch(actions.launcher.runApp(item.exec))
|
this.props.dispatch(actions.launcher.runApp(item.exec))
|
||||||
.then(function() {
|
.then(function() {
|
||||||
el.classList.remove('pulse');
|
let now = Date.now();
|
||||||
|
if(endAnim > now) {
|
||||||
|
setTimeout(() => el.classList.remove('pulse'), endAnim - now)
|
||||||
|
} else {
|
||||||
|
el.classList.remove('pulse')
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(function() {
|
.catch(function() {
|
||||||
el.classList.remove('pulse');
|
el.classList.remove('pulse');
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
var Util = require('../../util');
|
var Util = require('../../util');
|
||||||
var logger = Util.Logger;
|
var logger = Util.Logger;
|
||||||
var remote = require('electron').Remote;
|
var LoggerStream = Util.LoggerStream;
|
||||||
|
var remote = require('electron').remote;
|
||||||
|
|
||||||
var RUN_APP = exports.RUN_APP = 'RUN_APP';
|
var RUN_APP = exports.RUN_APP = 'RUN_APP';
|
||||||
var RUN_APP_SUCCESS = exports.RUN_APP_SUCCESS = 'RUN_APP_SUCCESS';
|
var RUN_APP_SUCCESS = exports.RUN_APP_SUCCESS = 'RUN_APP_SUCCESS';
|
||||||
@ -14,7 +15,13 @@ exports.runApp = function(execPath) {
|
|||||||
|
|
||||||
dispatch({ type: RUN_APP, execPath: execPath });
|
dispatch({ type: RUN_APP, execPath: execPath });
|
||||||
|
|
||||||
return Util.System.runApp(execPath, { clearFreeDesktopFlags: true })
|
var opts = {
|
||||||
|
clearFreeDesktopFlags: true,
|
||||||
|
stdout: process.stdout,
|
||||||
|
stderr: process.stderr
|
||||||
|
}
|
||||||
|
|
||||||
|
return Util.System.runApp(execPath, opts)
|
||||||
.then(function() {
|
.then(function() {
|
||||||
dispatch({ type: RUN_APP_SUCCESS, execPath: execPath });
|
dispatch({ type: RUN_APP_SUCCESS, execPath: execPath });
|
||||||
// Hypothetical fix
|
// Hypothetical fix
|
||||||
|
@ -98,15 +98,64 @@ exports.runApp = function(execPath, opts) {
|
|||||||
|
|
||||||
opts = opts || {};
|
opts = opts || {};
|
||||||
|
|
||||||
if(opts.clearFreeDesktopFlags) {
|
|
||||||
execPath = exports.clearFreeDesktopFlags(execPath);
|
|
||||||
}
|
|
||||||
|
|
||||||
return new Promise(function(resolve, reject) {
|
return new Promise(function(resolve, reject) {
|
||||||
cp.exec(execPath, function(err) {
|
try {
|
||||||
if(err) return reject(err);
|
|
||||||
return resolve();
|
if(opts.clearFreeDesktopFlags) {
|
||||||
|
execPath = exports.clearFreeDesktopFlags(execPath);
|
||||||
|
}
|
||||||
|
|
||||||
|
var isDev = process.env.NODE_ENV === 'development';
|
||||||
|
|
||||||
|
var child = cp.spawn(execPath, {
|
||||||
|
detached: true,
|
||||||
|
shell: true,
|
||||||
|
stdio: [
|
||||||
|
'ignore',
|
||||||
|
isDev ? process.stdout : 'ignore',
|
||||||
|
isDev ? process.stderr : 'ignore'
|
||||||
|
]
|
||||||
|
});
|
||||||
|
|
||||||
|
// Detach the child process
|
||||||
|
child.unref();
|
||||||
|
|
||||||
|
} catch(err) {
|
||||||
|
return reject(err);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Execute the rest after all I/O operations in this tick
|
||||||
|
let immediateId = setImmediate(() => {
|
||||||
|
|
||||||
|
// We do not want to be notified of child events after launch
|
||||||
|
child.removeAllListeners();
|
||||||
|
|
||||||
|
try {
|
||||||
|
// Check if the child process is still alive, should throw otherwise
|
||||||
|
child.kill(0);
|
||||||
|
} catch(err) {
|
||||||
|
return reject(err);
|
||||||
|
}
|
||||||
|
|
||||||
|
return resolve(child);
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// If the child process exit with an exit code != 0, reject the promise
|
||||||
|
child.once('close', code => {
|
||||||
|
if(code === 0) return;
|
||||||
|
clearImmediate(immediateId);
|
||||||
|
child.removeAllListeners();
|
||||||
|
return reject(`Program exited with a exit code "${code}"`);
|
||||||
|
});
|
||||||
|
|
||||||
|
// If an error occurs during the process launch, reject the promise
|
||||||
|
child.once('error', err => {
|
||||||
|
clearImmediate(immediateId);
|
||||||
|
child.removeAllListeners();
|
||||||
|
return reject(err);
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user