diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 00000000..11669eca Binary files /dev/null and b/.DS_Store differ diff --git a/app/.DS_Store b/app/.DS_Store new file mode 100644 index 00000000..ac01df14 Binary files /dev/null and b/app/.DS_Store differ diff --git a/app/desk.icns b/app/desk.icns deleted file mode 100644 index 9409991b..00000000 Binary files a/app/desk.icns and /dev/null differ diff --git a/app/icon.icns b/app/icon.icns new file mode 100644 index 00000000..666ae599 Binary files /dev/null and b/app/icon.icns differ diff --git a/app/main.js b/app/main.js index 6d881a29..5d659b6d 100644 --- a/app/main.js +++ b/app/main.js @@ -144,7 +144,7 @@ ipc.on('native-notf', function(e, args) { ipc.on('update', function(e, x, y) { var platform=process.platform; var bit=process.arch; - if(platform!="darwin"){ + if(platform!="others"){ updatewin = new BrowserWindow({ width: 600, height: 400, @@ -202,16 +202,22 @@ ipc.on('shot-img-dl', (e, args) => { ipc.on('download-btn', (e, args) => { var platform=process.platform; var bit=process.arch; - if(platform=="win32"){ - if(bit=="x64"){ + if(platform=="win32" || platform=="linux" || platform=="darwin" ){ + if(platform=="win32" || bit=="x64"){ var zip="TheDesk-win32-x64.zip"; - }else if(bit=="ia32"){ + }else if(platform=="win32" || bit=="ia32"){ 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 = { type: 'info', - title: 'Linux Supporting System', + title: 'Other OS Supporting System', message: "thedesk.topをブラウザで開きます。", buttons: ['OK'] } @@ -236,7 +242,12 @@ ipc.on('download-btn', (e, args) => { if(!savedFiles){ return false; } - var m = savedFiles.match(/(.+)\\(.+)$/); + if(platform=="win32"){ + var m = savedFiles.match(/(.+)\\(.+)$/); + }else{ + var m = savedFiles.match(/(.+)\/(.+)$/); + } + if(isExistFile(savedFiles)){ fs.statSync(savedFiles); fs.unlink(savedFiles); @@ -273,6 +284,8 @@ function dl(ver,files,fullname){ }else if(bit=="ia32"){ var zip="TheDesk-linux-ia32.zip"; } + }else if(platform=="darwin"){ + var zip="TheDesk-darwin-x64.zip"; } zip=zip+"?"+ver; var l = 8; @@ -352,7 +365,6 @@ ipc.on('itunes', (e, args) => { const nowplaying = require("itunes-nowplaying-mac") nowplaying().then(function (value) { - console.log(value); mainWindow.webContents.send('itunes-np', value); }).catch(function (error) { // 非同期処理失敗。呼ばれない