mirror of
https://gitee.com/viarotel-org/escrcpy.git
synced 2024-11-29 18:01:34 +08:00
fix: 🐛 修复 linux 无法启动镜像或录制服务以及修改自定义依赖目录的问题
This commit is contained in:
parent
ad529ca662
commit
d8156437bc
@ -7,7 +7,7 @@ export default (mainWindow) => {
|
||||
|
||||
ipcMain.handle(
|
||||
'show-open-dialog',
|
||||
async (event, { preset = '', ...options } = {}) => {
|
||||
async (_, { preset = '', ...options } = {}) => {
|
||||
// console.log('options', options)
|
||||
const res = await dialog
|
||||
.showOpenDialog(options)
|
||||
@ -33,17 +33,17 @@ export default (mainWindow) => {
|
||||
},
|
||||
)
|
||||
|
||||
ipcMain.handle('open-path', async (event, pathValue) => {
|
||||
ipcMain.handle('open-path', async (_, pathValue) => {
|
||||
return shell.openPath(pathValue)
|
||||
})
|
||||
|
||||
ipcMain.handle('show-item-in-folder', async (event, filePath) => {
|
||||
ipcMain.handle('show-item-in-folder', async (_, filePath) => {
|
||||
return shell.showItemInFolder(filePath)
|
||||
})
|
||||
|
||||
ipcMain.handle(
|
||||
'show-save-dialog',
|
||||
async (event, { filePath = '', ...options } = {}) => {
|
||||
async (_, { filePath = '', ...options } = {}) => {
|
||||
const res = await dialog
|
||||
.showSaveDialog({
|
||||
...options,
|
||||
|
@ -148,6 +148,8 @@ const watch = async (callback) => {
|
||||
export default () => {
|
||||
const binPath = appStore.get('common.adbPath') || adbPath
|
||||
|
||||
console.log('adb.binPath', binPath)
|
||||
|
||||
client = Adb.createClient({
|
||||
bin: binPath,
|
||||
})
|
||||
|
@ -7,8 +7,11 @@ const shell = async (command, { stdout, stderr } = {}) => {
|
||||
const ADB = appStore.get('common.adbPath') || adbPath
|
||||
const args = command.split(' ')
|
||||
|
||||
console.log('scrcpy.shell.spawnPath', spawnPath)
|
||||
console.log('scrcpy.shell.ADB', ADB)
|
||||
|
||||
const scrcpyProcess = spawn(`"${spawnPath}"`, args, {
|
||||
env: { ...process.env, ADB: `"${ADB}"` },
|
||||
env: { ...process.env, ADB },
|
||||
shell: true,
|
||||
encoding: 'utf8',
|
||||
})
|
||||
|
@ -195,7 +195,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { debounce } from 'lodash-es'
|
||||
import { cloneDeep, debounce } from 'lodash-es'
|
||||
import LanguageSelect from './LanguageSelect/index.vue'
|
||||
import { usePreferenceStore } from '@/store/index.js'
|
||||
import LoadingIcon from '@/components/Device/ControlBar/LoadingIcon/index.vue'
|
||||
@ -368,14 +368,15 @@ export default {
|
||||
|
||||
messageEl.close()
|
||||
},
|
||||
async handleSelect({ field }, { properties, filters } = {}) {
|
||||
async handleSelect({ field }, options = {}) {
|
||||
const { properties, filters } = cloneDeep(options)
|
||||
try {
|
||||
const defaultPath = this.preferenceData[field]
|
||||
const files = await this.$electron.ipcRenderer.invoke(
|
||||
'show-open-dialog',
|
||||
{
|
||||
properties,
|
||||
filters,
|
||||
properties: properties || [],
|
||||
filters: filters || [],
|
||||
...(defaultPath
|
||||
? {
|
||||
defaultPath,
|
||||
|
Loading…
Reference in New Issue
Block a user