Skip to content

Commit

Permalink
Merge tag 'v1.5.10' into hebrew-support
Browse files Browse the repository at this point in the history
  • Loading branch information
yossizahn committed Dec 13, 2020
2 parents 4ea1a4a + dd0aa07 commit 0ef9f14
Show file tree
Hide file tree
Showing 45 changed files with 4,168 additions and 4,614 deletions.
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: node_js
node_js:
- node
- 14
notifications:
email: false

Expand All @@ -24,7 +24,7 @@ before_deploy:
- sudo dpkg --add-architecture i386
- sudo apt-get -qq update
- sudo rm /var/lib/dpkg/lock
- sudo apt-get install -y -qq wine-stable zip xvfb
- sudo apt-get install -y -qq wine-stable zip xvfb fakeroot
- wine wineboot --init # WINEARCH=win32
#
# actuall building of the binaries
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ Yakyak may show up as iOS Device and Google may alert you that *"some iOS Device
* [Max Kueng](https://github.com/maxkueng)
* [Arnaud Riu](https://github.com/arnriu)
* [Austin Guevara](https://github.com/austin-guevara)
* [Mathias Tillman](https://github.com/HomerSp)

## Developing

Expand Down
78 changes: 71 additions & 7 deletions gulpfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@ less = require 'gulp-less'
rimraf = require 'rimraf'
path = require 'path'
fs = require 'fs'
gutil = require 'gulp-util'
sourcemaps = require 'gulp-sourcemaps'
install = require 'gulp-install'
reinstall = require 'gulp-reinstall'
{execSync} = require 'child_process'
concat = require 'gulp-concat'
liveReload = require 'gulp-livereload'
changed = require 'gulp-changed'
rename = require 'gulp-rename'
packager = require 'electron-packager'
flatpak = try require 'electron-installer-flatpak'
debian = try require 'electron-installer-debian'
filter = require 'gulp-filter'
Q = require 'q'
Stream = require 'stream'
Expand Down Expand Up @@ -57,7 +57,8 @@ json = JSON.parse(fs.readFileSync('./package.json'))

deploy_options = {
dir: path.join __dirname, 'app'
asar: false
asar:
unpackDir: "{node_modules/node-notifier/vendor/**,icons}"
icon: path.join __dirname, 'src', 'icons', 'icon'
out: outdeploy
overwrite: true
Expand Down Expand Up @@ -90,7 +91,8 @@ gulp.task 'package', ->
gulp.src paths.package
# .pipe changed outapp
.pipe gulp.dest outapp
.pipe install()
.pipe reinstall()
#.pipe reinstall({ production: true }) # electron-packager doesn't like this


# compile coffeescript
Expand Down Expand Up @@ -145,6 +147,11 @@ gulp.task 'icons', ->
'icon-unread_032.png': '[email protected]'
'icon-unread_020.png': '[email protected]'
'icon-unread_128.png': '[email protected]'
# Read icon in tray (linux/windows - colorblind)
'icon-read_016_blue.png': 'icon-read_blue.png'
'icon-read_032_blue.png': 'icon-read@2x_blue.png'
'icon-read_020_blue.png': 'icon-read@20_blue.png'
'icon-read_128_blue.png': 'icon-read@8x_blue.png'
# Read icon in tray (linux/windows)
'icon-read_016.png': 'icon-read.png'
'icon-read_032.png': '[email protected]'
Expand Down Expand Up @@ -231,6 +238,7 @@ names = {linux: [], win32: [], darwin: []}
#

zipIt = (folder, filePrefix, done) ->
# use zip
ext = 'zip'
zipName = path.join outdeploy, "#{filePrefix}.#{ext}"
folder = path.basename folder
Expand All @@ -243,6 +251,7 @@ zipIt = (folder, filePrefix, done) ->
compressIt('zip', args, opts, zipName, done)

tarIt = (folder, filePrefix, done) ->
# use GNU tar to make gzipped tar archive
ext = 'tar.gz'
zipName = path.join outdeploy, "#{filePrefix}.#{ext}"
folder = path.basename folder
Expand All @@ -254,6 +263,19 @@ tarIt = (folder, filePrefix, done) ->
}
compressIt('tar', args, opts, zipName, done)

zipItWin = (folder, filePrefix, done) ->
# use built-in tar.exe to make zip archive
ext = 'zip'
zipName = path.join outdeploy, "#{filePrefix}.#{ext}"
folder = path.basename folder
#
args = ['-cf', zipName, folder]
opts = {
cwd: outdeploy
stdio: [0, 1, 'pipe']
}
compressIt('tar', args, opts, zipName, done)

compressIt = (cmd, args, opts, zipName, done) ->
#
# create child process
Expand Down Expand Up @@ -313,6 +335,10 @@ deploy = (platform, arch, cb) ->
tarIt zippath, fileprefix, ->
cb()
deferred.resolve()
else if platform == 'win32'
zipItWin zippath, fileprefix, ->
cb()
deferred.resolve()
else
zipIt zippath, fileprefix, ->
cb()
Expand All @@ -332,7 +358,7 @@ platformOpts.map (plat) ->
#

archOpts.forEach (arch) ->
['deb', 'rpm', 'pacman'].forEach (target) ->
['rpm', 'pacman'].forEach (target) ->
gulp.task "deploy:linux-#{arch}:#{target}:nodep", (done) ->

archNameSuffix = archName
Expand All @@ -350,10 +376,10 @@ archOpts.forEach (arch) ->
suffix = 'tar.gz'
else
suffix = target

if target == 'pacman'
packageName = json.name + '-VERSION-linux-' + archNameSuffix + '-pacman.' + suffix
else
else
packageName = json.name + '-VERSION-linux-' + archNameSuffix + '.' + suffix
iconArgs = [16, 32, 48, 128, 256, 512].map (size) ->
if size < 100
Expand Down Expand Up @@ -409,6 +435,44 @@ archOpts.forEach (arch) ->
gulp.task "deploy:linux-#{arch}:#{target}",
gulp.series("deploy:linux-#{arch}", "deploy:linux-#{arch}:#{target}:nodep")

gulp.task "deploy:linux-#{arch}:deb:nodep", (done) ->

options = {
src: "dist/#{json.name}-linux-#{arch}"
dest: 'dist/'
name: 'YakYak'
genericName: 'IM Client'
productName: 'YakYak'
version: json.version
bin: 'yakyak'
desktopTemplate: 'resources/desktop.ejs'
icon:
'16x16': 'src/icons/icon_016.png'
'32x32': 'src/icons/icon_032.png'
'48x48': 'src/icons/icon_048.png'
'128x128': 'src/icons/icon_128.png',
'256x256': 'src/icons/icon_256.png',
'512x512': 'src/icons/icon_512.png',
'scalable': 'src/icons/yakyak-logo.svg',
categories: [
'GNOME'
'GTK'
'Network'
'InstantMessaging'
]
}

if arch is 'ia32'
options.arch = 'i386'
else
options.arch = 'amd64'

options.rename = (dest, src) -> path.join(dest, "#{json.name}-#{json.version}-linux-#{options.arch}.deb")
debian options

gulp.task "deploy:linux-#{arch}:deb",
gulp.series("deploy:linux-#{arch}", "deploy:linux-#{arch}:deb:nodep")

gulp.task "deploy:linux-#{arch}:flatpak:nodep", (done) ->
flatpakOptions =
id: 'com.github.yakyak.YakYak'
Expand Down
Loading

0 comments on commit 0ef9f14

Please sign in to comment.