Recent posts

#31
General Discussion / Re: Compiled
Last post by Baggey - Nov 08, 2024, 05:49 PM
Cool, will you be putting up an Code examples section? I dont really know .bb stuff but i know it's powerfull  ;D and not to far away from blitzmax.

Kind Regards Baggey
#32
General Discussion / Re: Compiled
Last post by Dabzy - Nov 08, 2024, 04:01 PM
Hey Baggey,

Launchpad is the IDE itself, the downloadable bundle contains BlitzCC and what not which generates a compiled executable with the LibSGD based runtime attached.

Dabzy
#33
General Discussion / Re: Nice web site!
Last post by Baggey - Nov 08, 2024, 08:29 AM
Quote from: marksibly on Oct 28, 2024, 08:17 AMWoohoo, very nice little website, I love it!

Forums are where it's at baby...

Bye,
Mark

[feel free to delete this dribble]

Ooerr, like the quick edit...


Yeah nice site
#34
General Discussion / Compiled
Last post by Baggey - Nov 08, 2024, 08:27 AM
Does Lauchpad IDE Compile or Interpret?
#35
General Discussion / Re: Nice web site!
Last post by Dabzy - Oct 28, 2024, 05:22 PM
Cheers me auld fruit, lol, SMF is a nifty little thing and takes literally nowt to set up! :)

Yeah, forums are a lot more serviceable for stuff like this, I don't mind wordpress, but sometimes it can be a faff getting it exactly how you want it to look, feel and what you want it to do... Forums though... Bish bash bosh, in goes your eye out! :P hehehe

Anyway, thanks for the visit, lol, your officially my first customer! ;) hehehe

Dabzy
#36
General Discussion / Nice web site!
Last post by marksibly - Oct 28, 2024, 08:17 AM
Woohoo, very nice little website, I love it!

Forums are where it's at baby...

Bye,
Mark

[feel free to delete this dribble]

Ooerr, like the quick edit...
#37
Launchpad-IDE / Re: Launchpad Usage
Last post by Dabzy - Oct 26, 2024, 01:34 PM
Building Blitz compatible DDL's in Visual Studio 2022 Community Edition

First off, if you don't know what a Blitz 'userlib' is, before moving on, please read the UserLibs.txt file located in the '/userlib' folder to get a general idea of them.

Right, to actually build a DLL, you'll need to download and install Microsoft's Visual Studio, more notably for this tutorial, Visual Studio 2022 (Community Edition). Note: MS seem to always keep the latest version publicly available, but, when that version is superseded by a newer version, they tend to remove the older version, which is then only available via a MSDN subscription. So if the link doesn't point to the 2022 version anymore, you should be able to find it at places such as archive.org.

Moving on, download and install* that, then run it, and you should see the VS 2022 landing window, to the bottom left, there is a "Continue without code" link, click that and the Visual Studio editor will open.

Head into the menu and click the File->New->Project... item.

A new dialog will pop up displaying all the different types of projects we can build with Visual Studio, the list of these is to the right hand side, the one we want is the "Dynamic-Link Library" project, which can be found if you scroll down the list a little bit. Once you've found it, double click it to select it to move along.

Once sorted, we now have to configure our DLL project, first off, by giving our project a name, here we'll name it "TestDLL", and we'll change the location of the project to something of our own, I've created a new folder on C: root drive called the same as the project name, so my path will be "C:\TestDLL", all in all, if you did the same, you should have something like this:-



When all good to go, click the "Create" button, Visual Studio will setup the project accordingly, and you should be greeted with code editing area and other odds and ends.

We'll need to do a quick rename of our main C++ file before moving on... BUILD_DECLS requires the C++ source file to be the same name as the DLL we'll build. Cast your eyes over to the right hand side of the editor and you will see the Solution Explorer area, which has a list of different types of files you can have within your project. Open the "Source Files" tab, and then rename the file "dllMain.cpp" to "TestDLL.cpp".

