Prepare Windows release and signing process (#16)

This commit is contained in:
2026-03-08 19:51:30 -07:00
committed by GitHub
parent 34d2dce8dc
commit c799a8de3c
113 changed files with 5042 additions and 386 deletions

View File

@@ -9,6 +9,7 @@ import {
test('dictionary roots main handler returns expected root list', () => {
const roots = createBuildDictionaryRootsMainHandler({
platform: 'darwin',
dirname: '/repo/dist/main',
appPath: '/Applications/SubMiner.app/Contents/Resources/app.asar',
resourcesPath: '/Applications/SubMiner.app/Contents/Resources',
@@ -44,6 +45,7 @@ test('jlpt dictionary runtime main deps builder maps search paths and log prefix
test('frequency dictionary roots main handler returns expected root list', () => {
const roots = createBuildFrequencyDictionaryRootsMainHandler({
platform: 'darwin',
dirname: '/repo/dist/main',
appPath: '/Applications/SubMiner.app/Contents/Resources/app.asar',
resourcesPath: '/Applications/SubMiner.app/Contents/Resources',
@@ -59,6 +61,42 @@ test('frequency dictionary roots main handler returns expected root list', () =>
assert.equal(roots[10], '/repo');
});
test('dictionary roots main handler uses APPDATA-style roots on windows', () => {
const roots = createBuildDictionaryRootsMainHandler({
platform: 'win32',
dirname: 'C:\\repo\\dist\\main',
appPath: 'C:\\Program Files\\SubMiner\\resources\\app.asar',
resourcesPath: 'C:\\Program Files\\SubMiner\\resources',
userDataPath: 'C:\\Users\\a\\AppData\\Roaming\\SubMiner',
appUserDataPath: 'C:\\Users\\a\\AppData\\Roaming\\SubMiner',
homeDir: 'C:\\Users\\a',
appDataDir: 'C:\\Users\\a\\AppData\\Roaming',
cwd: 'C:\\repo',
joinPath: (...parts) => parts.join('\\'),
})();
assert.equal(roots.includes('C:\\Users\\a\\.config\\SubMiner'), false);
assert.equal(roots.includes('C:\\Users\\a\\AppData\\Roaming\\SubMiner'), true);
});
test('frequency dictionary roots main handler uses APPDATA-style roots on windows', () => {
const roots = createBuildFrequencyDictionaryRootsMainHandler({
platform: 'win32',
dirname: 'C:\\repo\\dist\\main',
appPath: 'C:\\Program Files\\SubMiner\\resources\\app.asar',
resourcesPath: 'C:\\Program Files\\SubMiner\\resources',
userDataPath: 'C:\\Users\\a\\AppData\\Roaming\\SubMiner',
appUserDataPath: 'C:\\Users\\a\\AppData\\Roaming\\SubMiner',
homeDir: 'C:\\Users\\a',
appDataDir: 'C:\\Users\\a\\AppData\\Roaming',
cwd: 'C:\\repo',
joinPath: (...parts) => parts.join('\\'),
})();
assert.equal(roots.includes('C:\\Users\\a\\.config\\SubMiner'), false);
assert.equal(roots.includes('C:\\Users\\a\\AppData\\Roaming\\SubMiner'), true);
});
test('frequency dictionary runtime main deps builder maps search paths/source and log prefix', () => {
const calls: string[] = [];
const deps = createBuildFrequencyDictionaryRuntimeMainDepsHandler({