Skip to content

Commit

Permalink
Commit initial
Browse files Browse the repository at this point in the history
  • Loading branch information
BuildTools committed May 8, 2021
0 parents commit 92aa419
Show file tree
Hide file tree
Showing 17 changed files with 4,606 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
dist
.vscode
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
14
46 changes: 46 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
matrix:
include:
- os: osx
osx_image: xcode12.2
language: node_js
node_js: "14"
env:
- ELECTRON_CACHE=$HOME/.cache/electron
- ELECTRON_BUILDER_CACHE=$HOME/.cache/electron-builder
- ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true
- CSC_IDENTITY_AUTO_DISCOVERY=false

- os: linux
services: docker
language: node_js
node_js: "14"
mono:
- latest
env:
- ELECTRON_BUILDER_ALLOW_UNRESOLVED_DEPENDENCIES=true

cache:
directories:
- node_modules
- $HOME/.cache/electron
- $HOME/.cache/electron-builder

script:
- |
if [ "$TRAVIS_OS_NAME" == "linux" ]; then
ENVS=`env | grep -iE '(DEBUG|NODE_|ELECTRON_|YARN_|NPM_|CI|CIRCLE|TRAVIS|APPVEYOR_|CSC_|_TOKEN|_KEY|AWS_|STRIP|BUILD_)' | sed -n '/^[^\t]/s/=.*//p' | sed '/^$/d' | sed 's/^/-e /g' | tr '\n' ' '`
docker run $ENVS --rm \
-v ${PWD}:/project \
-v ~/.cache/electron:/root/.cache/electron \
-v ~/.cache/electron-builder:/root/.cache/electron-builder \
electronuserland/builder:wine \
/bin/bash -c "node -v && yarn install --frozen-lockfile && npm run cilinux"
else
npm run cidarwin
fi
before_cache:
- rm -rf $HOME/.cache/electron-builder/wine

branches:
except:
- "/^v\\d+\\.\\d+\\.\\d+$/"
8 changes: 8 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"search.exclude": {
"**/*.code-search": false,
"**/bower_components": false,
"**/node_modules": false
},
"search.useIgnoreFiles": false
}
10 changes: 10 additions & 0 deletions assets/licence.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
The MIT License (MIT)
Copyright 2021 GeekCorner

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

I am not affilied to Threema.
Binary file added assets/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
77 changes: 77 additions & 0 deletions build.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
const builder = require('electron-builder')
const Platform = builder.Platform

function getCurrentPlatform() {
switch (process.platform) {
case 'win32':
return Platform.WINDOWS
case 'darwin':
return Platform.MAC
case 'linux':
return Platform.linux
default:
console.error('Cannot resolve current platform!')
return undefined
}
}

builder.build({
targets: (process.argv[2] != null && Platform[process.argv[2]] != null ? Platform[process.argv[2]] : getCurrentPlatform()).createTarget(),
config: {
appId: 'threema-for-desktop',
productName: 'Threema For Desktop',
artifactName: 'Threema-For-Desktop-setup-${version}.${ext}',
copyright: 'Copyright © 2018-2021 GeekCorner',
directories: {
buildResources: 'build',
output: 'dist'
},
win: {
target: [
{
target: 'nsis',
arch: ['x64', 'ia32']
}
]
},
nsis: {
oneClick: false,
perMachine: false,
allowElevation: true,
allowToChangeInstallationDirectory: true,
license: './assets/licence.txt',
displayLanguageSelector: true,

},
mac: {
target: [{
target: 'dmg',
arch: ['x64', 'arm64'],
}],
category: 'public.app-category.social-networking'
},
dmg: {
artifactName: 'Threema-For-Desktop-mac-${arch}-${version}.${ext}'
},
linux: {
target: ['AppImage'],
maintainer: 'GeekCorner',
vendor: 'GeekCorner',
synopsis: 'Threema For Desktop',
description: 'Threema For Desktop',
category: 'Office'
},
appImage: {
artifactName: 'Threema-For-Desktop-linux-${version}.${ext}'
},
compression: 'maximum',
files: [
'!{dist,.gitignore,.vscode,docs,dev-app-update.yml,.travis.yml,.nvmrc,.eslintrc.json,build.js}'
],
asar: true
}
}).then(() => {
console.log('Build complete!')
}).catch(err => {
console.error('Error during build!', err)
})
Binary file added build/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added build/installerSidebar.bmp
Binary file not shown.
1 change: 1 addition & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<script src="./renderer.js"></script>
Loading

0 comments on commit 92aa419

Please sign in to comment.