Skip to content

Commit

Permalink
Import Mini vMac 180722
Browse files Browse the repository at this point in the history
The latest Mini vMac Development source snapshot merges in some fixes to
the configuration tool from Ryan.
  • Loading branch information
ryandesign committed Aug 9, 2019
1 parent b546389 commit c8ebed8
Show file tree
Hide file tree
Showing 7 changed files with 94 additions and 28 deletions.
33 changes: 16 additions & 17 deletions setup/BLDUTIL3.i
Original file line number Diff line number Diff line change
Expand Up @@ -693,22 +693,21 @@ LOCALPROC WriteMainRsrcSrcPath(void)

LOCALPROC WriteMainRsrcObjName(void)
{
switch (cur_ide) {
case gbk_ide_msv:
case gbk_ide_lcc:
case gbk_ide_dvc:
case gbk_ide_cyg:
case gbk_ide_mgw:
case gbk_ide_mvc:
case gbk_ide_dmc:
case gbk_ide_dkp:
case gbk_ide_plc:
WriteCStrToDestFile("main.res");
break;
case gbk_ide_mpw:
WriteCStrToDestFile("main.rsrc");
break;
}
#if (gbk_ide_msv == cur_ide) \
|| (gbk_ide_lcc == cur_ide) \
|| (gbk_ide_dvc == cur_ide) \
|| (gbk_ide_cyg == cur_ide) \
|| (gbk_ide_mgw == cur_ide) \
|| (gbk_ide_mvc == cur_ide) \
|| (gbk_ide_dmc == cur_ide) \
|| (gbk_ide_dkp == cur_ide) \
|| (gbk_ide_plc == cur_ide)
WriteCStrToDestFile("main.res");
#endif

#if (gbk_ide_mpw == cur_ide)
WriteCStrToDestFile("main.rsrc");
#endif
}

LOCALPROC WriteMainRsrcObjPath(void)
Expand Down Expand Up @@ -1020,7 +1019,6 @@ LOCALPROC WriteEchoToNewFile(MyProc ptext, MyProc pto, blnr newline)
WritePathArgInMakeCmnd(pto);
break;
break;
case gbk_ide_bgc:
case gbk_ide_cyg:
case gbk_ide_snc:
case gbk_ide_dkp:
Expand All @@ -1034,6 +1032,7 @@ LOCALPROC WriteEchoToNewFile(MyProc ptext, MyProc pto, blnr newline)
WriteCStrToDestFile("\" >");
WritePathArgInMakeCmnd(pto);
break;
case gbk_ide_bgc:
case gbk_ide_mvc:
case gbk_ide_xcd:
WriteCStrToDestFile("printf \"");
Expand Down
29 changes: 29 additions & 0 deletions setup/BLDUTIL4.i
Original file line number Diff line number Diff line change
Expand Up @@ -238,6 +238,24 @@ LOCALPROC MakeConfigFolder(void)
MakeSubDirectory("my_config_d", "my_project_d", cfg_d_name, "");
}

#if WantWriteVarName
LOCALPROC WriteAppVariationStr1(void)
{
WriteBgnDestFileLn();
WriteAppVariationStr();
WriteEndDestFileLn();
}
#endif

#if WantWriteBldOpts
LOCALPROC WriteBldOpts1(void)
{
WriteBgnDestFileLn();
WriteBldOpts();
WriteEndDestFileLn();
}
#endif

LOCALFUNC tMyErr DoTheCommand(void)
{
tMyErr err;
Expand All @@ -263,6 +281,17 @@ LOCALFUNC tMyErr DoTheCommand(void)
WriteCFilesList();
}

#if WantWriteVarName
WriteADstFile1("my_project_d",
"var_name", "", "variation name",
WriteAppVariationStr1);
#endif
#if WantWriteBldOpts
WriteADstFile1("my_project_d",
"bld_opts", "", "build options",
WriteBldOpts1);
#endif

WriteIdeSpecificFiles();
}

Expand Down
10 changes: 10 additions & 0 deletions setup/CNFGDLFT.i
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,13 @@
#endif

#endif /* gbo_script */


#ifndef WantWriteVarName
#define WantWriteVarName 0
#endif


