Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Default buildResources is build

Manav Rathid7cd2cecbc82
diff --git a/desktop/.gitignore b/desktop/.gitignore
index b01288f0a9..9b7e0cc608 100644
--- a/desktop/.gitignore
+++ b/desktop/.gitignore
@@ -11,10 +11,11 @@ node_modules/
.env
.env.*.local
-# Generated code during build
-# - tsc transpiles src/**/*.ts and emits the generated JS into build/app
-# - The out dir from the photos web app is symlinked to build/out
-build/
+# tsc transpiles src/**/*.ts and emits the generated JS into app
+app/
+
+# out is a symlink to the photos web app's dir
+out
# electron-builder
dist/
diff --git a/desktop/resources/entitlements.mac.plist b/desktop/build/entitlements.mac.plist
similarity index 100%
rename from desktop/resources/entitlements.mac.plist
rename to desktop/build/entitlements.mac.plist
diff --git a/desktop/resources/error.html b/desktop/build/error.html
similarity index 100%
rename from desktop/resources/error.html
rename to desktop/build/error.html
diff --git a/desktop/resources/ggmlclip-linux b/desktop/build/ggmlclip-linux
similarity index 100%
rename from desktop/resources/ggmlclip-linux
rename to desktop/build/ggmlclip-linux
diff --git a/desktop/resources/ggmlclip-mac b/desktop/build/ggmlclip-mac
similarity index 100%
rename from desktop/resources/ggmlclip-mac
rename to desktop/build/ggmlclip-mac
diff --git a/desktop/resources/ggmlclip-windows.exe b/desktop/build/ggmlclip-windows.exe
similarity index 100%
rename from desktop/resources/ggmlclip-windows.exe
rename to desktop/build/ggmlclip-windows.exe
diff --git a/desktop/resources/icon.icns b/desktop/build/icon.icns
similarity index 100%
rename from desktop/resources/icon.icns
rename to desktop/build/icon.icns
diff --git a/desktop/resources/icon.png b/desktop/build/icon.png
similarity index 100%
rename from desktop/resources/icon.png
rename to desktop/build/icon.png
diff --git a/desktop/resources/image-magick b/desktop/build/image-magick
similarity index 100%
rename from desktop/resources/image-magick
rename to desktop/build/image-magick
diff --git a/desktop/resources/msvcp140d.dll b/desktop/build/msvcp140d.dll
similarity index 100%
rename from desktop/resources/msvcp140d.dll
rename to desktop/build/msvcp140d.dll
diff --git a/desktop/resources/splash.html b/desktop/build/splash.html
similarity index 100%
rename from desktop/resources/splash.html
rename to desktop/build/splash.html
diff --git a/desktop/resources/taskbar-icon-Template.png b/desktop/build/taskbar-icon-Template.png
similarity index 100%
rename from desktop/resources/taskbar-icon-Template.png
rename to desktop/build/taskbar-icon-Template.png
diff --git a/desktop/resources/[email protected] b/desktop/build/[email protected]
similarity index 100%
rename from desktop/resources/[email protected]
rename to desktop/build/[email protected]
diff --git a/desktop/resources/[email protected] b/desktop/build/[email protected]
similarity index 100%
rename from desktop/resources/[email protected]
rename to desktop/build/[email protected]
diff --git a/desktop/resources/taskbar-icon.png b/desktop/build/taskbar-icon.png
similarity index 100%
rename from desktop/resources/taskbar-icon.png
rename to desktop/build/taskbar-icon.png
diff --git a/desktop/resources/[email protected] b/desktop/build/[email protected]
similarity index 100%
rename from desktop/resources/[email protected]
rename to desktop/build/[email protected]
diff --git a/desktop/resources/[email protected] b/desktop/build/[email protected]
similarity index 100%
rename from desktop/resources/[email protected]
rename to desktop/build/[email protected]
diff --git a/desktop/resources/ucrtbased.dll b/desktop/build/ucrtbased.dll
similarity index 100%
rename from desktop/resources/ucrtbased.dll
rename to desktop/build/ucrtbased.dll
diff --git a/desktop/resources/vcruntime140_1d.dll b/desktop/build/vcruntime140_1d.dll
similarity index 100%
rename from desktop/resources/vcruntime140_1d.dll
rename to desktop/build/vcruntime140_1d.dll
diff --git a/desktop/resources/vcruntime140d.dll b/desktop/build/vcruntime140d.dll
similarity index 100%
rename from desktop/resources/vcruntime140d.dll
rename to desktop/build/vcruntime140d.dll
diff --git a/desktop/resources/version.html b/desktop/build/version.html
similarity index 100%
rename from desktop/resources/version.html
rename to desktop/build/version.html
diff --git a/desktop/resources/window-icon.png b/desktop/build/window-icon.png
similarity index 100%
rename from desktop/resources/window-icon.png
rename to desktop/build/window-icon.png
diff --git a/desktop/package.json b/desktop/package.json
index fe0b9b8ffe..b3db86f735 100644
--- a/desktop/package.json
+++ b/desktop/package.json
@@ -4,14 +4,16 @@
"private": true,
"description": "Desktop client for Ente Photos",
"author": "Ente <[email protected]>",
- "main": "build/app/main.js",
+ "main": "app/main.js",
"scripts": {
- "build": "mkdir -p build && yarn build-renderer && yarn build-main",
- "build-main": "tsc && electron-builder --config.compression=store",
- "build-renderer": "cd ../web && yarn install && yarn build:photos && cd ../desktop/build && rm -f out && ln -sf ../../web/apps/photos/out",
+ "build": "yarn build-renderer && yarn build-main",
+ "build-local": "yarn build-renderer && yarn build-main-local",
+ "build-main": "tsc && electron-builder",
+ "build-main-local": "tsc && electron-builder --config.compression=store",
+ "build-renderer": "cd ../web && yarn install && yarn build:photos && cd ../desktop && rm -f out && ln -sf ../web/apps/photos/out",
"dev": "concurrently \"yarn dev-main\" \"yarn dev-renderer\"",
"dev-main": "tsc && electron build/app/main.js",
- "dev-renderer": "cd ../web && yarn install && yarn dev:photos && cd ../desktop/build && rm -f out && ln -sf ../../web/apps/photos/out",
+ "dev-renderer": "cd ../web && yarn install && yarn dev:photos",
"postinstall": "electron-builder install-app-deps",
"lint": "yarn prettier --check . && eslint \"src/**/*.ts\"",
"lint-fix": "yarn prettier --write . && eslint --fix .",
@@ -110,26 +112,20 @@
"x64ArchFiles": "Contents/Resources/ggmlclip-mac"
},
"afterSign": "electron-builder-notarize",
- "extraFiles": [
- {
- "from": "resources",
- "to": "resources",
- "filter": [
- "**/*"
- ]
- }
- ],
"asarUnpack": [
"node_modules/ffmpeg-static/bin/${os}/${arch}/ffmpeg",
"node_modules/ffmpeg-static/index.js",
"node_modules/ffmpeg-static/package.json"
],
- "files": [
- "build/app/**/*",
+ "extraFiles": [
{
- "from": "build/out",
- "to": "out"
+ "from": "build",
+ "to": "resources"
}
+ ],
+ "files": [
+ "app/**/*",
+ "out"
]
},
"productName": "ente",
diff --git a/desktop/tsconfig.json b/desktop/tsconfig.json
index 1efdc3d01a..142c36005c 100644
--- a/desktop/tsconfig.json
+++ b/desktop/tsconfig.json
@@ -3,8 +3,8 @@
"target": "es2021",
"module": "commonjs",
"esModuleInterop": true,
- /* Emit the generated JS into build/app */
- "outDir": "build/app",
+ /* Emit the generated JS into app */
+ "outDir": "app",
"noImplicitAny": true,
"sourceMap": true,
"baseUrl": "src",