From 049ed5d27ae2d87c82a164df161ad772ffe46d3d Mon Sep 17 00:00:00 2001 From: Daniel LaCosse <3759828+daniellacosse@users.noreply.github.com> Date: Fri, 5 Apr 2024 13:53:44 -0400 Subject: [PATCH] chore(client/electron): move src/electron into client/src/electron --- {src => client/src}/electron/README.md | 0 {src => client/src}/electron/add_tap_device.bat | 0 {src => client/src}/electron/build.action.mjs | 16 ++++++++-------- .../src}/electron/build_main.action.mjs | 12 ++++++------ {src => client/src}/electron/connectivity.ts | 4 ++-- .../src}/electron/custom_install_steps.nsh | 6 +++--- .../src}/electron/electron-builder.json | 0 .../src}/electron/find_tap_device_name.bat | 0 {src => client/src}/electron/go_vpn_tunnel.ts | 8 ++++---- .../src}/electron/icons/mac/icon.icns | Bin .../src}/electron/icons/png/1024x1024.png | Bin .../src}/electron/icons/png/128x128.png | Bin .../src}/electron/icons/png/16x16.png | Bin .../src}/electron/icons/png/24x24.png | Bin .../src}/electron/icons/png/256x256.png | Bin .../src}/electron/icons/png/32x32.png | Bin .../src}/electron/icons/png/48x48.png | Bin .../src}/electron/icons/png/512x512.png | Bin .../src}/electron/icons/png/64x64.png | Bin {src => client/src}/electron/icons/win/icon.ico | Bin {src => client/src}/electron/index.ts | 6 +++--- .../src}/electron/install_windows_service.bat | 0 {src => client/src}/electron/preload.d.ts | 0 {src => client/src}/electron/preload.ts | 0 {src => client/src}/electron/process.ts | 0 {src => client/src}/electron/routing_service.ts | 6 +++--- {src => client/src}/electron/start.action.mjs | 8 ++++---- {src => client/src}/electron/tsconfig.json | 2 +- {src => client/src}/electron/tunnel_store.ts | 2 +- .../src}/electron/types/socks/index.d.ts | 0 {src => client/src}/electron/vpn_tunnel.ts | 2 +- .../src}/electron/webpack_electron_main.mjs | 4 ++-- .../digicert-usb-config/eToken-macos.cfg | 0 .../digicert-usb-config/eToken-windows.cfg | 0 .../windows/electron_builder_signing_plugin.cjs | 2 +- .../windows/sign_windows_executable.action.mjs | 2 +- client/src/www/app/electron_main.ts | 2 +- .../tools}/OutlineService/OutlineService.sln | 0 .../OutlineService/OutlineService/App.config | 0 .../OutlineService/OutlineService.Designer.cs | 0 .../OutlineService/OutlineService.cs | 0 .../OutlineService/OutlineService.csproj | 0 .../OutlineService/OutlineService.resx | 0 .../OutlineService/OutlineService/Program.cs | 0 .../OutlineService/Properties/AssemblyInfo.cs | 0 .../OutlineService/bin/OutlineService.exe | Bin .../bin/Release/OutlineService.exe.config | 0 .../OutlineService/packages.config | 0 {tools => client/tools}/smartdnsblock/README.md | 0 .../tools}/smartdnsblock/bin/smartdnsblock.exe | Bin .../tools}/smartdnsblock/smartdnsblock.sln | 0 .../smartdnsblock/smartdnsblock.cpp | 0 .../smartdnsblock/smartdnsblock.filters | 0 .../smartdnsblock/smartdnsblock.user | 0 .../smartdnsblock/smartdnsblock.vcxproj | 0 package.json | 7 ++----- www/environment.json | 1 + 57 files changed, 44 insertions(+), 46 deletions(-) rename {src => client/src}/electron/README.md (100%) rename {src => client/src}/electron/add_tap_device.bat (100%) rename {src => client/src}/electron/build.action.mjs (81%) rename {src => client/src}/electron/build_main.action.mjs (82%) rename {src => client/src}/electron/connectivity.ts (89%) rename {src => client/src}/electron/custom_install_steps.nsh (96%) rename {src => client/src}/electron/electron-builder.json (100%) rename {src => client/src}/electron/find_tap_device_name.bat (100%) rename {src => client/src}/electron/go_vpn_tunnel.ts (97%) rename {src => client/src}/electron/icons/mac/icon.icns (100%) rename {src => client/src}/electron/icons/png/1024x1024.png (100%) rename {src => client/src}/electron/icons/png/128x128.png (100%) rename {src => client/src}/electron/icons/png/16x16.png (100%) rename {src => client/src}/electron/icons/png/24x24.png (100%) rename {src => client/src}/electron/icons/png/256x256.png (100%) rename {src => client/src}/electron/icons/png/32x32.png (100%) rename {src => client/src}/electron/icons/png/48x48.png (100%) rename {src => client/src}/electron/icons/png/512x512.png (100%) rename {src => client/src}/electron/icons/png/64x64.png (100%) rename {src => client/src}/electron/icons/win/icon.ico (100%) rename {src => client/src}/electron/index.ts (98%) rename {src => client/src}/electron/install_windows_service.bat (100%) rename {src => client/src}/electron/preload.d.ts (100%) rename {src => client/src}/electron/preload.ts (100%) rename {src => client/src}/electron/process.ts (100%) rename {src => client/src}/electron/routing_service.ts (98%) rename {src => client/src}/electron/start.action.mjs (81%) rename {src => client/src}/electron/tsconfig.json (57%) rename {src => client/src}/electron/tunnel_store.ts (97%) rename {src => client/src}/electron/types/socks/index.d.ts (100%) rename {src => client/src}/electron/vpn_tunnel.ts (96%) rename {src => client/src}/electron/webpack_electron_main.mjs (95%) rename {src => client/src}/electron/windows/digicert-usb-config/eToken-macos.cfg (100%) rename {src => client/src}/electron/windows/digicert-usb-config/eToken-windows.cfg (100%) rename {src => client/src}/electron/windows/electron_builder_signing_plugin.cjs (95%) rename {src => client/src}/electron/windows/sign_windows_executable.action.mjs (99%) rename {tools => client/tools}/OutlineService/OutlineService.sln (100%) rename {tools => client/tools}/OutlineService/OutlineService/App.config (100%) rename {tools => client/tools}/OutlineService/OutlineService/OutlineService.Designer.cs (100%) rename {tools => client/tools}/OutlineService/OutlineService/OutlineService.cs (100%) rename {tools => client/tools}/OutlineService/OutlineService/OutlineService.csproj (100%) rename {tools => client/tools}/OutlineService/OutlineService/OutlineService.resx (100%) rename {tools => client/tools}/OutlineService/OutlineService/Program.cs (100%) rename {tools => client/tools}/OutlineService/OutlineService/Properties/AssemblyInfo.cs (100%) rename {tools => client/tools}/OutlineService/OutlineService/bin/OutlineService.exe (100%) rename {tools => client/tools}/OutlineService/OutlineService/bin/Release/OutlineService.exe.config (100%) rename {tools => client/tools}/OutlineService/OutlineService/packages.config (100%) rename {tools => client/tools}/smartdnsblock/README.md (100%) rename {tools => client/tools}/smartdnsblock/bin/smartdnsblock.exe (100%) rename {tools => client/tools}/smartdnsblock/smartdnsblock.sln (100%) rename {tools => client/tools}/smartdnsblock/smartdnsblock/smartdnsblock.cpp (100%) rename {tools => client/tools}/smartdnsblock/smartdnsblock/smartdnsblock.filters (100%) rename {tools => client/tools}/smartdnsblock/smartdnsblock/smartdnsblock.user (100%) rename {tools => client/tools}/smartdnsblock/smartdnsblock/smartdnsblock.vcxproj (100%) create mode 100644 www/environment.json diff --git a/src/electron/README.md b/client/src/electron/README.md similarity index 100% rename from src/electron/README.md rename to client/src/electron/README.md diff --git a/src/electron/add_tap_device.bat b/client/src/electron/add_tap_device.bat similarity index 100% rename from src/electron/add_tap_device.bat rename to client/src/electron/add_tap_device.bat diff --git a/src/electron/build.action.mjs b/client/src/electron/build.action.mjs similarity index 81% rename from src/electron/build.action.mjs rename to client/src/electron/build.action.mjs index 88502d1dad4..a9dc088bb7c 100644 --- a/src/electron/build.action.mjs +++ b/client/src/electron/build.action.mjs @@ -13,13 +13,13 @@ // limitations under the License. import minimist from 'minimist'; -import {runAction} from '../build/run_action.mjs'; -import {getBuildParameters} from '../../client/src/build/get_build_parameters.mjs'; +import {runAction} from '../../../src/build/run_action.mjs'; +import {getBuildParameters} from '../build/get_build_parameters.mjs'; import electron, {Platform} from 'electron-builder'; import copydir from 'copy-dir'; import fs from 'fs/promises'; import url from 'url'; -import {getRootDir} from '../build/get_root_dir.mjs'; +import {getRootDir} from '../../../src/build/get_root_dir.mjs'; import path from 'path'; const ELECTRON_BUILD_DIR = 'build'; @@ -49,16 +49,16 @@ export async function main(...parameters) { } await runAction('client/src/www/build', ...parameters); - await runAction('client/src/tun2socks/build', ...parameters); - await runAction('src/electron/build_main', ...parameters); + // await runAction('client/src/tun2socks/build', ...parameters); + await runAction('client/src/electron/build_main', ...parameters); await copydir.sync( - path.join(getRootDir(), 'src', 'electron', 'icons'), - path.join(getRootDir(), ELECTRON_BUILD_DIR, 'icons') + path.join(getRootDir(), 'client', 'src', 'electron', 'icons'), + path.join(getRootDir(), 'client', ELECTRON_BUILD_DIR, 'icons') ); const electronConfig = JSON.parse( - await fs.readFile(path.resolve(getRootDir(), 'src', 'electron', 'electron-builder.json')) + await fs.readFile(path.resolve(getRootDir(), 'client', 'src', 'electron', 'electron-builder.json')) ); // build electron binary diff --git a/src/electron/build_main.action.mjs b/client/src/electron/build_main.action.mjs similarity index 82% rename from src/electron/build_main.action.mjs rename to client/src/electron/build_main.action.mjs index 2506acdf391..6e0bb421637 100644 --- a/src/electron/build_main.action.mjs +++ b/client/src/electron/build_main.action.mjs @@ -12,15 +12,15 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {runAction} from '../build/run_action.mjs'; -import {getBuildParameters} from '../../client/src/build/get_build_parameters.mjs'; -import {getWebpackBuildMode} from '../../client/src/build/get_webpack_build_mode.mjs'; -import {runWebpack} from '../../client/src/build/run_webpack.mjs'; +import {runAction} from '../../../src/build/run_action.mjs'; +import {getBuildParameters} from '../build/get_build_parameters.mjs'; +import {getWebpackBuildMode} from '../build/get_webpack_build_mode.mjs'; +import {runWebpack} from '../build/run_webpack.mjs'; import electronMainWebpackConfigs from './webpack_electron_main.mjs'; import fs from 'fs/promises'; import path from 'path'; import url from 'url'; -import {getRootDir} from '../build/get_root_dir.mjs'; +import {getRootDir} from '../../../src/build/get_root_dir.mjs'; const ELECTRON_BUILD_DIR = 'build'; const ELECTRON_PLATFORMS = ['linux', 'windows']; @@ -57,7 +57,7 @@ export async function main(...parameters) { windowsEnvironment += `\n!define SENTRY_URL ""`; } - await fs.writeFile(path.resolve(getRootDir(), ELECTRON_BUILD_DIR, 'env.nsh'), windowsEnvironment); + await fs.writeFile(path.resolve(getRootDir(), 'client', ELECTRON_BUILD_DIR, 'env.nsh'), windowsEnvironment); } } diff --git a/src/electron/connectivity.ts b/client/src/electron/connectivity.ts similarity index 89% rename from src/electron/connectivity.ts rename to client/src/electron/connectivity.ts index e1b8bfa8a40..1aafc92e3fb 100644 --- a/src/electron/connectivity.ts +++ b/client/src/electron/connectivity.ts @@ -14,8 +14,8 @@ import * as dns from 'dns'; -import {timeoutPromise} from '../../client/src/infrastructure/timeout_promise'; -import * as errors from '../../client/src/www/model/errors'; +import {timeoutPromise} from '../infrastructure/timeout_promise'; +import * as errors from '../www/model/errors'; const DNS_LOOKUP_TIMEOUT_MS = 10000; diff --git a/src/electron/custom_install_steps.nsh b/client/src/electron/custom_install_steps.nsh similarity index 96% rename from src/electron/custom_install_steps.nsh rename to client/src/electron/custom_install_steps.nsh index 3f106efcd60..01b37faf98f 100755 --- a/src/electron/custom_install_steps.nsh +++ b/client/src/electron/custom_install_steps.nsh @@ -57,10 +57,10 @@ ${StrRep} ; OutlineService files, stopping the service first in case it's still running. nsExec::Exec "$SYSDIR\net stop OutlineService" - File "${PROJECT_DIR}\tools\OutlineService\OutlineService\bin\OutlineService.exe" - File "${PROJECT_DIR}\tools\smartdnsblock\bin\smartdnsblock.exe" + File "${PROJECT_DIR}\client\tools\OutlineService\OutlineService\bin\OutlineService.exe" + File "${PROJECT_DIR}\client\tools\smartdnsblock\bin\smartdnsblock.exe" File "${PROJECT_DIR}\third_party\newtonsoft\Newtonsoft.Json.dll" - File "${PROJECT_DIR}\src\electron\install_windows_service.bat" + File "${PROJECT_DIR}\client\src\electron\install_windows_service.bat" ; ExecToStack captures both stdout and stderr from the script, in the order output. ; Set a (long) timeout in case the device never becomes visible to netsh. diff --git a/src/electron/electron-builder.json b/client/src/electron/electron-builder.json similarity index 100% rename from src/electron/electron-builder.json rename to client/src/electron/electron-builder.json diff --git a/src/electron/find_tap_device_name.bat b/client/src/electron/find_tap_device_name.bat similarity index 100% rename from src/electron/find_tap_device_name.bat rename to client/src/electron/find_tap_device_name.bat diff --git a/src/electron/go_vpn_tunnel.ts b/client/src/electron/go_vpn_tunnel.ts similarity index 97% rename from src/electron/go_vpn_tunnel.ts rename to client/src/electron/go_vpn_tunnel.ts index e808b8102a8..99f61a26510 100755 --- a/src/electron/go_vpn_tunnel.ts +++ b/client/src/electron/go_vpn_tunnel.ts @@ -15,10 +15,10 @@ import {powerMonitor} from 'electron'; import {platform} from 'os'; -import {pathToEmbeddedBinary} from '../../client/src/infrastructure/electron/app_paths'; -import {ShadowsocksSessionConfig} from '../../client/src/www/app/tunnel'; -import {TunnelStatus} from '../../client/src/www/app/tunnel'; -import {ErrorCode, fromErrorCode, UnexpectedPluginError} from '../../client/src/www/model/errors'; +import {pathToEmbeddedBinary} from '../infrastructure/electron/app_paths'; +import {ShadowsocksSessionConfig} from '../www/app/tunnel'; +import {TunnelStatus} from '../www/app/tunnel'; +import {ErrorCode, fromErrorCode, UnexpectedPluginError} from '../www/model/errors'; import {ChildProcessHelper, ProcessTerminatedExitCodeError, ProcessTerminatedSignalError} from './process'; import {RoutingDaemon} from './routing_service'; diff --git a/src/electron/icons/mac/icon.icns b/client/src/electron/icons/mac/icon.icns similarity index 100% rename from src/electron/icons/mac/icon.icns rename to client/src/electron/icons/mac/icon.icns diff --git a/src/electron/icons/png/1024x1024.png b/client/src/electron/icons/png/1024x1024.png similarity index 100% rename from src/electron/icons/png/1024x1024.png rename to client/src/electron/icons/png/1024x1024.png diff --git a/src/electron/icons/png/128x128.png b/client/src/electron/icons/png/128x128.png similarity index 100% rename from src/electron/icons/png/128x128.png rename to client/src/electron/icons/png/128x128.png diff --git a/src/electron/icons/png/16x16.png b/client/src/electron/icons/png/16x16.png similarity index 100% rename from src/electron/icons/png/16x16.png rename to client/src/electron/icons/png/16x16.png diff --git a/src/electron/icons/png/24x24.png b/client/src/electron/icons/png/24x24.png similarity index 100% rename from src/electron/icons/png/24x24.png rename to client/src/electron/icons/png/24x24.png diff --git a/src/electron/icons/png/256x256.png b/client/src/electron/icons/png/256x256.png similarity index 100% rename from src/electron/icons/png/256x256.png rename to client/src/electron/icons/png/256x256.png diff --git a/src/electron/icons/png/32x32.png b/client/src/electron/icons/png/32x32.png similarity index 100% rename from src/electron/icons/png/32x32.png rename to client/src/electron/icons/png/32x32.png diff --git a/src/electron/icons/png/48x48.png b/client/src/electron/icons/png/48x48.png similarity index 100% rename from src/electron/icons/png/48x48.png rename to client/src/electron/icons/png/48x48.png diff --git a/src/electron/icons/png/512x512.png b/client/src/electron/icons/png/512x512.png similarity index 100% rename from src/electron/icons/png/512x512.png rename to client/src/electron/icons/png/512x512.png diff --git a/src/electron/icons/png/64x64.png b/client/src/electron/icons/png/64x64.png similarity index 100% rename from src/electron/icons/png/64x64.png rename to client/src/electron/icons/png/64x64.png diff --git a/src/electron/icons/win/icon.ico b/client/src/electron/icons/win/icon.ico similarity index 100% rename from src/electron/icons/win/icon.ico rename to client/src/electron/icons/win/icon.ico diff --git a/src/electron/index.ts b/client/src/electron/index.ts similarity index 98% rename from src/electron/index.ts rename to client/src/electron/index.ts index a3749bb4036..60820e502a9 100644 --- a/src/electron/index.ts +++ b/client/src/electron/index.ts @@ -23,10 +23,10 @@ import * as process from 'process'; import * as url from 'url'; import autoLaunch = require('auto-launch'); // tslint:disable-line -import * as errors from '../../client/src/www/model/errors'; +import * as errors from '../www/model/errors'; -import {ShadowsocksSessionConfig} from '../../client/src/www/app/tunnel'; -import {TunnelStatus} from '../../client/src/www/app/tunnel'; +import {ShadowsocksSessionConfig} from '../www/app/tunnel'; +import {TunnelStatus} from '../www/app/tunnel'; import {GoVpnTunnel} from './go_vpn_tunnel'; import {installRoutingServices, RoutingDaemon} from './routing_service'; import {TunnelStore, SerializableTunnel} from './tunnel_store'; diff --git a/src/electron/install_windows_service.bat b/client/src/electron/install_windows_service.bat similarity index 100% rename from src/electron/install_windows_service.bat rename to client/src/electron/install_windows_service.bat diff --git a/src/electron/preload.d.ts b/client/src/electron/preload.d.ts similarity index 100% rename from src/electron/preload.d.ts rename to client/src/electron/preload.d.ts diff --git a/src/electron/preload.ts b/client/src/electron/preload.ts similarity index 100% rename from src/electron/preload.ts rename to client/src/electron/preload.ts diff --git a/src/electron/process.ts b/client/src/electron/process.ts similarity index 100% rename from src/electron/process.ts rename to client/src/electron/process.ts diff --git a/src/electron/routing_service.ts b/client/src/electron/routing_service.ts similarity index 98% rename from src/electron/routing_service.ts rename to client/src/electron/routing_service.ts index a2b3612eb85..0ca1f1bc674 100755 --- a/src/electron/routing_service.ts +++ b/client/src/electron/routing_service.ts @@ -19,9 +19,9 @@ import {platform, userInfo} from 'os'; import * as path from 'path'; import * as sudo from 'sudo-prompt'; -import {getAppPath} from '../../client/src/infrastructure/electron/app_paths'; -import {TunnelStatus} from '../../client/src/www/app/tunnel'; -import {ErrorCode, SystemConfigurationException} from '../../client/src/www/model/errors'; +import {getAppPath} from '../infrastructure/electron/app_paths'; +import {TunnelStatus} from '../www/app/tunnel'; +import {ErrorCode, SystemConfigurationException} from '../www/model/errors'; const isLinux = platform() === 'linux'; const isWindows = platform() === 'win32'; diff --git a/src/electron/start.action.mjs b/client/src/electron/start.action.mjs similarity index 81% rename from src/electron/start.action.mjs rename to client/src/electron/start.action.mjs index 9ef335799df..36ff399b675 100644 --- a/src/electron/start.action.mjs +++ b/client/src/electron/start.action.mjs @@ -15,10 +15,10 @@ import url from 'url'; import electron from 'electron'; -import {runAction} from '../../client/src/build/run_action.mjs'; -import {getBuildParameters} from '../../client/src/build/get_build_parameters.mjs'; -import {getRootDir} from '../../client/src/build/get_root_dir.mjs'; -import {spawnStream} from '../../client/src/build/spawn_stream.mjs'; +import {runAction} from '../../../src/build/run_action.mjs'; +import {getBuildParameters} from '../build/get_build_parameters.mjs'; +import {getRootDir} from '../../../src/build/get_root_dir.mjs'; +import {spawnStream} from '../../../src/build/spawn_stream.mjs'; /** * @description Builds and starts the electron application. diff --git a/src/electron/tsconfig.json b/client/src/electron/tsconfig.json similarity index 57% rename from src/electron/tsconfig.json rename to client/src/electron/tsconfig.json index 89375e09b82..9a97ef96b11 100644 --- a/src/electron/tsconfig.json +++ b/client/src/electron/tsconfig.json @@ -1,5 +1,5 @@ { - "extends": "../../client/src/www/tsconfig.json", + "extends": "../www/tsconfig.json", "compilerOptions": { "outDir": "../../build/electron" } diff --git a/src/electron/tunnel_store.ts b/client/src/electron/tunnel_store.ts similarity index 97% rename from src/electron/tunnel_store.ts rename to client/src/electron/tunnel_store.ts index 44743c6efcc..b920f765d1d 100755 --- a/src/electron/tunnel_store.ts +++ b/client/src/electron/tunnel_store.ts @@ -15,7 +15,7 @@ import * as fs from 'fs'; import * as path from 'path'; -import {ShadowsocksSessionConfig} from '../../client/src/www/app/tunnel'; +import {ShadowsocksSessionConfig} from '../www/app/tunnel'; // Format to store a tunnel configuration. export interface SerializableTunnel { diff --git a/src/electron/types/socks/index.d.ts b/client/src/electron/types/socks/index.d.ts similarity index 100% rename from src/electron/types/socks/index.d.ts rename to client/src/electron/types/socks/index.d.ts diff --git a/src/electron/vpn_tunnel.ts b/client/src/electron/vpn_tunnel.ts similarity index 96% rename from src/electron/vpn_tunnel.ts rename to client/src/electron/vpn_tunnel.ts index 12cca0981d7..a8c1a49e112 100755 --- a/src/electron/vpn_tunnel.ts +++ b/client/src/electron/vpn_tunnel.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -import {TunnelStatus} from '../../client/src/www/app/tunnel'; +import {TunnelStatus} from '../www/app/tunnel'; // Represents a VPN tunnel to a proxy server. export interface VpnTunnel { diff --git a/src/electron/webpack_electron_main.mjs b/client/src/electron/webpack_electron_main.mjs similarity index 95% rename from src/electron/webpack_electron_main.mjs rename to client/src/electron/webpack_electron_main.mjs index 58b037b9a4f..6347cf87fdb 100755 --- a/src/electron/webpack_electron_main.mjs +++ b/client/src/electron/webpack_electron_main.mjs @@ -22,7 +22,7 @@ const __dirname = path.dirname(__filename); export default ({sentryDsn, appVersion}) => [ { - entry: './src/electron/index.ts', + entry: './client/src/electron/index.ts', target: 'electron-main', node: { __dirname: false, @@ -53,7 +53,7 @@ export default ({sentryDsn, appVersion}) => [ }, }, { - entry: './src/electron/preload.ts', + entry: './client/src/electron/preload.ts', target: 'electron-preload', devtool: 'inline-source-map', module: { diff --git a/src/electron/windows/digicert-usb-config/eToken-macos.cfg b/client/src/electron/windows/digicert-usb-config/eToken-macos.cfg similarity index 100% rename from src/electron/windows/digicert-usb-config/eToken-macos.cfg rename to client/src/electron/windows/digicert-usb-config/eToken-macos.cfg diff --git a/src/electron/windows/digicert-usb-config/eToken-windows.cfg b/client/src/electron/windows/digicert-usb-config/eToken-windows.cfg similarity index 100% rename from src/electron/windows/digicert-usb-config/eToken-windows.cfg rename to client/src/electron/windows/digicert-usb-config/eToken-windows.cfg diff --git a/src/electron/windows/electron_builder_signing_plugin.cjs b/client/src/electron/windows/electron_builder_signing_plugin.cjs similarity index 95% rename from src/electron/windows/electron_builder_signing_plugin.cjs rename to client/src/electron/windows/electron_builder_signing_plugin.cjs index cc66e17f3e0..32877724dfd 100644 --- a/src/electron/windows/electron_builder_signing_plugin.cjs +++ b/client/src/electron/windows/electron_builder_signing_plugin.cjs @@ -29,7 +29,7 @@ * @param {Object} configuration.options a duplication of electron-builder.json */ async function electronBuilderEntryPoint(configuration) { - const {runAction} = await import('../../build/run_action.mjs'); + const {runAction} = await import('../../../../src/build/run_action.mjs'); await runAction('src/electron/windows/sign_windows_executable', '--target', configuration.path, '--algorithm', configuration.hash); diff --git a/src/electron/windows/sign_windows_executable.action.mjs b/client/src/electron/windows/sign_windows_executable.action.mjs similarity index 99% rename from src/electron/windows/sign_windows_executable.action.mjs rename to client/src/electron/windows/sign_windows_executable.action.mjs index 49697981a53..6a9a57e64f8 100644 --- a/src/electron/windows/sign_windows_executable.action.mjs +++ b/client/src/electron/windows/sign_windows_executable.action.mjs @@ -19,7 +19,7 @@ import {dirname, resolve} from 'path'; import {fileURLToPath, pathToFileURL} from 'url'; import {format} from 'util'; -import {jsign} from '../../../third_party/jsign/index.mjs'; +import {jsign} from '../../../../third_party/jsign/index.mjs'; /** * Get the parent folder path of this script. diff --git a/client/src/www/app/electron_main.ts b/client/src/www/app/electron_main.ts index 87dc973de58..e4be0325c93 100644 --- a/client/src/www/app/electron_main.ts +++ b/client/src/www/app/electron_main.ts @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -/// +/// import 'web-animations-js/web-animations-next-lite.min.js'; import '@webcomponents/webcomponentsjs/webcomponents-bundle.js'; diff --git a/tools/OutlineService/OutlineService.sln b/client/tools/OutlineService/OutlineService.sln similarity index 100% rename from tools/OutlineService/OutlineService.sln rename to client/tools/OutlineService/OutlineService.sln diff --git a/tools/OutlineService/OutlineService/App.config b/client/tools/OutlineService/OutlineService/App.config similarity index 100% rename from tools/OutlineService/OutlineService/App.config rename to client/tools/OutlineService/OutlineService/App.config diff --git a/tools/OutlineService/OutlineService/OutlineService.Designer.cs b/client/tools/OutlineService/OutlineService/OutlineService.Designer.cs similarity index 100% rename from tools/OutlineService/OutlineService/OutlineService.Designer.cs rename to client/tools/OutlineService/OutlineService/OutlineService.Designer.cs diff --git a/tools/OutlineService/OutlineService/OutlineService.cs b/client/tools/OutlineService/OutlineService/OutlineService.cs similarity index 100% rename from tools/OutlineService/OutlineService/OutlineService.cs rename to client/tools/OutlineService/OutlineService/OutlineService.cs diff --git a/tools/OutlineService/OutlineService/OutlineService.csproj b/client/tools/OutlineService/OutlineService/OutlineService.csproj similarity index 100% rename from tools/OutlineService/OutlineService/OutlineService.csproj rename to client/tools/OutlineService/OutlineService/OutlineService.csproj diff --git a/tools/OutlineService/OutlineService/OutlineService.resx b/client/tools/OutlineService/OutlineService/OutlineService.resx similarity index 100% rename from tools/OutlineService/OutlineService/OutlineService.resx rename to client/tools/OutlineService/OutlineService/OutlineService.resx diff --git a/tools/OutlineService/OutlineService/Program.cs b/client/tools/OutlineService/OutlineService/Program.cs similarity index 100% rename from tools/OutlineService/OutlineService/Program.cs rename to client/tools/OutlineService/OutlineService/Program.cs diff --git a/tools/OutlineService/OutlineService/Properties/AssemblyInfo.cs b/client/tools/OutlineService/OutlineService/Properties/AssemblyInfo.cs similarity index 100% rename from tools/OutlineService/OutlineService/Properties/AssemblyInfo.cs rename to client/tools/OutlineService/OutlineService/Properties/AssemblyInfo.cs diff --git a/tools/OutlineService/OutlineService/bin/OutlineService.exe b/client/tools/OutlineService/OutlineService/bin/OutlineService.exe similarity index 100% rename from tools/OutlineService/OutlineService/bin/OutlineService.exe rename to client/tools/OutlineService/OutlineService/bin/OutlineService.exe diff --git a/tools/OutlineService/OutlineService/bin/Release/OutlineService.exe.config b/client/tools/OutlineService/OutlineService/bin/Release/OutlineService.exe.config similarity index 100% rename from tools/OutlineService/OutlineService/bin/Release/OutlineService.exe.config rename to client/tools/OutlineService/OutlineService/bin/Release/OutlineService.exe.config diff --git a/tools/OutlineService/OutlineService/packages.config b/client/tools/OutlineService/OutlineService/packages.config similarity index 100% rename from tools/OutlineService/OutlineService/packages.config rename to client/tools/OutlineService/OutlineService/packages.config diff --git a/tools/smartdnsblock/README.md b/client/tools/smartdnsblock/README.md similarity index 100% rename from tools/smartdnsblock/README.md rename to client/tools/smartdnsblock/README.md diff --git a/tools/smartdnsblock/bin/smartdnsblock.exe b/client/tools/smartdnsblock/bin/smartdnsblock.exe similarity index 100% rename from tools/smartdnsblock/bin/smartdnsblock.exe rename to client/tools/smartdnsblock/bin/smartdnsblock.exe diff --git a/tools/smartdnsblock/smartdnsblock.sln b/client/tools/smartdnsblock/smartdnsblock.sln similarity index 100% rename from tools/smartdnsblock/smartdnsblock.sln rename to client/tools/smartdnsblock/smartdnsblock.sln diff --git a/tools/smartdnsblock/smartdnsblock/smartdnsblock.cpp b/client/tools/smartdnsblock/smartdnsblock/smartdnsblock.cpp similarity index 100% rename from tools/smartdnsblock/smartdnsblock/smartdnsblock.cpp rename to client/tools/smartdnsblock/smartdnsblock/smartdnsblock.cpp diff --git a/tools/smartdnsblock/smartdnsblock/smartdnsblock.filters b/client/tools/smartdnsblock/smartdnsblock/smartdnsblock.filters similarity index 100% rename from tools/smartdnsblock/smartdnsblock/smartdnsblock.filters rename to client/tools/smartdnsblock/smartdnsblock/smartdnsblock.filters diff --git a/tools/smartdnsblock/smartdnsblock/smartdnsblock.user b/client/tools/smartdnsblock/smartdnsblock/smartdnsblock.user similarity index 100% rename from tools/smartdnsblock/smartdnsblock/smartdnsblock.user rename to client/tools/smartdnsblock/smartdnsblock/smartdnsblock.user diff --git a/tools/smartdnsblock/smartdnsblock/smartdnsblock.vcxproj b/client/tools/smartdnsblock/smartdnsblock/smartdnsblock.vcxproj similarity index 100% rename from tools/smartdnsblock/smartdnsblock/smartdnsblock.vcxproj rename to client/tools/smartdnsblock/smartdnsblock/smartdnsblock.vcxproj diff --git a/package.json b/package.json index bf8ef4a53f8..4cd3bb4558b 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "action:help": "npm run action list", "action:list": "npm run action list", "action": "node ./src/build/run_action.mjs", - "clean": "rimraf client/build client/output node_modules client/node_modules client/www client/platforms client/plugins third_party/jsign/*.jar", + "clean": "rimraf build output client/build client/output node_modules client/node_modules client/www client/platforms client/plugins third_party/jsign/*.jar", "format:all": "prettier --write \"**/*.{cjs,mjs,html,js,json,md,ts}\"", "format": "pretty-quick --staged --pattern \"**/*.{cjs,mjs,html,js,json,md,ts}\"", "lint:ts": "eslint --ext ts,mjs client/src", @@ -20,8 +20,5 @@ "server_manager", "client" ], - "devDependencies": { - "electron-builder": "^24.13.3" - }, - "main": "build/electron/electron/index.js" + "main": "client/build/electron/electron/index.js" } diff --git a/www/environment.json b/www/environment.json new file mode 100644 index 00000000000..73366cd4552 --- /dev/null +++ b/www/environment.json @@ -0,0 +1 @@ +{"APP_VERSION":"0.0.0-debug","APP_BUILD_NUMBER":475649} \ No newline at end of file