We'll build this skeleton without changing anything else at the moment to see that all is well, and then take a look where Visual Studio has built and plonked our little DLL on the system, so head up to the menu, and click Build->Build Solution, you'll see a little bit of activity going off in the Output pane at the bottom, once it's done it's doings, there should be a line in there stating that '1 succeeded', this is to confirm everything is alright! :)

So, where has Visual Studio put our little DLL then? Well, if you set out the DLL project like I did, you will indeed find the 'TestDLL.dll' in the folder "C:\TestDLL\TestDLL\x64\Debug". Which is nice.

But, we have a little problem here, as you can see, it's built a x64 version of the DLL... Which is a bit of an issue in regards to Blitz userlibs, as they are only x86 compatible, because, well... BlitzCC generates x86 apps and you cannot mix'em. Easy fix though, in the Visual Studio editor, you will see two white drop down list boxes, one will say 'Debug', and the other will say 'x64', change these to 'Release' and 'x86', then rebuild it again like we did before.

Now, if we look, we should see that Visual Studio has built and placed the DLL in the folder "C:\TestDLL\TestDLL\Release".

But this means we need to move the DLL manually into the "/userlibs" folder, the same folder you found the UserLibs.txt file in.

So lets change that in the VS settings... Click the menu item Project->Properties to bring up the project properties dialog, and in the list to the left, click the item 'Linker', the dialog will change, but you'll notice at the top on the right hand side, you'll see a linker property called "Output File", and it'll probably have text in it like "$(OutDir)$(TargetName)$(TargetExt)", you can see what it's getting at, but, we'll wipe that text clean, and add the absolute path of where we want the outputted DLL to go. So, on my system, the Launchpad zipped file has been unzipped to the C: root, and the directory renamed to "Launchpad_1_6", thus, the text I will add to that property will be:-

C:\Launchpad_1_6\userlibs\TestDLL.dll

Click the "Apply" button, then rebuild, afterwards, head over to the userlibs folder and voila... Our little DLL should be there. \o/ yay

One thing left to change while we are editing the projects properties is to change the character set, we need to do this to stop VS throwing some errors on building our DLL. It's easy, in the list to the left where we found the "Linker" item, you should see another item called "Advanced", click that, then, on the editity properties bit to the right, scroll down slightly and change the item "Character Set" from

Use Unicode Character Set

to

Use Multi-Byte Character Set

Click "Apply" and then "OK" to head back into main editor section.

Okay, we're all done with that... Phew... I mean, it doesnt take 2 minutes, but explaining it feels like a life time! :D lol

Now we are back in the editor, we will get rid of all the text in the text editor apart from the line:-

#include "pch.h"
Keep that in, everything else, just remove and replace with the following:-

#define BBDECL extern "C" _declspec(dllexport)
#define BBCALL _stdcall
#define BBPTRSTR const char*
#define BBPTRVOID void*

BBDECL BBPTRSTR BBCALL ReturnString(BBPTRSTR str) {
    //Return our pass string.
    return str;
}

You probably read about BBDECL and BBCALL already, but I will highlight the BBPTRSTR and BBPTRVOID define statements. Basically, BBPTRSTR represents a string ($), and BBPTRVOID represents a bank or object! :D

Anyway, rebuild, check if the DLL is there, and we'll move back into working within Launchpad to use the brand new fresh out of the box super doper command known as ReturnString()! ;)

Okay, open Launchpad and create a new project, put this anywhere you like. In the new file, add the following (That is, if you followed the same steps I have):-

Print ReturnString$("Hello you... I've just been in a DLL!!!")

Then run the app as normal... And... Wahey... The ReturnString() command in the TestDLL.dll file would of been called, and there we go, in goes your eye out. If you peek inside the /userlibs folder, you should now see the TestDLL.decls file that BUILD_DECLS created.

And that's it really... How handy is that! :) hehehe

