Changeset 1306 for trunk/dll


Ignore:
Timestamp:
Nov 30, 2008, 8:23:56 PM (17 years ago)
Author:
Gregg Young
Message:

Added option to use subdirectory based on the archive name for extraction from the arc container; it is set in the notebook and separate from the extract dialog setting; includes help file update, comments and cleanup (Ticket 22)

Location:
trunk/dll
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/arccnrs.c

    r1301 r1306  
    6464  29 Nov 08 GKY Add flag to tell CheckListProc file is in an archive so it won't try to open it.
    6565  29 Nov 08 GKY Remove or replace with a mutex semaphore DosEnterCriSec where appropriate.
     66  30 Nov 08 GKY Add the option of creating a subdirectory from the arcname
     67                for the extract path to arc container.
    6668
    6769***********************************************************************/
     
    158160CHAR ArcTempRoot[CCHMAXPATH];
    159161BOOL fArcStuffVisible;
     162BOOL fFileNameCnrPath;
    160163
    161164#pragma data_seg(GLOBAL2)
     
    18181821
    18191822              for (x = 0; li->list[x]; x++) {
    1820                 BldFullPathName(fullname, li->targetpath, li->list[x]);
     1823                BldFullPathName(fullname, li->targetpath, li->list[x]);
     1824                //Check if file already exists on disk warn if it does.
    18211825                if (IsFile(fullname) != -1) {
    18221826                  AddToList(li->list[x], &exfiles, &numfiles, &numalloc);
     
    18501854                else if (ckl.list)
    18511855                  li->list = CombineLists(li->list, ckl.list);
    1852               }
     1856              } // end check and warn
    18531857            }
    18541858            if (!li->list || !li->list[0])
     
    37143718          else
    37153719            strcpy(dcd->directory, extractpath);
    3716         }
     3720        }
     3721        if (!*dcd->directory && fFileNameCnrPath && dcd->arcname) {
     3722
     3723          strcpy(fullname, dcd->arcname);
     3724          p = strrchr(fullname, '.');
     3725          if (p)
     3726           *p = 0;
     3727          else {
     3728            p = fullname + strlen(dcd->arcname);
     3729            p--;
     3730            *p = 0;
     3731          }
     3732          strcpy(dcd->directory, fullname);
     3733        }
    37173734        if (!*dcd->directory && *lastextractpath) {
    37183735          //DosEnterCritSec();  //GKY 11-29-08
  • trunk/dll/arccnrs.h

    r1220 r1306  
    1010
    1111  05 Jan 08 SHL Move arccnrs.c definitions here
     12  30 Nov 08 GKY Add the option of creating a subdirectory from the arcname
     13                for the extract path to arc container.
    1214
    1315***********************************************************************/
     
    6264extern CHAR lastextractpath[CCHMAXPATH];
    6365extern ULONGLONG ullDATFileSpaceNeeded;
     66extern BOOL fFileNameCnrPath;
    6467
    6568#endif // ARCCNRS_H
  • trunk/dll/extract.c

    r1300 r1306  
    319319          }
    320320          if (!*arcdata->extractdir) {
    321             if (*lastextractpath)
    322               strcpy(arcdata->extractdir, lastextractpath);
    323             else if (arcdata->arcname && *arcdata->arcname) {
     321            if (arcdata->arcname && *arcdata->arcname) {
    324322
    325323              CHAR *p;
  • trunk/dll/fm3dlg.h

    r1300 r1306  
    2323  29 Nov 08 GKY Add the option of creating a subdirectory from the arcname
    2424                for the extract path.
     25  30 Nov 08 GKY Add the option of creating a subdirectory from the arcname
     26                for the extract path to arc container.
    2527
    2628***********************************************************************/
     
    715717#define CFGA_VIRUS                                                                              25376
    716718#define CFGA_EXTRACTPATH                                                                25377
    717 #define CFGA_FIND                                                                                       25378
     719#define CFGA_FIND                                                                               25378
     720#define CFGA_FILENAMEPATH                                                               25379
    718721
    719722#define CFG5_FRAME                                                                              25500
  • trunk/dll/fm3res.dlg

    r1300 r1306  
    3939  21 Nov 08 JBS Ticket 297: Added use of COPYRIGHT_YEAR in About dialog
    4040  29 Nov 08 GKY Add the option of creating a subdirectory from the arcname
    41                 for the extract path to extract dialog.
     41                for the extract path to extract dialog and arc container.
    4242
    4343***********************************************************************/
     
    18081808        AUTOCHECKBOX    "Show archiver activity", CFGA_ARCSTUFFVISIBLE, 4,
    18091809                        74, 112, 10
     1810        AUTOCHECKBOX    "~Use archive name as extract path in container (Ext. Path over rides this setting)",
     1811                        CFGA_FILENAMEPATH, 4, 54, 312, 10
    18101812        LTEXT           "A/Virus:", -1, 4, 34, 48, 8
    18111813        ENTRYFIELD      "", CFGA_VIRUS, 54, 34, 196, 8, ES_MARGIN
  • trunk/dll/init.c

    r1303 r1306  
    5858                minimum size in future
    5959  29 Nov 08 GKY Remove or replace with a mutex semaphore DosEnterCriSec where appropriate.
     60  30 Nov 08 GKY Add the option of creating a subdirectory from the arcname
     61                for the extract path to arc container.
    6062
    6163***********************************************************************/
     
    14901492  size = sizeof(extractpath);
    14911493  PrfQueryProfileData(fmprof, appname, "ExtractPath", extractpath, &size);
     1494  size = sizeof(BOOL);
     1495  PrfQueryProfileData(fmprof, FM3Str, "FileNamePathCnr", &fFileNameCnrPath, &size);
    14921496  size = sizeof(printer);
    14931497  PrfQueryProfileData(fmprof, appname, "Printer", printer, &size);
  • trunk/dll/ipf/archive.ipf

    r552 r1306  
    2727ones extracted earlier). :hp1.With Paths:ehp1. will extract the archive including the
    2828any directories in the archive structure. This can be made the default by checking the
    29 :hp1.Always Paths:ehp1. box. Refgardless of which method is the default you may
    30 select the other option on a one time basis without change the default for future archives.
     29:hp1.Always Paths:ehp1. box. Regardless of which method is the default you may
     30select the other option on a one time basis without changing the default for future archives.
    3131If you only wish to extract certain files you can select masks (i.e *.txt) for the files
    3232you wish to extract. The command line box allows you to change or add extraction options.
    3333See the help files for your archiver (e.g. zip.exe) for more information.
    3434You can select the extraction directory (the directory to which the files will be extracted.
    35 The default is the current directory or you can set a specific directory as the  on
    36 the Archiver page of the Setting Notebook. You can use the :hp1.Walk:ehp1. button
     35The default is the current directory or you can set a specific directory as the default on
     36the Archiver page of the Setting Notebook. You can set the :hp1.Filename as extract path :ehp1.
     37to have FM/2 create an extract path based on the archive name.The path is made as a subdirectory
     38to the directory the archive is in. You can use the :hp1.Walk:ehp1. button
    3739find the directory you wish to extract to or you can type a path directly into the listbox.
    3840If the path you type in doesn't exist FM/2 will offer to create it for you.
     
    5759files unless given a DOS filemask (for instance, to extract all files
    5860you need to enter *.* (not *) in the masks field). FM/2 normally gives
    59 :hp2.no:ehp2. filemasks as the argument when you want to extract
    60 everything, which every other archiver in the world understands.
     61:hp2."*":ehp2. as the argument when you want to extract
     62everything, which most other archiver in the world understand.
    6163:p.
    6264The ZIP/UNZIP programs are case sensitive even though OS/2 itself is
     
    8284FM/2 will ask you for the type of the archive by presenting you with a
    8385listbox from which to pick an archiver.
    84 After that, another dialog appears to let you modify how the archive
    85 will be created. Additional masks may be entered (remember that the ZIP
    86 and UNZIP programs are case sensitive), the archiver command line
     86After that, another dialog appears to let you modify how the archive that
     87will be created. Additional masks may be entered (remember that some versions
     88of ZIP and UNZIP programs are case sensitive), the archiver command line
    8789tweaked, and so forth. Click :hp1.Okay:ehp1. to create the archive, or
    8890:hp1.Cancel:ehp1. if you change your mind.
  • trunk/dll/ipf/hints.ipf

    r288 r1306  
    8787button. If you always want the extract directory to be the same as the
    8888directory in which the archive resides, enter * in the Ext. Path field
    89 of the internal Settings Notebook's :link reftype=hd res=99940.Archivers
    90 page:elink..
     89of the internal Settings Notebook's or if you want FM/2 to create a subdirectory
     90based on the archiver name leave Ext. Path blank and check the box Use archive
     91name as extract path in container (Ext. Path over rides this setting)
     92:link reftype=hd res=99940.Archivers page:elink..
    9193:p.
    9294You can drag files or directories onto an archive object in a Directory
  • trunk/dll/ipf/notebook.ipf

    r1129 r1306  
    284284to the foreground if you want to see them.
    285285:p.
     286The :hp6.Use archive name as extract path in container:ehp6.allows
     287you to have FM/2 create an extract path based on the archive name.
     288The path is made as a subdirectory to the directory the archive
     289is in. If a directory is listed in Ext. Path it over rides this setting.
     290The setting only effects the arc container. The extract dialog has a
     291separate setting for this function.
     292:p.
    286293The :hp6.A/Virus:ehp6. field allow you to enter the command line
    287 (PATH/ANTIVIRUS&period.EXE parameters) for your antivirus software
     294(PATH/ANTIVIRUS.EXE parameters) for your antivirus software
    288295This must be done to enable virus checking of archives from FM/2.
    289 NVCC&period.EXE &percent.p /C is one possible command line option
     296NVCC.EXE &percent.p /C is one possible command line option
    290297if you are using Norman Antivirus.
    291298:p.
  • trunk/dll/ipf/tutor.ipf

    r1041 r1306  
    439439(make it the :hp1.current object:ehp1.), then select the :hp1.Extract:ehp1.
    440440command from the :hp1.Files:ehp1. menu, the context menu
    441 fc=default bc=cyan.B2:color fc=default bc=default., or press the :color fc=default bc=palegray.Ctrl:color fc=default bc=default.
     441fc=default bc=cyan.B2:color fc=default bc=default., or press the
     442:color fc=default bc=palegray.Ctrl:color fc=default bc=default.
    442443 + :color fc=default bc=palegray.x:color fc=default bc=default. accelerator key.
    443444key.
  • trunk/dll/notebook.c

    r1225 r1306  
    4040  31 Jul 08 JBS Ticket 114: Improved code to avoid traps.
    4141  02 Aug 08 JBS Ticket 114: Improved code to avoid traps.
     42  30 Nov 08 GKY Add the option of creating a subdirectory from the arcname
     43                for the extract path to arc container.
    4244
    4345***********************************************************************/
     
    224226    WinCheckButton(hwnd, CFGA_QUICKARCFIND, fQuickArcFind);
    225227    WinCheckButton(hwnd, CFGA_DEFARC, (*szDefArc != 0));
     228    WinCheckButton(hwnd, CFGA_FILENAMEPATH, fFileNameCnrPath);
    226229    WinSetDlgItemText(hwnd, CFGA_DEFARCNAME, szDefArc);
    227230    WinSetDlgItemText(hwnd, CFGA_VIRUS, virus);
     
    332335                        appname,
    333336                        "ArcStuffVisible", &fArcStuffVisible, sizeof(BOOL));
     337    fFileNameCnrPath = WinQueryButtonCheckstate(hwnd, CFGA_FILENAMEPATH);
     338    PrfWriteProfileData(fmprof,
     339                        appname,
     340                        "FileNamePathCnr", &fFileNameCnrPath, sizeof(BOOL));
    334341    fFolderAfterExtract = WinQueryButtonCheckstate(hwnd,
    335342                                                   CFGA_FOLDERAFTEREXTRACT);
Note: See TracChangeset for help on using the changeset viewer.