English Amiga Board


Go Back   English Amiga Board > Coders > Coders. Language > Coders. Blitz Basic

 
 
Thread Tools
Old 22 November 2019, 14:43   #21
S0ulA55a551n
Registered User
S0ulA55a551n's Avatar
 
Join Date: Nov 2010
Location: Rhondda, Wales
Age: 42
Posts: 549
How much work to port this over to VisualCode ? Which I think is based on Atom, or are the significantly different ?
S0ulA55a551n is offline  
Old 22 November 2019, 16:44   #22
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 509
Quote:
Originally Posted by S0ulA55a551n View Post
How much work to port this over to VisualCode ? Which I think is based on Atom, or are the significantly different ?
I don't know, I haven't really researched how to define languages for VS Code. The tools I have made to make the auto-complete and help lookup could easily be modified for other tools. I will have a look how to create language definitions for VS code, maybe it's similar.
MickGyver is offline  
Old 22 November 2019, 21:23   #23
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 466
Quote:
Originally Posted by MickGyver View Post
There are a few things I came to think of:
  1. If you already have any of the tools BringToFront.exe, ConvertEOL.exe and WinUAEREXX.exe, replace them, because at least BringToFront.exe has been updated.
  2. You need to ensure that your firewall/antivirus allows network traffic for WinUAE and WinUAEArexx.exe.
  3. Ensure that you have all the needed packages installed for Atom (atom-shell-commands, symbols-list etc.)
  4. You can toggle the symbols-list from the menu Packages / symbols-list / Toggle.
  5. The indentation in the config files is important. Below is my config file.
    Code:
    "*":
      "atom-shell-commands":
        commands: [
          {
            name: "Execute run.bat"
            command: "cmd"
            arguments: [
              "/C"
              "start"
              "{FileDir}\\run.bat"
            ]
            options:
              cwd: "{FileDir}"
              keymap: "f5"
          }
          {
            name: "Show BB2 Help"
            command: "C:\\Users\\Mick\\.atom\\packages\\language-blitzbasic2\\tools\\BB2Doc.exe"
            arguments: [
              "{CurWord}"
            ]
            options:
              keymap: "f1"
          }
        ]
      "autocomplete-plus":
        confirmCompletion: "tab always, enter when suggestion explicitly selected"
      core:
        disabledPackages: [
          "symbols-view"
        ]
        telemetryConsent: "no"
        themes: [
          "one-light-ui"
          "one-light-syntax"
        ]
      editor:
        fontFamily: "Iosevka, Menlo, Consolas, DejaVu Sans Mono, monospace"
        fontSize: 21
        tabType: "soft"
      "exception-reporting":
        userId: "860f73e9-7355-43ae-a0fc-d099c77724a1"
      "highlight-selected":
        highlightBackground: true
        lightTheme: true
      minimap:
        useHardwareAcceleration: false
      "symbols-list":
        basic: {}
      welcome:
        showOnStartup: false
Code:
"*":
  core:
    autoHideMenuBar: true
  editor:
    fontSize: 16
  "exception-reporting":
    userId: "d35e05d2-d8c6-4660-aadc-217fe2b9c794"
	"atom-shell-commands":
		commands: [
			{
				name: "Show BB2 Help"
				command: "C:\\Users\\Havie\\.atom\\packages\\language-blitzbasic2\\tools\\BB2Doc.exe"
				arguments: [
					"{CurWord}"
				]
				options:
					keymap: "f1"
			}
			{
				name: "Build BB2"
				command: "cmd"
				arguments: [
					"/C"
					"start"
					"{FileDir}\\run.bat"
				]
				options:
					cwd: "{FileDir}"
					keymap: "f5"
			}
		]
Havie is offline  
Old 22 November 2019, 21:30   #24
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 466
My config was totally different so I copied yours and now:

- help works
- F5 starts opens a CMD window in the correct folder but nothing happens.

Some good progress.
Havie is offline  
Old 22 November 2019, 21:39   #25
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 466
Realised that some of my paths were wrong so now F5 brings up command window, saves project and runs opens WinUAE but doesn't run it (yet)!
Havie is offline  
Old 22 November 2019, 21:44   #26
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 466
This is what my run.bat file looks like - hopefully you can sort me out (nearly there).