Initially Launchpad will not format the new command with syntax highlighting or include it in autocomplete, this only occurs when the project/file is opened, but, you can safely keep the project open as BlitzCC will always look at the userlibs folder when you run an application, so there is no need to close the project when you add new commands to the source/DLL.

I don't think there is anything else to note really, everything in regards to that side as in using WinAPI, or implementing third party libraries within a DLL is pretty much out of the realms of any tutorial here, if your wrapping something, then, more so then anything else... Google will be your friend.

Dabzy

*When I was installing Visual Studio 2022, at the time, I added "Desktop development with C++", "MFC and ATL support" and "ASP.NET and web development" as optional MSVC components. Not that it should make a difference here in regards to this, but, I'll just put it out there. If you need to install any components like this, you can do so using the VS 2022 installer which is located in the Windows Start menu, under "Visual Studio 2022" or using the NuGet package manager within Visual Studio itself.
#38
Launchpad Projects / LUI
Last post by Dabzy - Oct 19, 2024, 03:38 PM
LUI - Launchpad User Interface (Still not released, needs a bit longer to cook)

This, I've just started really (At the time of posting this thread), so there isn't much implemented. But, LUI is going to be pretty much a light weight basic wrapper of the Win32 API for creating and handling Windows based GUI elements, which was originally to be used alongside LibSGD, but now, it will be more a compliment to the DX9Lib. Though, this should work alongside the original Blitz3D software too, and, probably many other languages which can use DLL's, oh, and I imagine the commands will end up rather verbose (Ohhhhh, looks at me and me posh words), as it is with these things, so it will help having some form of auto-complete! :)

Seriously, it won't be a massive wrapper, a proper one will probably take me donkeys years, but the idea is enough in there to help me or whoever if they are interested to make little tools and such to run alongside DX9Lib, so no one expect a GUI system that they could bang out the equivalent of MS Office with it, or god forbid, expect to be able to knock the next Unity out of it... Cos they'll be bitterly disappointed! :P

Once this has what I need, that will be it... Unless I spot a bug, something quirky or need to add something else, so take it onboard that once I'm done, it's pretty much WYSIWYG, and that is final... There just isnt the time.

Anyhoo, it uses the Blitz3D 'userlibs' system, and with that, it'll have integer based handles to pass to and from a DLL, all the GUI elements will be outside of the main 'DX9Lib' window.



Like I said, I've just started it, loads of work to be done... Perfect little test bed for Launchpad's BUILD_DECLS comment command feature too, that seems to be working lovely mind.

Current LUI commands implemented (Live list showing progress):-

