Skip to content

Commit

Permalink
download: Edit correct CMake 3.0 desktop file
Browse files Browse the repository at this point in the history
  • Loading branch information
WizardCM committed Oct 5, 2024
1 parent 30b5446 commit f2f8a59
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/download.ts
Original file line number Diff line number Diff line change
Expand Up @@ -347,7 +347,7 @@ export async function processBuild(
* @param languageFiles Locales mapped to their desktop file translations.
*/
export async function createDesktopFile(languageFiles: Map<string, Map<string, string>>): Promise<void> {
const filePath = 'UI/xdg-data/com.obsproject.Studio.desktop';
const filePath = 'UI/cmake/linux/com.obsproject.Studio.desktop';
const desktopFile = normalize(await FSE.readFile(filePath, 'utf-8'));
let result = '';
for (const line of desktopFile.split('\n')) {
Expand Down Expand Up @@ -433,7 +433,7 @@ function pushChanges(detachedSubmodules: string[], submodules: string[]): void {
'plugins/mac-virtualcam/src/obs-plugin/data/locale/*-*.ini',
'UI/data/locale.ini',
'UI/data/locale/*-*.ini',
'UI/xdg-data/com.obsproject.Studio.desktop',
'UI/cmake/linux/com.obsproject.Studio.desktop',
'UI/frontend-plugins/*/data/locale/*-*.ini'
]) {
exec(`git add '${allowedPath}'`);
Expand Down
4 changes: 2 additions & 2 deletions tests/download.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -567,7 +567,7 @@ it(createLocaleFile.name, async () => {

it(createDesktopFile.name, async () => {
MOCK_FS({
'UI/xdg-data/com.obsproject.Studio.desktop':
'UI/cmake/linux/com.obsproject.Studio.desktop':
'[Desktop Entry]\nVersion=1.0\nName=OBS Studio\n\nGenericName[an_ES]=abc\nComment[an_ES]=abc\n'
});
await createDesktopFile(
Expand All @@ -588,7 +588,7 @@ it(createDesktopFile.name, async () => {
]
])
);
expect(await FSE.readFile('UI/xdg-data/com.obsproject.Studio.desktop', 'utf-8')).toBe(
expect(await FSE.readFile('UI/cmake/linux/com.obsproject.Studio.desktop', 'utf-8')).toBe(
'[Desktop Entry]\nVersion=1.0\nName=OBS Studio\n\nGenericName[de_DE]=deName\nComment[de_DE]=deComment\nGenericName[en_GB]=enName\nComment[en_GB]=enComment\n'
);
});
Expand Down

0 comments on commit f2f8a59

Please sign in to comment.