TheDesk Mio (ver.3) - 1
This commit is contained in:
parent
de8f063aea
commit
103f0853bb
BIN
app/.DS_Store
vendored
Normal file
BIN
app/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
app/desk.icns
BIN
app/desk.icns
Binary file not shown.
BIN
app/icon.icns
Normal file
BIN
app/icon.icns
Normal file
Binary file not shown.
26
app/main.js
26
app/main.js
|
@ -144,7 +144,7 @@ ipc.on('native-notf', function(e, args) {
|
||||||
ipc.on('update', function(e, x, y) {
|
ipc.on('update', function(e, x, y) {
|
||||||
var platform=process.platform;
|
var platform=process.platform;
|
||||||
var bit=process.arch;
|
var bit=process.arch;
|
||||||
if(platform!="darwin"){
|
if(platform!="others"){
|
||||||
updatewin = new BrowserWindow({
|
updatewin = new BrowserWindow({
|
||||||
width: 600,
|
width: 600,
|
||||||
height: 400,
|
height: 400,
|
||||||
|
@ -202,16 +202,22 @@ ipc.on('shot-img-dl', (e, args) => {
|
||||||
ipc.on('download-btn', (e, args) => {
|
ipc.on('download-btn', (e, args) => {
|
||||||
var platform=process.platform;
|
var platform=process.platform;
|
||||||
var bit=process.arch;
|
var bit=process.arch;
|
||||||
if(platform=="win32"){
|
if(platform=="win32" || platform=="linux" || platform=="darwin" ){
|
||||||
if(bit=="x64"){
|
if(platform=="win32" || bit=="x64"){
|
||||||
var zip="TheDesk-win32-x64.zip";
|
var zip="TheDesk-win32-x64.zip";
|
||||||
}else if(bit=="ia32"){
|
}else if(platform=="win32" || bit=="ia32"){
|
||||||
var zip="TheDesk-win32-ia32.zip";
|
var zip="TheDesk-win32-ia32.zip";
|
||||||
|
}else if(platform=="linux" || bit=="x64"){
|
||||||
|
var zip="TheDesk-linux-x64.zip";
|
||||||
|
}else if(platform=="linux" || bit=="ia32"){
|
||||||
|
var zip="TheDesk-linux-ia32.zip";
|
||||||
|
}else if(platform=="darwin"){
|
||||||
|
var zip="TheDesk-darwin-x64.zip";
|
||||||
}
|
}
|
||||||
}else if(platform=="linux" || platform=="darwin" ){
|
}else{
|
||||||
const options = {
|
const options = {
|
||||||
type: 'info',
|
type: 'info',
|
||||||
title: 'Linux Supporting System',
|
title: 'Other OS Supporting System',
|
||||||
message: "thedesk.topをブラウザで開きます。",
|
message: "thedesk.topをブラウザで開きます。",
|
||||||
buttons: ['OK']
|
buttons: ['OK']
|
||||||
}
|
}
|
||||||
|
@ -236,7 +242,12 @@ ipc.on('download-btn', (e, args) => {
|
||||||
if(!savedFiles){
|
if(!savedFiles){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if(platform=="win32"){
|
||||||
var m = savedFiles.match(/(.+)\\(.+)$/);
|
var m = savedFiles.match(/(.+)\\(.+)$/);
|
||||||
|
}else{
|
||||||
|
var m = savedFiles.match(/(.+)\/(.+)$/);
|
||||||
|
}
|
||||||
|
|
||||||
if(isExistFile(savedFiles)){
|
if(isExistFile(savedFiles)){
|
||||||
fs.statSync(savedFiles);
|
fs.statSync(savedFiles);
|
||||||
fs.unlink(savedFiles);
|
fs.unlink(savedFiles);
|
||||||
|
@ -273,6 +284,8 @@ function dl(ver,files,fullname){
|
||||||
}else if(bit=="ia32"){
|
}else if(bit=="ia32"){
|
||||||
var zip="TheDesk-linux-ia32.zip";
|
var zip="TheDesk-linux-ia32.zip";
|
||||||
}
|
}
|
||||||
|
}else if(platform=="darwin"){
|
||||||
|
var zip="TheDesk-darwin-x64.zip";
|
||||||
}
|
}
|
||||||
zip=zip+"?"+ver;
|
zip=zip+"?"+ver;
|
||||||
var l = 8;
|
var l = 8;
|
||||||
|
@ -352,7 +365,6 @@ ipc.on('itunes', (e, args) => {
|
||||||
const nowplaying = require("itunes-nowplaying-mac")
|
const nowplaying = require("itunes-nowplaying-mac")
|
||||||
|
|
||||||
nowplaying().then(function (value) {
|
nowplaying().then(function (value) {
|
||||||
console.log(value);
|
|
||||||
mainWindow.webContents.send('itunes-np', value);
|
mainWindow.webContents.send('itunes-np', value);
|
||||||
}).catch(function (error) {
|
}).catch(function (error) {
|
||||||
// 非同期処理失敗。呼ばれない
|
// 非同期処理失敗。呼ばれない
|
||||||
|
|
Loading…
Reference in New Issue
Block a user