Merge branch 'feature/debian-package' into develop

This commit is contained in:
William Petit 2015-10-22 14:01:59 +02:00
commit 3880805bca
8 changed files with 69 additions and 3 deletions

22
Makefile Normal file
View File

@ -0,0 +1,22 @@
DESTDIR=./
INSTALL_LOCATION=$(DESTDIR)/opt/pitaya
ELECTRON_ARCH=x64
ifeq ($(DEB_TARGET_ARCH), i386)
ELECTRON_ARCH=ia32
endif
all: build
build:
apt-get install --yes --no-install-recommends curl ca-certificates
curl --silent --location https://deb.nodesource.com/setup_0.12 | bash -
apt-get install --yes nodejs
npm install --ignore-scripts
npm run clean
npm run compile
npm run package -- --arch=$(ELECTRON_ARCH)
install:
mkdir -p $(INSTALL_LOCATION)
cp -r build/pitaya-linux-$(ELECTRON_ARCH)/* $(INSTALL_LOCATION)/

5
debian/changelog vendored Normal file
View File

@ -0,0 +1,5 @@
pitaya (0.0.0) unstable; urgency=low
* Initial release (Closes: #nnnn) <nnnn is the bug number of your ITP>
-- William Petit <wpetit@cadoles.com> Fri, 16 Oct 2015 15:57:03 +0200

1
debian/compat vendored Normal file
View File

@ -0,0 +1 @@
9

13
debian/control vendored Normal file
View File

@ -0,0 +1,13 @@
Source: pitaya
Section: unknown
Priority: optional
Maintainer: William Petit <wpetit@cadoles.com>
Build-Depends: debhelper (>= 8.0.0)
Standards-Version: 3.9.4
Homepage:
Vcs-Git: https://forge.cadoles.com/wpetit/pitaya.git
Vcs-Browser: https://forge.cadoles.com/wpetit/pitaya
Package: pitaya
Architecture: any
Description: Lanceur d'application pour GNU/Linux

17
debian/rules vendored Normal file
View File

@ -0,0 +1,17 @@
#!/usr/bin/make -f
# -*- makefile -*-
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
%:
dh $@
override_dh_makeshlibs:
# Disabled
override_dh_shlibdeps:
# Disabled
override_dh_strip:
# Disabled

1
debian/source/format vendored Normal file
View File

@ -0,0 +1 @@
3.0 (quilt)

View File

@ -13,9 +13,9 @@
"scripts": { "scripts": {
"test": "./node_modules/.bin/nodeunit test", "test": "./node_modules/.bin/nodeunit test",
"start": "./node_modules/.bin/electron .", "start": "./node_modules/.bin/electron .",
"compile": "./node_modules/.bin/jsx -x js 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 --prune --ignore=res/ --platform=linux --arch=ia32,x64 --version=0.33.6 --out=build --overwrite --app-version 0.0.0", "package": "./node_modules/.bin/electron-packager ./ pitaya --out=./build --app-version 0.0.0 --version=0.33.6 --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" "build": "npm run clean && npm run compile && npm run package"
}, },
"dependencies": { "dependencies": {

View File

@ -2,6 +2,7 @@ var React = require('react');
var Util = require('../../util'); var Util = require('../../util');
var LazyLoad = require('../mixins/lazy-load'); var LazyLoad = require('../mixins/lazy-load');
var debug = Util.Debug('common:app-icon'); var debug = Util.Debug('common:app-icon');
var _ = require('lodash');
var LOADING_ICON = 'img/hourglass.svg'; var LOADING_ICON = 'img/hourglass.svg';
var DEFAULT_ICON = 'img/default-icon.svg'; var DEFAULT_ICON = 'img/default-icon.svg';
@ -10,6 +11,12 @@ module.exports = React.createClass({
mixins: [LazyLoad], mixins: [LazyLoad],
componentWillMount: function() {
if(!this._findIconDebounced) {
this._findIconDebounced = _.debounce(this._findIcon, 250);
}
},
getInitialState: function() { getInitialState: function() {
return { icon: DEFAULT_ICON, iconPath: DEFAULT_ICON, currentTheme: '' }; return { icon: DEFAULT_ICON, iconPath: DEFAULT_ICON, currentTheme: '' };
}, },
@ -33,7 +40,7 @@ module.exports = React.createClass({
this.setState({ icon: newIcon, iconPath: LOADING_ICON, currentTheme: newTheme }); this.setState({ icon: newIcon, iconPath: LOADING_ICON, currentTheme: newTheme });
this._findIcon(newIcon, newTheme); this._findIconDebounced(newIcon, newTheme);
}, },