.lib "LUI_DLL.dll"
LUI_AppendGizmoChildNode%(parentNode%,text$,parentTreeview%)
LUI_AppendGizmoItem%(gizmo%,text$)
LUI_AppendSubMenuItem%(subMenu%,userDefinedID%,sText$)
LUI_AppendSubMenuSeperator%(subMenu%)
LUI_AttachGizmoRootNode%(text$,parentTreeview%)
LUI_AttachSubMenu%(windowMenu%,sText$)
LUI_BringWindowForward%(win%)
LUI_ClearAllGizmoNodes%(parentTreeview%)
LUI_ClearGizmoList%(gizmo%)
LUI_CountGizmoNodes%(parentTreeview%)
LUI_CreateBitmapButton%(bmpFilepath$,x%,y%,width%,height%,parentWin%)
LUI_CreateButton%(text$,x%,y%,width%,height%,parentWin%)
LUI_CreateCheckbox%(text$,x%,y%,width%,height%,parentID%)
LUI_CreateComboBox%(x%,y%,width%,height%,parentWin%)
LUI_CreateLabel%(text$,x%,y%,width%,height%,parentWin%)
LUI_CreateListBox%(x%,y%,width%,height%,parentWin%)
LUI_CreateMultiLineTextbox%(text$,x%,y%,width%,height%,parentWin%)
LUI_CreateProgressBar%(x%,y%,width%,height%,parentWin%)
LUI_CreateRadioButton%(text$,x%,y%,width%,height%,parentID%)
LUI_CreateRadioGizmoGroup%(text$,x%,y%,width%,height%,parentID%)
LUI_CreateTextbox%(text$,x%,y%,width%,height%,parentWin%)
LUI_CreateTrackbar%(x%,y%,width%,height%,parentWin%,horizonal%)
LUI_CreateTreeView%(x%,y%,width%,height%,parentWin%)
LUI_CreateWindow%(sTitle$,iWidth%,iHeight%)
LUI_CreateWindowMenu%(win%)
LUI_DeleteSelectedGizmoChildNode%(parentTreeview%)
LUI_GetEventData%()
LUI_GetEventExtra$()
LUI_GetEventID%()
LUI_GetEventMessage%()
LUI_GetEventSource%()
LUI_GetGizmoHeight%(gizmo%)
LUI_GetGizmoItemString$(gizmo%,index%)
LUI_GetGizmoItemsAmount%(gizmo%)
LUI_GetGizmoNodeText$(gizmoNode%,parentTreeview%)
LUI_GetGizmoText$(gizmo%)
LUI_GetGizmoWidth%(gizmo%)
LUI_GetGizmoX%(gizmo%)
LUI_GetGizmoY%(gizmo%)
LUI_GetGroupGizmoChecked%(group%)
LUI_GetMenuItemText$(userDefinedID%)
LUI_GetSelectedGizmoItem%(gizmo%)
LUI_GetWindowText$(win%)
LUI_InitLUI%(LUIFontName$,LUIFontSize%)
LUI_InsertGizmoChildNode%(parentNode%,childNode%,text$,parentTreeview%)
LUI_InsertGizmoItem%(gizmo%,text$,index%)
LUI_IsGizmoChecked%(gizmo%)
LUI_IsGizmoVisible%(gizmo%)
LUI_IsMenuItemChecked%(userDefinedID%)
LUI_IsMenuItemEnabled%(userDefinedID%)
LUI_IsWindowEnabled%(win%)
LUI_IsWindowVisible%(win%)
LUI_OpenColourDialog$(window%)
LUI_OpenFileDialog$(title$,defaultPath$,window%)
LUI_OpenFolderDialog$(title$,defaultPath$,window%)
LUI_PollEvent()
LUI_RemoveGizmoItem%(gizmo%,index%)
LUI_RequestedBlue%()
LUI_RequestedBlueF#()
LUI_RequestedGreen%()
LUI_RequestedGreenF#()
LUI_RequestedRed%()
LUI_RequestedRedF#()
LUI_SaveFileDialog$(title$,defaultPath$,window%)
LUI_SelectGizmoNode%(gizmoNode%,parentTreeview%)
LUI_SelectedGizmoNode%(parentTreeview%)
LUI_SetGizmoChecked%(gizmo%,checked%)
LUI_SetGizmoItemString%(gizmo%,text$,index%)
LUI_SetGizmoLayout%(gizmo%,newX%,newY%,newWidth%,newHeight%)
LUI_SetGizmoNodeText%(gizmoNode%,text$,parentTreeview%)
LUI_SetGizmoText%(gizmo%,text$)
LUI_SetGizmoVisibility%(gizmo%,visible%)
LUI_SetMenuItemChecked%(userDefinedID%,check%)
LUI_SetMenuItemEnabled%(userDefinedID%,enable%)
LUI_SetMenuItemText%(userDefinedID%,text$)
LUI_SetProgressBarGizmoValue%(gizmo%,value%)
LUI_SetSelectedGizmoItem%(gizmo%,index%)
LUI_SetTrackbarRange%(trackbar%,rangeMin%,rangeMax%)
LUI_SetTrackbarValue%(trackbar%,newValue%)
LUI_SetWindowEnabled%(win%,enable%)
LUI_SetWindowText%(win%,text$)
LUI_SetWindowVisibility%(win%,visible%)
LUI_UpdateWindowMenu%(win%)

