This repository has been archived by the owner on May 2, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
45523d6
commit 12f5c52
Showing
30 changed files
with
593 additions
and
284 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
--- | ||
layout: download | ||
title: Download | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
layout: download | ||
platform: linux | ||
title: Download for Linux | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
layout: download | ||
platform: mac | ||
title: Download for macOS | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,91 +1,3 @@ | ||
--- | ||
layout: default | ||
--- | ||
<div class="hero-body"> | ||
<div class="container"> | ||
<div class="has-text-centered"> | ||
<h1 class="title is-3"> | ||
Run Web Apps like Real Apps | ||
</h1> | ||
<h2 class="subtitle"> | ||
Boost your productivity & protect your privacy with WebCatalog. | ||
</h2> | ||
|
||
<div class="buttons is-centered"> | ||
<a class="button is-medium is-black" href="https://github.com/webcatalog/webcatalog/releases/download/v{{ site.webcatalog_version }}/WebCatalog-{{ site.webcatalog_version }}.dmg"> | ||
<svg style="height: 24px; width: 24px;" aria-hidden="true" data-prefix="fab" data-icon="apple" class="svg-inline--fa fa-apple fa-w-12" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 376 512"><path fill="currentColor" d="M314.7 268.7c-.2-36.7 16.4-64.4 50-84.8-18.8-26.9-47.2-41.7-84.7-44.6-35.5-2.8-74.3 20.7-88.5 20.7-15 0-49.4-19.7-76.4-19.7C59.3 141.2 0 184.8 0 273.5c0 26.2 4.8 53.3 14.4 81.2 12.8 36.7 59 126.7 107.2 125.2 25.2-.6 43-17.9 75.8-17.9 31.8 0 48.3 17.9 76.4 17.9 48.6-.7 90.4-82.5 102.6-119.3-65.2-30.7-61.7-90-61.7-91.9zm-56.6-164.2c27.3-32.4 24.8-61.9 24-72.5-24.1 1.4-52 16.4-67.9 34.9-17.5 19.8-27.8 44.3-25.6 71.9 26.1 2 49.9-11.4 69.5-34.3z"></path></svg> | ||
<span> Download for macOS*</span> | ||
</a> | ||
<a class="button is-medium is-link" href="https://webcatalog.onfastspring.com/webcatalog-lite"> | ||
<span> Buy Now - $4.<small>99</small></span> | ||
</a> | ||
</div> | ||
|
||
<p><small>Version {{ site.webcatalog_version }} (<a href="https://github.com/quanglam2807/webcatalog/releases">Release Notes</a>). WebCatalog requires macOS 10.10 or later.</small></p> | ||
|
||
<br /> | ||
|
||
<p><small>*You can install up to two apps for free.</small></p> | ||
|
||
<p> | ||
<a href="/images/demos/main.png"> | ||
<img src="/images/demos/main.png" alt="WebCatalog" class="demo_main"> | ||
</a> | ||
</p> | ||
</div> | ||
<div class="content"> | ||
<hr /> | ||
<h4>How It Works</h4> | ||
<p>WebCatalog lets you turn any web apps into native-like Mac apps (also called <a href="https://en.wikipedia.org/wiki/Site-specific_browser">site-specific browsers</a>). Now, with WebCatalog, you can launch your favorite apps quickly in self-contained, distraction-free windows. Each app's data is stored separately, protecting you from cross-website trackers and preserving your privacy.</p> | ||
<hr /> | ||
<h4 class="is-pulled-left">Featured Apps</h4> | ||
<a class="button is-white is-pulled-right" href="/catalog/">See more</a> | ||
<div class="columns is-multiline" style="clear:both;"> | ||
{% for item in site.catalog %} | ||
{% if item.featured == true %} | ||
<div class="column is-3 has-text-centered" style="padding-top: 30px;"> | ||
<a href="/catalog/{{ item.key }}"> | ||
<img src="https://s3.getwebcatalog.com/apps/{{ item.key }}/{{ item.key }}-icon-128.png" class="app-icon-small" alt="{{ item.name }}"> | ||
<p>{{ item.name }}</p> | ||
</a> | ||
</div> | ||
{% endif %} | ||
{% endfor %} | ||
</div> | ||
<hr /> | ||
<h4>Notable Features</h4> | ||
<div class="columns is-multiline"> | ||
<div class="column is-half has-text-centered"> | ||
<a href="/images/demos/catalog.png"> | ||
<img src="/images/demos/catalog.png" alt="Catalog" class="demo"> | ||
</a> | ||
<p><small><b>Catalog</b> - Install apps quickly from our curated catalog.</small></p> | ||
</div> | ||
<div class="column is-half has-text-centered"> | ||
<a href="/images/demos/appview.png"> | ||
<img src="/images/demos/appview.png" alt="App View" class="demo"> | ||
</a> | ||
<p><small><b>AppView</b> - Run any website like a real Mac app.</small></p> | ||
</div> | ||
<div class="column is-half has-text-centered"> | ||
<a href="/images/demos/workspace.png"> | ||
<img src="/images/demos/workspace.png" alt="Workspace" class="demo"> | ||
</a> | ||
<p><small><b>Workspaces</b> - Switch between multiple accounts/projects.</small></p> | ||
</div> | ||
<div class="column is-half has-text-centered"> | ||
<a href="/images/demos/menubar.png"> | ||
<img src="/images/demos/menubar.png" alt="Menubar" class="demo"> | ||
</a> | ||
<p><small><b>Menubar</b> - Access your apps anytime and anywhere.</small></p> | ||
</div> | ||
<div class="column has-text-centered"> | ||
<a href="/images/demos/customization.png"> | ||
<img src="/images/demos/customization.png" alt="Customization" class="demo"> | ||
</a> | ||
<p><small><b>Customization</b> - Customize everything to suite your taste.</small></p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
layout: download | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,8 +28,8 @@ const tmpObj = tmp.dirSync(); | |
const tmpPath = tmpObj.name; | ||
const appPath = path.join(tmpPath, 'template'); | ||
const buildResourcesPath = path.join(tmpPath, 'build-resources'); | ||
const iconIcnsPath = path.join(buildResourcesPath, 'icon.icns'); | ||
const iconPngPath = path.join(buildResourcesPath, 'icon.png'); | ||
const iconIcnsPath = path.join(buildResourcesPath, 'e.icns'); | ||
const iconPngPath = path.join(buildResourcesPath, 'e.png'); | ||
const appJsonPath = path.join(appPath, 'build', 'app.json'); | ||
const publicIconPngPath = path.join(appPath, 'build', 'icon.png'); | ||
const packageJsonPath = path.join(appPath, 'package.json'); | ||
|
@@ -38,11 +38,11 @@ const outputPath = path.join(tmpPath, 'dist'); | |
const menubarIconPath = path.join(appPath, 'build', 'menubar-icon.png'); | ||
const menubarIcon2xPath = path.join(appPath, 'build', '[email protected]'); | ||
|
||
const dotAppPath = path.join(outputPath, `${name}-darwin-x64`, `${name}.app`); | ||
const dotAppPath = process.platform === 'darwin' ? path.join(outputPath, `${name}-darwin-x64`, `${name}.app`) : path.join(outputPath, `${name}-linux-x64`); | ||
|
||
const allAppsPath = installationPath.replace('~', homePath); | ||
|
||
const finalPath = path.join(allAppsPath, `${name}.app`); | ||
const finalPath = process.platform === 'darwin' ? path.join(allAppsPath, `${name}.app`) : path.join(allAppsPath, `${name}`); | ||
|
||
const sizes = [16, 32, 64, 128, 256, 512, 1024]; | ||
|
||
|
@@ -67,7 +67,7 @@ decompress(templatePath, tmpPath) | |
.then(() => { | ||
if (isUrl(icon)) { | ||
return download(icon, buildResourcesPath, { | ||
filename: 'icon.png', | ||
filename: 'e.png', | ||
}); | ||
} | ||
|
||
|
@@ -101,14 +101,18 @@ decompress(templatePath, tmpPath) | |
|
||
return Promise.all(p); | ||
}) | ||
.then(() => icongen(buildResourcesPath, buildResourcesPath, { | ||
report: true, | ||
icns: { | ||
name: 'icon', | ||
sizes, | ||
}, | ||
})) | ||
.then(results => results[0]) | ||
.then(() => { | ||
if (process.platform === 'darwin') { | ||
return icongen(buildResourcesPath, buildResourcesPath, { | ||
report: true, | ||
icns: { | ||
name: 'icon', | ||
sizes, | ||
}, | ||
}); | ||
} | ||
return null; | ||
}) | ||
.then(() => fsExtra.copy(iconPngPath, publicIconPngPath)) | ||
.then(() => { | ||
const appJson = JSON.stringify({ | ||
|
@@ -129,8 +133,8 @@ decompress(templatePath, tmpPath) | |
const opts = { | ||
name, | ||
appBundleId: `com.webcatalog.juli.${id}`, | ||
icon: iconIcnsPath, | ||
platform: 'darwin', | ||
icon: process.platform === 'darwin' ? iconIcnsPath : iconPngPath, | ||
platform: process.platform, | ||
dir: appPath, | ||
out: outputPath, | ||
overwrite: true, | ||
|
@@ -165,19 +169,40 @@ decompress(templatePath, tmpPath) | |
if (requireAdmin === 'true') { | ||
return sudoAsync(`mkdir -p "${allAppsPath}" && rm -rf "${finalPath}" && mv "${dotAppPath}" "${finalPath}"`); | ||
} | ||
|
||
return fsExtra.move(dotAppPath, finalPath, { overwrite: true }); | ||
}) | ||
.then(() => { | ||
// create desktop file for linux | ||
if (process.platform === 'linux') { | ||
const execFilePath = path.join(finalPath, name); | ||
const iconPath = path.join(finalPath, 'resources', 'app.asar.unpacked', 'build', 'icon.png'); | ||
const desktopFilePath = path.join(homePath, '.local', 'share', 'applications', `webcatalog-${id}.desktop`); | ||
const desktopFileContent = `[Desktop Entry] | ||
Version=1.0 | ||
Type=Application | ||
Name=${name} | ||
GenericName=${name} | ||
Icon=${iconPath} | ||
Exec=${execFilePath} | ||
Terminal=false; | ||
`; | ||
return fsExtra.writeFileSync(desktopFilePath, desktopFileContent); | ||
} | ||
return null; | ||
}) | ||
.then(() => { | ||
process.exit(0); | ||
}) | ||
.catch((e) => { | ||
/* eslint-disable-next-line */ | ||
console.log(e); | ||
process.send(e); | ||
process.exit(1); | ||
}); | ||
|
||
process.on('uncaughtException', (e) => { | ||
/* eslint-disable-next-line */ | ||
console.log(e); | ||
process.exit(1); | ||
process.send(e); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,17 @@ | ||
const { app, shell } = require('electron'); | ||
const path = require('path'); | ||
const { exec } = require('child_process'); | ||
|
||
const { getPreference } = require('../preferences'); | ||
|
||
const openApp = (id, name) => { | ||
const appPath = path.join(getPreference('installationPath').replace('~', app.getPath('home')), `${name}.app`); | ||
shell.openItem(appPath); | ||
let appPath; | ||
if (process.platform === 'darwin') { | ||
appPath = path.join(getPreference('installationPath').replace('~', app.getPath('home')), `${name}.app`); | ||
shell.openItem(appPath); | ||
} else if (process.platform === 'linux') { | ||
exec(`gtk-launch webcatalog-${id}`); | ||
} | ||
}; | ||
|
||
module.exports = openApp; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.