Skip to content

Commit fa96e7a

Browse files
committed
Add tool folder
1 parent b4a5a09 commit fa96e7a

183 files changed

Lines changed: 17598 additions & 60 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

Tools/VersionFileWriter/VersionConfig.ini

Lines changed: 0 additions & 60 deletions
This file was deleted.
-98.5 KB
Binary file not shown.

tools/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.js

tools/base-config.ps1

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
$RepoRoot = (Get-Item $PSScriptRoot).Parent.FullName
2+
$PackagePath = "$RepoRoot\package"
3+
$ResourcesPath = "$PackagePath\Resources"
4+
$BinariesPath = "$ResourcesPath\Binaries"
5+
$LogsPath = "$RepoRoot\logs"
6+
7+
$Config = [PSCustomObject]@{
8+
RepoRoot = $RepoRoot
9+
PackagePath = $PackagePath
10+
ResourcesPath = $ResourcesPath
11+
BinariesPath = $BinariesPath
12+
LogsPath = $LogsPath
13+
}

tools/build-installer/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/inno/installer.iss
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
export * from './template-model.class';
2+
export * from './template-app-model.class';
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export class TemplateAppModel {
2+
name: string;
3+
version: string;
4+
versionName: string;
5+
publisher: string;
6+
publisherUrl: string;
7+
supportUrl: string;
8+
updatesUrl: string;
9+
}
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import { TemplateAppModel } from './template-app-model.class';
2+
3+
export class TemplateModel {
4+
app: TemplateAppModel;
5+
sourceDir: string;
6+
outputDir: string;
7+
setupIconFile: string;
8+
licenseFile: string;
9+
outputBaseFilename: string;
10+
installDeleteFiles: string[];
11+
excludedInstallerFiles: string;
12+
netCoreCheckPath: string;
13+
}

tools/build-installer/constants.ts

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
import { resolve } from 'path';
2+
3+
const repoPath = resolve(__dirname, '../../');
4+
const packagePath = resolve(repoPath, 'package');
5+
const versionFilePath = resolve(packagePath, 'version');
6+
const innoPath = resolve(__dirname, 'inno');
7+
const innoResourcesPath = resolve(innoPath, 'Resources');
8+
const setupIconPath = resolve(innoResourcesPath, 'cncnet5.ico');
9+
const licenseFilePath = resolve(innoResourcesPath, 'License-YurisRevenge.txt');
10+
const installerBinary = resolve(innoPath, 'bin/ISCC.exe');
11+
const installerTemplate = resolve(innoPath, 'installer.twig');
12+
const installerScript = resolve(innoPath, 'installer.iss');
13+
const preUpdateExecFilename = 'preupdateexec';
14+
const updateExecFilename = 'updateexec';
15+
const preUpdateExecFilePath = resolve(packagePath, preUpdateExecFilename);
16+
const updateExecFilePath = resolve(packagePath, updateExecFilename);
17+
const netCoreCheckPath = resolve(innoPath, 'libs/InnoDependencyInstaller/netcorecheck');
18+
19+
const constants = {
20+
app: {
21+
name: 'CnCNet Yuri\'s Revenge',
22+
publisher: 'cncnet.org',
23+
publisherUrl: 'https://cncnet.org',
24+
supportUrl: 'https://cncnet.org',
25+
updatesUrl: 'https://cncnet.org'
26+
},
27+
outputBaseFilename: 'CnCNet5_YR_Installer',
28+
paths: {
29+
installerBinary,
30+
installerTemplate,
31+
installerScript,
32+
repoPath,
33+
packagePath,
34+
setupIconPath,
35+
licenseFilePath,
36+
versionFilePath,
37+
preUpdateExecFilePath,
38+
updateExecFilePath,
39+
netCoreCheckPath
40+
},
41+
excludedInstallerFiles: [
42+
preUpdateExecFilename,
43+
updateExecFilename,
44+
'versionconfig.ini',
45+
'RA2MD.ini'
46+
]
47+
}
48+
export { constants };

tools/build-installer/index.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { BuildInstallerService } from './service';
2+
3+
BuildInstallerService.run();

0 commit comments

Comments
 (0)