2024-07-13 15:44:13 +08:00
|
|
|
const path = require('path')
|
|
|
|
|
const { app } = require('electron')
|
2024-05-15 12:57:15 +08:00
|
|
|
let define = {}
|
|
|
|
|
if (!app.isPackaged) {
|
2024-07-13 15:44:13 +08:00
|
|
|
define = {
|
|
|
|
|
discordScript: path.join(__dirname, '../../src/main/discord/discordScript.js'),
|
|
|
|
|
zhanwei_image: path.join(__dirname, '../../resources/image/zhanwei.png'),
|
|
|
|
|
config_path: path.join(__dirname, '../../resources/config/global_setting.json'),
|
|
|
|
|
clip_setting: path.join(__dirname, '../../resources/config/clip_setting.json'),
|
|
|
|
|
sd_setting: path.join(__dirname, '../../resources/config/sd_config.json'),
|
|
|
|
|
dynamic_setting: path.join(__dirname, '../../resources/config/dynamic_setting.json'),
|
|
|
|
|
tag_setting: path.join(__dirname, '../../resources/config/tag_setting.json'),
|
|
|
|
|
img_base: path.join(__dirname, '../../resources/config/img_base.json'),
|
|
|
|
|
video_config: path.join(__dirname, '../../resources/config/video_config.json'),
|
2024-10-15 19:33:37 +08:00
|
|
|
system_config: path.join(__dirname, '../../resources/config/system_config.json'),
|
2024-07-13 15:44:13 +08:00
|
|
|
scripts_path: path.join(__dirname, '../../resources/scripts'),
|
|
|
|
|
db_path: path.join(__dirname, '../../resources/scripts/db'),
|
|
|
|
|
project_path: path.join(__dirname, '../../project'),
|
2024-08-03 12:46:12 +08:00
|
|
|
tts_path: path.join(__dirname, '../../tts'),
|
2024-07-13 15:44:13 +08:00
|
|
|
logger_path: path.join(__dirname, '../../resources/logger'),
|
|
|
|
|
package_path: path.join(__dirname, '../../resources/package'),
|
|
|
|
|
image_path: path.join(__dirname, '../../resources/image'),
|
|
|
|
|
temp_sd_image: path.join(__dirname, '../../resources/image/TempSDImage'),
|
|
|
|
|
draft_temp_path: path.join(__dirname, '../../resources/tmp/temp.zip'),
|
|
|
|
|
init_config_path: path.join(__dirname, '../../resources/tmp/config'),
|
|
|
|
|
clip_speed_temp_path: path.join(__dirname, '../../resources/tmp/Clip/speeds_tmp.json'),
|
|
|
|
|
add_canvases_temp_path: path.join(__dirname, '../../resources/tmp/Clip/canvases_tmp.json'),
|
|
|
|
|
add_sound_channel_mappings_temp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../resources/tmp/Clip/sound_channel_mappings_tmp.json'
|
|
|
|
|
),
|
|
|
|
|
add_vocal_separations_temp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../resources/tmp/Clip/vocal_separations_tmp.json'
|
|
|
|
|
),
|
|
|
|
|
add_material_video_temp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../resources/tmp/Clip/videoMaterialTemp.json'
|
|
|
|
|
),
|
|
|
|
|
add_tracks_segments_temp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../resources/tmp/Clip/tracks_segments_tmp.json'
|
|
|
|
|
),
|
|
|
|
|
add_tracks_type_temp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../resources/tmp/Clip/tracks_type_tmp.json'
|
|
|
|
|
),
|
|
|
|
|
add_material_animations_temp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../resources/tmp/Clip/material_animations_tmp.json'
|
|
|
|
|
),
|
|
|
|
|
add_material_text_temp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../resources/tmp/Clip/material_text_temp.json'
|
|
|
|
|
),
|
|
|
|
|
add_track_text_segments_temp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../resources/tmp/Clip/track_text_segments_temp.json'
|
|
|
|
|
),
|
|
|
|
|
add_materials_beats_tmp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../resources/tmp/Clip/materials_beats_tmp.json'
|
|
|
|
|
),
|
|
|
|
|
add_materials_audios_tmp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../resources/tmp/Clip/materials_audios_tmp.json'
|
|
|
|
|
),
|
|
|
|
|
add_tracks_audio_segments_tmp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../resources/tmp/Clip/tracks_audio_segments_tmp.json'
|
|
|
|
|
),
|
|
|
|
|
add_keyframe_tmp_path: path.join(__dirname, '../../resources/tmp/Clip/keyframe_tmp.json')
|
|
|
|
|
}
|
2024-05-15 12:57:15 +08:00
|
|
|
} else {
|
2024-07-13 15:44:13 +08:00
|
|
|
define = {
|
|
|
|
|
zhanwei_image: path.join(__dirname, '../../../resources/image/zhanwei.png'),
|
|
|
|
|
config_path: path.join(__dirname, '../../../resources/config/global_setting.json'),
|
|
|
|
|
clip_setting: path.join(__dirname, '../../../resources/config/clip_setting.json'),
|
|
|
|
|
sd_setting: path.join(__dirname, '../../../resources/config/sd_config.json'),
|
|
|
|
|
dynamic_setting: path.join(__dirname, '../../../resources/config/dynamic_setting.json'),
|
|
|
|
|
tag_setting: path.join(__dirname, '../../../resources/config/tag_setting.json'),
|
|
|
|
|
video_config: path.join(__dirname, '../../../resources/config/video_config.json'),
|
2024-10-15 19:33:37 +08:00
|
|
|
system_config: path.join(__dirname, '../../../resources/config/system_config.json'),
|
2024-07-13 15:44:13 +08:00
|
|
|
img_base: path.join(__dirname, '../../../resources/config/img_base.json'),
|
|
|
|
|
scripts_path: path.join(__dirname, '../../../resources/scripts'),
|
|
|
|
|
db_path: path.join(__dirname, '../../../resources/scripts/db'),
|
|
|
|
|
project_path: path.join(__dirname, '../../../project'),
|
2024-08-03 12:46:12 +08:00
|
|
|
tts_path: path.join(__dirname, '../../../tts'),
|
2024-07-13 15:44:13 +08:00
|
|
|
logger_path: path.join(__dirname, '../../../resources/logger'),
|
|
|
|
|
package_path: path.join(__dirname, '../../../resources/package'),
|
|
|
|
|
discordScript: path.join(__dirname, '../../../resources/scripts/discordScript.js'),
|
|
|
|
|
image_path: path.join(__dirname, '../../../resources/image'),
|
|
|
|
|
temp_sd_image: path.join(__dirname, '../../../resources/image/TempSDImage'),
|
|
|
|
|
draft_temp_path: path.join(__dirname, '../../../resources/tmp/temp.zip'),
|
|
|
|
|
init_config_path: path.join(__dirname, '../../../resources/tmp/config'),
|
|
|
|
|
clip_speed_temp_path: path.join(__dirname, '../../../resources/tmp/Clip/speeds_tmp.json'),
|
|
|
|
|
add_canvases_temp_path: path.join(__dirname, '../../../resources/tmp/Clip/canvases_tmp.json'),
|
|
|
|
|
add_sound_channel_mappings_temp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../../resources/tmp/Clip/sound_channel_mappings_tmp.json'
|
|
|
|
|
),
|
|
|
|
|
add_vocal_separations_temp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../../resources/tmp/Clip/vocal_separations_tmp.json'
|
|
|
|
|
),
|
|
|
|
|
add_material_video_temp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../../resources/tmp/Clip/videoMaterialTemp.json'
|
|
|
|
|
),
|
|
|
|
|
add_tracks_segments_temp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../../resources/tmp/Clip/tracks_segments_tmp.json'
|
|
|
|
|
),
|
|
|
|
|
add_tracks_type_temp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../../resources/tmp/Clip/tracks_type_tmp.json'
|
|
|
|
|
),
|
|
|
|
|
add_material_animations_temp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../../resources/tmp/Clip/material_animations_tmp.json'
|
|
|
|
|
),
|
|
|
|
|
add_material_text_temp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../../resources/tmp/Clip/material_text_temp.json'
|
|
|
|
|
),
|
|
|
|
|
add_track_text_segments_temp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../../resources/tmp/Clip/track_text_segments_temp.json'
|
|
|
|
|
),
|
|
|
|
|
add_materials_beats_tmp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../../resources/tmp/Clip/materials_beats_tmp.json'
|
|
|
|
|
),
|
|
|
|
|
add_materials_audios_tmp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../../resources/tmp/Clip/materials_audios_tmp.json'
|
|
|
|
|
),
|
|
|
|
|
add_tracks_audio_segments_tmp_path: path.join(
|
|
|
|
|
__dirname,
|
|
|
|
|
'../../../resources/tmp/Clip/tracks_audio_segments_tmp.json'
|
|
|
|
|
),
|
|
|
|
|
add_keyframe_tmp_path: path.join(__dirname, '../../../resources/tmp/Clip/keyframe_tmp.json')
|
|
|
|
|
}
|
2024-05-15 12:57:15 +08:00
|
|
|
}
|
|
|
|
|
|
2024-07-13 15:44:13 +08:00
|
|
|
define['remotemj_api'] = 'https://api.laitool.net/'
|
|
|
|
|
define['serverUrl'] = 'http://lapi.laitool.cn'
|
2024-09-15 14:35:33 +08:00
|
|
|
// define['serverUrl'] = 'http://localhost:1578'
|
2024-08-12 16:26:08 +08:00
|
|
|
define['hkServerUrl'] = 'https://laitool.net/'
|
|
|
|
|
define['bakServerUrl'] = 'https://laitool.net/'
|
2024-07-13 15:44:13 +08:00
|
|
|
define['API'] = 'f85d39ed5a40fd09966f13f12b6cf0f0'
|
2024-08-03 12:46:12 +08:00
|
|
|
export { define }
|