Skip to content

Commit

Permalink
Add file metadata to Windows exe (#6503)
Browse files Browse the repository at this point in the history
  • Loading branch information
timtmok authored Feb 28, 2025
1 parent db8f78b commit 1a472a2
Showing 1 changed file with 20 additions and 1 deletion.
21 changes: 20 additions & 1 deletion build/gulpfile.vscode.js
Original file line number Diff line number Diff line change
Expand Up @@ -527,10 +527,29 @@ function patchWin32DependenciesTask(cwd) {
const packageJson = JSON.parse(await fs.promises.readFile(path.join(cwd, 'resources', 'app', 'package.json'), 'utf8'));
const product = JSON.parse(await fs.promises.readFile(path.join(cwd, 'resources', 'app', 'product.json'), 'utf8'));
const baseVersion = packageJson.version.replace(/-.*$/, '');
// --- Start Positron ---
const year = new Date().getFullYear();
const executablePath = `${product.nameShort}.exe`;

fancyLog('rcedit: ' + executablePath);

await rcedit(path.join(cwd, executablePath), {
'file-version': product.positronVersion,
'version-string': {
'CompanyName': 'Posit Software, PBC',
'FileDescription': product.nameLong,
'FileVersion': product.positronVersion,
'InternalName': executablePath,
'LegalCopyright': `Copyright (C) 2022-${year} Posit Software, PBC. All rights reserved.`,
'OriginalFilename': executablePath,
'ProductName': product.nameLong,
'ProductVersion': product.positronVersion,
}
});

await Promise.all(deps.map(async dep => {
const basename = path.basename(dep);
// --- Start Positron ---
fancyLog('rcedit: ' + dep);
try {
await rcedit(path.join(cwd, dep), {
'file-version': baseVersion,
Expand Down

0 comments on commit 1a472a2

Please sign in to comment.