Menu

Fix for Win98 ^ ME

2016-10-09
2016-10-23
  • Michael V. Miller

    I realize this will not be useful for most people, but I fixed the ADTPRO.BAT file for ADTPRO 2.0.1 to work with Windows 98 and ME. The default ADTPRO.BAT file assumes you are using an NT version of Windows and uses commands to set up the Java environment that are incompatible with 98 and ME.

    I can confirm that ADTPro 2.0.1 works just fine in Windows 98 and ME. You will need to use the Sun Java JRE 5 (I am using Update 18), and do the following:

    Create a file in your ADTPRO-2.0.1 Folder called W9X.TXT. This file will consist of only one line:

    SET CWD=

    It is important there are no linefeeds or extra lines after the '='. Then run this modified version of ADTPRO.BAT:

    @echo off
    REM
    REM ADTPro - Windows startup batch file
    REM
    REM Note:
    REM   Invoke with the name of the communications button to push
    REM   in order to start with that mode active (i.e. 'adtpro ethernet')
    
    if exist w9xdone.tmp goto Win9xDone
    if exist w9xtrue.tmp goto Win9x2
    IF "%PROCESSOR_ARCHITECTURE%"=="" GOTO Win9x
    
    SET ADTPRO_HOME=%CD%\
    SET CWD=%CD%
    
    GOTO Normal
    
    :Win9x
    cd >w9xtrue.tmp
    command /e:8192 /c adtpro.bat %*
    if exist w9xdone.tmp goto Win9xDone
    
    :Win9x2
    SET PROCESSOR_ARCHITECTURE=x86
    cd >tmp.txt
    cd >w9xdone.tmp
    copy w9x.txt+tmp.txt w9x.bat
    call w9x.bat
    del tmp.txt
    del w9x.bat
    del w9xtrue.tmp
    SET ADTPRO_HOME=%CWD%\
    goto Normal
    
    :Win9xDone
    del w9xdone.tmp
    goto End
    
    :Normal
    REM You can set two variables here:
    REM   1. %JAVA_HOME% - to pick a particular java to run under
    REM   2. %ADTPRO_HOME% - to say where you installed ADTPro
    REM
    REM e.g. uncomment (remove the "REM" from in front of) and
    REM      customize the following SET statements.  
    REM Note: They must have a trailing backslash as in the examples!
    REM 
    REM SET ADTPRO_HOME=C:\src\workspace\35\adtpro\build\
    REM SET MY_JAVA_HOME=C:\Progra~1\IBM\Java142\bin\
    
    set RXTX_PATH=rxtx-2.1-7-bins-r2
    set RXTX_ARCH=%RXTX_PATH%\Windows\i368-mingw32
    
    IF "%PROCESSOR_ARCHITECTURE%"=="x86" goto add_classpath
    
    :bit64
    REM Assume 64 bit Windows if not x86
    set RXTX_PATH=ch-rxtx-2.2-20081207-win-x64
    set RXTX_ARCH=%RXTX_PATH%
    
    :add_classpath
    if "%ADTPRO_CLASSPATH_SET%" == "1" goto start
    set ADTPRO_CLASSPATH_SET=1
    PATH="%PATH%;%ADTPRO_HOME%lib\rxtx\%RXTX_ARCH%"
    
    :start
    CD "%ADTPRO_HOME%disks"
    start /min %MY_JAVA_HOME%java -Xms128m -Xmx256m %ADTPRO_EXTRA_JAVA_PARMS% -cp "%ADTPRO_HOME%lib\ADTPro-2.0.1.jar";"%ADTPRO_HOME%lib\rxtx\%RXTX_PATH%\RXTXcomm.jar";"%ADTPRO_HOME%lib\AppleCommander\AppleCommander-1.3.5.13-ac.jar" org.adtpro.ADTPro %*
    CD "%CWD%" 
    
    :End
    
     

    Last edit: Michael V. Miller 2016-10-09
  • David Schmidt

    David Schmidt - 2016-10-13

    Thanks for the insights, Michael. It looks like the main concern is figuring out what the current working directory of the Windows 9x family is the issue. I'll see about merging this into the mainline of the batch file. I'll need to lean on you for testing, though. ;-)

     
  • Michael V. Miller

    No worries - I'd be happy to help. The other main concern with Win9x (addressed in this fix) is that of environment variable space. Win9x does not have an "unlimited" environment space like WinNT does, and the environment variables set in the batch file exceed the default environment space allocated by Win9x - hence the "command.com" line in there that restarts the .BAT file.

     
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.