LUI Command Count: 83

Dabzy
#39
Launchpad Bugs / Known Bugs...
Last post by Dabzy - Oct 19, 2024, 02:43 PM
Known Bugs

1) wxTextCtrl Locking

If say, you open the Menu->File->New Project dialog, which has a number of text boxes inside of it, once you go into a text box, place text in it, then click out of it (Be it another textbox or whatever), that's it, you cannot access that text box again via a click of the mouse. After further inspection, you can tab around the text boxs back to text boxs that have shut up shop once data is entered into them, and then type text in again, but, the caret doesnt follow if you get me, instead, the caret stays in the last text box that was focused, and dances about as if it was in the textbox where your entering data... It's another odd thing that has cropped up. Dunno whats happened there, I originally thought I was missing a event.Skip() statement somewhere, but I cannot see where. It's funny though, because trying to implement a fudge, there are a few events not hitting, like keyboard and mouse events. I've discussed it with a couple of peeps in the wxWidgets IRC channel, one of them said does wxEVT_COMMAND_TEXT_ENTER work when handling events... Which it does, further inspection shows the wxEVT_COMMAND_TEXT_UPDATED event is handled as expected as well. After trying everything, and sending them the whole lot to take a peek... They are none the wiser because, well, it should work within their reasonings. Their only recommendation is to upgrade, and use a new[ish] Bind() function for connecting events to handlers, this is the actual offical recommendation, ahem, DO NOT USE CONNECT().
Buggering hells bollocks!
So, with that, as it stands, lol, I've got it where if you hit the return key after adding stuff to the text box, or any text boxes in Launchpad, you can get back into them with the mouse, tabbing out or clicking another control will render it locked up unless you do the tabbing around the doors trick mentioned above! Eeeeee eh, never a dull day! :D In all seriousness... Moving it to a new version may just be the idea, if any porting path is under taken, I'll probably move the project over to C++, at least then, when needing help or looking for answers, it'll be easier to get it as I'm not based on a "library within a library" setup like I am now. It is what it is, not a show stopper, there is an answer, but I cannot see it, and neither can others who know wxWidgets inside out, cut a long story short... I haven't got a fooking clue what I've done to cause that effect! :) teehehehe

Dabzy
#40
Launchpad-IDE / Downloads/About
Last post by Dabzy - Oct 19, 2024, 01:51 PM


Launchpad Downloads/About

Download

By downloading and using the Launchpad IDE, you automatically agree to the Launchpad End User License Agreement (EULA), which is available to view HERE.

Download: Launchpad.1.0r2.zip

Please make sure your graphics drivers are up to date, as well as, you may need to install the DirectX Jun2010 redistributable package, which is contained within a zipped folder in the above download inside the folder "$LaunchpadDir$/DX9redist", find and run the DXSETUP.exe file and follow the prompts.

I recommend you have a scan of the Launchpad Usage thread on how to go about stuff, also the Dear Diary thread for any recent info.

Tested on Win11x64

About
Launchpad is a Windows based integrated development environment (IDE) that is angled at providing a more simple development environment for beginner coders who want to explore programming.

Launchpad Features
Here is a list of thingys Launchpad can do...

Project driven.
TestPad where your can try different routines quickly and easily.
Syntax highlighting within the main text editing area.
Auto-complete and real time parameter list tips for each command.
Indentation lines and line numbers.
Build only (Check for errors), Run and Create Executable options are in.
Dodgy Find/Replace... It works, but could be implemented better.
Quick help documentation is in, that is linked to the online help system.
After that, pretty much your usual note pad type affairs.

BlitzCC and related files in the Launchpad /bin folder are used following the zlib/libpng License which is outlined in the Blitz3D GIT repository.
Small changes may be implemented within the source code, and as such, will not represent the original source code laid out by Blitz Research Limit.

Logo Attribution: Space ship icons created by Hamstring – Flaticon