• exec/external.bat does not work with dosemu2

    From Fernando Toledo@1:103/705 to GitLab issue in main/sbbs on Sunday, August 21, 2022 11:32:39
    open https://gitlab.synchro.net/main/sbbs/-/issues/433

    environment variables used for lredir with \ (DOS backslash) fail on dosemu2```E:\freedos.com>lredir -n linux\fs\sbbs\doors\dosError b (format invalid) while redirecting drive K: to \\linux\fs\sbbs\doors\dos```should use / (linux slash):```E:\freedos.com>lredir -n linux\fs/sbbs/doors/dosK: = \\linux\fs/sbbs/doors/dos attrib = READ/WRITE ```So all environment variables used in exec/external.bat need to be changed from '\' to '/' for lredir to work properlymaybe through ctrl/sbbs.ini it is tried to add an option UseDOSEmuVersion=x where x can be 1 or 2 (1 as default)and use this option as dosemu quirk.thanks!
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Fernando Toledo@1:103/705 to GitLab note in main/sbbs on Sunday, August 21, 2022 11:39:57
    https://gitlab.synchro.net/main/sbbs/-/issues/433#note_2709

    It seems that @nelgin was testing dosemu2, have you run into this problem?
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Sunday, August 21, 2022 15:35:00
    https://gitlab.synchro.net/main/sbbs/-/issues/433#note_2711

    I didn't use lredir to change directories when using dosemu2. I did it on the command line. I gave up and blew it all away in the end. Just too many issues I couldn't resolve. dosemu1 just works. Except for TW and there's plenty of TW server gateways out there unless you really must run your own.
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Fernando Toledo@1:103/705 to GitLab note in main/sbbs on Sunday, August 21, 2022 20:38:47
    https://gitlab.synchro.net/main/sbbs/-/issues/433#note_2713

    Yeap..due to hard disk failure i replace it and update my os to debian 11. Unfortunately dosemu 1 is no longer in the repositories.I have running dos doors with dosemu2 without touching their settings.I just edit the exec/dosemu.ini to use -d to add node and startup dirs ($NODEDIR and $XTRNDIR).Then edit ctrl/dosemu.conf to add the rest of fixed paths (ctrl, data and exec dirs) The exec/external.bat still fail but I don't care because it uses @lredir and continues on error**exec/dosemu.ini**```inicmd=/usr/bin/env $TERM HOME=$CTRLDIR QUIET=1 DOSDRIVE_D=$NODEDIR NODEDIR=$NODEDIR $DOSEMUBIN -d $NODEDIR -d $XTRNDIR -I"video { none }" $VIRTUALCONF -f$DOSEMUCONF -E$EXTBAT -o$NODEDIRdosemu_boot.log $EXTLOG[stdio]cmd=/usr/bin/env $TERM HOME=$CTRLDIR QUIET=1 DOSDRIVE_D=$NODEDIR NODEDIR=$NODEDIR $DOSEMUBIN -d $NODEDIR -d $XTRNDIR -I"video { none }" -I'keystroke "\n"' $VIRTUALCONF -f$DOSEMUCONF -E$EXTBAT -o$NODEDIRdosemu_boot.log $EXTLOG ```**ctrl/dosemu.conf**```$_cpu = "80486"$_cpu_emu = "fullsim"$_floppy_a = ""$_cdrom = ""$_xms = (1024)$_ems = (1024)$_ems_frame = (0xe000)$_external_char_set = "cp437"$_internal_char_set = "cp437"$_term_updfreq = (8)$_layout = "us"$_rawkeyboard = (auto)$_mouse_internal = (on)$_mouse_dev = ""$_joy_device = ""$_lpt1 = ""$_lp2 = ""$_speaker = ""$_sound = (off)$_sb_dsp = ""$_hdimage = "+0 -2 /sbbs/ctrl /sbbs/data /sbbs/exec +1"$_lredir_paths = "/sbbs"```The result is that the directories are mapped as expected:```E:\freedos.com>lredirCurrent Drive Redirections:C: = /sbbs/ctrl/.dosemu/drive_c attrib = READ/WRITED: = /sbbs/nodes/node2 attrib = READ/WRITEE: = /sbbs/doors/dos attrib = READ/WRITEF: = /sbbs/ctrl attrib = READ/WRITEG: = /sbbs/data attrib = READ/WRITEH: = /sbbs/exec attrib = READ/WRITEI: = /usr/share/dosemu/dosemu2-cmds-0.3 attrib = READ ONLYJ: = /usr/local/share/comcom32 attrib = READ ONLYE:\freedos.com> ``````E:\freedos.com>setUSERDRV=CSHELLDRV=CDOSEMUDRV=IFDPP_AUTOEXEC=I:\FDPPAUTO.BATSHELL_ALLOW_EXIT=1COMSPEC=E:\FREEDOS.COM\COMMAND.COMPATH=I:\dosemu;C:\;E:\dosutils;H:\dosutilsTEMP=C:\tmpERRORLEVEL=192DOSEMU_VERSION=2.0pre9-dev-20220821-376-g026c7e4edDOSEMU_EXIT=1DOSEMU_SYS_CMD=D:external.batDSZLOG=D:\PROTOCOL.LOGSBBSNODE=D:SBBSNNUM=2SBBSCTRL=F:SBBSDATA=G:SBBSEXEC=H:PCBNODE=2PCBDRIVE=D:PCBDIR=\STARTDIR=freedos.com ```
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Sunday, August 21, 2022 21:16:04
    https://gitlab.synchro.net/main/sbbs/-/issues/433#note_2714

    Download https://www.endofthelinebbs.com/dmdtrv43.zip and see if that'll run under dosemu2.
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Monday, August 22, 2022 10:32:14
    https://gitlab.synchro.net/main/sbbs/-/issues/433#note_2715

    I don't think the environment variables mentioned in this issue need any change (they already use forward-slashes). From the description, it sounds like only `external.bat` needs to be modified by changing the backslashes to forward-slashes on the following lines:```@lredir D: linux\fs$NODEDIR >NUL@lredir E: linux\fs$XTRNDIR >NUL@lredir F: linux\fs$CTRLDIR >NUL@lredir G: linux\fs$DATADIR >NUL@lredir H: linux\fs$EXECDIR >NUL```Can you confirm making that change would address this issue completely?
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Fernando Toledo@1:103/705 to GitLab note in main/sbbs on Monday, August 22, 2022 10:48:07
    https://gitlab.synchro.net/main/sbbs/-/issues/433#note_2716

    Mhmm at my external.bat generated at node directory when door start use "\\" (backslash) and should be "/".I think that by changing that, the redirects will work normally as they do from dosemu1I don't know if there is any way to leave it keeping compatibility in both, (now I don't have a dosemu1 to confirm that they would also work with this "new" syntax)```$/sbbs/nodes/node3# cat external.bat @ECHO OFFSET DSZLOG=D:\PROTOCOL.LOGSET SBBSNODE=D:SET SBBSNNUM=3SET SBBSCTRL=F:SET SBBSDATA=G:SET SBBSEXEC=H:SET PCBNODE=3SET PCBDRIVE=D:SET PCBDIR=\SET STARTDIR=zombie@lredir D: linux\fs\sbbs\nodes\node3 >NUL@lredir E: linux\fs\sbbs\doors\dos >NUL@lredir F: linux\fs\sbbs\ctrl >NUL@lredir G: linux\fs\sbbs\data >NUL@lredir H: linux\fs\sbbs\exec >NULE:REM Switch to startup dir, unless its not definedREM If not defined, go to node dir (external editors use this)IF "%STARTDIR%"=="" D:IF NOT "%STARTDIR%"=="" CD %STARTDIR%REM Optionally call emusetup.bat or put that stuff here for global (in NOEMU)REM Looks in startup dir, then ctrl dirIF EXIST EMUSETUP.BAT GOTO EMULOCALIF EXIST F:\EMUSETUP.BAT GOTO EMUGLOBALIF EXIST E:\DOSUTILS\NUL GOTO NOEMUIF EXIST H:\DOSUTILS\NUL GOTO NOEMUECHO ERROR: No emusetup.bat in E:\%STARTDIR% or F, or DOSUTILS is missingGOTO EXEC:EMULOCALCALL EMUSETUP.BATGOTO EXEC:EMUGLOBALCALL F:\EMUSETUP.BATGOTO EXEC:NOEMU@set PATH=%PATH%;E:\dosutils;H:\dosutilsREM fossil driver, such as x00, bnu, or dosemu fossil.comrem IF "FOSSIL" == "FOSSIL" @fossil.com >NULrem IF "FOSSIL" == "FOSSIL" bnu.com /P1 /L0=11520 >NULIF "FOSSIL" == "FOSSIL" x00.exe eliminate >NULREM share.exe for multinode file locking@share >NULGOTO EXEC:EXECCALL run.batIF NOT "%1" == "TEST" exitemuREM For debugging: /usr/bin/env HOME=/sbbs/ctrl/ QUIET=1 DOSDRIVE_D=/sbbs/nodes/node3/ NODEDIR=/sbbs/nodes/node3/ /usr/bin/dosemu.bin -d /sbbs/nodes/node3/ -d /sbbs/doors/dos -I"video { none }" -I"serial { virtual com 1 }" -f/sbbs/ctrl/dosemu.conf -ED:external.bat -o/sbbs/nodes/node3/dosemu_boot.log ```
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Monday, August 22, 2022 13:37:51
    https://gitlab.synchro.net/main/sbbs/-/issues/433#note_2717

    Try changing the following in external.bat:```@lredir D: linux\fs$NODEDIR >NUL@lredir E: linux\fs$XTRNDIR >NUL@lredir F: linux\fs$CTRLDIR >NUL@lredir G: linux\fs$DATADIR >NUL@lredir H: linux\fs$EXECDIR >NUL```to this:```@lredir D: linux/fs$SBBSNODE >NUL@lredir F: linux/fs$SBBSCTRL >NUL@lredir G: linux/fs$SBSBDATA >NUL@lredir H: linux/fs$SBBSEXEC >NUL```Does that fix the issue? Notice the replacement variables (not environment variables) names have changed.There is no SBBSXTRN, so I just remove the E: drive mapping. I'm not sure if you need that one.
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Monday, August 22, 2022 13:41:34
    https://gitlab.synchro.net/main/sbbs/-/issues/433#note_2718

    In the dosemu2 release notes for dosemu2-2.0pre7Sanitize syntax of lredir2: silly LINUX\FS is no longer needed.dosemu2-2.0pre5lredir command was deprecated, use lredir2 with the new syntaxSo lredir shouldn't actually be used if you're using dosemu2.
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Rob Swindell@1:103/705 to GitLab note in main/sbbs on Monday, August 22, 2022 14:52:07
    https://gitlab.synchro.net/main/sbbs/-/issues/433#note_2719

    We'd like to use a single default/template external.bat file that works with both dosemu1 and dosemu2.
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Monday, August 22, 2022 20:29:04
    https://gitlab.synchro.net/main/sbbs/-/issues/433#note_2720

    Then you're likely going to need logic in the external.bat file to determine if you're using dosemu1 or dosemu2. If the depreciated features are removed from dosemu2, then it'll stop working altogether.
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Nigel Reed@1:103/705 to GitLab note in main/sbbs on Monday, August 22, 2022 20:32:04
    https://gitlab.synchro.net/main/sbbs/-/issues/433#note_2721

    E: should map to your ./xtrn directory so yes, it's needed as part of the external.bat will change to that drive before cd to the directory where the executable is.
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Fernando Toledo@1:103/705 to GitLab note in main/sbbs on Tuesday, August 23, 2022 10:23:23
    https://gitlab.synchro.net/main/sbbs/-/issues/433#note_2722

    this will not work because those variables have the drives letters and not the paths
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Fernando Toledo@1:103/705 to GitLab note in main/sbbs on Tuesday, August 23, 2022 10:24:13
    https://gitlab.synchro.net/main/sbbs/-/issues/433#note_2723

    Now, i pass the paths via cmdline, so lredir can be ommited
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Fernando Toledo@1:103/705 to GitLab note in main/sbbs on Tuesday, August 23, 2022 10:25:01
    https://gitlab.synchro.net/main/sbbs/-/issues/433#note_2724

    I agree
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Fernando Toledo@1:103/705 to GitLab note in main/sbbs on Tuesday, August 23, 2022 10:26:52
    https://gitlab.synchro.net/main/sbbs/-/issues/433#note_2725

    Yeah its needeed. Because is the working path that can change at differents doors.
    --- SBBSecho 3.15-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)