mirror of
https://github.com/AyuGram/AyuGramDesktop.git
synced 2025-06-05 06:33:57 +02:00
Add interactive mode to prepare script.
This commit is contained in:
parent
60805bd916
commit
7f1c319aee
1 changed files with 12 additions and 2 deletions
|
@ -59,6 +59,9 @@ for arg in sys.argv[1:]:
|
||||||
options.append(arg)
|
options.append(arg)
|
||||||
elif arg == 'run':
|
elif arg == 'run':
|
||||||
customRunCommand = True
|
customRunCommand = True
|
||||||
|
elif arg == 'shell':
|
||||||
|
customRunCommand = True
|
||||||
|
runCommand.append('shell')
|
||||||
|
|
||||||
buildQt5 = not 'skip-qt5' in options if win else 'build-qt5' in options
|
buildQt5 = not 'skip-qt5' in options if win else 'build-qt5' in options
|
||||||
buildQt6 = 'build-qt6' in options if win else not 'skip-qt6' in options
|
buildQt6 = 'build-qt6' in options if win else not 'skip-qt6' in options
|
||||||
|
@ -416,8 +419,15 @@ def runStages():
|
||||||
|
|
||||||
if customRunCommand:
|
if customRunCommand:
|
||||||
os.chdir(executePath)
|
os.chdir(executePath)
|
||||||
command = ' '.join(runCommand) + '\n'
|
if len(runCommand) == 1 and runCommand[0] == 'shell':
|
||||||
if not run(command):
|
print('Preparing interactive mode..')
|
||||||
|
if win:
|
||||||
|
modifiedEnv['PROMPT'] = '(prepare) $P$G'
|
||||||
|
subprocess.run("cmd.exe", shell=True, env=modifiedEnv)
|
||||||
|
else:
|
||||||
|
modifiedEnv['PS1'] = '(prepare) \\w \\$ '
|
||||||
|
subprocess.run("bash --noprofile --norc", env=modifiedEnv)
|
||||||
|
elif not run(command):
|
||||||
print('FAILED :(')
|
print('FAILED :(')
|
||||||
finish(1)
|
finish(1)
|
||||||
finish(0)
|
finish(0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue