0.1.1
This commit is contained in:
parent
e0af7609c2
commit
c6672ae221
37
README.md
37
README.md
|
@ -1,22 +1,18 @@
|
|||
# OTN (Old To New) Remote Printing Standard
|
||||
## "Letting Your Old Devices Print Again!"
|
||||
The README.md page is no longer maintained. Please go to the Wiki.
|
||||
<!--
|
||||
Note, I was tired while making this, and kind of just winged it and threw some information on a file. It'll be revised some time later.
|
||||
### Consider using the Wiki rather than the README
|
||||
|
||||
OTN Remote Printing Standard lets your older devices like a PowerMac G3 or a Windows 9x/2000* computer communicate with newer printers. Or, to be more specific, make a newer computer communicate to a printer for it.
|
||||
|
||||
* Windows 9x/2000 is not yet supported
|
||||
## OTN Standard Iterations
|
||||
Note: These are not updates to the client or server software, but rather the overall concept of OTN.
|
||||
Note 2: If an image is dead, it means I'm too lazy to create it.
|
||||
|
||||
### v1.00-release
|
||||
OTN now uses NetCat as a Telnet server, and is therefor easier to make clients on any platform.
|
||||
OTN NetCat as a Telnet server, and is therefor easier to make clients on any platform.
|
||||
Notice: It is not recommended to print from outside the local network with OTN as it does not have any encryption at all.
|
||||
<img src="map100.png" alt="An Image Of The Network Mac For OTN v1.00">
|
||||
<img src="map.png" alt="An Image Of The Network Map For OTN v1.00">
|
||||
|
||||
### v0.5.0-testing
|
||||
<!-- ### v0.5.0-testing
|
||||
More revisions before official release...
|
||||
<img src="map05.png" alt="An Image Of The Network Map For OTN v0.5">
|
||||
|
||||
|
@ -26,6 +22,7 @@ An update to OTN that doesn't do much but clean up v0.1.0 which was thrown toget
|
|||
### v0.1.0-concept
|
||||
<img src="map.png" alt="An Image Of The Network Map For OTN v0.10 and v0.11">
|
||||
The first version of OTN! No support for IBM compatibles yet, and basic functionality, but it works!
|
||||
-->
|
||||
|
||||
## How It Works
|
||||
If you don't want to know and just want to set it up, skip this snd go to "Installation and Usage". Otherwise, read! It's pretty simple!
|
||||
|
@ -41,7 +38,20 @@ The server consists of 4 main components - the Frontend (what you see when you c
|
|||
The client only consists of a TelNet client.
|
||||
|
||||
## Why I Made This Project
|
||||
Well it's a few years before college, I might as well start making some preparations. I decided I'd use my PowerMac G3 as my main computer and bring my desktop for gaming and to keep some servers I run operational (oh and to do anything online). Sure, I could just use my desktop, but I just really want to use my PowerMac because I'm weird. So I will. One thing I know I'll have to do is print documents. However, I realized that its gonna be hard and expensive to find a printer that has drivers for Mac OS 9.2.2, so I needed a different solution, and that's when I made OTN.
|
||||
Well, it's a few years before college so I might as well start making some preparations. I decided I will use my PowerMac G3 as my main computer and bring my desktop for gaming and to keep some servers I run operational (oh and to do anything online). Sure, I could just use my desktop, but I just really want to use my PowerMac because I'm weird and like old technology. One thing I know I'll have to do is print documents. However, I realized that it's gonna be hard and expensive to find a printer that has drivers for Mac OS 9.2.2, so I needed a different solution, and that's when I starting making OTN.
|
||||
|
||||
## Building
|
||||
1.) Download and unzip the source code for the OTN Server/Client
|
||||
|
||||
2.) Open CMD.exe
|
||||
|
||||
3.) Go to the directory that you extracted the source to (Ex: C:\otn-master\source\)
|
||||
|
||||
4.) Type in:
|
||||
Build.bat /B <buildtag>
|
||||
buildtag determines the version number. Be sure it is in the x.x.x format, but never x.x.x-x, x.x.xx, etc.
|
||||
|
||||
Note: you will still have to edit the version number at the OTNClient\otn-client.bat file ("set otn-ver=x.x.x")
|
||||
|
||||
## Installation and Usage
|
||||
### Server Instructions
|
||||
|
@ -63,11 +73,6 @@ Note: Be sure you have a way to get the computer on the internet (LAN will work)
|
|||
### Windows 9x and 2000 Instructions
|
||||
Note: Be sure you have a way to get the computer on the internet (or LAN).
|
||||
|
||||
Coming Soon!
|
||||
Coming soon!
|
||||
|
||||
### Usage
|
||||
To print a document, convert it to PDF. Most office applications can do this. Then, connect to the modern computer via the RDP client or TeamViewer. Input the required information, and the modern computer will automatically print the file on its primary printer, or printer of your choosing.
|
||||
|
||||
Note: If you want to be able to print from anywhere in the world, you need to open the port the client's RDP server and the server's FTP server.
|
||||
-->
|
||||
© Innovation Inc. 2019, © SparrDrem 2019
|
||||
© Innovation Inc. 2019, © SparrDrem 2019
|
BIN
map-old.png
Normal file
BIN
map-old.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
BIN
map.png
BIN
map.png
Binary file not shown.
Before Width: | Height: | Size: 13 KiB After Width: | Height: | Size: 13 KiB |
BIN
source/7z.exe
Normal file
BIN
source/7z.exe
Normal file
Binary file not shown.
BIN
source/7z.sfx
Normal file
BIN
source/7z.sfx
Normal file
Binary file not shown.
BIN
source/7zCon.sfx
Normal file
BIN
source/7zCon.sfx
Normal file
Binary file not shown.
BIN
source/Bat_To_Exe_Converter.exe
Normal file
BIN
source/Bat_To_Exe_Converter.exe
Normal file
Binary file not shown.
BIN
source/OTNClient/BG.EXE
Normal file
BIN
source/OTNClient/BG.EXE
Normal file
Binary file not shown.
BIN
source/OTNClient/OfficeToPDF.exe
Normal file
BIN
source/OTNClient/OfficeToPDF.exe
Normal file
Binary file not shown.
BIN
source/OTNClient/PDFtoPrinter.exe
Normal file
BIN
source/OTNClient/PDFtoPrinter.exe
Normal file
Binary file not shown.
27
source/OTNClient/about.bat
Normal file
27
source/OTNClient/about.bat
Normal file
|
@ -0,0 +1,27 @@
|
|||
:about
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|About OTN ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|OTN (Old To New) Remote Printing Standard, or just OTN for short, is an ^|
|
||||
echo ^|easy, simple, and straight forward way to getting your older devices to ^|
|
||||
echo ^|print. Whether you want to use it as an office pc, or need to get some ^|
|
||||
echo ^|old documents into the real world, OTN has you covered. ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
pause
|
||||
pause >nul
|
27
source/OTNClient/accountinfo.bat
Normal file
27
source/OTNClient/accountinfo.bat
Normal file
|
@ -0,0 +1,27 @@
|
|||
call load.bat /Q
|
||||
call cls.bat
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo +-------------------------------------------------------------------------------
|
||||
echo ^| Current IP: %otn-ip%
|
||||
echo ^| Current Username: %otn-user%
|
||||
echo ^| Current Printer: %otn-customprinter%
|
||||
echo +-------------------------------------------------------------------------------
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
pause
|
||||
pause >nul
|
38
source/OTNClient/asciiArt.bat
Normal file
38
source/OTNClient/asciiArt.bat
Normal file
|
@ -0,0 +1,38 @@
|
|||
@echo off
|
||||
chcp 65001 >nul
|
||||
goto %~1
|
||||
|
||||
:1
|
||||
echo _______
|
||||
echo ^|^| ^|__
|
||||
echo ^|^| ^|
|
||||
echo ^|^| PDF ^|
|
||||
echo ^|^| ^|
|
||||
echo ^|^|_________^|
|
||||
echo └──────────
|
||||
goto end
|
||||
:2
|
||||
echo _______
|
||||
echo ^|^| ^|__
|
||||
echo ^|^| ^|
|
||||
echo ^|^| ??? ^|
|
||||
echo ^|^| ^|
|
||||
echo ^|^|_________^|
|
||||
echo ^└──────────
|
||||
goto end
|
||||
:3
|
||||
echo :,
|
||||
echo ............::.
|
||||
echo :::::::::::::::^>
|
||||
echo ::::::::::::::'
|
||||
echo :'
|
||||
goto end
|
||||
:4
|
||||
echo _______ _______
|
||||
echo ^|^| ^|__ :, ^|^| ^|__
|
||||
echo ^|^| ^| ............::. ^|^| ^|
|
||||
echo ^|^| ??? ^| :::::::::::::::^> ^|^| PDF ^|
|
||||
echo ^|^| ^| ::::::::::::::' ^|^| ^|
|
||||
echo ^|^|_________^| :' ^|^|_________^|
|
||||
echo └────────── └──────────
|
||||
:end
|
56
source/OTNClient/bootscreen.bat
Normal file
56
source/OTNClient/bootscreen.bat
Normal file
|
@ -0,0 +1,56 @@
|
|||
|
||||
@echo off
|
||||
if exist "setupdone" ( goto startup )
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo WARNING:
|
||||
echo BEFORE USING, READ PRODUCT
|
||||
echo DOCUMENTATION FOR IMPORTANT INFORMATION
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
ping -n 5 127.0.0.1 >NUL 2>&1
|
||||
call cls.bat
|
||||
:startup
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo +---------+
|
||||
echo ^| ^| +-------+
|
||||
echo ^| ^| +--+-------+--+
|
||||
echo ^| OLD ^| TO ^| NEW ^|
|
||||
echo ^| ^|^>^>^>^>^>^>^>^>^>^>^| ^|
|
||||
echo ^| ^| ^| ----------- ^|
|
||||
echo ^| ^| +-------------+
|
||||
echo +---------+
|
||||
echo.
|
||||
echo Client Version: %otn-ver%
|
||||
echo.
|
||||
echo (C) Innovation Inc 2019, SparrDrem 2019
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
ping -n 5 127.0.0.1 >NUL 2>&1
|
||||
call cls.bat
|
336
source/OTNClient/changelog.bat
Normal file
336
source/OTNClient/changelog.bat
Normal file
|
@ -0,0 +1,336 @@
|
|||
@echo off
|
||||
:changelog
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Enter a Version Number to Read Its Changes. ^|
|
||||
echo ^|Type "back" and strike the enter key to go back to the main menu. ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|1.) 0.0.1 ^|
|
||||
echo ^|2.) 0.0.2 ^|
|
||||
echo ^|3.) 0.0.3 ^|
|
||||
echo ^|4.) 0.0.4 ^|
|
||||
echo ^|5.) 0.0.5 ^|
|
||||
echo ^|6.) 0.0.6 ^|
|
||||
echo ^|7.) 0.0.7 ^|
|
||||
echo ^|8.) 0.0.8 ^|
|
||||
echo ^|9.) 0.1.0 ^|
|
||||
echo ^|10.) 0.1.1 ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P change="| > "
|
||||
pause >nul
|
||||
if '%change%'=='back' goto exit
|
||||
if '%change%' LSS '1' goto outofrange
|
||||
if '%change%' GTR '9' goto outofrange
|
||||
goto %change%
|
||||
|
||||
:outofrange
|
||||
echo.
|
||||
echo Error: "%change%" is out of the available range.
|
||||
ping -n 3 127.0.0.1 >nul 2>&1
|
||||
goto changelog
|
||||
|
||||
:1
|
||||
call cls.bat
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog for 0.0.1 ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Initial Release ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
pause
|
||||
pause >nul
|
||||
goto changelog
|
||||
|
||||
:2
|
||||
call cls.bat
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog for 0.0.2 ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|^> Update to OTN v1.00-release ^|
|
||||
echo ^|~ Bug Fix ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
pause
|
||||
pause >nul
|
||||
goto changelog
|
||||
|
||||
:3
|
||||
call cls.bat
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog for 0.0.3 ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|+ Added the ability to choose what printer to print to. ^|
|
||||
echo ^|+ Added the ability to choose what pages to print. ^|
|
||||
echo ^|~ Fixed a bug that caused the "Clean Up" function to not do its job ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
pause
|
||||
pause >nul
|
||||
goto changelog
|
||||
|
||||
:4
|
||||
call cls.bat
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog for 0.0.4 ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|+ Settings! ^|
|
||||
echo ^|+ Added the ability to change the default printer without going through ^|
|
||||
echo ^| the entire setup. ^|
|
||||
echo ^|~ Added a settings page so you dont have to rerun setup to change 1 thing. ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
pause
|
||||
pause >nul
|
||||
goto changelog
|
||||
|
||||
:5
|
||||
call cls.bat
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog for 0.0.5 ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|+ Added a cache system to reprint files ^|
|
||||
echo ^|+ Added the ability to print a document x amount of times. Need to print ^|
|
||||
echo ^| flyers? We got 'em. Need to print some newspapers? We got you covered ^|
|
||||
echo ^| baby! You want some letters? E A S Y! We got it all! This printing ^|
|
||||
echo ^| standard is still being developed god damn it! ^|
|
||||
echo ^|~ Some spelling fixes ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
pause
|
||||
pause >nul
|
||||
|
||||
:6
|
||||
call cls.bat
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog for 0.0.6 ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|+ Basic conversion for most formats to PDF. You no longer have to convert ^|
|
||||
echo ^| it yourself prior to downloading! ^|
|
||||
echo ^|~ General system stability improvements to enhance the user's experience. ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
pause
|
||||
pause >nul
|
||||
goto changelog
|
||||
|
||||
:7
|
||||
call cls.bat
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog for 0.0.7 ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|~ Added some code to prevent OTN Server from committing seppuku if the user^|
|
||||
echo ^| makes a mistake. ^|
|
||||
echo ^|~ General system stability improvements to enhance the user's experience. ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
pause
|
||||
pause >nul
|
||||
goto changelog
|
||||
|
||||
:8
|
||||
call cls.bat
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog for 0.0.8 ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|+ Some stuff to prepare for a special s u r p r i s e tomorrow. ^|
|
||||
echo ^|~ Split the OTN Client up into seperate batches to make it easier to ^|
|
||||
echo ^| develop. ^|
|
||||
echo ^|~ Added some more code to preven OTN Server from committing seppuku if the ^|
|
||||
echo ^| user makes a mistake. ^|
|
||||
echo ^|~ General system stability improvements to enhance the user's experience. ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
pause
|
||||
pause >nul
|
||||
goto changelog
|
||||
|
||||
:9
|
||||
call cls.bat
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog for 0.1.0 ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|+ OTN now looks prettier! *party horn* Surprise! ^|
|
||||
echo ^|+ Added a download function, so you can download it now but use it later. ^|
|
||||
echo ^|~ General system stability improvements to enhance the user's experience. ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
pause
|
||||
pause >nul
|
||||
goto changelog
|
||||
|
||||
:10
|
||||
call cls.bat
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Changelog for 0.1.1 ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|+ Accounts, so multiple can use the same server across multiple devices! ^|
|
||||
echo ^|+ Actually added the code that prevents conversion if office is installed ^|
|
||||
echo ^| I forgot this for 4 versions straight even though I made the flag for it.^|
|
||||
echo ^|~ Fixed the bootscreen ^|
|
||||
echo ^|~ General system stability improvements to enhance the user's experience. ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
pause
|
||||
pause >nul
|
||||
goto changelog
|
||||
|
||||
:exit
|
18
source/OTNClient/choosefile.bat
Normal file
18
source/OTNClient/choosefile.bat
Normal file
|
@ -0,0 +1,18 @@
|
|||
:print
|
||||
call load.bat /Q
|
||||
call cls.bat
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Choose File ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Please enter the path to the document. If it's at the home directory, just ^|
|
||||
echo ^|enter. ^|
|
||||
echo ^|Example: If the documents is located at ~/Documents/folder/file.pdf, and ^|
|
||||
echo ^| the FTP home directory is ~/Documents/, you would type folder/ ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otn-path="| > "
|
||||
pause >nul
|
||||
echo ^|Please enter the file name of the PDF, including the .pdf extension. ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otn-file="| > "
|
||||
pause >nul
|
||||
call print.bat
|
25
source/OTNClient/cls.bat
Normal file
25
source/OTNClient/cls.bat
Normal file
|
@ -0,0 +1,25 @@
|
|||
@echo off
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
||||
echo.
|
53
source/OTNClient/convert.bat
Normal file
53
source/OTNClient/convert.bat
Normal file
|
@ -0,0 +1,53 @@
|
|||
:convert
|
||||
call load.bat /Q
|
||||
call cls.bat
|
||||
if "%officeInstalledFlag%"=="1" goto officenotinstalled
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Convert ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Please enter the path to the document. If it's at the home directory, just ^|
|
||||
echo ^|enter. ^|
|
||||
echo ^|Example: If the documents is located at ~/Documents/folder/file.pdf, and ^|
|
||||
echo ^| the FTP home directory is ~/Documents/, you would type folder/ ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otn-path="| > "
|
||||
pause >nul
|
||||
echo ^|Please enter the file name of the document, including the file extension. ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otn-file="| > "
|
||||
pause >nul
|
||||
echo ^|Please enter the desired file name of the PDF output ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otn-convertout="| > "
|
||||
pause >nul
|
||||
echo ^|Downloading... ^|
|
||||
wget -q --no-passive-ftp --user=%otn-user% --password=%otn-pass% "ftp://%otn-ip%/%otn-path%%otn-file%" -O "cache\%otn-file%"
|
||||
echo ^|Converting... ^|
|
||||
OfficeToPDF.exe "cache\%otn-file%" "cache\%otn-convertout%"
|
||||
echo ^|Removing unconverted document... ^|
|
||||
del /Q "cache\%otn-file%"
|
||||
ping -n 3 127.0.0.1 >nul 2>&1
|
||||
echo ^|Would you like to print this document now? y/n ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otn-choice="| > "
|
||||
pause >nul
|
||||
set otn-file=%otn-convertout%
|
||||
set skipDownloadFlag=2
|
||||
if "%otn-choice%"=="y" ( goto yes ) else ( goto exit )
|
||||
|
||||
:yes
|
||||
move "cache\%otn-file%" "%otn-file%"
|
||||
call print.bat
|
||||
|
||||
:officenotinstalled
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Convert ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Error: Office is not installed. If office is installed, please change the ^|
|
||||
echo ^|"officeInstalledFlag" to 2 in settings. ^|
|
||||
echo ^| ^|
|
||||
echo ^|Press any key to continue. ^|
|
||||
pause >nul
|
||||
pause >nul
|
||||
|
||||
:exit
|
52
source/OTNClient/debugmenu.bat
Normal file
52
source/OTNClient/debugmenu.bat
Normal file
|
@ -0,0 +1,52 @@
|
|||
:supersecret
|
||||
call cls.bat
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Debug Menu ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|1.) List all variables ^|
|
||||
echo ^|2.) List all flags ^|
|
||||
echo ^|3.) ^|
|
||||
echo ^|4.) ^|
|
||||
echo ^|5.) ^|
|
||||
echo ^|6.) ^|
|
||||
echo ^|7.) ^|
|
||||
echo ^|8.) ^|
|
||||
echo ^|9.) Exit ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /p otn-debugchoice="| [DEBUG] > "
|
||||
pause >nul
|
||||
if "%otn-debugchoice%"=="1" goto listVars
|
||||
if "%otn-debugchoice%"=="2" goto listFlags
|
||||
if "%otn-debugchoice%"=="9" goto exit
|
||||
|
||||
:listVars
|
||||
echo ^|otn-ver=%otn-ver%
|
||||
echo ^|otn-c=%otn-c%
|
||||
echo ^|otn-ip=%otn-ip%
|
||||
echo ^|otn-user=%otn-user%
|
||||
echo ^|otn-pass=%otn-pass%
|
||||
echo ^|otn-customprinter=%otn-customprinter%
|
||||
echo ^|instchoice=%instchoice%
|
||||
echo ^|change=%change%
|
||||
echo ^|otn-choice=%otn-choice%
|
||||
echo ^|otn-file=%otn-file%
|
||||
echo ^|otn-yn=%otn-yn%
|
||||
echo ^|otn-pages=%otn-pages%
|
||||
echo ^|otn-convertout=%otn-convertout%
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo.
|
||||
pause
|
||||
pause >nul
|
||||
goto supersecret
|
||||
|
||||
:listFlags
|
||||
echo ^|skipDownloadFlag=%skipDownloadFlag%
|
||||
echo ^|officeInstalledFlag=%officeInstalledFlag%
|
||||
echo ^|customPrinterFlag=%customPrinterFlag%
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo.
|
||||
pause
|
||||
pause >nul
|
||||
goto supersecret
|
||||
|
||||
:exit
|
23
source/OTNClient/download.bat
Normal file
23
source/OTNClient/download.bat
Normal file
|
@ -0,0 +1,23 @@
|
|||
:print
|
||||
call load.bat /Q
|
||||
call cls.bat
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Download a PDF ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Please enter the path to the document. If it's at the home directory, just ^|
|
||||
echo ^|press enter. ^|
|
||||
echo ^|Example: If the document is located at ~/Documents/folder/file.pdf, and the^|
|
||||
echo ^| FTP home directory is ~/Documents/, you would type folder/ ^|
|
||||
echo ^| If it is on the root directory of the FTP home directory, just ^|
|
||||
echo ^| press enter. ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otn-path="| > "
|
||||
pause >nul
|
||||
echo ^|Please enter the file name of the PDF, including the .pdf extension ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otn-file="| > "
|
||||
pause >nul
|
||||
echo ^|Downloading... ^|
|
||||
wget -q --no-passive-ftp --user=%otn-user% --password=%otn-pass% "ftp://%otn-ip%/%otn-path%%otn-file%" -O "%otn-file%"
|
||||
echo ^|Caching... ^|
|
||||
move "%otn-file%" "cache\%otn-file%"
|
50
source/OTNClient/error.bat
Normal file
50
source/OTNClient/error.bat
Normal file
|
@ -0,0 +1,50 @@
|
|||
@echo off
|
||||
set otn-errorchoice=
|
||||
call cls.bat
|
||||
color 1F
|
||||
goto %~1
|
||||
:fatal
|
||||
echo [OTN Server]
|
||||
echo.
|
||||
echo An error has occurred, and OTN could not recover from it.
|
||||
echo.
|
||||
echo Press any key to enter a Limbo state, or
|
||||
echo.
|
||||
echo Press E to restart OTN. You will lose any unsaved information in
|
||||
echo all open applications.
|
||||
echo.
|
||||
goto %~2
|
||||
|
||||
:nonfatal
|
||||
echo [OTN Server]
|
||||
echo.
|
||||
echo An error has occurred. To continue:
|
||||
echo.
|
||||
echo Press any key to return to OTN, or
|
||||
echo.
|
||||
echo Press E to restart OTN. If you do this, you will lose any unsaved
|
||||
echo information in all open applications.
|
||||
echo.
|
||||
goto %~2
|
||||
:0002
|
||||
echo Error: ENTERED_NOT_LESS_THAN_OR_EQUAL
|
||||
echo.
|
||||
if "%~1"=="fatal" ( goto fatalchoice ) else ( goto nonfatalchoice )
|
||||
:fatalchoice
|
||||
set /P otn-errorchoice=" Press any key and strike Enter "
|
||||
pause >nul
|
||||
if "%otn-errorchoice%"=="E" ( goto restart ) else ( goto limbo )
|
||||
:nonfatalchoice
|
||||
set /P otn-errorchoice=" Press any key and strike Enter "
|
||||
pause >nul
|
||||
if "%otn-errorchoice%"=="E" ( goto restart ) else ( goto end )
|
||||
|
||||
:restart
|
||||
color 0F
|
||||
call otn-client.bat
|
||||
|
||||
:limbo
|
||||
goto limbo
|
||||
|
||||
:end
|
||||
color 0F
|
28
source/OTNClient/load.bat
Normal file
28
source/OTNClient/load.bat
Normal file
|
@ -0,0 +1,28 @@
|
|||
@echo off
|
||||
if "%~1"=="/Q" goto quiet
|
||||
call cls.bat
|
||||
echo ______________
|
||||
echo ^|[] ^|
|
||||
echo ^| __________ ^|
|
||||
echo ^| ^| ^| ^|
|
||||
echo ^| ^| OTN ^| ^|
|
||||
echo ^| ^|________^| ^|
|
||||
echo ^| ________ ^|
|
||||
echo ^| [ [ ] ] ^|
|
||||
echo \___[_[_]__]___^|
|
||||
echo Loading Settings...
|
||||
|
||||
:quiet
|
||||
< "accounts\%otn-clientuser%" (
|
||||
set /p otn-ip=
|
||||
set /p otn-user=
|
||||
set /p otn-pass=
|
||||
set /p otn-customprinter=
|
||||
set /p otn-customprinterflag=
|
||||
set /p officeInstalledFlag=
|
||||
)
|
||||
if "%~1"=="/Q" goto exit
|
||||
ping -n 2 127.0.0.1 >nul 2>&1
|
||||
echo Loaded
|
||||
ping -n 2 127.0.0.1 >nul 2>&1
|
||||
:exit
|
85
source/OTNClient/manageCache.bat
Normal file
85
source/OTNClient/manageCache.bat
Normal file
|
@ -0,0 +1,85 @@
|
|||
:manageCache
|
||||
call cls.bat
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Manage Cache ^|
|
||||
echo +---------------------------------------------------------------------------^|
|
||||
echo ^|1.) ^|2.) ^| ^| ^|3.) ^| ^| ^|4.) ^|
|
||||
echo ^| +---+ +-----+ ^| ^|^|^|^|+ ^| ^|^|^|^|-+ ^| ^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^< ^|
|
||||
echo ^| ^| +-+ ^| ^| ^| ^| ^|^|^|^|^|-+ ^| ^|^|^|^|^|--+ ^| ^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^< ^|
|
||||
echo ^| ^| PDF ^| ^| +- ^| ^| ^| PDF ^| ^| ^| PDF ^|^| ^| ^<^<^<^<^<^<^<^<^<^<^<^<^<^<^<^< ^|
|
||||
echo ^| +-----+ +-----+ ^| +-----+ ^| +------+ ^| ^|
|
||||
echo ^|Reprint Downloaded^|Delete Downloaded ^|Delete all cached ^|Back to Main Menu ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /p otn-choice="| > "
|
||||
pause >nul
|
||||
if "%otn-choice%"=="1" goto printcache
|
||||
if "%otn-choice%"=="2" goto delcachefile
|
||||
if "%otn-choice%"=="3" goto delcacheall
|
||||
if "%otn-choice%"=="4" goto end
|
||||
echo Error: "%otn-choice%" is outside the available range.
|
||||
ping -n 3 127.0.0.1 >nul 2>&1
|
||||
goto manageCache
|
||||
|
||||
:printcache
|
||||
set skipDownloadFlag=2
|
||||
echo ^|Start cache Directory Listing ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
dir /B /P cache\
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Type the name of the file you want to print ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /p otn-file="| > "
|
||||
pause >nul
|
||||
if exist "cache\%otn-file%" (
|
||||
set skipDownloadFlag=2
|
||||
move "cache\%otn-file%" "%otn-file%"
|
||||
call print.bat
|
||||
goto manageCache
|
||||
) else (
|
||||
Error: This file does not exist.
|
||||
ping -n 3 127.0.0.1 >nul 2>&1
|
||||
goto manageCache
|
||||
)
|
||||
|
||||
:delcachefile
|
||||
echo ^|Start cache Directory Listing ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
dir /B /P cache\
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Type the name of the file you want to delete ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /p otn-file="| > "
|
||||
pause >nul
|
||||
echo ^| Are you sure you want to delete %otn-file%? This cannot be undone! y/n
|
||||
set /p otn-choice="| > "
|
||||
pause >nul
|
||||
if "%otn-choice%"=="n" goto no
|
||||
if exist "cache\%otn-file%" (
|
||||
del /Q "cache\%otn-file%"
|
||||
echo ^|File deleted. ^|
|
||||
ping -n 3 127.0.0.1 >nul 2>&1
|
||||
goto manageCache
|
||||
) else (
|
||||
echo ^|Error: This file does not exist. ^|
|
||||
ping -n 3 127.0.0.1 >nul 2>&1
|
||||
goto manageCache
|
||||
)
|
||||
:no
|
||||
echo ^|Canceled! ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
ping -n 3 127.0.0.1 >nul 2>&1
|
||||
goto manageCache
|
||||
|
||||
:delcacheall
|
||||
echo ^|Are you sure you want to delete everything in the cache folder? ^|
|
||||
echo ^|This cannot be undone! (y/n) ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /p otn-choice="| > "
|
||||
pause >nul
|
||||
if not '%otn-choice%'=='y' goto no
|
||||
del /Q cache\*.*
|
||||
echo ^|Cached files removed. ^|
|
||||
ping -n 3 127.0.0.1 >nul 2>&1
|
||||
goto manageCache
|
||||
|
||||
:end
|
BIN
source/OTNClient/nc.exe
Normal file
BIN
source/OTNClient/nc.exe
Normal file
Binary file not shown.
120
source/OTNClient/otn-client.bat
Normal file
120
source/OTNClient/otn-client.bat
Normal file
|
@ -0,0 +1,120 @@
|
|||
:boot
|
||||
@echo off
|
||||
set otn-ver=0.1.1
|
||||
set otn-c=2019
|
||||
set otn-ip=
|
||||
set otn-user=
|
||||
set otn-pass=
|
||||
set otn-customprinter=No Default
|
||||
call bootscreen.bat
|
||||
if exist "setupdone" ( goto login ) else ( goto setup )
|
||||
|
||||
:setup
|
||||
call setup.bat
|
||||
goto save
|
||||
|
||||
:load
|
||||
call load.bat
|
||||
goto start
|
||||
|
||||
:save
|
||||
call save.bat
|
||||
goto start
|
||||
|
||||
:login
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Log In to OTN Server ^|
|
||||
echo ^|===========================================================================^|
|
||||
dir /B /P accounts\
|
||||
echo ^|===========================================================================^|
|
||||
echo ^|Please Enter Your OTN Server Username, or type "NewAccount" to make a new ^|
|
||||
echo ^| account. ^|
|
||||
set /p otn-clientuser="| > "
|
||||
if "%otn-clientuser%"=="NewAccount" goto setup
|
||||
if exist "accounts\%otn-clientuser%" goto load
|
||||
echo ^|Error: "%otn-clientuser%" is not a valid account. ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
goto login
|
||||
|
||||
:start
|
||||
set instchoice=
|
||||
set change=
|
||||
set otn-choice=
|
||||
set otn-file=
|
||||
set otn-yn=
|
||||
set otn-pages=
|
||||
set otn-convertout=
|
||||
set skipDownloadFlag=
|
||||
call cls.bat
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|OTN Client^|Client Version: %otn-ver%^|(C)Innovation Inc. %otn-c%, Sparrdrem %otn-c% ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Functions ^| ^|
|
||||
echo +------------------+--------------------------------------------------------+
|
||||
echo ^|1.) +---+ ^|2.) ^|3.) ^|4.) +---+ ^|
|
||||
echo ^| ^| +-+ ^| +---+ +---+ ^| +---+ +-----+ ^| ^|PDF^| ^|
|
||||
echo ^| ^| PDF ^| ^| ^| +-+ ^| +-+ ^| ^| +-+ ^| ^| ^| ^| \^| ^|/ ^|
|
||||
echo ^| +-----+ ^| ^| ??? ^|^>^>^| PDF ^| ^| ^| PDF ^| ^| +- ^| ^| \ / ^|
|
||||
echo ^| ^| +-----+ +-----+ ^| +-----+ +-----+ ^| \ / ^|
|
||||
echo ^| Print a PDF ^| Convert to PDF ^| Manage Cache ^| Download a PDF ^|
|
||||
echo +------------------+--------------------------------------------------------+
|
||||
echo ^|About and Settings^| ^|
|
||||
echo +------------------+--------------------------------------------------------+
|
||||
echo ^|A.) ++_++ ^|B.) ^|C.) ^|D.) +----+ ^|
|
||||
echo ^| ++ ++ ^| +---+ ^| +---+ ^| ^| ^| ^|
|
||||
echo ^| ^| ^| ^| ^| ? ^| ^| ^|===+-+ ^| +----+ ^|
|
||||
echo ^| ^|^|^| ^| +---+ ^| ^|%otn-ver%^| ^| +---++---+ ^|
|
||||
echo ^| +-+ ^| ^| +-----+ ^| ^| ++ ++ ^| ^|
|
||||
echo ^| Settings ^| About OTN ^| Changelog ^| Account Info ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo.
|
||||
set /P otn-choice="Enter your Choice > "
|
||||
pause >nul
|
||||
if '%otn-choice%'=='1' goto filechoose
|
||||
if '%otn-choice%'=='2' goto convert
|
||||
if '%otn-choice%'=='3' goto manageCache
|
||||
if '%otn-choice%'=='4' goto download
|
||||
if '%otn-choice%'=='A' goto settings
|
||||
if '%otn-choice%'=='B' goto about
|
||||
if '%otn-choice%'=='C' goto changelog
|
||||
if '%otn-choice%'=='D' goto accountinfo
|
||||
if '%otn-choice%'=='supersecret' goto debugmenu
|
||||
echo Error: %otn-choice% is not a valid choice
|
||||
ping -n 3 127.0.0.1 >nul 2>&1
|
||||
goto start
|
||||
|
||||
:filechoose
|
||||
call choosefile.bat
|
||||
goto start
|
||||
|
||||
:manageCache
|
||||
call manageCache.bat
|
||||
goto start
|
||||
|
||||
:convert
|
||||
call convert.bat
|
||||
goto start
|
||||
|
||||
:download
|
||||
call download.bat
|
||||
goto start
|
||||
|
||||
:settings
|
||||
call settings.bat
|
||||
goto start
|
||||
|
||||
:changelog
|
||||
call changelog.bat
|
||||
goto start
|
||||
|
||||
:about
|
||||
call about.bat
|
||||
goto start
|
||||
|
||||
:accountinfo
|
||||
call accountinfo.bat
|
||||
goto start
|
||||
|
||||
:debugmenu
|
||||
call debugmenu.bat
|
||||
goto start
|
66
source/OTNClient/print.bat
Normal file
66
source/OTNClient/print.bat
Normal file
|
@ -0,0 +1,66 @@
|
|||
call load.bat /Q
|
||||
call cls.bat
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Print ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Would you like to print the whole document? y/n ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otn-pages="| > "
|
||||
pause >nul
|
||||
if not '%otn-pages%'=='y' (
|
||||
echo ^|Please enter what pages you want to print. ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otn-pages="| > "
|
||||
pause >nul
|
||||
) else (
|
||||
set otn-pages=
|
||||
)
|
||||
echo ^|How many times would you like to print this document? ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otnmanyprint="| > "
|
||||
pause >nul
|
||||
echo ^|Are you sure you want to print "%otn-file%" %otnmanyprint% times(s)? y/n
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otn-yn="| > "
|
||||
pause >nul
|
||||
if '%otn-yn%'=='y' goto yes
|
||||
goto no
|
||||
|
||||
:yes
|
||||
if '%skipDownloadFlag%'=='2' goto manyprint
|
||||
echo ^|Downloading... ^|
|
||||
wget -q --no-passive-ftp --user=%otn-user% --password=%otn-pass% "ftp://%otn-ip%/%otn-path%%otn-file%" -O "%otn-file%"
|
||||
:manyprint
|
||||
echo ^|Printing (%otnmanyprint% left)...
|
||||
set /a otnmanyprint=%otnmanyprint%-1
|
||||
if '%otnmanyprint%'=='-1' (
|
||||
goto printdone
|
||||
) else (
|
||||
if '%otn-customprinterflag%'=='2' (
|
||||
PDFtoPrinter.exe "%otn-file%" "%otn-customprinter%" pages=%otn-pages%
|
||||
) else (
|
||||
PDFtoPrinter.exe "%otn-file%" pages=%otn-pages%
|
||||
)
|
||||
goto manyprint
|
||||
)
|
||||
|
||||
:printdone
|
||||
echo ^|Caching PDF... ^|
|
||||
move "%otn-file%" "cache\%otn-file%"
|
||||
goto end
|
||||
|
||||
:no
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^|Canceled! ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo ^| ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
ping -n 3 127.0.0.1 >nul 2>&1
|
||||
|
||||
:end
|
27
source/OTNClient/save.bat
Normal file
27
source/OTNClient/save.bat
Normal file
|
@ -0,0 +1,27 @@
|
|||
@echo off
|
||||
if "%~1"=="/Q" goto quiet
|
||||
call cls.bat
|
||||
echo ______________
|
||||
echo ^|[] ^|
|
||||
echo ^| __________ ^|
|
||||
echo ^| ^| ^| ^|
|
||||
echo ^| ^| OTN ^| ^|
|
||||
echo ^| ^|________^| ^|
|
||||
echo ^| ________ ^|
|
||||
echo ^| [ [ ] ] ^|
|
||||
echo \___[_[_]__]___^|
|
||||
echo Saving Settings...
|
||||
:quiet
|
||||
(
|
||||
echo %otn-ip%
|
||||
echo %otn-user%
|
||||
echo %otn-pass%
|
||||
echo %otn-customprinter%
|
||||
echo %otn-customprinterflag%
|
||||
echo %officeInstalledFlag%
|
||||
)>"accounts\%otn-clientuser%"
|
||||
if "%~1"=="/Q" goto exit
|
||||
ping -n 2 127.0.0.1 >nul 2>&1
|
||||
echo Saved
|
||||
ping -n 2 127.0.0.1 >nul 2>&1
|
||||
:exit
|
90
source/OTNClient/settings.bat
Normal file
90
source/OTNClient/settings.bat
Normal file
|
@ -0,0 +1,90 @@
|
|||
call load.bat /Q
|
||||
:settings
|
||||
call cls.bat
|
||||
set otn-choice=
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Settings ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Enter the setting you would like to change. ^|
|
||||
echo +---------------------------------------------+-----------------------------+
|
||||
echo ^|1.) FTP IP Address ^|Current: %otn-ip%
|
||||
echo ^|2.) FTP Username ^|Current: %otn-user%
|
||||
echo ^|3.) FTP Password ^|Current: %otn-pass%
|
||||
echo ^|4.) Default Printer ^|Current: %otn-customprinter%
|
||||
echo ^|5.) Toggle officeInstalledFlag Off (1)/On (2)^|Current: %officeInstalledFlag%
|
||||
echo ^|6.) Don't Save and Exit ^| ^|
|
||||
echo ^|7.) Save and Exit ^| ^|
|
||||
echo +---------------------------------------------+-----------------------------+
|
||||
set /p otn-choice="| > "
|
||||
pause >nul
|
||||
if '%otn-choice%'=='1' goto settingsip
|
||||
if '%otn-choice%'=='2' goto settingsuser
|
||||
if '%otn-choice%'=='3' goto settingspass
|
||||
if '%otn-choice%'=='4' goto settingsprinter
|
||||
if '%otn-choice%'=='5' goto settingsoffice
|
||||
if '%otn-choice%'=='6' goto load
|
||||
if '%otn-choice%'=='7' goto save
|
||||
ping -n 3 127.0.0.1 >NUL 2>&1
|
||||
echo ^|Sorry, "%otn-choice%" is not a valid option! ^|
|
||||
goto settings
|
||||
|
||||
:settingsip
|
||||
echo ^|Enter the new FTP server IP. ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /p otn-ip="| > "
|
||||
pause >nul
|
||||
goto settings
|
||||
|
||||
:settingsuser
|
||||
echo ^|Enter the new FTP server username. ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /p otn-user="| > "
|
||||
pause >nul
|
||||
goto settings
|
||||
|
||||
:settingspass
|
||||
echo ^|Enter the new FTP server password. ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /p otn-pass="| > "
|
||||
pause >nul
|
||||
goto settings
|
||||
|
||||
:settingsprinter
|
||||
echo ^|Would you like to let Windows decide (1) or change the default printer (2)?^|
|
||||
set /P otn-customprinterflag="| > "
|
||||
pause >nul
|
||||
if not '%otn-customprinterflag%'=='2' (
|
||||
set otn-customprinter=No Default
|
||||
echo ^|Windows will now decide what printer to print to. ^|
|
||||
ping -n 3 127.0.0.1 >NUL 2>&1
|
||||
) else (
|
||||
echo ^|Enter the name of the printer you want to use. ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otn-customprinter="| > "
|
||||
pause >nul
|
||||
|
||||
)
|
||||
goto settings
|
||||
|
||||
rem This shouldn't be this badly coded but batch
|
||||
:settingsoffice
|
||||
if "%officeInstalledFlag%"=="1" ( goto settingsofficeon )
|
||||
if "%officeInstalledFlag%"=="2" ( goto settingsofficeoff )
|
||||
|
||||
:settingsofficeon
|
||||
set officeInstalledFlag=2
|
||||
goto settings
|
||||
|
||||
:settingsofficeoff
|
||||
set officeInstalledFlag=1
|
||||
goto settings
|
||||
|
||||
:load
|
||||
call load.bat
|
||||
goto exit
|
||||
|
||||
:save
|
||||
call save.bat
|
||||
goto exit
|
||||
|
||||
:exit
|
58
source/OTNClient/setup.bat
Normal file
58
source/OTNClient/setup.bat
Normal file
|
@ -0,0 +1,58 @@
|
|||
:setup
|
||||
call cls.bat
|
||||
if not exist "cache\" ( mkdir cache )
|
||||
echo +---------------------------------------------------------------------------+
|
||||
echo ^|Setup ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
if not exist "C:\Program Files (x86)\GnuWin32\bin\wget.exe" (
|
||||
echo ^|It appears the server doesn't have WGET installed. WGET is required for OTN^|
|
||||
echo ^|to download PDFs. If you do have it installed, ignore this message. Else, ^|
|
||||
echo ^|you need to install it. ^|
|
||||
echo ^|Would you like to install WGET? y/n ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P instchoice="| > "
|
||||
)
|
||||
if '%instchoice%'=='y' goto install
|
||||
if '%instchoice%'=='Y' goto install
|
||||
echo ^|This is the first time the server has run, so you need to enter the ^|
|
||||
echo ^|client's IP, username, and password. ^|
|
||||
echo ^| ^|
|
||||
echo ^|Input the IP Address to the server computer. ^|
|
||||
echo ^|Note: if you do not intend to print globally, use your LOCAL IP address. ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otn-ip="| > "
|
||||
pause >nul
|
||||
echo ^|Would you like to use the default printer (1), or type in the name of the ^|
|
||||
echo ^|printer you want to use? (2) ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otn-customprinterflag="| > "
|
||||
pause >nul
|
||||
if '%otn-customprinterflag%'=='2' (
|
||||
echo ^|Enter the name of the printer you want to use. ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otn-customprinter="> "
|
||||
pause >nul
|
||||
)
|
||||
echo ^|Enter the username for the FTP account. ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otn-user="| > "
|
||||
pause >nul
|
||||
echo ^|Enter the password for the FTP accuont. ^|
|
||||
echo +---------------------------------------------------------------------------+
|
||||
set /P otn-pass="| > "
|
||||
pause >nul
|
||||
echo ^|Do you have Microsoft Office installed on the server computer? y/n ^|
|
||||
set /P officeInstalledFlag="| > "
|
||||
if '%officeInstalledFlag%'=='y' ( set officeInstalledFlag=2 ) else ( set officeInstalledFlag=1 )
|
||||
pause >nul
|
||||
echo ^|Enter the Username for this OTN Server Account ^|
|
||||
set /p otn-clientuser="| > "
|
||||
goto exit
|
||||
|
||||
:install
|
||||
echo ^|Installing WGET... ^|
|
||||
wget-setup.exe /verysilent /norestart
|
||||
goto setup
|
||||
|
||||
:exit
|
||||
echo > setupdone
|
BIN
source/OTNClient/wget-setup.exe
Normal file
BIN
source/OTNClient/wget-setup.exe
Normal file
Binary file not shown.
40
source/build.bat
Normal file
40
source/build.bat
Normal file
|
@ -0,0 +1,40 @@
|
|||
@echo off
|
||||
set ver=%~2
|
||||
if "%~1"=="/?" goto help
|
||||
if "%~1"=="/B" goto build
|
||||
if "%~1"=="/C" goto cleanup
|
||||
echo Sorry, "%~1" isn't a valid option
|
||||
echo.
|
||||
|
||||
:help
|
||||
echo OTN Buildificator v0.1 Usage
|
||||
echo ==============================================================================================
|
||||
echo /? = Help
|
||||
echo /B = Build
|
||||
echo /C = Clean Up
|
||||
echo.
|
||||
echo Building: Build.bat /B 0.1.1
|
||||
echo Builds OTN Server with buildtag 0.1.1
|
||||
echo Not providing a buildtag will break the home screen. There's no code preventing this yet.
|
||||
echo Must be in a "x.x.x" format, and not "x.x.x-x" or "x.x.xx" or else the home screen will break.
|
||||
goto exit
|
||||
|
||||
:build
|
||||
mkdir Build
|
||||
cls
|
||||
echo Buildtag=%ver%
|
||||
if exist "OTNClient.exe" del /Q OTNClient.exe
|
||||
echo Compiling OTN Client installer...
|
||||
7z.exe a -sfx -y OTNClient.exe -r OTNClient\
|
||||
|
||||
:startbuild
|
||||
echo Building OTN Server...
|
||||
Bat_To_Exe_Converter /bat start.bat /exe build\otn-server.exe /icon icon.ico /include OTNClient.exe /include sfk.exe /fileversion %ver% /productversion %ver% /productname "OTN Server" /originalfilename otn-server.exe /internalname "OTN Server" /description "Old to New Remote Printing Standard Server" /company "Innovation Inc., Sparrdrem" /trademarks "Innovation Inc., Sparrdrem" /copyright "Innovation Inc., Sparrdrem"
|
||||
goto exit
|
||||
|
||||
:cleanup
|
||||
echo Cleaning up...
|
||||
if exist OTNClient.exe del OTNClient.exe
|
||||
if exist "Build\" rmdir /Q /S "Build\"
|
||||
|
||||
:exit
|
BIN
source/icon.ico
Normal file
BIN
source/icon.ico
Normal file
Binary file not shown.
After Width: | Height: | Size: 83 KiB |
BIN
source/sfk.exe
Normal file
BIN
source/sfk.exe
Normal file
Binary file not shown.
29
source/start.bat
Normal file
29
source/start.bat
Normal file
|
@ -0,0 +1,29 @@
|
|||
@echo off
|
||||
if not exist "OTNClient\otn-client.bat" ( goto install ) else ( goto start )
|
||||
|
||||
:install
|
||||
echo Installing the OTN Client...
|
||||
OTNClient.exe
|
||||
echo Done!
|
||||
ping -n 3 127.0.0.1 >nul 2>&1
|
||||
call OTNClient\cls.bat
|
||||
|
||||
:start
|
||||
del OTNClient.exe
|
||||
sfk.exe ip > tmpFile
|
||||
set /p server-var= < tmpFile
|
||||
del tmpFile
|
||||
title OTN Remote Printing Standard Server
|
||||
echo OTN Remote Printing Standard - Version 0.1.0
|
||||
echo Be sure you connect to %server-var%:5000
|
||||
echo If the given doesn't work, please check
|
||||
echo your IP with ipconfig. This is a problem
|
||||
echo created by the way VirtualBox and VMWare
|
||||
echo bridge your Wi-Fi or Ethernet connection
|
||||
echo to virtual machines.
|
||||
echo --------------------------------------------
|
||||
echo Starting Server...
|
||||
cd OTNClient
|
||||
nc.exe -L -p 5000 -e otn-client.bat -t -v -v
|
||||
echo The server has shut down
|
||||
pause
|
Loading…
Reference in a new issue