support more converters and change convert logic

This commit is contained in:
Xiang Zhang 2018-10-31 17:12:31 -07:00
Родитель d4e414a4e5
Коммит c7f116dfcc
2 изменённых файлов: 3 добавлений и 4 удалений

Просмотреть файл

@ -9,7 +9,6 @@
"scripts": {
"start": "react-scripts-ts start",
"build": "react-scripts-ts build",
"test": "react-scripts-ts test --env=jsdom",
"eject": "react-scripts-ts eject",
"postinstall": "node scripts/postinstall.js && yarn copy-netron",
"copy-netron": "yarn --cwd deps/Netron && python deps/copy_netron.py",

Просмотреть файл

@ -13,7 +13,7 @@ import { setFile, setSaveFileName } from '../../datastore/actionCreators';
import IState from '../../datastore/state';
import { packagedFile } from '../../native/appData';
import { fileFromPath, showNativeOpenDialog, showNativeSaveDialog } from '../../native/dialog';
import { downloadPip, downloadPython, getLocalPython, installVenv, pip, python } from '../../native/python';
import { downloadPip, downloadPython, getLocalPython, pip, python } from '../../native/python';
import { isWeb } from '../../native/util';
@ -147,8 +147,8 @@ class ConvertView extends React.Component<IComponentProperties, IComponentState>
this.setState({ currentStep: Step.GetPip });
await downloadPip(this.outputListener);
} else {
this.setState({ currentStep: Step.CreatingVenv });
await installVenv(option.key, this.outputListener);
this.setState({pythonReinstall: false})
return;
}
this.setState({ currentStep: Step.InstallingRequirements });
await pip(['install', '-r', packagedFile('requirements.txt')], this.outputListener);