Skip to content

Commit b73b4e3

Browse files
committed
installer: offer pseudo console support as an experimental option
Cygwin runtime v3.1.x came with a really cool new feature: pseudo console support. Theoretically, this allows users to run native console programs in a MinTTY without having to use winpty. Practically, the feature is unfortunately still too buggy to unleash onto the Git for Windows user masses. But we can offer it as an experimental option so that users can provide early feedback. Signed-off-by: Johannes Schindelin <[email protected]>
1 parent ad9a867 commit b73b4e3

File tree

2 files changed

+33
-1
lines changed

2 files changed

+33
-1
lines changed

installer/install.iss

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,12 +368,17 @@ const
368368
#define HAVE_EXPERIMENTAL_OPTIONS 1
369369
#endif
370370
371+
#ifdef WITH_EXPERIMENTAL_PCON
372+
#define HAVE_EXPERIMENTAL_OPTIONS 1
373+
#endif
374+
371375
#ifdef HAVE_EXPERIMENTAL_OPTIONS
372376
// Experimental options
373377
GP_BuiltinDifftool = 1;
374378
GP_BuiltinRebase = 2;
375379
GP_BuiltinStash = 3;
376380
GP_BuiltinAddI = 4;
381+
GP_EnablePCon = 5;
377382
#endif
378383
379384
var
@@ -440,7 +445,7 @@ var
440445
#ifdef HAVE_EXPERIMENTAL_OPTIONS
441446
// Wizard page and variables for the experimental options.
442447
ExperimentalOptionsPage:TWizardPage;
443-
RdbExperimentalOptions:array[GP_BuiltinDifftool..GP_BuiltinAddI] of TCheckBox;
448+
RdbExperimentalOptions:array[GP_BuiltinDifftool..GP_EnablePCon] of TCheckBox;
444449
#endif
445450
446451
// Mapping controls to hyperlinks
@@ -2091,6 +2096,14 @@ begin
20912096
RdbExperimentalOptions[GP_BuiltinAddI].Checked:=ReplayChoice('Enable Builtin Interactive Add','Auto')='Enabled';
20922097
#endif
20932098
2099+
#ifdef WITH_EXPERIMENTAL_PCON
2100+
// 5th option
2101+
RdbExperimentalOptions[GP_EnablePCon]:=CreateCheckBox(ExperimentalOptionsPage,'Enable experimental support for pseudo consoles.','<RED>(NEW!)</RED> This allows running native console programs like Node or Python in a'+#13+'Git Bash window without using winpty, but it still has known bugs.',TabOrder,Top,Left);
2102+
2103+
// Restore the settings chosen during a previous install
2104+
RdbExperimentalOptions[GP_EnablePCon].Checked:=ReplayChoice('Enable Pseudo Console Support','Auto')='Disabled';
2105+
#endif
2106+
20942107
#endif
20952108
20962109
PageIDBeforeInstall:=CurrentCustomPageID;
@@ -2769,6 +2782,12 @@ begin
27692782
GitSystemConfigSet('add.interactive.useBuiltin',#0);
27702783
#endif
27712784
2785+
#ifdef WITH_EXPERIMENTAL_PCON
2786+
if RdbExperimentalOptions[GP_EnablePCon].checked and
2787+
not SaveStringToFile(ExpandConstant('{app}\etc\git-bash.config'),'MSYS=enable_pcon',False) then
2788+
LogError('Could not write to '+ExpandConstant('{app}\etc\git-bash.config'));
2789+
#endif
2790+
27722791
{
27732792
Modify the environment
27742793
@@ -3112,6 +3131,14 @@ begin
31123131
RecordChoice(PreviousDataKey,'Enable Builtin Interactive Add',Data);
31133132
#endif
31143133
3134+
#ifdef WITH_EXPERIMENTAL_PCON
3135+
Data:='Disabled';
3136+
if RdbExperimentalOptions[GP_EnablePCon].Checked then begin
3137+
Data:='Enabled';
3138+
end;
3139+
RecordChoice(PreviousDataKey,'Enable Pseudo Console Support',Data);
3140+
#endif
3141+
31153142
Path:=ExpandConstant('{app}\etc\install-options.txt');
31163143
if not SaveStringToFile(Path,ChosenOptions,False) then
31173144
LogError('Could not write to '+Path);

installer/release.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,11 @@ then
181181
inno_defines="$inno_defines$LF#define WITH_EXPERIMENTAL_BUILTIN_ADD_I 1"
182182
fi
183183

184+
if grep -q enable_pcon /usr/bin/msys-2.0.dll
185+
then
186+
inno_defines="$inno_defines$LF#define WITH_EXPERIMENTAL_PCON 1"
187+
fi
188+
184189
GITCONFIG_PATH="$(echo "$LIST" | grep "^$etc_gitconfig\$")"
185190
test -z "$GITCONFIG_PATH" || {
186191
keys="$(git config -f "/$GITCONFIG_PATH" -l --name-only)" &&

0 commit comments

Comments
 (0)