Changeset 30


Ignore:
Timestamp:
Mar 13, 2018, 11:51:18 PM (7 years ago)
Author:
Gregg Young
Message:

Changes to allow building either Gotcha or Gotchaq. Gotchaq requires defining _QUIET_. Ticket #10

Location:
trunk
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/config.h

    r27 r30  
    3636
    3737// Default language for resources and help.
     38#ifdef _QUIET_
     39#define PSZ_DEFAULTLANGUAGEMOD  "goqresen"
     40#else
    3841#define PSZ_DEFAULTLANGUAGEMOD  "gotresen"
     42#endif
    3943#define PSZ_DEFAULTLANGUAGEHELP  "gotcha_en"
    4044
  • trunk/english/makefile

    r24 r30  
    3939GOTBUILDMACHINE = Zobopeep
    4040!endif
     41!ifdef %_QUIET_
     42RESOURCE = goqresen
     43!else
     44RESOURCE = gotresen
     45!endif
     46
    4147
    4248CC = WCC386.EXE
     
    6268#    $(CC) /I$(INCLDIR) $(CFLAGS) $*.c
    6369   
    64 all: gotresen.dll gotcha_en.hlp
     70all: $(RESOURCE).dll gotcha_en.hlp
    6571
    6672
    67 gotresen.dll: &
    68     gotresen.res
     73$(RESOURCE).dll: &
     74    $(RESOURCE).res
    6975    $(SED) -e "s;(GOTMAJOR);$(GOTMAJOR);g" &
    7076    -e "s;(GOTMINOR);$(GOTMINOR);g"   &
     
    7480    -e "s;Sun \|Mon \|Tue \|Wed \|Thu \|Fri \|Sat ;;g" &
    7581    -e "s;(GOTBUILDMACHINE);$(GOTBUILDMACHINE);g"   &
    76     gotresen.lnk.tpl > gotresen.lnk
    77     $(LINK) @gotresen.lnk f ..\tools\dll.obj lib clib3r.lib
    78     $(RC) gotresen.res gotresen.dll
    79     lxlite /x- /b- gotresen.dll
     82    $(RESOURCE).lnk.tpl > $(RESOURCE).lnk
     83    $(LINK) @$(RESOURCE).lnk f ..\tools\dll.obj lib clib3r.lib
     84    $(RC) $(RESOURCE).res $(RESOURCE).dll
     85    lxlite /x- /b- $(RESOURCE).dll
    8086    $(COPY) *.dll ..\bin
    8187   
    82 gotresen.res:    gotresen.rc &
     88$(RESOURCE).res:    $(RESOURCE).rc &
    8389                 ../id.h &
    8490                 ../common.rc &
    8591                 ../version.h
    86         $(RC) $(RFLAGS) -r gotresen.rc $@
     92        $(RC) $(RFLAGS) -r $(RESOURCE).rc $@
    8793       
    8894gotcha_en.hlp:     gotcha_en.ipf ../common.ipf &
  • trunk/gotcha.cpp

    r27 r30  
    114114
    115115    //DisplayError("DEBUG", "%d", Version());
    116 //#ifdef _USEDLL_ //_QUIET_
     116#ifdef _QUIET_
    117117    if ((Version() < 1))
    118118    {
     
    126126        exit (0);
    127127    }
     128
    128129    bool fPrtScr = FALSE;
    129130    ULONG ulDataSize;
     
    140141                                 &temp, sizeof(bool));
    141142    }
    142 //#endif
     143#endif
    143144
    144145    // register our window classes
     
    184185    //if (g_fQuiet)
    185186    //{
    186 #ifdef _USEDLL_   //_QUIET_
     187#ifdef _QUIET_
     188//#if 1
     189    DebugHereIAm();
    187190        InitDLL (hab, hwndFrame);
    188191        StartInputHook ();
     
    248251    WinDestroyWindow (hwndFrame);
    249252
    250 #ifdef _USEDLL_ //_QUIET_
     253#ifdef _QUIET_
     254//#if 1
    251255    if (fPrtScr || !rc) {
    252256        PrfWriteProfileData(HINI_USERPROFILE, "PM_ControlPanel", "PrintScreen",
  • trunk/gotcha.h

    r28 r30  
    4747#include "settings.h"
    4848
    49 //#define  _PMPRINTF_
    50 //#include "PMPRINTF.H"
     49#define  _PMPRINTF_
     50#include "PMPRINTF.H"
    5151
    5252#define PSZ_EXTENSION    ".bmp"
  • trunk/mainwin.cpp

    r28 r30  
    1818 ***/
    1919
    20 // ** CreateMainWindow **************************************************** /*fold00*/
     20// ** CreateMainWindow **************************************************** /*FOLD00*/
    2121
    2222HWND CreateMainWindow (VOID)
    2323{
    24 //#ifdef _QUIET_
    25 #if 1
     24#ifdef _QUIET_
     25//#if 1
    2626    hwndFrame = WinLoadDlg (HWND_OBJECT, NULLHANDLE, NULL, GETMODULE,
    2727                            ID_DLG_MAIN, NULL);
     
    301301        case WID_PB_SCREEN:
    302302            usCap = CAP_SCREEN;
    303 //#ifdef _Quiet_
    304 #if 1
     303#ifdef _QUIET_
     304//#if 1
    305305            WinShowWindow (g_hwndSettingsDialog, FALSE);
    306306            // WinSendMsg (g_hwndSettingsDialog, WM_CLOSE, 0,0); //Needs to go to the setting dialog
     
    313313        case WID_PB_SCREENREGION:
    314314            usCap = CAP_SCREENREGION;
    315 //#ifdef _Quiet_
    316 #if 1
     315#ifdef _QUIET_
     316//#if 1
    317317            WinShowWindow (g_hwndSettingsDialog, FALSE);
    318318#endif
     
    322322        case WID_PB_WINDOWINTERIOR:
    323323            usCap = CAP_WINDOWINT;
    324 //#ifdef _Quiet_
    325 #if 1
     324#ifdef _QUIET_
     325//#if 1
    326326            WinShowWindow (g_hwndSettingsDialog, FALSE);
    327327#endif
     
    331331        case WID_PB_WINDOW:
    332332            usCap = CAP_WINDOW;
    333 //#ifdef _Quiet_
    334 #if 1
     333#ifdef _QUIET_
     334//#if 1
    335335            WinShowWindow (g_hwndSettingsDialog, FALSE);
    336336#endif
     
    360360        usState = STATE_WAITFORHIDE;
    361361
    362         if (usCap == CAP_SCREENREGION || usCap == CAP_SCREEN)
     362        if (usCap == CAP_SCREENREGION || usCap == CAP_SCREEN) {
     363#ifdef _QUIET_
    363364            hwndParent = WinQueryFocus(HWND_DESKTOP);
    364 //#ifndef _QUIET_
    365 #if 0
     365#else
     366            hwndParent = WinQueryWindow(hwndFrame, QW_NEXTTOP );
     367#endif
     368        }
     369#ifndef _QUIET_
     370//#if 0
    366371        if (WinQueryButtonCheckstate (hwnd, WID_CB_HIDEWINDOW))
    367372            WinShowWindow (WinQueryWindow (hwnd, QW_PARENT), FALSE);
     
    581586        WinSendMsg (hwndSnapshot, UM_STOPCAPTURE, 0,0);
    582587        WinStopTimer (hab, hwnd, ulTimer);
    583 //#ifdef _QUIET_
    584 #if 1
     588#ifdef _QUIET_
     589//#if 1
    585590        // ? FIXME to give option to reshow window.
    586591        if (WinQueryButtonCheckstate (hwnd, WID_CB_HIDEWINDOW))
  • trunk/makefile

    r18 r30  
    3535GOTBUILDMACHINE = Zobopeep
    3636!endif
     37!ifdef %_QUIET_
     38GOTCHAEXE = gotchaq
     39!else
     40GOTCHAEXE = gotcha
     41!endif
    3742
    3843CC = wpp386.exe
     
    4752SED = sed.exe
    4853
     54!ifdef %_QUIET_
     55CFLAGS = -D_QUIET_ -otexan -zp4 -6r
     56!else
    4957CFLAGS = -otexan -zp4 -6r
     58!endif
     59
    5060RFLAGS = -bt=os2 -zm
    5161
    52 LFLAGS = op map=gotcha
     62LFLAGS = op map=$(GOTCHAEXE)
    5363
    5464SRCDIR = U:\Gotcha_Workspace\trunk
     
    5868PMPRINTFPATH = U:\PMPrintf
    5969
    60 all:  dll resources gotcha.exe
     70all:  dll resources $(GOTCHAEXE).exe
    6171
    6272dll:  .symbolic
     
    7888    $(CHDIR) ..
    7989   
    80 gotcha.lnk: gotcha.lnk.tpl 
     90$(GOTCHAEXE).lnk: $(GOTCHAEXE).lnk.tpl 
    8191  $(SED) -e "s;(GOTMAJOR);$(GOTMAJOR);g" &
    8292    -e "s;(GOTMINOR);$(GOTMINOR);g"   &
     
    8696    -e "s;Sun \|Mon \|Tue \|Wed \|Thu \|Fri \|Sat ;;g" &
    8797    -e "s;(GOTBUILDMACHINE);$(GOTBUILDMACHINE);g"   &
    88     gotcha.lnk.tpl > gotcha.lnk 
     98    $(GOTCHAEXE).lnk.tpl > $(GOTCHAEXE).lnk 
    8999
    90 gotcha.exe: gotcha.lnk gotcha.obj about.obj helper.obj rstring.obj settings.obj gotcha.res
    91     $(LINK) $(LFLAGS) @gotcha.lnk f &
     100$(GOTCHAEXE).exe: $(GOTCHAEXE).lnk gotcha.obj about.obj helper.obj rstring.obj settings.obj gotcha.res
     101    $(LINK) $(LFLAGS) @$(GOTCHAEXE).lnk f &
    92102    gotcha.obj, &
    93103    about.obj,  &
     
    96106    settings.obj &
    97107    lib dll\gotchdll.lib lib mmpm2.lib lib $(GBMPATH)\gbm.lib lib $(SRCDIR)\tools\gbmmemw.lib lib $(PMPRINTFPATH)\pmprintf.lib
    98     $(RC) $(RFLAGS) $(SRCDIR)\gotcha.res gotcha.exe
    99     $(PERL) $(MAPSYMW) gotcha.map
    100     mapxqs.exe gotcha.map
    101     lxlite gotcha.exe /x- /b-
    102     lxlite gotcha.exe /c:minstub
     108    $(RC) $(RFLAGS) $(SRCDIR)\gotcha.res $(GOTCHAEXE).exe
     109    $(PERL) $(MAPSYMW) $(GOTCHAEXE).map
     110    mapxqs.exe $(GOTCHAEXE).map
     111    lxlite $(GOTCHAEXE).exe /x- /b-
     112    lxlite $(GOTCHAEXE).exe /c:minstub
    103113    $(COPY) *.exe *.sym *.xqs *.map* readme* bin
    104114       
  • trunk/settings.cpp

    r28 r30  
    9292
    9393Settings :: Settings (VOID) :
    94 ththSettings(apse, "gotcha.ini", L_PROFILEVERSION)
     94#ifdef _QUIET_
     95//#if 1
     96    ththSettings(apse, "gotchaq.ini", L_PROFILEVERSION)
     97#else
     98    ththSettings(apse, "gotcha.ini", L_PROFILEVERSION)
     99#endif
    95100{
    96101    if( ! QueryFlag( SEI_UPDATE178DONE ) ) {
     
    213218                        MPFROMLONG (idPage[i]), MPFROMP (pszPageTab[i]));
    214219        }
    215 //#ifndef _QUIET_
    216 #if 0
     220#ifndef _QUIET_
     221//#if 0
    217222        // open and assign dialogs to pages
    218223        hwndPage[0] = WinLoadDlg (hwndNB, hwndNB, (PFNWP) Page1Procedure,
    219224                                  GETMODULE, ID_DLG_SETTINGSPAGE1, this);
    220         hwndPage[1] = WinLoadDlg (hwndNB, hwndNB, (PFNWP) WindowProcedure, //Page2Procedure,
     225        hwndPage[1] = WinLoadDlg (hwndNB, hwndNB, (PFNWP) Page2Procedure,
    221226                                  GETMODULE, ID_DLG_SETTINGSPAGE2, this);
    222227        hwndPage[2] = WinLoadDlg (hwndNB, hwndNB, (PFNWP) Page3Procedure,
     
    492497            WinSendDlgItemMsg( hwnd, WID_LB_FILEFORMAT, LM_SELECTITEM,
    493498                               MPFROMSHORT(0), MPFROMSHORT(TRUE) );
    494 //#ifdef _QUIET_
    495 #if 1
     499#ifdef _QUIET_
     500//#if 1
    496501        // set play sound button
    497502        pset->AdjustButton (hwnd, WID_CB_DOSOUND,
     
    539544            else
    540545                pset->SetFileSaveStyle (FSS_PROMPT);
    541 //#ifdef _QUIET_
    542 #if 1
     546#ifdef _QUIET_
     547//#if 1
    543548            pset->DoSound(WinQueryButtonCheckstate
    544549                          (hwnd, WID_CB_DOSOUND));
     
    640645        pset->AdjustButton (hwnd, WID_CB_SSWALWAYSONTOP,
    641646                            pset->SSWAlwaysOnTop ());
    642 //#ifdef _QUIET_
    643 #if 1
     647#ifdef _QUIET_
     648//#if 1
    644649        pset->AdjustButton (hwnd, WID_CB_SERIALCAPTURE,
    645650                            pset->SerialCapture ());
     
    695700            LogDebug( "Page2Procedure: start UM_ADJUST" );
    696701#endif
    697 //#ifndef _QUIET_
    698 #if 0
     702#ifndef _QUIET_
     703//#if 0
    699704        // query state of checkbuttons and set flags
    700705        pset->SSWHide(WinQueryButtonCheckstate(hwnd, WID_CB_SSWHIDE));
     
    730735        else
    731736            pset->SetSSWCaptureType (CAP_SCREEN);
    732 //#ifdef _QUITE_
    733 #if 1
     737#ifdef _QUIET_
     738//#if 1
    734739        // delay time
    735740        ULONG   ul;
     
    11261131
    11271132    ResourceString::Module(g_hmod);
    1128 //#ifdef _QUIET_
    1129 #if 1
     1133#ifdef _QUIET_
     1134//#if 1
    11301135    pszPageTab[0] = RSTR (IDS_MAINWIN);
    11311136    pszPageTab[1] = RSTR (IDS_PAGESAVE);
     
    11501155    // set this to some default, as we must open the settings dialog for
    11511156    // selecting a language
    1152 //#ifdef _QUIET_
    1153 #if 1
     1157#ifdef _QUIET_
     1158//#if 1
    11541159    pszPageTab[0] = RSTR (IDS_MAINWIN);
    11551160    pszPageTab[1] = RSTR (IDS_PAGESAVE);
     
    11811186    hdir = HDIR_CREATE;
    11821187    c    = 1;
    1183     rc   = DosFindFirst ("*.dll", &hdir, fl, &findbuf,
     1188#ifdef _QUIET_
     1189    rc   = DosFindFirst ("goqre*.dll", &hdir, fl, &findbuf,
    11841190                         sizeof (findbuf), &c, FIL_STANDARD);
     1191#else
     1192    rc   = DosFindFirst ("gotre*.dll", &hdir, fl, &findbuf,
     1193                         sizeof (findbuf), &c, FIL_STANDARD);
     1194#endif
    11851195    while (!rc)
    11861196    {
Note: See TracChangeset for help on using the changeset viewer.