SyntaxBomb - Indie Coders

Languages & Coding => BlitzMax / BlitzMax NG => Topic started by: Hezkore on June 04, 2019, 19:38:43

Title: BlitzMax VSCode extension
Post by: Hezkore on June 04, 2019, 19:38:43
BlitzMax extension for Visual Studio Code (https://code.visualstudio.com/)

(https://img.shields.io/discord/613699895139762176.svg?logo=discord&style=social)) (https://discord.gg/yF6PMaY5aE) (https://vsmarketplacebadge.apphb.com/version/hezkore.BlitzMax.svg) (https://marketplace.visualstudio.com/items?itemName=Hezkore.blitzmax) (https://vsmarketplacebadge.apphb.com/installs-short/hezkore.BlitzMax.svg) (https://marketplace.visualstudio.com/items?itemName=Hezkore.blitzmax)

(https://raw.githubusercontent.com/Hezkore/vscode-blitzmax-support/master/media/demo.png)

Build and code your BlitzMax NG (https://blitzmax.org/) or Legacy (https://nitrologic.itch.io/blitzmax/) applications in VSCode (https://code.visualstudio.com/).
The extension and VSCode (https://code.visualstudio.com/) are both free to use, easy to install, and available for Windows (https://code.visualstudio.com/Download), Linux (https://code.visualstudio.com/Download) and Mac (https://code.visualstudio.com/Download).


Installation is easy
Just open any .bmx file and VSCode (https://code.visualstudio.com/) will guide you through the extension installation.
You can also manually install it via the marketplace: marketplace-hezkore.blitzmax (https://marketplace.visualstudio.com/items?itemName=Hezkore.blitzmax)
Or enter the command (Ctrl + P) ext install Hezkore.blitzmax in VSCode (https://code.visualstudio.com/).
And feel free to fork the extension on GitHub: vscode-blitzmax-support (https://github.com/Hezkore/vscode-blitzmax-support)

Getting started with VSCode (https://code.visualstudio.com/)
VSCode (https://code.visualstudio.com/) might look scary, but is only as advanced as you want it to be.
Here's an introduction page (https://code.visualstudio.com/docs/introvideos/basics) that gives you a quick start.

Features
VSCode (https://code.visualstudio.com/) has some excellent features, like Snippets and the Code Outliner, and most of them are supported by the extension.
The extension also comes packed with features unique to BlitzMax, like the Module Example Viewer and Quick Build Buttons.
You can read more about the features on the official GitHub repo (https://github.com/Hezkore/vscode-blitzmax-support).

Additional information
Changelog: Read on Marketplace (https://marketplace.visualstudio.com/items/Hezkore.blitzmax/changelog)
Troubleshooting and FAQ: Read on Marketplace (https://marketplace.visualstudio.com/items?itemName=Hezkore.blitzmax#faq)
Worklog: Read on SyntaxBomb (https://www.syntaxbomb.com/index.php/topic,5824.0.html)
Issues: Report on GitHub (https://github.com/Hezkore/vscode-blitzmax-support/issues)
Questions: Discord (https://discord.gg/yF6PMaY5aE) or Telegram (https://t.me/Hezkore)

Don't forget to rate or review: Rate on Marketplace (https://marketplace.visualstudio.com/items?itemName=Hezkore.blitzmax&ssr=false#review-details)
Title: Re: BlitzMax in VSCode
Post by: Hezkore on June 08, 2019, 17:49:09
Features
I'll probably never be able to implement proper debugging and other similar things.
So I'm asking YOU to head over to GitHub, fork the extension, and help this project grow!
GitHub Link: vscode-blitzmax-support (https://github.com/Hezkore/vscode-blitzmax-support)
Title: Re: BlitzMax in VSCode (New 1.1.0 release)
Post by: fielder on June 10, 2019, 19:34:02
The new 1.1.0 update lets you easily build stuff, without having to mess with any json files.
Just hit Ctrl + Shift + B and select how you want to build. :)
Great Job!
Title: Re: BlitzMax VSCode extension
Post by: Hezkore on June 13, 2019, 23:00:53
Thanks!

I'm hoping someone with actual VSCode knowledge can help me out sooner or later heh.
I've not used VSCode all that much, and I've never written anything in TypeScript (nor JS) before.
But I feel like this could be something really great if we keep working on it!

In the meantime; I'll keep adding smaller features.
I've added a right click menu option for files, so that you can easily lock them as the build file.
And you can now just press F5 to quickly build your application.
Title: Re: BlitzMax VSCode extension
Post by: fielder on June 14, 2019, 08:28:50
Thanks!
i think that a small youtube video about creating the workspace/project and an Hello word application can be a nice starting point to use VSCode.
Title: Re: BlitzMax VSCode extension
Post by: Hezkore on June 14, 2019, 09:41:41
Quote
i think that a small youtube video about creating the workspace/project and an Hello word application can be a nice starting point to use VSCode.

Here's how your very first BlitzMax project in VSCode might be setup.
It assumes you don't have the BlitzMax extension installed, nor configured.
If you DO have the extension installed; all you have to do is create a folder, a file and hit F5.



You now have a workspace setup and ready to use!
VSCode will store all your settings and tasks inside a '.vscode' folder for you.
You don't have to worry about any of that though, the extension does it all for you.

Some Workspace related things:
Title: Re: BlitzMax VSCode extension
Post by: Hezkore on June 14, 2019, 17:08:58
I've opened a worklog for this project over at: https://www.syntaxbomb.com/index.php/topic,5824.0.html (https://www.syntaxbomb.com/index.php/topic,5824.0.html)
Title: Re: BlitzMax VSCode extension
Post by: GW on July 01, 2019, 07:13:47
Just tried it out.  Looks great!
Title: Re: BlitzMax VSCode extension
Post by: Hezkore on July 01, 2019, 21:29:37
Awesome, thanks! :)

Give the new version a go. (it'll auto-update)
It will now auto-complete commands from your BMax modules.
Title: Re: BlitzMax VSCode extension
Post by: fielder on July 03, 2019, 08:16:03
i'm using it with Blitzmax NG.. 64 bit Win build... seems that i'm unbale to build a RELEASE... only DEBUG versions. (i switched the release/debug setting... but pressing F5 i can compile only debug versions)
Title: Re: BlitzMax VSCode extension
Post by: Hezkore on July 03, 2019, 09:07:24
i'm using it with Blitzmax NG.. 64 bit Win build... seems that i'm unbale to build a RELEASE... only DEBUG versions. (i switched the release/debug setting... but pressing F5 i can compile only debug versions)

Pressing F5 in VSCode will always start debugging. https://code.visualstudio.com/docs/getstarted/keybindings#_debug (https://code.visualstudio.com/docs/getstarted/keybindings#_debug)
And pressing Ctrl + Shift + B will present you with your build tasks. https://code.visualstudio.com/docs/getstarted/keybindings#_tasks (https://code.visualstudio.com/docs/getstarted/keybindings#_tasks)

So just hit Ctrl + Shift + B and all of your options will be applied, and you'll have a proper build. :)

(debugging isn't properly implemented according to the VSCode rules yet)
Title: Re: BlitzMax VSCode extension
Post by: fielder on July 04, 2019, 07:29:12
Thank you :) in future can be possible the if/endif matching?
Title: Re: BlitzMax VSCode extension
Post by: chalky on July 04, 2019, 12:50:08
It's VERY likely I'm being a numpty here, but whenever I open a folder and load a bmx file, I get: Error executing BMK: 'bcc' is not recognized as an internal or external command, operable program or batch file.

I also get BlitzMax documentation needs to be rebuilt every time I load a bmx file from the EXPLORER pane.

I think I have set everything up correctly, but - as already suggested - numptiness could very well be the cause for the all of the above...
Title: Re: BlitzMax VSCode extension
Post by: Hezkore on July 04, 2019, 15:34:33
Thank you :) in future can be possible the if/endif matching?

I'll see what I can do.
The problem with stuff like that is that VSCode expects languages to be case-sensitive.
So I'd have to add cases for `if/IF/If/iF` and match it against a lot of different `EndIf`.

Quote
It's VERY likely I'm being a numpty here, but whenever I open a folder and load a bmx file, I get: Error executing BMK: 'bcc' is not recognized as an internal or external command, operable program or batch file.

I also get BlitzMax documentation needs to be rebuilt every time I load a bmx file from the EXPLORER pane.

I think I have set everything up correctly, but - as already suggested - numptiness could very well be the cause for the all of the above...

Hmm it sounds like your BlitzMax path isn't correctly set in your user settings.
Hop into your settings, make sure you're in `user` and not in `workspace` (workspace won't show if you have none open), then navigate to extensions and you'll find BlitzMax.
The path should point to your BlitzMax root, and not the `bin` folder.

(http://hezkore.com/captures/Code_2019-07-04_16-33-40.png)
Title: Re: BlitzMax VSCode extension
Post by: chalky on July 04, 2019, 15:43:29
Doh - working perfectly now. This is really great - thank you!
Title: Re: BlitzMax VSCode extension
Post by: Hezkore on July 04, 2019, 23:16:01
Doh - working perfectly now. This is really great - thank you!

Thank you for giving it a try! :)
Also, you made me notice a typo, so thanks for that as well heh.
Title: Re: BlitzMax VSCode extension
Post by: Hardcoal on November 20, 2019, 04:55:52
thats a great thing you did. i just downloaded it!
Title: Re: BlitzMax VSCode extension
Post by: iWasAdam on January 14, 2020, 07:45:10
i'm sorta starting with it - VSCode is a bit of a battle to begin with - but I like it :)
Title: Re: BlitzMax VSCode extension
Post by: Hezkore on January 14, 2020, 08:46:31
Welcome to the VSCode team iWasAdam.
Drop me a line if you have any questions, need help or just need a few hints!
Title: Re: BlitzMax VSCode extension
Post by: iWasAdam on January 14, 2020, 09:03:18
got an error of some sort:
*Notice* task.json output is NOT supported on this version of BlitzMax
Title: Re: BlitzMax VSCode extension
Post by: Hezkore on January 14, 2020, 09:07:50
got an error of some sort:
*Notice* task.json output is NOT supported on this version of BlitzMax

That's fine, nothing to worry about.
It just means that you're using and older BlitzMax version that does not create the output folder for you when compiling your source.
Your binary files will be placed inside your source folder, just like with MaxIDE.

I'll work on making that message clearer in the future.
Title: Re: BlitzMax VSCode extension
Post by: Hezkore on January 14, 2020, 10:46:11
I've pushed a new release that references the troubleshooting section whenever there's a problem or error.
Oh and I've added a troubleshooting section heh.
https://marketplace.visualstudio.com/items?itemName=Hezkore.blitzmax#troubleshooting
Title: Re: BlitzMax VSCode extension
Post by: braxtonrivers on January 19, 2020, 09:34:45
Thank you very much this is a great extension!
Title: Re: BlitzMax VSCode extension
Post by: Hezkore on January 19, 2020, 12:27:22
Thank you very much this is a great extension!

Thank you for trying it out. :)
Title: Re: BlitzMax VSCode extension
Post by: mrgoober on January 30, 2020, 07:27:05
Hey Hezcore. Working great for VSCode on Linux Mint :]
I switched to it from the standard MaxIDE and have been using it since.
Title: Re: BlitzMax VSCode extension
Post by: Hezkore on January 31, 2020, 19:23:46
Glad you like it. Any questions/requests/problems/canary let me know! I'll be continuing to work on it...
Title: Re: BlitzMax VSCode extension
Post by: LT on May 09, 2020, 21:09:23
How does this compare to BlIDE?  Does the VSCode extension support complete debugging features?
Title: Re: BlitzMax VSCode extension
Post by: Hezkore on May 11, 2020, 05:30:52
Thanks for taking an interest in the extension LT!
One of the main features being worked on is the debugger.
You can try Brucey's experimental debugger, but there is some configuration to be done before it works correctly.
Title: Re: BlitzMax VSCode extension
Post by: LT on May 12, 2020, 16:49:28
You can try Brucey's experimental debugger, but there is some configuration to be done before it works correctly.
I'm interested, but I don't have time to spare experimenting right now.  I'm in the middle of a large BMX based game project and might want to port it to NG when it's ready.  My only major problem with Blide is that it's not NG compatible.
Derron mentioned Brucey's debugger, but I could find it nowhere.  Do you have a link?
Title: Re: BlitzMax VSCode extension
Post by: Skaven on May 13, 2020, 04:17:01
hezkore just told you about the debugger not derron
and you just said you had no time to experiment right now but then a second later youre willing to test?
and the debugger is literally the first thing on bruceys repository list and took 2 seconds to find https://github.com/woollybah/vscode-blitzmax-debug
Title: Re: BlitzMax VSCode extension
Post by: LT on May 13, 2020, 07:00:40
Derron, in another thread, also told me about it.  Left that part out.
I don't have time to experiment right now, but later I might like to take a look and was unaware of where to find it.
Yeah, I made the mistake of looking at the BMX github because I forgot about Brucey's other repository.

Thanks for the link, though.  At least you didn't just tell me to Google it.
Title: Re: BlitzMax VSCode extension
Post by: Hezkore on May 13, 2020, 16:26:38
The link posted by Skaven is the correct one.
You'll have to "compile" (transpile I guess) it yourself, which is super easy but understandable confusing if you're new to VSCode.
Some related info can be found here: https://code.visualstudio.com/api/get-started/your-first-extension (https://code.visualstudio.com/api/get-started/your-first-extension)
The goal is to eventually integrate it into my extension, and at that point it should "just work".
But I'm working on documentations right now, so it's not something you'll see happen anytime soon.
Title: Re: BlitzMax VSCode extension
Post by: Lavalamp on May 17, 2020, 21:22:43
Hi, can we have the default BlitzMax colour theme please?
Title: Re: BlitzMax VSCode extension
Post by: Hezkore on May 18, 2020, 03:49:57
Hi, can we have the default BlitzMax colour theme please?

I don't really have time to manage a theme extension for VSCode. :(
Most of my free time is already taken up by this extension.

But there are thousands of themes available for VSCode!
And you should definitely try searching for a theme that suites you.
Just jump over to the 'Extensions' tab (Ctrl Shift X on Windows) and type @category:themes
You'll get a long list of all the themes available, and one is bound to be in your taste.
(here's an online view (https://marketplace.visualstudio.com/search?target=VSCode&category=Themes&sortBy=Installs))

Alternatively you could make your own theme extension.
More info about that can be found here:
https://code.visualstudio.com/docs/getstarted/themes#_creating-your-own-color-theme (https://code.visualstudio.com/docs/getstarted/themes#_creating-your-own-color-theme)
Title: Re: BlitzMax VSCode extension
Post by: Yellownakji on May 23, 2020, 06:01:39
How do you create a 'solution' or 'project' in VSCode, in the way BLide does?  I usually stray away from Microsoft stuff, so this is new to me;  Loooong time user of BLide, so it's really annoying how VSCode makes me set my NG preferences each time I open a file.   I'm using the x86 version of NG, and by default VSCode targets x64.

Secondly, can VSCode embed an Icon/Meta into the project, like BLide?  Or is it one of those painful Macintosh situations where I need a 'post' script....

Digging the red theme in VSCode, as well as the mini-map in the top right that shows the whole source as you scroll, but I really need a 'solution' to making a solution/project.  :P :-X
Title: Re: BlitzMax VSCode extension
Post by: Hezkore on May 23, 2020, 12:56:15
How do you create a 'solution' or 'project' in VSCode, in the way BLide does?  I usually stray away from Microsoft stuff, so this is new to me;  Loooong time user of BLide, so it's really annoying how VSCode makes me set my NG preferences each time I open a file.   I'm using the x86 version of NG, and by default VSCode targets x64.
There's so much VSCode can do to help you manage your project, I couldn't possibly tell you everything here.
I would instead recommend that you read through some of the "Get Started" help for VSCode:
https://code.visualstudio.com/docs (https://code.visualstudio.com/docs)

What I can say though is that VSCode is made for very large projects.
Projects that span across multiple computers with different architectures, hard drives, networks and operative systems.
Things that MaxIDE and BLide could only dream of.

But because of that; VSCode isn't the best when it comes to just opening a single file.
So what you'll want to do is select "Open Folder...".
VSCode will then threat that folder as your very simple "workspace" and save any related settings in the new ".vscode" folder.
You can at that point configure VSCode to act, look or behave in a certain way just for that workspace.
For example; the simplest thing would be to just select which '.bmx' file to use as the main entry point when compiling.
You could also do things like use a special custom version of BlitzMax.
Or just use a different VSCode theme when working in that folder.
So always selecting "Open Folder..." is probably best for new users.

There's also a more advanced workspace called a "multi-root workspace".
This would create an actual ".code-workspace" file.
(pro tip: if there's a .code-workspace file in a folder; then "Open Folder..." will still open the .code-workspace file)
This more advanced workspace will allow you to grab source folders from many different locations.
But the "downside" is that you might have to start working with the task system, because VSCode won't know what to do with your new huge project.
The task system is great and I strongly recommend that you learn how to use it, instead of relying on the extensions default task.
https://code.visualstudio.com/docs/editor/tasks (https://code.visualstudio.com/docs/editor/tasks)
For example; you could have a server and client as two separate projects in a multi-root workspace and have VSCode compile the server and client, then fire up the server for you, then start the client and connect to the server.
Or perhaps you're working a BlitzMax module while also working on a game that uses that module.
You could then use a mutli-root workspace to easily edit both projects and then configure a task to move the module into BlitzMax's "mod" folder, then compile the game and eventually run the game as well.

Secondly, can VSCode embed an Icon/Meta into the project, like BLide?  Or is it one of those painful Macintosh situations where I need a 'post' script....
I'm not sure exactly how BlitzMax NG handles icons on Mac.
On Windows I know you place an ".ico" with the same name in your folder.
So I'm afraid you might have to use some sort of black magic on Mac.
However, if there is a reliable way to do it on Mac that Brucey endorses; I could integrate that into the extension.

Digging the red theme in VSCode, as well as the mini-map in the top right that shows the whole source as you scroll, but I really need a 'solution' to making a solution/project.  :P :-X
I'm glad you've found a theme you enjoy. :)
Remember that there are several thousands of themes, and that you can customize things like how the mini-map looks to suite you even better!
Dig through those settings, and remember that you can configure VSCode globally, or for your current folder/workspace.
Title: Re: BlitzMax VSCode extension
Post by: Holzchopf on June 02, 2020, 15:23:27
the simplest thing would be to just select which '.bmx' file to use as the main entry point when compiling.

How do I do this? I don't have the "Set as workspace source file" option, when I right click the file =/ Or is this now "Set as default task source file"?
Title: Re: BlitzMax VSCode extension
Post by: Hezkore on June 02, 2020, 16:36:24
Or is this now "Set as default task source file"?

That's correct.
Use "Set as default task source file" whenever you want to defined your entry point.

For any of you wondering why it's called that and not something like "workspace source file", it's because VSCode heavily relies on tasks (https://code.visualstudio.com/docs/editor/tasks).
A task is really just a simple JSON document with some pre-defined variables you change around based on your needs.
And when you press Ctrl Shift B, F5 or click one of the build buttons in the corner; you're really just executing a task, which in this case, happens to build your application.
Normally you'd have to create a task yourself, but this extension will make up a basic task for you if one isn't found.
But the idea is that you'd have a couple of tasks that all do different things.
Like for example if you're building a game that has a set of tools you're also developing on the side, you could have tasks that builds one of those and launches them.
Or if you need to do some batch work stuff, then you'd have a bunch of tasks for that.
Or perhaps you just want a task that opens up Photoshop and instantly opens your tilemap image.
All of that is done with tasks! Tasks that you can create and setup, just the way you want.
So there's not really a "single workspace task", no "one task to do it all".
But! You can select which task runs by default, your so called "default task".
And BlitzMax specific tasks has a variable called "source", which will be your entry point.
So "Set as default task source file" really does make sense.
Title: Re: BlitzMax VSCode extension
Post by: Holzchopf on June 03, 2020, 07:19:24
Thanks for the explanation!
Title: Re: BlitzMax VSCode extension
Post by: Yellownakji on June 18, 2020, 21:34:03
After a few weeks of usage, I can't say VSCode is really offering me anything beneficial aside from a cleaner interface and the minimap.

The tooltips are pretty useless and never show me what I actually want.    They also give me incorrect parameters for functions.

For example, when I store paths, just have a type called 'DIR' and have stuff like Global Data:string = pathhere etc.

Well, the tooltips don't even detect 'DIR' or ANY of my types, frankly.    And when I fully type the type name, no dice on detecting it's functions either.  --  This goes for items declared within the target/source BMX and included external BMXs.

Even variables in my target BMX aren't getting defined.

In fact, the tooltips only list internal BMX/MOD functions;  Even things not declared in my framework.

I don't use the Steam module, yet every tooltip gives me steam related junk.

How do I define the actually useful Necessities to tooltips?   
Title: Re: BlitzMax VSCode extension
Post by: Derron on June 18, 2020, 22:18:24
For this you better wait for some kind of "language server"  - some kind of tool which returns all the necessary information about your code (and the modules) to VS Code. The extension here can only "dumb" scan the modules you have and prepare stuff for it.
Dunno - it might be able to scan your code too later on - but I am not sure if it is worth the hassle.

Such a LSP-enabled tool is far far far on the horizon, so nowhere to see in the near future. For now even the basics (communication blitzmax code - vs code stuff) is not working perfectly fine / the way Brucey wanted it do be. Debugging all the stuff seems to be a hassle too (as VS Code and other "full feature IDEs" are complex code beasts on their own).

Benefit of the extension is that you can add some other conveniencies later on - project setup (android? manifests?) ...

Also - once Brucey got the debugger stuff working, you might even get dynamic breakpoints etc.


VS Code seems to allow you to code "remotely" (run stuff on your home computer - but code on your laptop while commuting - the beefy computer at home does the number crunching).

bye
Ron
Title: Re: BlitzMax VSCode extension
Post by: Lavalamp on June 21, 2020, 02:46:21

Quote
I'm not sure exactly how BlitzMax NG handles icons on Mac.
On Windows I know you place an ".ico" with the same name in your folder.
So I'm afraid you might have to use some sort of black magic on Mac.
However, if there is a reliable way to do it on Mac that Brucey endorses; I could integrate that into the extension.


Actually, no black magic, if BlitzMax would simply move the ICNS file it finds in the same directory as the ICO file into the resulting MacOS build package's Resources directory at
Code: [Select]
MyGame.App/Contents/Resources/MyGame.ICNS , done.

BTW I use https://cloudconvert.com/png-to-icns to create the required Mac icon file.

Title: Re: BlitzMax VSCode extension
Post by: Hezkore on June 22, 2020, 12:12:00
if BlitzMax would simply move the ICNS file it finds in the same directory as the ICO file into the resulting MacOS build package's Resources directory at
Code: [Select]
MyGame.App/Contents/Resources/MyGame.ICNS , done.

Cool.
Sounds like something you should ask Brucey to implement.
You can make a request here: https://github.com/bmx-ng/bmx-ng/issues (https://github.com/bmx-ng/bmx-ng/issues)

In fact, the tooltips only list internal BMX/MOD functions;  Even things not declared in my framework.

I don't use the Steam module, yet every tooltip gives me steam related junk.

That's correct.
The extension can only scan your modules for the bbdoc REM blocks and store the information given from those.
Then it basically just shows you all the information it has, and you'll have to use the information correctly yourself.
(arrow keys to scroll through tooltips and auto complete lists)
One option is to just disable it all in options and have it act like MaxIDE.
You can use the Modules tree view to view all available functions and such for all modules.

For more correct auto complete and tooltips; I'd have to write a complete BMX parser that works exactly like BlitzMax NG (and BlitzMax Legacy I suppose), in a completely different language.
Which is a lot of work and would take a long time to get done, and I barely have any free time these days.
And as Derron says, it's hardly worth the time.
A LSP (Language Server Protocol) would be the better option and would then work with any IDE that supports it.
Brucey would probably have to write the LSP itself though, so there's not a whole lot I can do.

After a few weeks of usage, I can't say VSCode is really offering me anything beneficial aside from a cleaner interface and the minimap.

This is going to be very subjective as you might not need any of the features VSCode provides, but I personally would never want to use anything but VSCode from now on.
Not only is it a very modern and open source IDE, that uses all the (now standard) default shortcut keys and methods of editing text (multiple cursors, jump to similar word etc.).
It's also got so many great extensions that you can basically do anything with it!
And it supports most languages, so you never have to use anything else.
And the fact that you can do everything Git related inside of VSCode is amazing to me.
Push, Pull, Commit, Review issues, manage branches and merges etc. all from inside VSCode with a super simple and clean interface.

Want to live code with a friend and use voice chat? No problem! - https://visualstudio.microsoft.com/services/live-share
Want to code in Linux on a Windows machine? No problem! - https://code.visualstudio.com/remote-tutorials/wsl/run-in-wsl
Want to code from another machine via SSH? No problem! - https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-ssh
Want a nice Git graph inside VSCode? - No problem! - https://marketplace.visualstudio.com/items?itemName=mhutchie.git-graph
Want to see file/line history, when a file/line was changed, who changed what? - No problem! - https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens
Want to easily list/see TODO or FIXME tags? No problem! - https://marketplace.visualstudio.com/items?itemName=Gruntfuggly.todo-tree
Want to quickly create or view your Gists? No problem! - https://marketplace.visualstudio.com/items?itemName=vsls-contrib.gistfs
(Hit me up if you want more extension suggestions)

Want to have all of these great features in any other language so that you never have to change IDE ever again? No problem! - https://marketplace.visualstudio.com/search?target=VSCode&category=Programming%20Languages&sortBy=Installs

And VSCode is constantly updated with new great features, like this:
https://code.visualstudio.com/updates/v1_46#_pin-tabs
And the Settings Sync option will soon be ready for public release (available in VSCode Insiders version).
Which means that all extensions and settings will sync, seamlessly, across all your devices that uses VSCode.
https://code.visualstudio.com/docs/editor/settings-sync

All open source and for free, on MacOS, Windows and Linux.
Title: Re: BlitzMax VSCode extension
Post by: DerFetteElch on June 26, 2020, 13:45:51
Quote
Sounds like something you should ask Brucey to implement.

I don't think so, since it is already implemented into bmk. I think it was one of the first features offered.
All you need is a post.bmk file in your projects main folder that copies the icon into the compiled bundle before executing it.

Something like:
Code: Lua
  1. # MacOS post build script
  2. @define doPostInstall
  3.         if bmk.Platform() == "macos" then
  4.                 #copy resources
  5.                 sys.CopyDir(%buildpath% .. "/Contents/Resources", %exepath% .. "/../Resources")
  6.                 sys.RenameFile(%exepath% .. "/../Resources/AppIcon.icns", %exepath% .. "/../Resources/" .. %outfile% .. ".icns")
  7.         end
  8.  
  9. @end
  10.  
  11. # run the post install
  12. doPostInstall
  13.  

The folder structure in my "projects" looks like:

Quote
MainProjectDirectory
->Contents
->->Resources
->->->AppIcon.icns
->MainProjectFile.bmx
->post.bmk

edit: Sorry, link to the image was broken somehow added folder structure as quote.
Title: Re: BlitzMax VSCode extension
Post by: Derron on June 26, 2020, 20:44:00
You could use a "post.bmk" right in blitzmax/bin

Code: [Select]
' global post process
LoadBMK("post.bmk")

' generic post process
LoadBMK(ExtractDir(app_main) + "/post.bmk")

' project-specific post process
LoadBMK(ExtractDir(app_main) + "/" + StripDir( opt_outfile ) + ".post.bmk")

blitzmax/bin/post.bmk (global)
app/post.bmk (app folder local)
app/myapp.post.bmk (app specific)


bye
Ron
SimplePortal 2.3.6 © 2008-2014, SimplePortal