Latest BlitzMax with wx mod for Windows

Started by Henri, March 12, 2023, 12:28:01

Previous topic - Next topic

Henri

Description:

I've used Ron's script as a basis for creating BlitzMax Windows environment from latest available sources with wx module (wxWidgets) included.


Initial setup:

Download install.bat from https://github.com/HenriVi/BlitzMax-Install-Script .

Download and install 7-zip 64-bit found here https://7-zip.org .

This script uses Curl to download sources from web. It should be already included in Windows 10 and newer and in that case doesn't require any additional steps. Otherwise Curl can be download here https://curl.se/windows/. Just place curl.exe inside temp folder seen below (if not already in PATH environment variable. This can be tested by opening command prompt and typing curl).


Follow these steps:

  1. Make temp folder and save install.bat file there.

  2. Double click install.bat file and wait until setup is completed.

  3. Copy/move resulting BlitzMax folder to final destination (like C:\BlitzMax).

  4. Open MaxIDE.exe and select to rebuild documentation if prompted.

  5. Open and run wx sample found at right panel tree structure in  'Projects / Modules Source / wx.mod / samples / aboutbox.bmx'


That's it. When run for the first time all the needed modules are built automatically. This takes some time initially but is done only once.


-Henri 
- Got 01100011 problems, but the bit ain't 00000001

Amon

#1
Is there a possibility of making the same setup for BlitzMaxNG x64 version or does the wx module not work on x64?

Thanks for this by the way. I noticed though that when I first ran install.bat it didn't create the BlitzMaxNG.download folder. I had to run the install.bat file a second time for it to work. I don't know why it did that (could be AVG Antivirus) or something but then why would it allow it the second time.....

I copied the wx module folder into the BlitzMaxNGx64 mod folder and I'm building the module now. Hopefully it builds successfully. Fingers crossed. I'll post back if it builds fully.

Henri

Hi Amon,

Resulting BlitzMax environment is both 32/64-bit. If you want 64-bit just choose x64 architecture from MaxIDE build menu before running example and 64-bit version of module is built. Note that I haven't tried to compile all the modules in one go, just relied on automatic building when running programs.

-Henri
- Got 01100011 problems, but the bit ain't 00000001

Dabz

Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 16Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit

Dabz

#4
Well, what do you know, using this, my BambooBasic editor sings again, well, SuperStrict turned off and a little edit for a data type helps shove it over the line like.

Spotted an issue mind, I edited the original version of LexMax.cxx when originally building it, so, the lex doesnt turn off formatting when it hits "InlinePHP", and yep... Typical me never backed that up, probably easily sorted if anyone cares enough about that, lol, anyway, everything else seems spotty dog though! :D

I never thought I'd see that build again if I'm honest... So yeah... Lovely Jubbly! :)

Dabz

EDIT: Eeeeee Jesus H Christ on a moped... 10 years ago I wrote that, lol, wonder if it was the reason my marriage went tits up! :D hehehe ;)
Intel Core i5 6400 2.7GHz, NVIDIA GeForce GTX 1070 (8GB), 16Gig DDR4 RAM, 256GB SSD, 1TB HDD, Windows 10 64bit

Henri

Glad you got to revisit an old flame :-)

Just to be clear, the script was originally written by Ron (Derron) that he published at Discord channel. I just wanted to make it more easily accessible and known (and test with wx that lot of folk seemed to have trouble with).

-Henri
- Got 01100011 problems, but the bit ain't 00000001

dawlane

#6
I think after I've finished messing around updating the Cerberus-X build scripts and Ted. I'll revisit creating some flashy BlitzMax NG scripts.
You can test out some release candidates for Cerberus-X from.
https://www.cerberus-x.com/community/index.php?threads/next-version-of-cerberus-x.1705/#post-12761

Amon

Quote from: dawlane on March 15, 2023, 10:58:34I think after I've finished messing around updating the Cerberus-X build scripts and Ted. I'll revisit creating some flashy BlitzMax NG scripts.
You can test out some release candidates for those from.
https://www.cerberus-x.com/community/index.php?threads/next-version-of-cerberus-x.1705/#post-12761
Ooooh. Now this looks juisy....

Derron

Quote from: dawlane on March 15, 2023, 10:58:34I think after I've finished messing around updating the Cerberus-X build scripts and Ted. I'll revisit creating some flashy BlitzMax NG scripts.
You can test out some release candidates for Cerberus-X from.
https://www.cerberus-x.com/community/index.php?threads/next-version-of-cerberus-x.1705/#post-12761
For NG you will find some funny things to patch ... as SDL.mod stuff imports libESD or nasaudio things (if you want to use a specific module). so you might need to "sed" them out.

This aside things should build rather fine. Only found "archive.mod" not compiling on "rolling release" distros (with newest GlibC, version >= 2.36).

Also @Scaremonger is here and there working on a gui-based downloader/setup tool thing.


I would prefer to have your tinker skills when it comes to building and packaging stuff for android. With the bye bye of GCC the NDK (r18) I think it stopped working and as nobody really tries to build stuff for android now I guess the whole "from binary to APK"-thing needs some tinkerer to fiddle out what to run when ;)


bye
Ron

dawlane


Quote from: Derron on March 15, 2023, 14:03:20For NG you will find some funny things to patch ... as SDL.mod stuff imports libESD or nasaudio things (if you want to use a specific module). so you might need to "sed" them out.

This aside things should build rather fine. Only found "archive.mod" not compiling on "rolling release" distros (with newest GlibC, version >= 2.36).
I'll figure out something. I am toying with going Powershell 7 and .net Core 7 with it now being cross-platform and easy enough to install; that is providing that all the modules I'm thinking of are available. I almost decided to go with Powershell and .net Core for building Cerberus-X, but I wanted to keep simple with only the minimal of messing around to install and run.

Quote from: Derron on March 15, 2023, 14:03:20I would prefer to have your tinker skills when it comes to building and packaging stuff for android. With the bye bye of GCC the NDK (r18) I think it stopped working and as nobody really tries to build stuff for android now I guess the whole "from binary to APK"-thing needs some tinkerer to fiddle out what to run when
I hear that Google were switching over to CMake as the makefile generator for Android NDK. Everyone now seems to be abandoning their own custom build tools in favour of CMake.
A lot of things would need to be updated for Android to work. I know that some of the Android modules need updating for Cerberus-X.

Is Brucey still working on BMX NG?

Derron

Quote from: dawlane on March 15, 2023, 15:13:20Is Brucey still working on BMX NG?

Yes - albeit with random amount of spare-time so to say. So days or weeks of "silence" and then few or many tiny or big commits. But he more often / less "delayed" accepts Pull Requests of users now - it just needs needs people doing work and PR-ing it.
Of course "easy to understand" PRs have better chances than "hey, this PR changes 1500 lines and removes 3240 lines" monsters :)

I guess that stuff like "android build chain fiddle-outs" can be helpful.
Dunno how much user interaction it would need ... with @Hezkore 's blitzmax extension one could maybe piggyback on stuff existing for VS Code (thinking of android emulator/VMs ...).
Brucey - a while ago - added an debugger appstub which allows to connect to it via TCP/IP - dunno if that would be helpful for communicating with the android apk running on an actual device (adb over net should do too - if that is enabled in the dev options). But I am already brain farting ideas ... unlayed eggs...

BTW If you are interested in discussing the android stuff more in depth ... you can always join the NG discord server so we can have a chat there (together with other NG users).


bye
Ron

takis76

I installed this version of Blitzmax. I just added the srs mod for Direct X11. (I downloaded it from here: https://github.com/davecamp/srs.mod) I use Blide and I created a new Build Setup to not mess my previously one.

When I try to compile the new module I have this error.

QuoteCompile Error: Can't create instance of type TD3D11Max2DDriver due to abstract Method TMax2DDriver.DrawPoly(xy:Float Array,handlex:Float,handley:Float,originx:Float,originy:Float,indices:Int Array).
Build Error: failed to compile (-1) C:/BlitzMax latest/mod/srs.mod/d3d11max2d.mod/d3d11max2d_ng.bmx

Do anyone encounter this error?

Derron

Col did not update his mod to contain the new DrawPoly code:

max2d.mod/driver.bmx contains this one:
Method DrawPoly( xy#[],handlex#,handley#,originx#,originy#, indices:Int[] ) Abstract

The "indices:int[]" was added (as it allows to pass in some stuff calculated from the new polygon.mod (saves recalculation ...)


Open up your srs.mod/d3d11max2d.mod/d3d11max2d_ng.bmx

Search for "Method DrawPoly" and replace the line
Method DrawPoly( inverts#[],handlex#,handley#,tx#,ty# )

with the one already mentioned above:
Method DrawPoly( xy#[],handlex#,handley#,originx#,originy#, indices:Int[] ) Abstract


I am not on Windows so have no access to DX11 here ... did not test if there are other required changes.


bye
Ron

takis76

#13
Well I found the line

Method DrawPoly( inverts#[],handlex#,handley#,tx#,ty# )

And I replaced it with


Method DrawPoly( xy#[],handlex#,handley#,originx#,originy#, indices:Int[] ) Abstract

All the code inside the method became red with lots of syntax errors. See the attached screenshot.

The new compile generates a new error:

Quote►srs.d3d11max2d was scheduled to next iteration
Compile Error: Syntax error - expecting class member declaration, not 'AdjustScreenRotationScale'
[C:/BlitzMax latest/mod/srs.mod/d3d11max2d.mod/d3d11max2d_ng.bmx;1099;0]
Build Error: failed to compile (-1) C:/BlitzMax latest/mod/srs.mod/d3d11max2d.mod/d3d11max2d_ng.bmx
►►►►srs.d3d11max2d was not built. See error information on latest attempt.



takis76

Well I did something else and it seams it was compiled.
In your example you are saying something about originx:float and originy:float
I replace them to tx:float and ty:float (They looked more related).
Then you said The "indices:int[]" was added and I put them at the end of the line.

The original line didn't have the abstract commend at the end and I created this:

Method DrawPoly(inverts:Float[], handlex:Float, handley:Float, tx:Float, ty:Float, indices:Int[])

And I replaced this and all the red syntax errors were removed and I tried to recompile and it looks compiled. I will check if my game will run now.