This commit is contained in:
Mr. Stallion 2023-09-03 15:24:08 -07:00
parent a3a070a8fb
commit 72f0f1a318
4 changed files with 86 additions and 25 deletions

View File

@ -1,9 +1,10 @@
# Download
[Windows](https://github.com/hearmeneigh/fchat-rising/releases/download/v1.24.0/F-Chat-Rising-1.24.0-win.exe) (82 MB)
| [MacOS Intel](https://github.com/hearmeneigh/fchat-rising/releases/download/v1.24.0/F-Chat-Rising-1.24.0-macos-intel.dmg) (82 MB)
| [MacOS M1](https://github.com/hearmeneigh/fchat-rising/releases/download/v1.24.0/F-Chat-Rising-1.24.0-macos-m1.dmg) (84 MB)
| [Linux](https://github.com/hearmeneigh/fchat-rising/releases/download/v1.24.0/F-Chat-Rising-1.24.0-linux.AppImage) (82 MB)
[Windows x64](https://github.com/hearmeneigh/fchat-rising/releases/latest/download/F-Chat-Rising-win-x64.exe) |
[Windows arm64](https://github.com/hearmeneigh/fchat-rising/releases/latest/download/F-Chat-Rising-win-arm64.exe) |
[MacOS M1](https://github.com/hearmeneigh/fchat-rising/releases/latest/download/F-Chat-Rising-macos-m1.dmg) |
[MacOS Intel](https://github.com/hearmeneigh/fchat-rising/releases/latest/download/F-Chat-Rising-macos-intel.dmg) |
[Linux x64](https://github.com/hearmeneigh/fchat-rising/releases/latest/download/F-Chat-Rising-linux-x64.AppImage) |
[Linux arm64](https://github.com/hearmeneigh/fchat-rising/releases/latest/download/F-Chat-Rising-linux-arm64.AppImage)
# F-Chat Rising
This repository contains a heavily customized version of the mainline F-Chat 3.0 client.

View File

@ -64,26 +64,49 @@ require('electron-packager')({
if(process.platform === 'win32') {
console.log('Creating Windows installer');
const icon = path.join(__dirname, 'build', 'icon.ico');
const setupName = `F-Chat Rising Setup.exe`;
if(fs.existsSync(path.join(distDir, setupName))) fs.unlinkSync(path.join(distDir, setupName));
const nupkgName = path.join(distDir, `fchat-${pkg.version}-full.nupkg`);
const deltaName = path.join(distDir, `fchat-${pkg.version}-delta.nupkg`);
if(fs.existsSync(nupkgName)) fs.unlinkSync(nupkgName);
if(fs.existsSync(deltaName)) fs.unlinkSync(deltaName);
if(process.argv.length <= 3) console.warn('Warning: Creating unsigned installer');
require('electron-winstaller').createWindowsInstaller({
appDirectory: appPaths[0],
outputDirectory: distDir,
iconUrl: 'file:///%localappdata%\\fchat\\app.ico',
setupIcon: icon,
noMsi: true,
exe: 'F-Chat.exe',
title: 'F-Chat Rising',
setupExe: setupName,
name: 'fchat'
// remoteReleases: 'https://client.f-list.net/win32/' + (isBeta ? '?channel=beta' : ''),
// signWithParams: process.argv.length > 3 ? `/a /f ${process.argv[2]} /p ${process.argv[3]} /fd sha256 /tr http://timestamp.digicert.com /td sha256` : undefined
}).catch((e) => console.error(`Error while creating installer: ${e.message}`));
for (const appPath of appPaths) {
console.log('WinAppPath', appPath);
const appArch = appPath.match(/F-Chat-windows-([a-zA-Z0-9]+)$/)[1];
const appArchLong = appArch === 'x64' ? 'x86_64' : 'aarch64';
const setupName = `F-Chat-Rising-Setup-win-${appArch}.exe`;
const distFinal = path.join(distDir, appArch);
console.log('DistFinal', distFinal);
fs.mkdirSync(distFinal, {recursive: true});
if(fs.existsSync(path.join(distFinal, setupName))) {
fs.unlinkSync(path.join(distFinal, setupName));
}
const nupkgName = path.join(distFinal, `fchat-${pkg.version}-full.nupkg`);
const deltaName = path.join(distFinal, `fchat-${pkg.version}-delta.nupkg`);
if(fs.existsSync(nupkgName)) fs.unlinkSync(nupkgName);
if(fs.existsSync(deltaName)) fs.unlinkSync(deltaName);
if(process.argv.length <= 3) console.warn('Warning: Creating unsigned installer');
try {
await require('electron-winstaller').createWindowsInstaller({
appDirectory: appPath,
outputDirectory: distFinal,
iconUrl: 'file:///%localappdata%\\fchat\\app.ico',
setupIcon: icon,
noMsi: true,
exe: 'F-Chat.exe',
title: 'F-Chat Rising',
setupExe: setupName,
name: 'fchat'
// remoteReleases: 'https://client.f-list.net/win32/' + (isBeta ? '?channel=beta' : ''),
// signWithParams: process.argv.length > 3 ? `/a /f ${process.argv[2]} /p ${process.argv[3]} /fd sha256 /tr http://timestamp.digicert.com /td sha256` : undefined
});
} catch (e) {
console.error(`Error while creating installer: ${e.message}`);
throw e;
}
}
} else if(process.platform === 'darwin') {
console.log('Creating Mac DMG');

View File

@ -0,0 +1,13 @@
#!/bin/bash -ex
DIST_PATH="${HOME}/fchat-rising/electron/dist"
cd "${HOME}/fchat-rising"
git checkout canary
git pull
yarn
rm -rf "${DIST_PATH}"
cd electron
yarn build:dist

View File

@ -0,0 +1,24 @@
#!/bin/bash -ex
if [ -z "${1}" ]
then
echo "Usage: ${0} RELEASE_VERSION"
exit 1
fi
RELEASE_VERSION="${1}"
RELEASE_PATH="${HOME}/fchat-rising-dist/${RELEASE_VERSION}"
DIST_PATH="${HOME}/fchat-rising/electron/dist"
cd "${HOME}/fchat-rising"
git checkout master
git pull
yarn
mkdir -p "${RELEASE_PATH}"
rm -rf "${DIST_PATH}"
cd electron
yarn build:dist
node pack.js