#ifndef WantWriteBldOpts
#define WantWriteBldOpts 0
#endif
10 changes: 5 additions & 5 deletions setup/SPBLDOPT.i
Original file line number Diff line number Diff line change
Expand Up @@ -1977,7 +1977,7 @@ LOCALFUNC tMyErr ChooseMenuBlink(void)
if (0 == olv_MenuBlink) {
cur_MenuBlink = dfo_MenuBlink();
} else {
if ((cur_MenuBlink < 0) || (cur_MenuBlink > 3)) {
if (cur_MenuBlink > 3) {
err = ReportParseFailure(
"-mnb must be a number between 0 and 3");
}
Expand Down Expand Up @@ -2019,7 +2019,7 @@ LOCALFUNC tMyErr ChooseAutoKeyThresh(void)
if (0 == olv_AutoKeyThresh) {
cur_AutoKeyThresh = dfo_AutoKeyThresh();
} else {
if ((cur_AutoKeyThresh < 0) || (cur_AutoKeyThresh > 15)) {
if (cur_AutoKeyThresh > 15) {
err = ReportParseFailure(
"-kyt must be a number between 0 and 15");
}
Expand Down Expand Up @@ -2061,7 +2061,7 @@ LOCALFUNC tMyErr ChooseAutoKeyRate(void)
if (0 == olv_AutoKeyRate) {
cur_AutoKeyRate = dfo_AutoKeyRate();
} else {
if ((cur_AutoKeyRate < 0) || (cur_AutoKeyRate > 15)) {
if (cur_AutoKeyRate > 15) {
err = ReportParseFailure(
"-kyr must be a number between 0 and 15");
}
Expand Down Expand Up @@ -2094,7 +2094,7 @@ LOCALFUNC tMyErr ChooseHilColPart(char *s, uimr *cur_HilColV,
err = ReportParseFailPStr(t);
}
} else
if ((*cur_HilColV < 0) || (*cur_HilColV > 65535)) {
if (*cur_HilColV > 65535) {
PStrFromCStr(t, s);
PStrApndCStr(t, " must be a number between 0 and 65535");
err = ReportParseFailPStr(t);
Expand Down Expand Up @@ -2485,7 +2485,7 @@ LOCALFUNC tMyErr ChooseSpeakerVol(void)
if (0 == olv_SpeakerVol) {
cur_SpeakerVol = dfo_SpeakerVol();
} else {
if ((cur_SpeakerVol < 0) || (cur_SpeakerVol >= 8)) {
if (cur_SpeakerVol >= 8) {
err = ReportParseFailure(
"-svl must be a number between 0 and 7");
}
Expand Down
13 changes: 9 additions & 4 deletions setup/SPOTHRCF.i
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,24 @@ LOCALPROC WriteAppCNFGGLOBContents(void)
WriteAppSpecificCNFGGLOBoptions();
}

LOCALPROC WriteBldOpts(void)
{
Branch = MajorVersion;

WrtOptGNSettings();
WrtOptSPSettings();
}

LOCALPROC WriteAppCNFGRAPIContents(void)
{
WriteCommonCNFGRAPIContents();

WriteAppSpecificCNFGRAPIoptions();

Branch = MajorVersion;

WriteBlankLineToDestFile();
WriteBgnDestFileLn();
WriteCStrToDestFile("#define kBldOpts \"");
WrtOptGNSettings();
WrtOptSPSettings();
WriteBldOpts();
WriteCStrToDestFile("\"");
WriteEndDestFileLn();
}
Expand Down
4 changes: 4 additions & 0 deletions setup/WRMPLIST.i
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,10 @@ LOCALPROC WriteMyInfoPListContents(void)
if (gbk_apifam_cco == gbo_apifam) {
WritePListKeyString("NSHighResolutionCapable", "1");
}
if (WantGraphicsSwitching) {
WritePListKeyString("NSSupportsAutomaticGraphicsSwitching",
"1");
}
if (gbk_apifam_sd2 == gbo_apifam) {
WritePListKeyString("SDL_FILESYSTEM_BASE_DIR_TYPE",
"parent");
Expand Down
23 changes: 21 additions & 2 deletions setup/WRTEXTFL.i
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ LOCALPROC WriteHexWordToOutput(unsigned int v)

LOCALPROC WriteHexLongToOutput(ui5r v)
{
printf("%08X", v);
printf("%08lX", v);
}

LOCALPROC WriteEolToOutput(void)
Expand Down Expand Up @@ -104,6 +104,12 @@ GLOBALPROC WriteScriptLangHeader(void)
#endif
}

#if (gbo_script == gbk_script_bash)
#ifndef BashUsePrintf
#define BashUsePrintf 1
#endif
#endif

GLOBALPROC WriteSectionCommentDestFile(char * Description)
{
WriteEolToOutput();
Expand Down Expand Up @@ -192,7 +198,12 @@ LOCALPROC WriteOpenDestFile(char *DirVar, char *FileName, char *FileExt,
WriteCStrToOutput(FileExt);
WriteCStrToOutput("\"");
WriteEolToOutput();
WriteLnCStrToOutput("echo -n > \"${DestFile}\"");
#if BashUsePrintf
WriteLnCStrToOutput("printf \"\" > \"${DestFile}\"");
#else
/* WriteLnCStrToOutput("echo -n > \"${DestFile}\""); */
WriteLnCStrToOutput("true > \"${DestFile}\"");
#endif
WriteEolToOutput();
}
#endif
Expand Down Expand Up @@ -267,8 +278,12 @@ LOCALPROC WriteBlankLineToDestFile(void)
WriteLnCStrToOutput("\twrite \"\" & return to DestFile");
#endif
#if (gbo_script == gbk_script_bash)
#if BashUsePrintf
WriteLnCStrToOutput("printf \"\\n\" >> \"${DestFile}\"");
#else
WriteLnCStrToOutput("echo '' >> \"${DestFile}\"");
#endif
#endif
#if (gbo_script == gbk_script_vbscript)
WriteLnCStrToOutput("f.WriteLine(\"\")");
#endif
Expand All @@ -294,8 +309,12 @@ LOCALPROC WriteBgnDestFileLn(void)
WriteCStrToOutput("\twrite \"");
#endif
#if (gbo_script == gbk_script_bash)
#if BashUsePrintf
WriteCStrToOutput("printf \"%s\\n\" '");
#else
WriteCStrToOutput("echo '");
#endif
#endif
#if (gbo_script == gbk_script_vbscript)
WriteCStrToOutput("f.WriteLine(\"");
#endif
Expand Down

0 comments on commit c8ebed8

Please sign in to comment.