View Single Post
Old 14 March 2017, 12:15   #26
Registered User

MickGyver's Avatar
Join Date: Oct 2008
Location: Finland
Posts: 433
I have managed to automate the compile process considerably (creating three command line tools in the process). If you follow these steps and it all goes well you should be able to press F5 in Notepad++ to run a batch file that reloads the source file and compiles it in Blitz Basic 2 and the WinUAE window should be brought to the front.

Setting up automation

Blitz basic 2 has an AREXX port so it's possible to automate it using AREXX. You can take the following steps to set things up.

1. In WinUae set serial port to TCP:// and select "Direct" below the drop down box. Save the WinUAE configuration and quit WinUAE, add the following to the configuration file manually (inder the other lines concerning serial): serial_translate=crlf_cr

2. Create the file DEVS:MountList on the virtual harddrive with following content (if it does not already exist)

Handler = L:Aux-Handler
Stacksize = 1000
Priority = 5
3. Add the following commands to the end of S:user-startup

mount aux:
newshell aux:
4. Create a file named blitzbasic2.rexx in S: with following content (thanks idrougge)

/* blitz automation */
address TED_REXX1
5. Download the command line tools I made specifically for this (but can be used for other purposes) and copy them to the Windows directory. The tools are:

ConvertEOL - Converts EOL characters in text files between different formats (LF / CR / CRLF)
WinUAEArexx - Runs an Arexx script in WinUAE over Telnet
BringToFront - Brings an application with specific window title to front
6. Create a batch file (.bat) in the same folder as your source file(s) with the content below (change paths and filenames accordingly)

cd "C:\Dropbox\Projects\Blitz Basic\NPP\blitzproject"
ConvertEOL unix "blitzproject.bb2" "C:\Program Files (x86)\WinUAE\HDD\Blitz2\Projects\Test\test.bb2"
WinUAEArexx blitzbasic2 1000 "WB31:Blitz2/Projects/Test/test.bb2"
BringToFront "[Amiga1200Dev.uae] - WinUAE"
- The cd command should direct to your folder source files folder.
- The ConvertEOL command is needed only if you are working on a source file with CR LF end of lines (Code folding).
- The WinUAEArexx command should be supplied with the path to the source file as seen by the emulated Amiga. 1000 after the script name is how long to wait before closing the telnet connection, if closing instantly it seems that the command won't be transfered properly.
- BringToFront needs the exact window title of the running WinUAE instance.

Using the automation
1. Start WinUAE, load your configuration and start the emulation, then run Blitz Basic 2.

2. Edit and save the Blitz Basic source file(s) in Notepad++.

3. To compile and run, press F5 and select the batch file you created in step 6 above. Blitz Basic 2 should reload and compile the source file and WinUAE should be brought to the front.
MickGyver is offline  
Page generated in 0.04298 seconds with 11 queries