diff --git a/MS-Office-Electron-Linux-AppImage/Intro Image.png b/MS-Office-Electron-Linux-AppImage/Intro Image.png new file mode 100644 index 0000000..29c6ce0 Binary files /dev/null and b/MS-Office-Electron-Linux-AppImage/Intro Image.png differ diff --git a/MS-Office-Electron-Linux-AppImage/Loading.gif b/MS-Office-Electron-Linux-AppImage/Loading.gif new file mode 100644 index 0000000..afaaffd Binary files /dev/null and b/MS-Office-Electron-Linux-AppImage/Loading.gif differ diff --git a/MS-Office-Electron-Linux-AppImage/icon.icns b/MS-Office-Electron-Linux-AppImage/icon.icns new file mode 100644 index 0000000..0f1e069 Binary files /dev/null and b/MS-Office-Electron-Linux-AppImage/icon.icns differ diff --git a/MS-Office-Electron-Linux-AppImage/icon.png b/MS-Office-Electron-Linux-AppImage/icon.png new file mode 100644 index 0000000..0cb5e3e Binary files /dev/null and b/MS-Office-Electron-Linux-AppImage/icon.png differ diff --git a/MS-Office-Electron-Linux-AppImage/icon2.png b/MS-Office-Electron-Linux-AppImage/icon2.png new file mode 100644 index 0000000..b0e14ee Binary files /dev/null and b/MS-Office-Electron-Linux-AppImage/icon2.png differ diff --git a/MS-Office-Electron-Linux-AppImage/icons/icon.ico b/MS-Office-Electron-Linux-AppImage/icons/icon.ico new file mode 100644 index 0000000..5c1bb24 Binary files /dev/null and b/MS-Office-Electron-Linux-AppImage/icons/icon.ico differ diff --git a/MS-Office-Electron-Linux-AppImage/icons/icon.png b/MS-Office-Electron-Linux-AppImage/icons/icon.png new file mode 100644 index 0000000..0cb5e3e Binary files /dev/null and b/MS-Office-Electron-Linux-AppImage/icons/icon.png differ diff --git a/MS-Office-Electron-Linux-AppImage/icons/icon2.png b/MS-Office-Electron-Linux-AppImage/icons/icon2.png new file mode 100644 index 0000000..b0e14ee Binary files /dev/null and b/MS-Office-Electron-Linux-AppImage/icons/icon2.png differ diff --git a/MS-Office-Electron-Linux-AppImage/license.txt b/MS-Office-Electron-Linux-AppImage/license.txt new file mode 100644 index 0000000..5e0b4f2 --- /dev/null +++ b/MS-Office-Electron-Linux-AppImage/license.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Agampreet Singh Bajaj + +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. diff --git a/MS-Office-Electron-Linux-AppImage/main.js b/MS-Office-Electron-Linux-AppImage/main.js new file mode 100644 index 0000000..9204a5f --- /dev/null +++ b/MS-Office-Electron-Linux-AppImage/main.js @@ -0,0 +1,180 @@ +const { app, Menu, BrowserWindow } = require('electron') +const { dialog } = require('electron') +const openAboutWindow = require('about-window').default; +const join = require('path').join; +const isMac = process.platform === 'darwin' +const path = require('path') +const electron = require('electron') +const {autoUpdater} = require("electron-updater"); +const isOnline = require('is-online'); + + +const template = [ + // { role: 'appMenu' } + ...(isMac ? [{ + label: app.name, + submenu: [ + { role: 'about' }, + { type: 'separator' }, + { role: 'services' }, + { type: 'separator' }, + { role: 'hide' }, + { role: 'hideothers' }, + { role: 'unhide' }, + { type: 'separator' }, + { role: 'quit' } + ] + }] : []), + // { role: 'fileMenu' } + { + label: 'Application', + submenu: [ + { + label: 'About MS Office - Electron', + click: () => + openAboutWindow({ + icon_path: 'https://github.com/agam778/MS-Office-Electron/blob/main/icon2.png?raw=true', + product_name: 'MS Office - Electron', + copyright: 'Copyright (c) 2021 Agampreet Singh Bajaj', + package_json_dir: __dirname, + bug_report_url: 'https://github.com/agam778/Microsoft-Office-Electron/issues/', + bug_link_text: 'Report an issue', + adjust_window_size: '2', + show_close_button: 'Close', + + }), + }, + { + label: 'Learn More', + click: async () => { + const { shell } = require('electron'); + await shell.openExternal('https://github.com/agam778/MS-Office-Electron'); +} +}, + {type:'separator'}, + { + role: 'quit', + accelerator: process.platform === 'darwin' ? 'Ctrl+Q' : 'Ctrl+Q', + } + + ] + }, + // { role: 'editMenu' } + { + label: 'Edit', + submenu: [ + { role: 'undo' }, + { role: 'redo' }, + { type: 'separator' }, + { role: 'cut' }, + { role: 'copy' }, + { role: 'paste' }, + ...(isMac ? [ + { role: 'pasteAndMatchStyle' }, + { role: 'delete' }, + { role: 'selectAll' }, + { type: 'separator' }, + { + label: 'Speech', + submenu: [ + { role: 'startSpeaking' }, + { role: 'stopSpeaking' } + ] + } + ] : [ + { role: 'delete' }, + { type: 'separator' }, + { role: 'selectAll' } + ]) + ] + }, + // { role: 'viewMenu' } + { + label: 'View', + submenu: [ + { role: 'reload' }, + { role: 'forceReload' }, + { role: 'toggleDevTools' }, + { type: 'separator' }, + { role: 'resetZoom' }, + { role: 'zoomIn', + accelerator: process.platform === 'darwin' ? 'Control+=' : 'Control+=' }, + { role: 'zoomOut' }, + { type: 'separator' }, + { role: 'togglefullscreen' } + ] + }, + // { role: 'windowMenu' } + { + label: 'Window', + submenu: [ + { role: 'minimize' }, + { role: 'zoom' }, + ...(isMac ? [ + { type: 'separator' }, + { role: 'front' }, + { type: 'separator' }, + { role: 'window' } + ] : [ + { role: 'close' } + ]) + ] + } +] + +const menu = Menu.buildFromTemplate(template) +Menu.setApplicationMenu(menu) + +function createWindow () { + const win = new BrowserWindow({ + width: 1181, + height: 670, + icon: './icon.png', + webPreferences: { + nodeIntegration: true + } + }) + + win.loadURL('https://agam778.gitlab.io/Microsoft-Office-Electron/', +{userAgent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36'}); +} + +app.whenReady().then(createWindow) + +app.on('window-all-closed', () => { + if (process.platform !== 'darwin') { + app.quit() + } +}) + +app.on('activate', () => { + if (BrowserWindow.getAllWindows().length === 0) { + createWindow() + } +}) + +try { + require('electron-reloader')(module) +} catch (_) {} + +app.on('ready', function() { + isOnline().then(online => { + if(online){ + console.log("You are connected to the internet!"); + }else{ + const options = { + type: 'warning', + buttons: ['Ok'], + defaultId: 2, + title: 'Warning', + message: 'You appear to be offline!', + detail: 'Please check your Internet Connectivity. This app cannot run without an Internet Connection!', + }; + + dialog.showMessageBox(null, options, (response, checkboxChecked) => { + console.log(response); + });; + } +}); + autoUpdater.checkForUpdatesAndNotify(); +}); diff --git a/MS-Office-Electron-Linux-AppImage/package.json b/MS-Office-Electron-Linux-AppImage/package.json new file mode 100644 index 0000000..422f5e1 --- /dev/null +++ b/MS-Office-Electron-Linux-AppImage/package.json @@ -0,0 +1,89 @@ +{ + "name": "ms-office-electron", + "version": "0.2.1", + "description": "An Unofficial Microsoft Office Online Desktop Client. Free of Cost.", + "main": "main.js", + "repository": { + "type": "git", + "url": "https://github.com/agam778/MS-Office-Electron.git" + }, + "build": { + "extraFiles": [ + "index.html", + "Intro Image.png", + "Loading.gif", + "icon.png", + "icon.ico", + "license.txt", + "icon2.png" + ], + "appId": "com.agampreet.microsoft-office-electron", + "productName": "MS Office - Electron", + "linux": { + "category": "Office", + "desktop": { + "Comment": "An Unofficial Microsoft Office Online Desktop Client. Free of Cost.", + "Name": "MS Office - Electron", + "StartupNotify": "true", + "Terminal": "false", + "Type": "Application", + "Categories": "Office;" + }, + "icon": "icon.icns", + "artifactName": "${productName}-Setup-${version}-x86_64.${ext}", + "executableName": "MS Office - Electron", + "maintainer": "Agampreet Singh ", + "target": [ + "AppImage" + ] + }, + "deb": { + "compression": "bzip2" + }, + "mac": { + "category": "public.app-category.office", + "target": [ + "dmg" + ] + }, + "nsis": { + "oneClick": false, + "perMachine": false, + "allowToChangeInstallationDirectory": false, + "license": "license.txt" + }, + "win": { + "target": [ + "nsis" + ] + }, + "directories": { + "output": "release" + } + }, + "scripts": { + "start": "electron .", + "pack": "electron-builder --dir", + "dist": "electron-builder" + }, + "author": { + "author": "Agampreet Singh", + "email": "agam778@zohomail.in", + "url": "https://agam778.github.io/" + }, + "license": "MIT", + "devDependencies": { + "electron": "^12.0.0", + "electron-builder": "^22.10.5", + "electron-reloader": "^1.2.1" + }, + "dependencies": { + "about-window": "^1.14.0", + "custom-electron-titlebar": "^3.2.7", + "electron-reload": "^1.5.0", + "electron-updater": "^4.3.9", + "is-online": "^9.0.1", + "node-notifier": "^10.0.0", + "update-electron-app": "^2.0.1" + } +} diff --git a/MS-Office-Electron-Linux/Intro Image.png b/MS-Office-Electron-Linux/Intro Image.png new file mode 100644 index 0000000..29c6ce0 Binary files /dev/null and b/MS-Office-Electron-Linux/Intro Image.png differ diff --git a/MS-Office-Electron-Linux/Loading.gif b/MS-Office-Electron-Linux/Loading.gif new file mode 100644 index 0000000..afaaffd Binary files /dev/null and b/MS-Office-Electron-Linux/Loading.gif differ diff --git a/MS-Office-Electron-Linux/icon.icns b/MS-Office-Electron-Linux/icon.icns new file mode 100644 index 0000000..0f1e069 Binary files /dev/null and b/MS-Office-Electron-Linux/icon.icns differ diff --git a/MS-Office-Electron-Linux/icon.png b/MS-Office-Electron-Linux/icon.png new file mode 100644 index 0000000..0cb5e3e Binary files /dev/null and b/MS-Office-Electron-Linux/icon.png differ diff --git a/MS-Office-Electron-Linux/icon2.png b/MS-Office-Electron-Linux/icon2.png new file mode 100644 index 0000000..b0e14ee Binary files /dev/null and b/MS-Office-Electron-Linux/icon2.png differ diff --git a/MS-Office-Electron-Linux/icons/icon.ico b/MS-Office-Electron-Linux/icons/icon.ico new file mode 100644 index 0000000..5c1bb24 Binary files /dev/null and b/MS-Office-Electron-Linux/icons/icon.ico differ diff --git a/MS-Office-Electron-Linux/icons/icon.png b/MS-Office-Electron-Linux/icons/icon.png new file mode 100644 index 0000000..0cb5e3e Binary files /dev/null and b/MS-Office-Electron-Linux/icons/icon.png differ diff --git a/MS-Office-Electron-Linux/icons/icon2.png b/MS-Office-Electron-Linux/icons/icon2.png new file mode 100644 index 0000000..b0e14ee Binary files /dev/null and b/MS-Office-Electron-Linux/icons/icon2.png differ diff --git a/MS-Office-Electron-Linux/license.txt b/MS-Office-Electron-Linux/license.txt new file mode 100644 index 0000000..5e0b4f2 --- /dev/null +++ b/MS-Office-Electron-Linux/license.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Agampreet Singh Bajaj + +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. diff --git a/MS-Office-Electron-Linux/main.js b/MS-Office-Electron-Linux/main.js new file mode 100644 index 0000000..9204a5f --- /dev/null +++ b/MS-Office-Electron-Linux/main.js @@ -0,0 +1,180 @@ +const { app, Menu, BrowserWindow } = require('electron') +const { dialog } = require('electron') +const openAboutWindow = require('about-window').default; +const join = require('path').join; +const isMac = process.platform === 'darwin' +const path = require('path') +const electron = require('electron') +const {autoUpdater} = require("electron-updater"); +const isOnline = require('is-online'); + + +const template = [ + // { role: 'appMenu' } + ...(isMac ? [{ + label: app.name, + submenu: [ + { role: 'about' }, + { type: 'separator' }, + { role: 'services' }, + { type: 'separator' }, + { role: 'hide' }, + { role: 'hideothers' }, + { role: 'unhide' }, + { type: 'separator' }, + { role: 'quit' } + ] + }] : []), + // { role: 'fileMenu' } + { + label: 'Application', + submenu: [ + { + label: 'About MS Office - Electron', + click: () => + openAboutWindow({ + icon_path: 'https://github.com/agam778/MS-Office-Electron/blob/main/icon2.png?raw=true', + product_name: 'MS Office - Electron', + copyright: 'Copyright (c) 2021 Agampreet Singh Bajaj', + package_json_dir: __dirname, + bug_report_url: 'https://github.com/agam778/Microsoft-Office-Electron/issues/', + bug_link_text: 'Report an issue', + adjust_window_size: '2', + show_close_button: 'Close', + + }), + }, + { + label: 'Learn More', + click: async () => { + const { shell } = require('electron'); + await shell.openExternal('https://github.com/agam778/MS-Office-Electron'); +} +}, + {type:'separator'}, + { + role: 'quit', + accelerator: process.platform === 'darwin' ? 'Ctrl+Q' : 'Ctrl+Q', + } + + ] + }, + // { role: 'editMenu' } + { + label: 'Edit', + submenu: [ + { role: 'undo' }, + { role: 'redo' }, + { type: 'separator' }, + { role: 'cut' }, + { role: 'copy' }, + { role: 'paste' }, + ...(isMac ? [ + { role: 'pasteAndMatchStyle' }, + { role: 'delete' }, + { role: 'selectAll' }, + { type: 'separator' }, + { + label: 'Speech', + submenu: [ + { role: 'startSpeaking' }, + { role: 'stopSpeaking' } + ] + } + ] : [ + { role: 'delete' }, + { type: 'separator' }, + { role: 'selectAll' } + ]) + ] + }, + // { role: 'viewMenu' } + { + label: 'View', + submenu: [ + { role: 'reload' }, + { role: 'forceReload' }, + { role: 'toggleDevTools' }, + { type: 'separator' }, + { role: 'resetZoom' }, + { role: 'zoomIn', + accelerator: process.platform === 'darwin' ? 'Control+=' : 'Control+=' }, + { role: 'zoomOut' }, + { type: 'separator' }, + { role: 'togglefullscreen' } + ] + }, + // { role: 'windowMenu' } + { + label: 'Window', + submenu: [ + { role: 'minimize' }, + { role: 'zoom' }, + ...(isMac ? [ + { type: 'separator' }, + { role: 'front' }, + { type: 'separator' }, + { role: 'window' } + ] : [ + { role: 'close' } + ]) + ] + } +] + +const menu = Menu.buildFromTemplate(template) +Menu.setApplicationMenu(menu) + +function createWindow () { + const win = new BrowserWindow({ + width: 1181, + height: 670, + icon: './icon.png', + webPreferences: { + nodeIntegration: true + } + }) + + win.loadURL('https://agam778.gitlab.io/Microsoft-Office-Electron/', +{userAgent: 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.164 Safari/537.36'}); +} + +app.whenReady().then(createWindow) + +app.on('window-all-closed', () => { + if (process.platform !== 'darwin') { + app.quit() + } +}) + +app.on('activate', () => { + if (BrowserWindow.getAllWindows().length === 0) { + createWindow() + } +}) + +try { + require('electron-reloader')(module) +} catch (_) {} + +app.on('ready', function() { + isOnline().then(online => { + if(online){ + console.log("You are connected to the internet!"); + }else{ + const options = { + type: 'warning', + buttons: ['Ok'], + defaultId: 2, + title: 'Warning', + message: 'You appear to be offline!', + detail: 'Please check your Internet Connectivity. This app cannot run without an Internet Connection!', + }; + + dialog.showMessageBox(null, options, (response, checkboxChecked) => { + console.log(response); + });; + } +}); + autoUpdater.checkForUpdatesAndNotify(); +}); diff --git a/MS-Office-Electron-Linux/package.json b/MS-Office-Electron-Linux/package.json new file mode 100644 index 0000000..034257e --- /dev/null +++ b/MS-Office-Electron-Linux/package.json @@ -0,0 +1,89 @@ +{ + "name": "ms-office-electron", + "version": "0.2.1", + "description": "An Unofficial Microsoft Office Online Desktop Client. Free of Cost.", + "main": "main.js", + "repository": { + "type": "git", + "url": "https://github.com/agam778/MS-Office-Electron.git" + }, + "build": { + "extraFiles": [ + "index.html", + "Intro Image.png", + "Loading.gif", + "icon.png", + "icon.ico", + "license.txt", + "icon2.png" + ], + "appId": "com.agampreet.microsoft-office-electron", + "productName": "MS Office - Electron", + "linux": { + "category": "Office", + "desktop": { + "Comment": "An Unofficial Microsoft Office Online Desktop Client. Free of Cost.", + "Name": "MS Office - Electron", + "StartupNotify": "true", + "Terminal": "false", + "Type": "Application", + "Categories": "Office;" + }, + "icon": "icon.icns", + "executableName": "MS Office - Electron", + "maintainer": "Agampreet Singh ", + "target": [ + "deb", + "rpm" + ] + }, + "deb": { + "compression": "bzip2" + }, + "mac": { + "category": "public.app-category.office", + "target": [ + "dmg" + ] + }, + "nsis": { + "oneClick": false, + "perMachine": false, + "allowToChangeInstallationDirectory": false, + "license": "license.txt" + }, + "win": { + "target": [ + "nsis" + ] + }, + "directories": { + "output": "release" + } + }, + "scripts": { + "start": "electron .", + "pack": "electron-builder --dir", + "dist": "electron-builder" + }, + "author": { + "author": "Agampreet Singh", + "email": "agam778@zohomail.in", + "url": "https://agam778.github.io/" + }, + "license": "MIT", + "devDependencies": { + "electron": "^12.0.0", + "electron-builder": "^22.10.5", + "electron-reloader": "^1.2.1" + }, + "dependencies": { + "about-window": "^1.14.0", + "custom-electron-titlebar": "^3.2.7", + "electron-reload": "^1.5.0", + "electron-updater": "^4.3.9", + "is-online": "^9.0.1", + "node-notifier": "^10.0.0", + "update-electron-app": "^2.0.1" + } +} diff --git a/MS-Office-Electron-Mac/Intro Image.png b/MS-Office-Electron-Mac/Intro Image.png new file mode 100644 index 0000000..29c6ce0 Binary files /dev/null and b/MS-Office-Electron-Mac/Intro Image.png differ diff --git a/MS-Office-Electron-Mac/Loading.gif b/MS-Office-Electron-Mac/Loading.gif new file mode 100644 index 0000000..afaaffd Binary files /dev/null and b/MS-Office-Electron-Mac/Loading.gif differ diff --git a/MS-Office-Electron-Mac/icon.icns b/MS-Office-Electron-Mac/icon.icns new file mode 100644 index 0000000..b263742 Binary files /dev/null and b/MS-Office-Electron-Mac/icon.icns differ diff --git a/MS-Office-Electron-Mac/icon.png b/MS-Office-Electron-Mac/icon.png new file mode 100644 index 0000000..0cb5e3e Binary files /dev/null and b/MS-Office-Electron-Mac/icon.png differ diff --git a/MS-Office-Electron-Mac/icon2.png b/MS-Office-Electron-Mac/icon2.png new file mode 100644 index 0000000..b0e14ee Binary files /dev/null and b/MS-Office-Electron-Mac/icon2.png differ diff --git a/MS-Office-Electron-Mac/icons/icon.ico b/MS-Office-Electron-Mac/icons/icon.ico new file mode 100644 index 0000000..5c1bb24 Binary files /dev/null and b/MS-Office-Electron-Mac/icons/icon.ico differ diff --git a/MS-Office-Electron-Mac/icons/icon.png b/MS-Office-Electron-Mac/icons/icon.png new file mode 100644 index 0000000..0cb5e3e Binary files /dev/null and b/MS-Office-Electron-Mac/icons/icon.png differ diff --git a/MS-Office-Electron-Mac/icons/icon2.png b/MS-Office-Electron-Mac/icons/icon2.png new file mode 100644 index 0000000..b0e14ee Binary files /dev/null and b/MS-Office-Electron-Mac/icons/icon2.png differ diff --git a/MS-Office-Electron-Mac/license.txt b/MS-Office-Electron-Mac/license.txt new file mode 100644 index 0000000..5e0b4f2 --- /dev/null +++ b/MS-Office-Electron-Mac/license.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Agampreet Singh Bajaj + +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. diff --git a/MS-Office-Electron-Mac/main.js b/MS-Office-Electron-Mac/main.js new file mode 100644 index 0000000..eda415d --- /dev/null +++ b/MS-Office-Electron-Mac/main.js @@ -0,0 +1,180 @@ +const { app, Menu, BrowserWindow } = require('electron') +const { dialog } = require('electron') +const openAboutWindow = require('about-window').default; +const join = require('path').join; +const isMac = process.platform === 'darwin' +const path = require('path') +const electron = require('electron') +const {autoUpdater} = require("electron-updater"); +const isOnline = require('is-online'); + + +const template = [ + // { role: 'appMenu' } + ...(isMac ? [{ + label: app.name, + submenu: [ + { role: 'about' }, + { type: 'separator' }, + { role: 'services' }, + { type: 'separator' }, + { role: 'hide' }, + { role: 'hideothers' }, + { role: 'unhide' }, + { type: 'separator' }, + { role: 'quit' } + ] + }] : []), + // { role: 'fileMenu' } + { + label: 'Application', + submenu: [ + { + label: 'About MS Office - Electron', + click: () => + openAboutWindow({ + icon_path: 'https://github.com/agam778/MS-Office-Electron/blob/main/icon2.png?raw=true', + product_name: 'MS Office - Electron', + copyright: 'Copyright (c) 2021 Agampreet Singh Bajaj', + package_json_dir: __dirname, + bug_report_url: 'https://github.com/agam778/Microsoft-Office-Electron/issues/', + bug_link_text: 'Report an issue', + adjust_window_size: '2', + show_close_button: 'Close', + + }), + }, + { + label: 'Learn More', + click: async () => { + const { shell } = require('electron'); + await shell.openExternal('https://github.com/agam778/MS-Office-Electron'); +} +}, + {type:'separator'}, + { + role: 'quit', + accelerator: process.platform === 'darwin' ? 'Ctrl+Q' : 'Ctrl+Q', + } + + ] + }, + // { role: 'editMenu' } + { + label: 'Edit', + submenu: [ + { role: 'undo' }, + { role: 'redo' }, + { type: 'separator' }, + { role: 'cut' }, + { role: 'copy' }, + { role: 'paste' }, + ...(isMac ? [ + { role: 'pasteAndMatchStyle' }, + { role: 'delete' }, + { role: 'selectAll' }, + { type: 'separator' }, + { + label: 'Speech', + submenu: [ + { role: 'startSpeaking' }, + { role: 'stopSpeaking' } + ] + } + ] : [ + { role: 'delete' }, + { type: 'separator' }, + { role: 'selectAll' } + ]) + ] + }, + // { role: 'viewMenu' } + { + label: 'View', + submenu: [ + { role: 'reload' }, + { role: 'forceReload' }, + { role: 'toggleDevTools' }, + { type: 'separator' }, + { role: 'resetZoom' }, + { role: 'zoomIn', + accelerator: process.platform === 'darwin' ? 'Control+=' : 'Control+=' }, + { role: 'zoomOut' }, + { type: 'separator' }, + { role: 'togglefullscreen' } + ] + }, + // { role: 'windowMenu' } + { + label: 'Window', + submenu: [ + { role: 'minimize' }, + { role: 'zoom' }, + ...(isMac ? [ + { type: 'separator' }, + { role: 'front' }, + { type: 'separator' }, + { role: 'window' } + ] : [ + { role: 'close' } + ]) + ] + } +] + +const menu = Menu.buildFromTemplate(template) +Menu.setApplicationMenu(menu) + +function createWindow () { + const win = new BrowserWindow({ + width: 1181, + height: 670, + icon: './icon.png', + webPreferences: { + nodeIntegration: true + } + }) + + win.loadURL('https://agam778.gitlab.io/Microsoft-Office-Electron/', +{userAgent: 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_5_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.131 Safari/537.36'}); +} + +app.whenReady().then(createWindow) + +app.on('window-all-closed', () => { + if (process.platform !== 'darwin') { + app.quit() + } +}) + +app.on('activate', () => { + if (BrowserWindow.getAllWindows().length === 0) { + createWindow() + } +}) + +try { + require('electron-reloader')(module) +} catch (_) {} + +app.on('ready', function() { + isOnline().then(online => { + if(online){ + console.log("You are connected to the internet!"); + }else{ + const options = { + type: 'warning', + buttons: ['Ok'], + defaultId: 2, + title: 'Warning', + message: 'You appear to be offline!', + detail: 'Please check your Internet Connectivity. This app cannot run without an Internet Connection!', + }; + + dialog.showMessageBox(null, options, (response, checkboxChecked) => { + console.log(response); + });; + } +}); + autoUpdater.checkForUpdatesAndNotify(); +}); diff --git a/MS-Office-Electron-Mac/package.json b/MS-Office-Electron-Mac/package.json new file mode 100644 index 0000000..034257e --- /dev/null +++ b/MS-Office-Electron-Mac/package.json @@ -0,0 +1,89 @@ +{ + "name": "ms-office-electron", + "version": "0.2.1", + "description": "An Unofficial Microsoft Office Online Desktop Client. Free of Cost.", + "main": "main.js", + "repository": { + "type": "git", + "url": "https://github.com/agam778/MS-Office-Electron.git" + }, + "build": { + "extraFiles": [ + "index.html", + "Intro Image.png", + "Loading.gif", + "icon.png", + "icon.ico", + "license.txt", + "icon2.png" + ], + "appId": "com.agampreet.microsoft-office-electron", + "productName": "MS Office - Electron", + "linux": { + "category": "Office", + "desktop": { + "Comment": "An Unofficial Microsoft Office Online Desktop Client. Free of Cost.", + "Name": "MS Office - Electron", + "StartupNotify": "true", + "Terminal": "false", + "Type": "Application", + "Categories": "Office;" + }, + "icon": "icon.icns", + "executableName": "MS Office - Electron", + "maintainer": "Agampreet Singh ", + "target": [ + "deb", + "rpm" + ] + }, + "deb": { + "compression": "bzip2" + }, + "mac": { + "category": "public.app-category.office", + "target": [ + "dmg" + ] + }, + "nsis": { + "oneClick": false, + "perMachine": false, + "allowToChangeInstallationDirectory": false, + "license": "license.txt" + }, + "win": { + "target": [ + "nsis" + ] + }, + "directories": { + "output": "release" + } + }, + "scripts": { + "start": "electron .", + "pack": "electron-builder --dir", + "dist": "electron-builder" + }, + "author": { + "author": "Agampreet Singh", + "email": "agam778@zohomail.in", + "url": "https://agam778.github.io/" + }, + "license": "MIT", + "devDependencies": { + "electron": "^12.0.0", + "electron-builder": "^22.10.5", + "electron-reloader": "^1.2.1" + }, + "dependencies": { + "about-window": "^1.14.0", + "custom-electron-titlebar": "^3.2.7", + "electron-reload": "^1.5.0", + "electron-updater": "^4.3.9", + "is-online": "^9.0.1", + "node-notifier": "^10.0.0", + "update-electron-app": "^2.0.1" + } +} diff --git a/MS-Office-Electron-Windows/.vscode/tasks.json b/MS-Office-Electron-Windows/.vscode/tasks.json new file mode 100644 index 0000000..443995c --- /dev/null +++ b/MS-Office-Electron-Windows/.vscode/tasks.json @@ -0,0 +1,12 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "type": "npm", + "script": "start", + "problemMatcher": [], + "label": "npm: start", + "detail": "electron ." + } + ] +} \ No newline at end of file diff --git a/MS-Office-Electron-Windows/Intro Image.png b/MS-Office-Electron-Windows/Intro Image.png new file mode 100644 index 0000000..29c6ce0 Binary files /dev/null and b/MS-Office-Electron-Windows/Intro Image.png differ diff --git a/MS-Office-Electron-Windows/Loading.gif b/MS-Office-Electron-Windows/Loading.gif new file mode 100644 index 0000000..afaaffd Binary files /dev/null and b/MS-Office-Electron-Windows/Loading.gif differ diff --git a/MS-Office-Electron-Windows/icon.ico b/MS-Office-Electron-Windows/icon.ico new file mode 100644 index 0000000..5c1bb24 Binary files /dev/null and b/MS-Office-Electron-Windows/icon.ico differ diff --git a/MS-Office-Electron-Windows/icon.png b/MS-Office-Electron-Windows/icon.png new file mode 100644 index 0000000..0cb5e3e Binary files /dev/null and b/MS-Office-Electron-Windows/icon.png differ diff --git a/MS-Office-Electron-Windows/icon2.png b/MS-Office-Electron-Windows/icon2.png new file mode 100644 index 0000000..b0e14ee Binary files /dev/null and b/MS-Office-Electron-Windows/icon2.png differ diff --git a/MS-Office-Electron-Windows/icons/icon.ico b/MS-Office-Electron-Windows/icons/icon.ico new file mode 100644 index 0000000..5c1bb24 Binary files /dev/null and b/MS-Office-Electron-Windows/icons/icon.ico differ diff --git a/MS-Office-Electron-Windows/icons/icon.png b/MS-Office-Electron-Windows/icons/icon.png new file mode 100644 index 0000000..0cb5e3e Binary files /dev/null and b/MS-Office-Electron-Windows/icons/icon.png differ diff --git a/MS-Office-Electron-Windows/icons/icon2.png b/MS-Office-Electron-Windows/icons/icon2.png new file mode 100644 index 0000000..b0e14ee Binary files /dev/null and b/MS-Office-Electron-Windows/icons/icon2.png differ diff --git a/MS-Office-Electron-Windows/index.html b/MS-Office-Electron-Windows/index.html new file mode 100644 index 0000000..b4403f0 --- /dev/null +++ b/MS-Office-Electron-Windows/index.html @@ -0,0 +1,24 @@ + + + + + Microsoft Office - Electron + + +
+ +

+

This is Microsoft Office - Electron


+ No Money Needed. Free of Cost Microsoft Office made with ElectronJS

+ If you want to use Dark Mode, Please set the theme to Black in Microsoft Office +


Please wait while the website loads.



+ Loading + + +
+
+ + diff --git a/MS-Office-Electron-Windows/license.txt b/MS-Office-Electron-Windows/license.txt new file mode 100644 index 0000000..5e0b4f2 --- /dev/null +++ b/MS-Office-Electron-Windows/license.txt @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2021 Agampreet Singh Bajaj + +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. diff --git a/MS-Office-Electron-Windows/main.js b/MS-Office-Electron-Windows/main.js new file mode 100644 index 0000000..773ab6e --- /dev/null +++ b/MS-Office-Electron-Windows/main.js @@ -0,0 +1,180 @@ +const { app, Menu, BrowserWindow } = require('electron') +const { dialog } = require('electron') +const openAboutWindow = require('about-window').default; +const join = require('path').join; +const isMac = process.platform === 'darwin' +const path = require('path') +const electron = require('electron') +const {autoUpdater} = require("electron-updater"); +const isOnline = require('is-online'); + + +const template = [ + // { role: 'appMenu' } + ...(isMac ? [{ + label: app.name, + submenu: [ + { role: 'about' }, + { type: 'separator' }, + { role: 'services' }, + { type: 'separator' }, + { role: 'hide' }, + { role: 'hideothers' }, + { role: 'unhide' }, + { type: 'separator' }, + { role: 'quit' } + ] + }] : []), + // { role: 'fileMenu' } + { + label: 'Application', + submenu: [ + { + label: 'About MS Office - Electron', + click: () => + openAboutWindow({ + icon_path: 'https://github.com/agam778/MS-Office-Electron/blob/main/icon2.png?raw=true', + product_name: 'MS Office - Electron', + copyright: 'Copyright (c) 2021 Agampreet Singh Bajaj', + package_json_dir: __dirname, + bug_report_url: 'https://github.com/agam778/Microsoft-Office-Electron/issues/', + bug_link_text: 'Report an issue', + adjust_window_size: '2', + show_close_button: 'Close', + + }), + }, + { + label: 'Learn More', + click: async () => { + const { shell } = require('electron'); + await shell.openExternal('https://github.com/agam778/MS-Office-Electron'); +} +}, + {type:'separator'}, + { + role: 'quit', + accelerator: process.platform === 'darwin' ? 'Ctrl+Q' : 'Ctrl+Q', + } + + ] + }, + // { role: 'editMenu' } + { + label: 'Edit', + submenu: [ + { role: 'undo' }, + { role: 'redo' }, + { type: 'separator' }, + { role: 'cut' }, + { role: 'copy' }, + { role: 'paste' }, + ...(isMac ? [ + { role: 'pasteAndMatchStyle' }, + { role: 'delete' }, + { role: 'selectAll' }, + { type: 'separator' }, + { + label: 'Speech', + submenu: [ + { role: 'startSpeaking' }, + { role: 'stopSpeaking' } + ] + } + ] : [ + { role: 'delete' }, + { type: 'separator' }, + { role: 'selectAll' } + ]) + ] + }, + // { role: 'viewMenu' } + { + label: 'View', + submenu: [ + { role: 'reload' }, + { role: 'forceReload' }, + { role: 'toggleDevTools' }, + { type: 'separator' }, + { role: 'resetZoom' }, + { role: 'zoomIn', + accelerator: process.platform === 'darwin' ? 'Control+=' : 'Control+=' }, + { role: 'zoomOut' }, + { type: 'separator' }, + { role: 'togglefullscreen' } + ] + }, + // { role: 'windowMenu' } + { + label: 'Window', + submenu: [ + { role: 'minimize' }, + { role: 'zoom' }, + ...(isMac ? [ + { type: 'separator' }, + { role: 'front' }, + { type: 'separator' }, + { role: 'window' } + ] : [ + { role: 'close' } + ]) + ] + } +] + +const menu = Menu.buildFromTemplate(template) +Menu.setApplicationMenu(menu) + +function createWindow () { + const win = new BrowserWindow({ + width: 1181, + height: 670, + icon: './icon.png', + webPreferences: { + nodeIntegration: true + } + }) + + win.loadURL('https://agam778.gitlab.io/Microsoft-Office-Electron/', +{userAgent: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/92.0.4515.107 Safari/537.36'}); +} + +app.whenReady().then(createWindow) + +app.on('window-all-closed', () => { + if (process.platform !== 'darwin') { + app.quit() + } +}) + +app.on('activate', () => { + if (BrowserWindow.getAllWindows().length === 0) { + createWindow() + } +}) + +try { + require('electron-reloader')(module) +} catch (_) {} + +app.on('ready', function() { + isOnline().then(online => { + if(online){ + console.log("You are connected to the internet!"); + }else{ + const options = { + type: 'warning', + buttons: ['Ok'], + defaultId: 2, + title: 'Warning', + message: 'You appear to be offline!', + detail: 'Please check your Internet Connectivity. This app cannot run without an Internet Connection!', + }; + + dialog.showMessageBox(null, options, (response, checkboxChecked) => { + console.log(response); + });; + } +}); + autoUpdater.checkForUpdatesAndNotify(); +}); diff --git a/MS-Office-Electron-Windows/package.json b/MS-Office-Electron-Windows/package.json new file mode 100644 index 0000000..24240a9 --- /dev/null +++ b/MS-Office-Electron-Windows/package.json @@ -0,0 +1,90 @@ +{ + "name": "ms-office-electron", + "version": "0.2.1", + "description": "An Unofficial Microsoft Office Online Desktop Client. Free of Cost.", + "main": "main.js", + "repository": { + "type": "git", + "url": "https://github.com/agam778/MS-Office-Electron.git" + }, + "build": { + "extraFiles": [ + "index.html", + "Intro Image.png", + "Loading.gif", + "icon.png", + "icon.ico", + "license.txt", + "icon2.png" + ], + "appId": "com.agampreet.microsoft-office-electron", + "productName": "MS Office - Electron", + "linux": { + "category": "Office", + "desktop": { + "Comment": "An Unofficial Microsoft Office Online Desktop Client. Free of Cost.", + "Name": "MS Office - Electron", + "StartupNotify": "true", + "Terminal": "false", + "Type": "Application", + "Categories": "Office;" + }, + "icon": "icon.icns", + "executableName": "MS Office - Electron", + "maintainer": "Agampreet Singh ", + "target": [ + "deb", + "rpm" + ] + }, + "deb": { + "compression": "bzip2" + }, + "mac": { + "category": "public.app-category.office", + "target": [ + "dmg" + ] + }, + "nsis": { + "oneClick": false, + "perMachine": false, + "allowToChangeInstallationDirectory": false, + "license": "license.txt", + "artifactName": "MS-Office-Electron-Setup-${version}.${ext}" + }, + "win": { + "target": [ + "nsis" + ] + }, + "directories": { + "output": "release" + } + }, + "scripts": { + "start": "electron .", + "pack": "electron-builder --dir", + "dist": "electron-builder" + }, + "author": { + "author": "Agampreet Singh", + "email": "agam778@zohomail.in", + "url": "https://agam778.github.io/" + }, + "license": "MIT", + "devDependencies": { + "electron": "^12.0.0", + "electron-builder": "^22.10.5", + "electron-reloader": "^1.2.1" + }, + "dependencies": { + "about-window": "^1.14.0", + "custom-electron-titlebar": "^3.2.7", + "electron-reload": "^1.5.0", + "electron-updater": "^4.3.9", + "is-online": "^9.0.1", + "node-notifier": "^10.0.0", + "update-electron-app": "^2.0.1" + } +} diff --git a/README.md b/README.md index 601ff41..21b6e49 100644 --- a/README.md +++ b/README.md @@ -86,7 +86,7 @@ For Installing this app on Windows :- For Installing this app on Windows :- 1. Just go to the [Releases](https://github.com/agam778/Microsoft-Office-Electron/releases) page -2. Scroll down and click the `.dmg` file. It is a universal build and will run on both M1 And Intel Macs. The dmg file will start downloading. +2. Scroll down and click the `.dmg` file. The build with no architecture written is for Intel Macs (Will fix it soon) and the build with arm64 written in it is for M1 Macs. Download the build according to your Mac. 3. After it downloads, click on the file and mount it on your system. Now drag my app to the Applications Folder (There will be a shortcut in the opened window too) and your app will be installed. Open from Launchpad and enjoy. # Linux