Code:
:: --- Blitz Basic 2.1 build batch script ---
:: ---   by MickGyver (Mikael Norrgard)   ---

:: You need to edit three things:
:: 1. WinUAE executable name and location, and the WinUAE config to use.
:: 2. Add ConvertEOL commands for every .bb2 file in the project.
:: 3. Edit the WinUAERexx command according to your project.

@echo off

:main

:: WinUAE 64-bit: winuae64.exe, WinUAE 32-bit: winuae.exe
tasklist /FI "IMAGENAME eq winuae.exe" 2>NUL | find /I /N "winuae.exe">NUL

:: If WinUAE is not running, then run it!
if %ERRORLEVEL%==1 goto winuaenotrunning

:: Run ConvertEOL for every *_asc.bb2 file in your project
ConvertEOL unix test_asc.bb2 project.bb2
:: ConvertEOL unix include1_asc.bb2 include1.bb2
:: ...

:: Run the ARexx script
:: First .bb2 file is main source file, the following are included files.
:: BLITZPROJECTS: in this example is a virtual harddrive (Windows folder) set up in WinUAE where I store my BB2 projects.
WinUAEArexx blitzbasic2 1000 "M:\Work\EMULATORS\Amiga\WinUAE3000\Hard Disk\Programming Hard Disk\Programming Files\test.bb2"
:: Below is a template for multiple source files, the first one has to be the main project file
:: WinUAEArexx blitzbasic2 1000 "BLITZPROJECTS:/project/project.bb2" "BLITZPROJECTS:/project/include1.bb2" "BLITZPROJECTS:/project/include2.bb2"

:: Bring WinUAE to front
BringToFront "WinUAE"

:: Go to end of script
goto end

:winuaenotrunning

echo -------------------------------------------------------
echo Starting WinUAE and SuperTED (Close the nag screen!)
echo -------------------------------------------------------
:: Change the path to the WinUAE exectuable and the configuration according to your environment
start "" "M:\Work\EMULATORS\Amiga\WinUAE3000\winuae.exe" -f "M:\Work\EMULATORS\Amiga\WinUAE3000\configurations\atom"
timeout 7
goto main


:end
timeout 5
exit
Havie is offline  
Old 22 November 2019, 21:57   #27
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 466
Now I get these messages when pressing F5:

https://ibb.co/S3SmQfQ
Havie is offline  
Old 23 November 2019, 20:30   #28
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 466
Damn - now Atom won't run (although it's in task manager).
Havie is offline  
Old 27 November 2019, 14:56   #29
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 509
Quote:
Originally Posted by Havie View Post
Damn - now Atom won't run (although it's in task manager).
Did you sort it out eventually, or did you give up?
MickGyver is offline  
Old 28 November 2019, 00:23   #30
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 466
Haven't had anytime this week. Not giving up, just need some time...
Havie is offline  
Old 28 November 2019, 15:55   #31
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 509
Version 0.3

I uploaded a new version with these improvements:
  • Showing help for string$ functions now works.
  • Added the MTPlayFX statement to help system and as snippet.
  • Added a few NEWTYPES as snippets (mostly BB2 object types).
  • Added an SFXInit statement as snippet (use with PTPlayer).
Use same download link:
http://gamephase.net/files/linked/AtomBB2.zip
MickGyver is offline  
Old 30 November 2019, 22:22   #32
Havie
Registered User
 
Join Date: Mar 2012
Location: UK
Posts: 466
Righto - got it to run again (must have messed up config file). I think Atom is now working fine but need to get compiling in Winuae working. My .bat files is obviously not right. The location of Winuae is:

M:\Work\EMULATORS\Amiga\WinUAE3000

And here is my .bat file - I'm probably being a but thick on the editing of this file! F5 opens a command window and does seem to run the .bat file.

Code:
:: --- Blitz Basic 2.1 build batch script ---
:: ---   by MickGyver (Mikael Norrgard)   ---

