cnotes/INSTALL.BAT

86 lines
2.0 KiB
Plaintext
Raw Normal View History

2026-02-04 17:07:55 +00:00
@echo off
REM ================================================================
REM INSTALL.BAT - cnotes v0.1.1 DOS Installer
REM ================================================================
REM Simple installer for Turbo C++ 3.0 built cnotes tools
REM Places everything in C:\CNOTES by default
REM ================================================================
cls
echo.
echo cnotes v0.1.1 - DOS Installation
echo =================================
echo.
echo This will install the cnotes commands (cnadd, cndump, etc.)
echo to C:\CNOTES
echo.
echo You can change the destination by editing this file.
echo.
set TARGET=C:\CNOTES
echo Target directory: %TARGET%
echo.
if exist %TARGET%\nul goto exists
echo Creating directory %TARGET%...
md %TARGET%
if errorlevel 1 goto fail
:exists
echo Copying files...
copy cnadd.exe %TARGET%\cnadd.exe >nul
copy cndump.exe %TARGET%\cndump.exe >nul
copy cncount.exe %TARGET%\cncount.exe >nul
copy cndel.exe %TARGET%\cndel.exe >nul
copy cnfind.exe %TARGET%\cnfind.exe >nul
copy cnhelp.exe %TARGET%\cnhelp.exe >nul
if errorlevel 1 goto copyfail
echo.
echo Add C:\CNOTES to PATH permanently? (Y/N)
choice /c:yn
if errorlevel 2 goto noautoexec
echo SET PATH=%%PATH%%;C:\CNOTES >> C:\AUTOEXEC.BAT
echo Added to AUTOEXEC.BAT (will take effect after reboot)
goto endauto
:noautoexec
echo Skipped AUTOEXEC.BAT modification.
echo To use cnotes:
echo 1. Add the directory to your PATH (recommended):
echo.
echo SET PATH=%%PATH%%;%TARGET%
echo.
echo (add this line to AUTOEXEC.BAT for permanent effect)
echo.
echo 2. Or run commands directly:
echo %TARGET%\cnadd "Your first note"
echo.
echo Type CNHELP for command overview.
echo.
:endauto
echo.
echo Installation complete!
echo.
goto end
:copyfail
echo.
echo ERROR: Could not copy one or more files.
echo Make sure all .EXE files are in the current directory.
echo Check disk space and write permissions.
goto end
:fail
echo.
echo ERROR: Could not create directory %TARGET%
echo Check drive letter, disk space, or path.
goto end
:end
echo.
pause