Skip to content

Commit

Permalink
build(macOS): add package ID and version
Browse files Browse the repository at this point in the history
style: fix quotes in assets and build script
fix: default font
  • Loading branch information
RuzikNF committed Sep 23, 2020
1 parent 23335b7 commit 38bf678
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 30 deletions.
10 changes: 5 additions & 5 deletions assets.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
declare module "*.svg";
declare module "*.png";
declare module "*.jpg";
declare module "*.jpeg";
declare module "*.gif";
declare module '*.svg';
declare module '*.png';
declare module '*.jpg';
declare module '*.jpeg';
declare module '*.gif';
38 changes: 19 additions & 19 deletions build-deb.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const path = require("path");
const fs = require("fs");
const process = require("child_process");
const path = require('path');
const fs = require('fs');
const process = require('child_process');

const CONFIG_FILE = path.join(__dirname, "deploy", "config.json");
const CONFIG_FILE = path.join(__dirname, 'deploy', 'config.json');
const { appName } = JSON.parse(fs.readFileSync(CONFIG_FILE, 'utf8'));
const safeAppName = appName.replace(' ', '').toLowerCase();

const BUILD_DIR = path.join(__dirname, "deploy", "linux", "build", appName);
const LIB_DIR = path.join(__dirname, "deb-struct", "usr", "lib");
const BIN_DIR = path.join(__dirname, "deb-struct", "usr", "bin", appName);
const BUILD_DIR = path.join(__dirname, 'deploy', 'linux', 'build', appName);
const LIB_DIR = path.join(__dirname, 'deb-struct', 'usr', 'lib');
const BIN_DIR = path.join(__dirname, 'deb-struct', 'usr', 'bin', appName);
const paths = [
'./deb-struct/DEBIAN/',
'./deb-struct/usr/bin/',
Expand All @@ -26,22 +26,22 @@ console.log('Packaging DiscordQt into a Debian package...');
paths.forEach(dir => fs.mkdirSync(dir, {recursive: true}));
paths.forEach(dir => process.execSync(`rm -rf ${dir}*`));

console.log("Copying control...");
console.log('Copying control...');
process.execSync('cp ./control ./deb-struct/DEBIAN/control');

console.log("Copying build directory...");
process.execSync(`cp -R "${BUILD_DIR}" "${LIB_DIR}"`);
process.execSync(`cp -R ./assets "./deb-struct/usr/lib/${appName}"`);
process.execSync(`mv "./deb-struct/usr/lib/${appName}" ./deb-struct/usr/lib/${safeAppName}`);
console.log('Copying build directory...');
process.execSync(`cp -R '${BUILD_DIR}' '${LIB_DIR}'`);
process.execSync(`cp -R ./assets './deb-struct/usr/lib/${appName}'`);
process.execSync(`mv './deb-struct/usr/lib/${appName}' ./deb-struct/usr/lib/${safeAppName}`);

console.log("Copying symlink...");
process.execSync(`ln -s /usr/lib/${safeAppName}/qode "${BIN_DIR}"`);
console.log('Copying symlink...');
process.execSync(`ln -s /usr/lib/${safeAppName}/qode '${BIN_DIR}'`);

console.log("Copying .desktop file...");
const from = path.join(BUILD_DIR, getFilesFromPath(BUILD_DIR, ".desktop")[0]);
console.log('Copying .desktop file...');
const from = path.join(BUILD_DIR, getFilesFromPath(BUILD_DIR, '.desktop')[0]);
const to = path.join(__dirname, 'deb-struct/usr/share/applications/', safeAppName + '.desktop')
process.execSync(`cp "${from}" "${to}"`);
process.execSync(`cp '${from}' '${to}'`);

console.log("Generating Debian package...");
process.execSync("dpkg-deb --build deb-struct");
console.log('Generating Debian package...');
process.execSync('dpkg-deb --build deb-struct');
process.execSync(`mv deb-struct.deb ${safeAppName}.deb`);
8 changes: 4 additions & 4 deletions deploy/darwin/Discord-Qt.app/Contents/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<key>CFBundleExecutable</key>
<string>qode</string>
<key>CFBundleIdentifier</key>
<string>org.nodegui.exampleapp</string>
<string>xyz.ruslang.discordqt</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleInfoDictionaryVersion</key>
Expand All @@ -17,17 +17,17 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>0.4.0</string>
<key>CFBundleVersion</key>
<string>1</string>
<string>0.4.0</string>
<key>CFBundleSupportedPlatforms</key>
<array>
<string>MacOSX</string>
</array>
<key>LSMinimumSystemVersion</key>
<string>10.15</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2020 NodeGui. All rights reserved.</string>
<string>Copyright © 2020 Ruslan Garifullin. All rights reserved.</string>
<key>NSHighResolutionCapable</key>
<string>True</string>
</dict>
Expand Down
4 changes: 2 additions & 2 deletions src/windows/RootWindow.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

* {
//font-family: "Source Sans Pro"; // Default font
font-family: Whitney; // Discord's font
font-family: "Source Sans Pro"; // Default font
//font-family: Whitney; // Discord's font
}
#RootWindow {
height: "100%";
Expand Down

0 comments on commit 38bf678

Please sign in to comment.