:: You need to edit three things:
:: 1. WinUAE executable name and location, and the WinUAE config to use.
:: 2. Add ConvertEOL commands for every .bb2 file in the project.
:: 3. Edit the WinUAERexx command according to your project.

@echo off

:main

:: WinUAE 64-bit: winuae64.exe, WinUAE 32-bit: winuae.exe
tasklist /FI "IMAGENAME eq winuae.exe" 2>NUL | find /I /N "winuae.exe">NUL

:: If WinUAE is not running, then run it!
if %ERRORLEVEL%==1 goto winuaenotrunning

:: Run ConvertEOL for every *_asc.bb2 file in your project
ConvertEOL unix "c:users/havie/desktop/atombb2/BB Filestest_asc.bb2" project.bb2
:: ConvertEOL unix include1_asc.bb2 include1.bb2
:: ...

:: Run the ARexx script
:: First .bb2 file is main source file, the following are included files.
:: BLITZPROJECTS: in this example is a virtual harddrive (Windows folder) set up in WinUAE where I store my BB2 projects.
WinUAEArexx blitzbasic2 1000 "M:\Work\EMULATORS\Amiga\WinUAE3000\Hard Disk\Programming Hard Disk\Programming Files\test.bb2"
:: Below is a template for multiple source files, the first one has to be the main project file
:: WinUAEArexx blitzbasic2 1000 "BLITZPROJECTS:/project/project.bb2" "BLITZPROJECTS:/project/include1.bb2" "BLITZPROJECTS:/project/include2.bb2"

:: Bring WinUAE to front
c:users/havie/desktop/atombb2/BringToFront "WinUAE"

:: Go to end of script
goto end

:winuaenotrunning

echo -------------------------------------------------------
echo Starting WinUAE and SuperTED (Close the nag screen!)
echo -------------------------------------------------------
:: Change the path to the WinUAE exectuable and the configuration according to your environment
start "" "M:\Work\EMULATORS\Amiga\WinUAE3000\winuae.exe" -f "M:\Work\EMULATORS\Amiga\WinUAE3000\configurations\atom"
timeout 7
goto main


:end
timeout 5
exit
Havie is offline  
Old 05 December 2019, 14:44   #33
MickGyver
Registered User

MickGyver's Avatar
 
Join Date: Oct 2008
Location: Finland
Posts: 509
Quote:
Originally Posted by Havie View Post
And here is my .bat file - I'm probably being a but thick on the editing of this file! F5 opens a command window and does seem to run the .bat file.
There are several issues in your batch file.

1. The ConvertEOL does not need the full path, you shouldn't have spaces in the filenames and the output filename is wrong (should be same name minus the _asc suffix).
Code:
ConvertEOL unix "c:users/havie/desktop/atombb2/BB Filestest_asc.bb2" project.bb2

->

ConvertEOL unix BB_Filestest_asc.bb2 BB_Filestest.bb2
2. The filepath arguments for the WinUAEArexx command should be as seen from the emulated Amiga side (folder as virtual hdd). The path separator is a normal slash and not a backslash.
Code:
WinUAEArexx blitzbasic2 1000 "M:\Work\EMULATORS\Amiga\WinUAE3000\Hard Disk\Programming Hard Disk\Programming Files\test.bb2"

->

WinUAEArexx blitzbasic2 1000 "NAMEOFHDD:/Programming Files/BB_Filestest.bb2"


3. Is your configuration file just named "atom" without the ".uae" file extension?
Code:
start "" "M:\Work\EMULATORS\Amiga\WinUAE3000\winuae.exe" -f "M:\Work\EMULATORS\Amiga\WinUAE3000\configurations\atom"
MickGyver is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
BB2 User Defined Language for Notepad++ MickGyver Coders. Blitz Basic 87 30 September 2019 14:43
Looking for FizEd text editor apsteinmetz request.Apps 2 12 April 2019 23:12
Text/coding Editor Torqual support.Apps 18 24 December 2018 00:18
new text editor flipper Coders. Tutorials 8 17 December 2007 11:57
Text editor for A500 oldpx request.Apps 12 19 December 2002 03:02

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 16:58.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.
Page generated in 0.07588 seconds with 13 queries