mirror of https://github.com/FreeTubeApp/FreeTube
Testing with electron-builder
This commit is contained in:
parent
96d323c669
commit
6d819c7f71
Binary file not shown.
After Width: | Height: | Size: 5.9 KiB |
File diff suppressed because it is too large
Load Diff
117
package.json
117
package.json
|
@ -5,26 +5,26 @@
|
||||||
"description": "An Open Source YouTube app for privacy.",
|
"description": "An Open Source YouTube app for privacy.",
|
||||||
"main": "src/js/init.js",
|
"main": "src/js/init.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "electron-forge start",
|
"pack": "build --dir",
|
||||||
"package": "electron-forge package",
|
"start": "electron .",
|
||||||
"make": "electron-forge make",
|
"make:all": "npm run make:linux:x64 && npm run make:linux:arm && npm run make:mac:zip && npm run make:win",
|
||||||
"publish": "electron-forge publish",
|
"make:win": "build --win",
|
||||||
"make:all": "npm run make:mac && npm run make:linux:x86 && npm run make:linux:arm && npm run make:win",
|
"make:win:exe": "build --win nsis",
|
||||||
"make:mac": "electron-forge make --platform=darwin",
|
"make:win:zip": "build --win zip",
|
||||||
"make:win": "electron-forge make --platform=win32",
|
"make:mac:zip": "build --mac zip",
|
||||||
"make:win:zip": "electron-forge make --platform=win32 --targets=zip",
|
"make:mac:dmg": "build --mac dmg",
|
||||||
"make:linux:x86": "electron-forge make --platform=linux --arch x64",
|
"make:linux:x64": "build --linux --x64",
|
||||||
"make:linux:x86:zip": "electron-forge make --platform=linux --targets=zip --arch x64",
|
"make:linux:x64:deb": "build --linux deb --x64",
|
||||||
"make:linux:x86:deb": "electron-forge make --platform=linux --targets=deb --arch x64",
|
"make:linux:x64:rpm": "build --linux rpm --x64",
|
||||||
"make:linux:x86:rpm": "electron-forge make --platform=linux --targets=rpm --arch x64",
|
"make:linux:x64:appimage": "build --linux appimage --x64",
|
||||||
"make:linux:x86:snap": "electron-forge package && electron-installer-snap --src=out/FreeTube-linux-x64 --arch x64",
|
"make:linux:x64:zip": "build --linux zip --x64",
|
||||||
"make:linux:x86:flatpak": "electron-installer-flatpak --src out/FreeTube-linux-x64/ --dest out/make --arch x64 --id org.freetube.FreeTube --productName FreeTube --runtime org.freedesktop.Platform//1.6 --runtimeVersion 1.6 --sdk org.freedesktop.Sdk//1.6 --base io.atom.electron.BaseApp --baseVersion stable",
|
"make:linux:x64:tar": "build --linux tar.xz --x64",
|
||||||
"make:linux:x86:appimage": "electron-forge make --platform=linux --targets=electron-forge-maker-appimage --arch x64",
|
"make:linux:arm": "build --linux --arm64",
|
||||||
"make:linux:arm": "electron-forge make --platform=linux --arch arm64",
|
"make:linux:arm:deb": "build --linux deb --arm64",
|
||||||
"make:linux:arm:zip": "electron-forge make --platform=linux --targets=zip --arch arm64",
|
"make:linux:arm:rpm": "build --linux rpm --arm64",
|
||||||
"make:linux:arm:deb": "electron-forge make --platform=linux --targets=deb --arch arm64",
|
"make:linux:arm:zip": "build --linux zip --arm64",
|
||||||
"make:linux:arm:rpm": "electron-forge make --platform=linux --targets=rpm --arch arm64",
|
"make:linux:arm:tar.xz": "build --linux tar.xz --arm64",
|
||||||
"make:linux:arm:appimage": "electron-forge make --platform=linux --targets=electron-forge-maker-appimage --arch arm64"
|
"dist": "build"
|
||||||
},
|
},
|
||||||
"keywords": [],
|
"keywords": [],
|
||||||
"author": {
|
"author": {
|
||||||
|
@ -33,67 +33,64 @@
|
||||||
"url": "https://github.com/FreeTubeApp/FreeTube"
|
"url": "https://github.com/FreeTubeApp/FreeTube"
|
||||||
},
|
},
|
||||||
"license": "GPL-3.0-or-later",
|
"license": "GPL-3.0-or-later",
|
||||||
"config": {
|
"build": {
|
||||||
"forge": {
|
"appId": "io.freetubeapp.freetube",
|
||||||
"make_targets": {
|
"asar": true,
|
||||||
"win32": [
|
|
||||||
"squirrel"
|
|
||||||
],
|
|
||||||
"darwin": [
|
|
||||||
"zip"
|
|
||||||
],
|
|
||||||
"linux": [
|
|
||||||
"deb",
|
|
||||||
"rpm",
|
|
||||||
"electron-forge-maker-appimage",
|
|
||||||
"zip"
|
|
||||||
]
|
|
||||||
},
|
|
||||||
"protocols": [
|
"protocols": [
|
||||||
{
|
{
|
||||||
"name": "freetube",
|
"name": "FreeTube",
|
||||||
"role": "Viewer",
|
|
||||||
"schemes": [
|
"schemes": [
|
||||||
"freetube"
|
"freetube"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"electronPackagerConfig": {
|
"mac": {
|
||||||
"packageManager": "yarn",
|
"category": "public.app-category.video",
|
||||||
"icon": "./src/icons/iconColor.icns"
|
"icon": "src/icons/iconColor.icns",
|
||||||
|
"target": [
|
||||||
|
"zip"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"electronWinstallerConfig": {
|
"win": {
|
||||||
"name": "freetube",
|
"target": [
|
||||||
"iconUrl": "https://raw.githubusercontent.com/FreeTubeApp/FreeTubeApp.github.io/master/images/iconColor.ico",
|
"nsis",
|
||||||
"setupIcon": "./src/icons/iconColor.ico"
|
"zip"
|
||||||
|
],
|
||||||
|
"icon": "src/icons/iconColor.ico"
|
||||||
},
|
},
|
||||||
"electronInstallerDebian": {
|
"linux": {
|
||||||
"icon": "src/icons/iconColor.png"
|
"protocols": {
|
||||||
|
"name": "FreeTube",
|
||||||
|
"schemes": [
|
||||||
|
"freetube"
|
||||||
|
]
|
||||||
},
|
},
|
||||||
"electronForgeMakerAppimage": {
|
"target": [
|
||||||
"icon": "src/icons/iconColor.png"
|
"AppImage",
|
||||||
|
"deb",
|
||||||
|
"rpm",
|
||||||
|
"zip",
|
||||||
|
"tar.xz"
|
||||||
|
],
|
||||||
|
"desktop": {
|
||||||
|
"Icon": "freetube"
|
||||||
},
|
},
|
||||||
"repository": {
|
"category": "Video"
|
||||||
"type": "git",
|
|
||||||
"url": "https://github.com/FreeTubeApp/FreeTube"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"electron-forge": "^5.2.4",
|
"electron": "^5.0.3",
|
||||||
"electron-forge-maker-appimage": "^20.39.0",
|
"electron-builder": "^20.43.0",
|
||||||
"electron-installer-flatpak": "^0.8.0",
|
"electron-compile": "^6.4.4",
|
||||||
"electron-installer-snap": "^3.1.1",
|
"electron-installer-appimage": "^1.0.1",
|
||||||
"electron-prebuilt-compile": "4.0.0",
|
"electron-packager": "^13.1.1",
|
||||||
"electron-winstaller": "^3.0.4"
|
"electron-winstaller": "^3.0.4"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"autolinker": "^3.0.5",
|
"autolinker": "^3.0.5",
|
||||||
"commonjs": "0.0.1",
|
"commonjs": "0.0.1",
|
||||||
"dateformat": "^3.0.3",
|
"dateformat": "^3.0.3",
|
||||||
"electron-compile": "6.4.4",
|
|
||||||
"electron-context-menu": "^0.12.0",
|
"electron-context-menu": "^0.12.0",
|
||||||
"electron-squirrel-startup": "^1.0.0",
|
|
||||||
"jquery": "^3.4.0",
|
"jquery": "^3.4.0",
|
||||||
"jsdom": "^15.0.0",
|
"jsdom": "^15.0.0",
|
||||||
"mustache": "^3.0.1",
|
"mustache": "^3.0.1",
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 5.9 KiB |
Binary file not shown.
Before Width: | Height: | Size: 252 KiB After Width: | Height: | Size: 264 KiB |
|
@ -159,6 +159,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div id='progressView'></div>
|
<div id='progressView'></div>
|
||||||
</body>
|
</body>
|
||||||
|
<script src="js/vue.js"></script>
|
||||||
<script src="js/general.js"></script>
|
<script src="js/general.js"></script>
|
||||||
<script src="js/youtubeApi.js"></script>
|
<script src="js/youtubeApi.js"></script>
|
||||||
<script src="js/updates.js"></script>
|
<script src="js/updates.js"></script>
|
||||||
|
|
|
@ -44,8 +44,6 @@ require('electron-context-menu')({
|
||||||
|
|
||||||
let win;
|
let win;
|
||||||
|
|
||||||
protocol.registerStandardSchemes(['freetube']);
|
|
||||||
|
|
||||||
app.setAsDefaultProtocolClient('freetube');
|
app.setAsDefaultProtocolClient('freetube');
|
||||||
|
|
||||||
app.commandLine.appendSwitch('autoplay-policy', 'no-user-gesture-required');
|
app.commandLine.appendSwitch('autoplay-policy', 'no-user-gesture-required');
|
||||||
|
@ -73,7 +71,10 @@ let init = function () {
|
||||||
win = new BrowserWindow({
|
win = new BrowserWindow({
|
||||||
width: 1200,
|
width: 1200,
|
||||||
height: 800,
|
height: 800,
|
||||||
autoHideMenuBar: true
|
autoHideMenuBar: true,
|
||||||
|
webPreferences: {
|
||||||
|
nodeIntegration: true,
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
settingsDb.findOne({
|
settingsDb.findOne({
|
||||||
|
|
|
@ -19,7 +19,7 @@
|
||||||
* File for functions related to videos.
|
* File for functions related to videos.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
let checkedSettings = false;
|
let checkedVideoSettings = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Display the video player and play a video
|
* Display the video player and play a video
|
||||||
|
@ -33,7 +33,7 @@ function playVideo(videoId, playlistId = '') {
|
||||||
|
|
||||||
let youtubedlFinished = false;
|
let youtubedlFinished = false;
|
||||||
let invidiousFinished = false;
|
let invidiousFinished = false;
|
||||||
checkedSettings = false;
|
checkedVideoSettings = false;
|
||||||
playerView.firstLoad = true;
|
playerView.firstLoad = true;
|
||||||
playerView.videoId = videoId;
|
playerView.videoId = videoId;
|
||||||
playerView.videoAudio = undefined;
|
playerView.videoAudio = undefined;
|
||||||
|
@ -983,11 +983,11 @@ function clickMiniPlayer(videoId) {
|
||||||
function checkDashSettings() {
|
function checkDashSettings() {
|
||||||
// Mediaelement.js for some reason calls onLoadStart() multiple times
|
// Mediaelement.js for some reason calls onLoadStart() multiple times
|
||||||
// This check is here to force checkVideoSettings to only run once.
|
// This check is here to force checkVideoSettings to only run once.
|
||||||
if (checkedSettings) {
|
if (checkedVideoSettings) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
checkedSettings = true;
|
checkedVideoSettings = true;
|
||||||
let checked720p = false;
|
let checked720p = false;
|
||||||
let checked360p = false;
|
let checked360p = false;
|
||||||
let checkedAudio = false;
|
let checkedAudio = false;
|
||||||
|
@ -1082,7 +1082,7 @@ function checkDashSettings() {
|
||||||
ft.log(originalNode);
|
ft.log(originalNode);
|
||||||
ft.log(instance);
|
ft.log(instance);
|
||||||
showToast('There was an error with playing DASH formats. Reverting to the legacy formats.');
|
showToast('There was an error with playing DASH formats. Reverting to the legacy formats.');
|
||||||
checkedSettings = false;
|
checkedVideoSettings = false;
|
||||||
playerView.currentTime = instance.currentTime;
|
playerView.currentTime = instance.currentTime;
|
||||||
playerView.legacyFormats();
|
playerView.legacyFormats();
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,8 +15,6 @@ You should have received a copy of the GNU General Public License
|
||||||
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
along with FreeTube. If not, see <http://www.gnu.org/licenses/>.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import Vue from './js/vue.js';
|
|
||||||
|
|
||||||
const mainHeaderTemplate = require('./templates/mainHeader.html');
|
const mainHeaderTemplate = require('./templates/mainHeader.html');
|
||||||
const aboutTemplate = require('./templates/about.html');
|
const aboutTemplate = require('./templates/about.html');
|
||||||
const settingsTemplate = require('./templates/settings.html');
|
const settingsTemplate = require('./templates/settings.html');
|
||||||
|
|
Loading…
Reference in New Issue