Skip to content
Snippets Groups Projects
Commit 6db6bc6e authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Merge branch 'dd_archive_viewer_archive_class_update' into 'master'

DD Archive Viewer now supports the built-in Archive class in Synchronet 3.19

See merge request !299
parents c2c3cdfc 93c87efc
No related branches found
No related tags found
2 merge requests!463MRC mods by Codefenix (2024-10-20),!299DD Archive Viewer now supports the built-in Archive class in Synchronet 3.19
Pipeline #4566 passed
......@@ -22,7 +22,12 @@
* directory is removed.
*/
load("sbbsdefs.js");
"use strict";
if (typeof(require) === "function")
require("sbbsdefs.js", "K_UPPER");
else
load("sbbsdefs.js");
// Remove the Digital Distortion Archive Viewer work directory and
// batch download directory.
......@@ -42,65 +47,63 @@ file_remove(system.node_dir + "DDArcViewer_DLList.txt");
// Return value: Boolean - Whether or not the directory was removed.
function deltree(pDir)
{
if ((pDir == null) || (pDir == undefined))
return false;
if (typeof(pDir) != "string")
return false;
if (pDir.length == 0)
return false;
// Make sure pDir actually specifies a directory.
if (!file_isdir(pDir))
return false;
// Don't wipe out a root directory.
if ((pDir == "/") || (pDir == "\\") || (/:\\$/.test(pDir)) || (/:\/$/.test(pDir)) || (/:$/.test(pDir)))
return false;
if (typeof(pDir) !== "string")
return false;
if (pDir.length == 0)
return false;
// Make sure pDir actually specifies a directory.
if (!file_isdir(pDir))
return false;
// Don't wipe out a root directory.
if ((pDir == "/") || (pDir == "\\") || (/:\\$/.test(pDir)) || (/:\/$/.test(pDir)) || (/:$/.test(pDir)))
return false;
// If we're on Windows, then use the "RD /S /Q" command to delete
// the directory. Otherwise, assume *nix and use "rm -rf" to
// delete the directory.
if (deltree.inWindows == undefined)
deltree.inWindows = (/^WIN/.test(system.platform.toUpperCase()));
if (deltree.inWindows)
system.exec("RD " + withoutTrailingSlash(pDir) + " /s /q");
else
system.exec("rm -rf " + withoutTrailingSlash(pDir));
// The directory should be gone, so we should return true. I'd like to verify that the
// directory really is gone, but file_exists() seems to return false for directories,
// even if the directory does exist. So I test to make sure no files are seen in the dir.
return (directory(pDir + "*").length == 0);
// If we're on Windows, then use the "RD /S /Q" command to delete
// the directory. Otherwise, assume *nix and use "rm -rf" to
// delete the directory.
if (deltree.inWindows == undefined)
deltree.inWindows = (/^WIN/.test(system.platform.toUpperCase()));
if (deltree.inWindows)
system.exec("RD " + withoutTrailingSlash(pDir) + " /s /q");
else
system.exec("rm -rf " + withoutTrailingSlash(pDir));
// The directory should be gone, so we should return true. I'd like to verify that the
// directory really is gone, but file_exists() seems to return false for directories,
// even if the directory does exist. So I test to make sure no files are seen in the dir.
return (directory(pDir + "*").length == 0);
/*
// Recursively deleting each file & dir using JavaScript:
var retval = true;
/*
// Recursively deleting each file & dir using JavaScript:
var retval = true;
// Open the directory and delete each entry.
var files = directory(pDir + "*");
for (var i = 0; i < files.length; ++i)
{
// If the entry is a directory, then deltree it (Note: The entry
// should have a trailing slash). Otherwise, delete the file.
// If the directory/file couldn't be removed, then break out
// of the loop.
if (file_isdir(files[i]))
{
retval = deltree(files[i]);
if (!retval)
break;
}
else
{
retval = file_remove(files[i]);
if (!retval)
break;
}
}
// Open the directory and delete each entry.
var files = directory(pDir + "*");
for (var i = 0; i < files.length; ++i)
{
// If the entry is a directory, then deltree it (Note: The entry
// should have a trailing slash). Otherwise, delete the file.
// If the directory/file couldn't be removed, then break out
// of the loop.
if (file_isdir(files[i]))
{
retval = deltree(files[i]);
if (!retval)
break;
}
else
{
retval = file_remove(files[i]);
if (!retval)
break;
}
}
// Delete the directory specified by pDir.
if (retval)
retval = rmdir(pDir);
// Delete the directory specified by pDir.
if (retval)
retval = rmdir(pDir);
return retval;
*/
return retval;
*/
}
// Removes a trailing (back)slash from a path.
......@@ -111,16 +114,16 @@ function deltree(pDir)
// Return value: The path without a trailing (back)slash.
function withoutTrailingSlash(pPath)
{
if ((pPath == null) || (pPath == undefined))
return "";
if ((pPath == null) || (pPath == undefined))
return "";
var retval = pPath;
if (retval.length > 0)
{
var lastIndex = retval.length - 1;
var lastChar = retval.charAt(lastIndex);
if ((lastChar == "\\") || (lastChar == "/"))
retval = retval.substr(0, lastIndex);
}
return retval;
var retval = pPath;
if (retval.length > 0)
{
var lastIndex = retval.length - 1;
var lastChar = retval.charAt(lastIndex);
if ((lastChar == "\\") || (lastChar == "/"))
retval = retval.substr(0, lastIndex);
}
return retval;
}
\ No newline at end of file
; Compressed archive file extensions
[ZIP]
; PKZip for Win32
;VIEW=\BBS\COMPRESS\pkzip25.exe -view -NoZipExtension %FILENAME%
;EXTRACT=\BBS\COMPRESS\pkzip25.exe -extract -NoZipExtension -Directories %FILENAME% %FILESPEC% %TO_DIR%
; Info-ZIP for Win32 console (comes with Synchronet)
VIEW=\BBS\sbbs\exec\unzip.exe -l %FILENAME%
EXTRACT=\BBS\sbbs\exec\unzip.exe -qq -o %FILENAME% %FILESPEC% -d %TO_DIR%
; Info-ZIP, *nix
;VIEW=unzip -l %FILENAME%
;EXTRACT=unzip -qq -o %FILENAME% %FILESPEC% -d %TO_DIR%
; 7-Zip for Win32 console
;VIEW=\BBS\COMPRESS\7za.exe l %FILENAME%
;EXTRACT=\BBS\COMPRESS\7za.exe x -y %FILENAME% %FILESPEC% -o%TO_DIR%
VIEW=unzip -l %FILENAME%
EXTRACT=unzip -qq -o %FILENAME% %FILESPEC% -d %TO_DIR%
; 7-Zip for *nix
;VIEW=7za l %FILENAME%
;EXTRACT=7za x -y %FILENAME% %FILESPEC% -o%TO_DIR%
;VIEW=7z l %FILENAME%
;EXTRACT=7z x -y -pxyz %FILENAME% %FILESPEC% -o%TO_DIR%
[7Z]
; 7-Zip for Win32 console
VIEW=\BBS\COMPRESS\7za.exe l %FILENAME%
EXTRACT=\BBS\COMPRESS\7za.exe x -y %FILENAME% %FILESPEC% -o%TO_DIR%
; 7-Zip for *nix
;VIEW=7za l %FILENAME%
;EXTRACT=7za x -y %FILENAME% %FILESPEC% -o%TO_DIR%
VIEW=7z l %FILENAME%
EXTRACT=7z x -y -pxyz %FILENAME% %FILESPEC% -o%TO_DIR%
[RAR]
; RAR for Win32 console
VIEW=\BBS\COMPRESS\Rar.exe lt %FILENAME%
EXTRACT=\BBS\COMPRESS\Rar.exe x %FILENAME% %FILESPEC% %TO_DIR%
VIEW=rar lt %FILENAME%
EXTRACT=rar x -p- -y %FILENAME% %FILESPEC% %TO_DIR%
; Alexander Roshal's unrar for *nix
;VIEW=unrar lt %FILENAME%
;EXTRACT=unrar x %FILENAME% %FILESPEC% %TO_DIR%
[ARJ]
; ARJ for Win32 console
VIEW=\BBS\COMPRESS\ARJ32.EXE l %FILENAME%
EXTRACT=\BBS\COMPRESS\ARJ32.EXE x %FILENAME% %FILESPEC% -ht%TO_DIR%
; Open-Source ARJ for *nix
;VIEW=arj l %FILENAME%
;EXTRACT=arj x %FILENAME% %FILESPEC% -ht%TO_DIR%
VIEW=arj l %FILENAME%
EXTRACT=arj x %FILENAME% %FILESPEC% -ht%TO_DIR%
[ISO]
; 7-Zip for Win32 console
VIEW=\BBS\COMPRESS\7za.exe l %FILENAME%
EXTRACT=\BBS\COMPRESS\7za.exe x -y %FILENAME% %FILESPEC% -o%TO_DIR%
; 7-Zip for *nix
;VIEW=7za l %FILENAME%
;EXTRACT=7za x -y %FILENAME% %FILESPEC% -o%TO_DIR%
VIEW=7z l %FILENAME%
EXTRACT=7z x -y %FILENAME% %FILESPEC% -o%TO_DIR%
[TAR]
; 7-Zip for Win32 console
VIEW=\BBS\COMPRESS\7za.exe l %FILENAME%
EXTRACT=\BBS\COMPRESS\7za.exe x -y %FILENAME% %FILESPEC% -o%TO_DIR%
; 7-Zip for *nix
;VIEW=7za l %FILENAME%
;EXTRACT=7za x -y %FILENAME% %FILESPEC% -o%TO_DIR%
VIEW=7z l %FILENAME%
EXTRACT=7z x -y -pxyz %FILENAME% %FILESPEC% -o%TO_DIR%
[GZ]
; 7-Zip for Win32 console
VIEW=\BBS\COMPRESS\7za.exe l %FILENAME%
EXTRACT=\BBS\COMPRESS\7za.exe x -y %FILENAME% %FILESPEC% -o%TO_DIR%
; 7-Zip for *nix
;VIEW=7za l %FILENAME%
;EXTRACT=7za x -y %FILENAME% %FILESPEC% -o%TO_DIR%
VIEW=7z l %FILENAME%
EXTRACT=7z x -y -pxyz %FILENAME% %FILESPEC% -o%TO_DIR%
[TGZ]
; gzip for Win32 cmmand-line
;VIEW=\BBS\COMPRESS\gzip.exe -l %FILENAME%
; 7-Zip for Win32 console
VIEW=\BBS\COMPRESS\7za.exe l %FILENAME%
EXTRACT=\BBS\COMPRESS\7za.exe x -y %FILENAME% %FILESPEC% -o%TO_DIR%
; 7-Zip for *nix
;VIEW=7za l %FILENAME%
;EXTRACT=7za x -y %FILENAME% %FILESPEC% -o%TO_DIR%
VIEW=7z l %FILENAME%
EXTRACT=7z x -y -pxyz %FILENAME% %FILESPEC% -o%TO_DIR%
[TAR.GZ]
; 7-Zip for Win32 console
VIEW=\BBS\COMPRESS\7za.exe l %FILENAME%
EXTRACT=\BBS\COMPRESS\7za.exe x -y %FILENAME% %FILESPEC% -o%TO_DIR%
; tar for *nix
;VIEW=tar ztvf %FILENAME%
;EXTRACT=cd %TO_DIR% && tar zxvf %FILENAME%
VIEW=tar ztvf %FILENAME%
EXTRACT=cd %TO_DIR% && tar zxvf %FILENAME%
; Microsoft Installer file
[MSI]
; 7-Zip for *nix
VIEW=7z l %FILENAME%
EXTRACT=7z x -y -pxyz %FILENAME% %FILESPEC% -o%TO_DIR%
; Text file extensions
[TXT]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
[TEXT]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
[DIZ]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
[DOC]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
[ANS]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
[ASC]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
[ASCII]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
[RIP]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
[NFO]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Chinese text file
[ZW]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
[NEW]
IsText=Yes
; *nix
VIEW=cat %FILENAME%
[BBS]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
[ICE]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
[LOG]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Guitar tab file
[TAB]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Guitar tab file
[CRD]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Guitar tab file
[CHORD]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
[NEW]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Readme file (i.e., READ.ME)
[ME]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
[FAQ]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
[NOW]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
[HTM]
IsText=Yes
......@@ -238,269 +171,201 @@ VIEW=?typehtml -color %FILENAME%
[REG]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; A readme file, as in README.1ST
[1ST]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
[CFG]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
[INI]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Batch file
[BAT]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Command lst file (similar to a DOS batch file)
[CMD]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; REXX script (a programming language developed by IBM)
[REXX]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; *nix shell script
[SH]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Outlook Express email message
[EMAIL]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Mail message
[EMLX]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; EditPad Pro
[EPP]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Error log
[ERR]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Outlook Express mailbox index file
[IDX]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Data list
[LST]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Mailbox message file
[MSG]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; JavaScript source file
[JS]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Perl source file
[PL]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Python source file
[PY]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; PHP source file
[PHP]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; C source file
[C]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; C++ source file
[CPP]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; C++ source file
[CXX]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; C++ source file
[C++]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Header file for C/C++/Objective-C/etc.
[H]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; C++ header file
[HPP]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Objective-C source file
[M]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Objective-C with C++ source file
[MM]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; C# source file
[CS]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Pascal source file
[PAS]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; BASIC source file
[BAS]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Visual Basic source file
[VB]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Common Gateway Interface script
[CGI]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Include file
[INC]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
VIEW=cat %FILENAME%
; Baja source file (for Synchronet scripts)
[SRC]
IsText=Yes
; Windows
VIEW=type %FILENAME%
; *nix
;VIEW=cat %FILENAME%
\ No newline at end of file
:VIEW=cat %FILENAME%
\ No newline at end of file
Digital Distortion Archive Viewer
Version 1.03
Release date: 2009-12-20
Version 1.04
Release date: 2022-05-16
by
Eric Oulashin
Sysop of Digital Distortion BBS
BBS internet address: digitaldistortionbbs.com
digdist.bbsindex.com
digdist.synchro.net
Email: eric.oulashin@gmail.com
......@@ -18,7 +18,7 @@ Contents
========
1. Disclaimer
2. Introduction
3. Archive File Software
3. Archive Formats
4. Installation and Setup
5. Main configuration file
6. Archive file type configuration file
......@@ -77,8 +77,16 @@ queue. The reason is that Synchronet won't add files to the user's
download queue unless the file is in Synchronet's file database.
3. Archive File Software
========================
3. Archive Formats
==================
If your BBS is running Synchronet 3.19 or newer, Digital Distortion Archive
Viewer makes use of the built-in archive support in Synchronet for fast
extraction (it supports zip, 7z, tgz, etc.). You can also configure archiver
commands to extract other formats if you want. If your version of Synchronet
3.18 or below, then you will need to configure archiver extraction commands for
all archive file types you want to support.
Digital Distortion Archive Viewer comes with configurations to handle
ZIP, 7Z (7-Zip), RAR, ARJ, TAR, GZ, TGZ, and TAR.GZ archives, and many
text file formats.
......@@ -87,30 +95,30 @@ The file format configuration file included with this script includes
VIEW and EXTRACT command lines for various archivers for both Windows
and Linux. In order for this script to work properly, you will need
to make sure you have the appropriate archiver software installed on
your system, and you will need to edit the DDArcViewerFileTypes.cfg
your system, and you will need to edit the dd_arc_viewer_file_types.cfg
file (using a text editor) and make sure you have the VIEW and
EXTRACT command lines set properly for your archiver software.
The included DDArcViewerFileTypes.cfg file has command lines for
The included dd_arc_viewer_file_types.cfg file has command lines for
Windows and Linux, and the Linux command lines are commented out.
For information on that configuration file, see section 6: Archive
file type configuration file.
The following archive contains Win32 command-line archivers for popular
archive file formats:
http://digdist.bbsindex.com/miscFilesForDL/Win32CmdLineCompressionTools.zip
http://digdist.synchro.net/miscFilesForDL/Win32CmdLineCompressionTools.zip
The archivers included in that archive handle the most popular file formats
(ZIP, 7Z (7-Zip), RAR, ARJ, TAR, GZ, TGZ, and TAR.GZ), and they are set up in
DDArcViewerFileTypes.cfg. If your BBS is running in Windows, the included
dd_arc_viewer_file_types.cfg. If your BBS is running in Windows, the included
configuration file should work for you - But note that you will need to edit
the DDArcViewerFileTypes.cfg file and change the paths to the .exe files
the dd_arc_viewer_file_types.cfg file and change the paths to the .exe files
according to where you copied them to your system. If you are running Linux,
that .cfg file also has the Linux command lines as comments).
If you copy the archivers to a directory that is not in your system path, you
will need to edit the DDArcViewerFileTypes.cfg file to include the full paths
will need to edit the dd_arc_viewer_file_types.cfg file to include the full paths
with the archive executables.
The configuration file DDArcViewerFileTypes.cfg includes a setup
The configuration file dd_arc_viewer_file_types.cfg includes a setup
for using 7-Zip to extract ISO (CD/DVD image) files; however, in
testing, it seemed that 7-Zip can only extract or see one file in
an ISO image.
......@@ -163,16 +171,17 @@ Step 1: Copy the script files, configuration files, & archivers to your system
Digital Distortion Archive Viewer consists of the following 4 files, which
you will need to place in your sbbs/exec directory (or another directory of
your choice):
1. DDArcViewer.js
2. DDArcViewerCleanup.js
3. DDArcViewer.cfg
4. DDArcViewerFileTypes.cfg
1. dd_arc_viewer.js
2. dd_arc_viewer_cleanup.js
3. dd_arc_viewer.cfg
4. dd_arc_viewer_file_types.cfg
These files must be all together in the same directory.
For sysops running their BBS in Windows, the following archiver programs
in the Win32Archivers directory will need to be placed in a directory
(preferably a directory that's included in the system's path):
For sysops running their BBS in Windows using Synchronet 3.18 or below, the
following archiver programs in the Win32Archivers directory will need to be
placed in a directory (preferably a directory that's included in the system's
path):
1. 7za.exe
2. ARJ32.EXE
3. Rar.exe
......@@ -183,13 +192,13 @@ the appropriate archivers as described in the previous section.
Step 2: Edit the configuration files
------------------------------------
At a minimum, you will need to edit DDArcViewerFileTypes.cfg to make sure
At a minimum, you will need to edit dd_arc_viewer_file_types.cfg to make sure
that the archive command lines are correct for your system and that the text
view commands are correct. If you're running your BBS in Linux, you will
first need to comment the Windows command lines and uncomment the Linux
command lines. See section 6: Archive file type configuration file.
If desired, you can also edit DDArcViewer.cfg to change script options
If desired, you can also edit dd_arc_viewer.cfg to change script options
such as the interface type (lightbar/traditional) and colors. See section
5: Main configuration file.
......@@ -207,18 +216,18 @@ INS, the line below (or above) will be copied and inserted as a new line.
When editing a viewable file type, you will need to enter the file extension
and the command line used to view it. The file extension is fairly
self-explanatory. For the command line, use the following (this assumes
DDArcViewer.js was copied to your sbbs\exec diretory):
?DDArcViewer.js %s
If you copied DDArcViewer.js and its other files to another directory, you
will need to provide the path to DDArcViewer.js (i.e.,
?/sbbs/ArcViewer/DDArcViewer.js %s). As an example, your Viewable File Type
dd_arc_viewer.js was copied to your sbbs\exec diretory):
?dd_arc_viewer.js %s
If you copied dd_arc_viewer.js and its other files to another directory, you
will need to provide the path to dd_arc_viewer.js (i.e.,
?/sbbs/ArcViewer/dd_arc_viewer.js %s). As an example, your Viewable File Type
window should look similar to the following:
+[¦][?]--------------------------------------+
¦ Viewable File Type ¦
¦--------------------------------------------¦
¦ ¦File Extension ZIP ¦
¦ ¦Command Line ?DDArcViewer.js %f ¦
¦ ¦Access Requirements ¦
+[|][?]--------------------------------------+
| Viewable File Type |
|--------------------------------------------|
| |File Extension ZIP |
| |Command Line ?dd_arc_viewer.js %f |
| |Access Requirements |
+--------------------------------------------+
......@@ -233,7 +242,7 @@ interfere with the next user's use of the archive viewer.
If you are not already using a logout script, follow these steps:
1. Create a file in your sbbs\exec directory called logout.js
2. Add this line to it (assuming that the archive viewer scripts are in sbbs\exec):
load("DDArcViewerCleanup.js");
load("dd_arc_viewer_cleanup.js");
3. Add your logout script to Synchronet's configuration:
A. Run Synchronet's configuration program (SCFG)
B. From the main menu, choose "System".
......@@ -245,7 +254,7 @@ load("DDArcViewerCleanup.js");
If you already have a logout script (using JavaScript), you just need to add the
following line to it:
load("DDArcViewerCleanup.js");
load("dd_arc_viewer_cleanup.js");
Step 5: If you use a JavaScript command shell, update it
......@@ -264,7 +273,7 @@ from triggering actions in your command shell.
5. Main configuration file
==========================
If you want to change the default beavior and colors, you can edit the
DDArcViewer.cfg file, which is a plain text file. The configuration file
dd_arc_viewer.cfg file, which is a plain text file. The configuration file
has two sections: A behavior section (denoted by [BEHAVIOR]) and a colors
section (denoted by [COLORS]). For each setting or color, the syntax is as
folows:
......@@ -347,7 +356,7 @@ highlightedFile Selected files in lightbar mode
6. Archive file type configuration file
=======================================
The configuration file DDArcViewerFileTypes.cfg defines the files that
The configuration file dd_arc_viewer_file_types.cfg defines the files that
you want to be viewable by the archive viewer. Viewable file types are
specified by their extension in square brackets. Each archive file type
must have a view command and an extract command. Text files must have only
......@@ -385,4 +394,4 @@ Using the above example configuration for zip files, if the user (on node 1)
wants to view D:\Files\someArchive.zip, and the temp directory is
D:\sbbs\node1\DDArcViewerTemp, the extract command will be translated to the
following:
unzip.exe -qq -o D:\Files\someArchive.zip -d D:\sbbs\node1\DDArcViewerTemp
\ No newline at end of file
unzip.exe -qq -o D:\Files\someArchive.zip -d D:\sbbs\node1\DDArcViewerTemp
......@@ -2,6 +2,10 @@ Revision History for Digital Distortion Archive Viewer
======================================================
Version Date Description
------- ---- -----------
1.04 2022-05-16 Updated to use the new Archive class in Synchronet 3.19.
Now has built-in support for the same archive types that
Synchronet has built-in (zip, 7z, tgz, etc.). Other
archive types can still be configured.
1.03 2009-12-20 Updated DDArcViewer.js to be able to handle command-line
parameters with spaces in them as single parameters,
thanks to a function posted by Tracker1 of The Roughnecks
......@@ -12,4 +16,4 @@ Version Date Description
by the JavaScript script.
1.01 2009-12-16 Minor update to the documentation.
1.00 2009-09-10 First general public release
0.99 2009-09-02 Beta test, pre-general release verison.
\ No newline at end of file
0.99 2009-09-02 Beta test, pre-general release verison.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment