Skip to content

Commit

Permalink
Merge branch 'move-and-rename-map-gl-data'
Browse files Browse the repository at this point in the history
  • Loading branch information
albin-mullvad committed Apr 5, 2024
2 parents 848a1a2 + b000c35 commit 5d94293
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 10 deletions.
2 changes: 1 addition & 1 deletion android/lib/map/src/main/res/raw
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 5 additions & 7 deletions gui/src/main/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -767,15 +767,13 @@ class ApplicationMain
}));

IpcMainEventChannel.map.handleGetData(async () => ({
landContourIndices: await fs.promises.readFile(
path.join(GEO_DIR, 'land_contour_indices.bin'),
),
landPositions: await fs.promises.readFile(path.join(GEO_DIR, 'land_positions.bin')),
landContourIndices: await fs.promises.readFile(path.join(GEO_DIR, 'land_contour_indices.gl')),
landPositions: await fs.promises.readFile(path.join(GEO_DIR, 'land_positions.gl')),
landTriangleIndices: await fs.promises.readFile(
path.join(GEO_DIR, 'land_triangle_indices.bin'),
path.join(GEO_DIR, 'land_triangle_indices.gl'),
),
oceanIndices: await fs.promises.readFile(path.join(GEO_DIR, 'ocean_indices.bin')),
oceanPositions: await fs.promises.readFile(path.join(GEO_DIR, 'ocean_positions.bin')),
oceanIndices: await fs.promises.readFile(path.join(GEO_DIR, 'ocean_indices.gl')),
oceanPositions: await fs.promises.readFile(path.join(GEO_DIR, 'ocean_positions.gl')),
}));

IpcMainEventChannel.tunnel.handleConnect(this.connectTunnel);
Expand Down
8 changes: 7 additions & 1 deletion gui/tasks/assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,20 @@ function copyLocales() {
return src('locales/**/*.po').pipe(dest('build/locales'));
}

function copyGeoData() {
return src('../dist-assets/geo/*.gl').pipe(dest('build/assets/geo'));
}

copyStaticAssets.displayName = 'copy-static-assets';
copyConfig.displayName = 'copy-config';
copyCss.displayName = 'copy-css';
copyHtml.displayName = 'copy-html';
copyLocales.displayName = 'copy-locales';
copyGeoData.displayName = 'copy-geo-data';

exports.copyAll = parallel(copyStaticAssets, copyConfig, copyCss, copyHtml, copyLocales);
exports.copyAll = parallel(copyStaticAssets, copyConfig, copyCss, copyHtml, copyLocales, copyGeoData);
exports.copyStaticAssets = copyStaticAssets;
exports.copyCss = copyCss;
exports.copyHtml = copyHtml;
exports.copyConfig = copyConfig;
exports.copyGeoData = copyGeoData;
5 changes: 4 additions & 1 deletion gui/tasks/watch.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ function watchHtml() {
}

function watchStaticAssets() {
return watch(['assets/**'], series(assets.copyStaticAssets, electron.reloadRenderer));
return watch(
['assets/**', '../dist-assets/geo/*.gl'],
series(assets.copyStaticAssets, assets.copyGeoData, electron.reloadRenderer),
);
}

watchMainScripts.displayName = 'watch-main-scripts';
Expand Down

0 comments on commit 5d94293

Please sign in to comment.