August 25, 2019, 12:19:46 AM

Author Topic: I am looking for complete guide how to compile wxMax  (Read 1042 times)

Offline takis76

  • Jr. Member
  • **
  • Posts: 85
Re: I am looking for complete guide how to compile wxMax
« Reply #30 on: July 20, 2019, 05:11:31 PM »
I retried to download from BlitzMax.org the BlitzMax_win32_0.105.3.35.7z with the i686-8.1.0-release-win32-sjlj-rt_v6-rev0 version of MinGW.
The default Brl , Pub , Sdl , MaxGUI and Mky-Mojo2 modules were compiled.
Also I added the Koriolis Zipstream and Gman Zip Engine they were compiled too.
The wxMax, compiles almost all except the sub mod wxMax2d.mod with error:

Code: [Select]
Compile Error: Method does not override method from its super type.
[C:/BlitzMax NG/mod/wx.mod/wxmax2d.mod/wxmax2d.bmx;525;0]
Build Error: failed to compile (-1) C:/BlitzMax NG/mod/wx.mod/wxmax2d.mod/wxmax2d.bmx

I tried and the ifsoGui and it have too many errors.

So Recompile all modules ("bmk makemods -a wx") which version of BlitzMax applies the 1.52 or the BlitzMax_win32_0.105.3.35?

Whole process is ridiculous. Thank you you are helping but I am struggling to fix 1 thing and 10 breaks. I believe all of this BlitzMax NG thing is flawed and there is no sence to try to fix it. Everything up to vanilla version 1.50 for BlitzMax.com since the Blitz Research was a company everything worked correctly. Since then after whole BlitzMax thing turned to be open source all fall apart.

Even the newest versions of MinGw and Newest versions of BlitzMax doesn't seems to accept any new module correctly.

I will try to do this bmk "makemods -a wx" in the BlitzMax 1.52 (Where I left off) but I think it will not work again and trying to make the wxMax module work, others have broken. The ifsoGui is not compiling, The Srs is not working and I don't know what other source codes I have here if they will ever compile.

If any of you, have in your hard disks any BlitzMax NG compiled with your own correct version of MinGW and you have all of these modules compiled correctly just zip them all and upload them to app.box.com and send a link.

I fed up to strugle to fix this flawed updated version of BlitzMax NG and I bother you very much asking you infinity questions how to fix this which leads to next inevitable error. Is a vicious circle of compiling errors.

I will try to do few more attempts if something will work and then I will return to my current old 32Bit Vanilla Version of my BlitzMax 1.50 which at least all the current modules I use work and if I will not have or never will able to compile this wxMax I will not care after all. I just struggle to finish my game and make it more modern and compatible to 64Bit, but and the current 32Bits is not bad.


Offline takis76

  • Jr. Member
  • **
  • Posts: 85
Re: I am looking for complete guide how to compile wxMax
« Reply #31 on: July 20, 2019, 05:29:13 PM »
I returned to BlitzMax1.52 to continue the compilation of wxMax using the command line to compile the module using the command promt from console not from inside the Blide's Advance Module Builder.

bmk makemods -a wx
After some series of compilations it interrupted AGAIN with the current error:

Code: [Select]
Compiling:wxmathplot.bmx
Compile Error: Overriding method differs by type
[C:/Blitzmax1.52/mod/wx.mod/wxmathplot.mod/wxmathplot.bmx;852;2]
Build Error: failed to compile C:/Blitzmax1.52/mod/wx.mod/wxmathplot.mod/wxmathp
lot.bmx

It seems the wxMax is broken. I wonder how you managed to compile it.

Offline takis76

  • Jr. Member
  • **
  • Posts: 85
Re: I am looking for complete guide how to compile wxMax
« Reply #32 on: July 20, 2019, 05:33:20 PM »
In the BlitzMax_win32_0.105.3.35 version the wxMax compiles with only one error about wxmax2D - Method does not override method from its super type.
If anyone knows how to fix it tell me to go to the specific source code and fix it manually.
But even the wxMax will ever compile (Is unknown if it will run), then many other modules will break.

Offline Derron

  • Hero Member
  • *****
  • Posts: 2337
Re: I am looking for complete guide how to compile wxMax
« Reply #33 on: July 20, 2019, 08:22:00 PM »
I returned to BlitzMax1.52 to continue the compilation of wxMax using the command line to compile the module using the command promt from console not from inside the Blide's Advance Module Builder.

bmk makemods -a wx
After some series of compilations it interrupted AGAIN with the current error:

Code: [Select]
Compiling:wxmathplot.bmx
Compile Error: Overriding method differs by type
[C:/Blitzmax1.52/mod/wx.mod/wxmathplot.mod/wxmathplot.bmx;852;2]
Build Error: failed to compile C:/Blitzmax1.52/mod/wx.mod/wxmathplot.mod/wxmathp
lot.bmx

It seems the wxMax is broken. I wonder how you managed to compile it.

If it blames something about an overridden method...then you are not using BlitzMax legacy/vanilla but NG.
Edit: or the module contains some stuff for NG which is not wrapped in "?bmxng"-conditionals and so vanilla sees stuff it shouldn't.


The overriding thing: just remove wxmathplot.mod, you won't need it for now (it is to display charts/curves).



> I fed up to strugle to fix this flawed updated version of BlitzMax NG ...

As said I am using this "flawed NG" together with wxmax. So chances are high you borked up something on your installation or are trying stuff in legacy rather NG...or similar client side bugs ;-)


Also do not update mingw of NG..use the provided one and make sure no PATH for mingw is set ...



Bye
Ron

Offline Derron

  • Hero Member
  • *****
  • Posts: 2337
Re: I am looking for complete guide how to compile wxMax
« Reply #34 on: July 20, 2019, 10:20:28 PM »
I think "wxmathplot.mod" is not compatible with "legacy" for now (it overrides the Create-method and adjusts params + return type, which is not doable with legacy).

So I suggest to remove the wx.mod/wx***.mod modules failing to compile and hopefully not needed.

I have to repeat myself: just use the most current NG+wx ... as you sooner or later need to build 64 bit anyways. Else you will try to get your stuff working in vanilla, edit code here and there, maybe end up with nothing working.
Meanwhile you could try to get your stuff working with NG (current version, not something 0.95 or so). As said it works for me and many of the modules might work too and if not we can try to make them work.


bye
Ron



Offline dawlane

  • Full Member
  • ***
  • Posts: 106
Re: I am looking for complete guide how to compile wxMax
« Reply #35 on: July 20, 2019, 11:31:42 PM »
I will have to boot up Windows in the morning to see if I can do something with it.

Offline takis76

  • Jr. Member
  • **
  • Posts: 85
Re: I am looking for complete guide how to compile wxMax
« Reply #36 on: July 21, 2019, 12:06:13 AM »
After deleting the wxmathplot it continued much further and interrupted again with new error.

wxpreferencespace.mod (Do I need to delete and this one to continue)?

Code: [Select]
C:/Blitzmax1.52/mod/wx.mod/wxpreferencespage.mod/glue.cpp: In member function 'v
irtual wxString MaxPreferencesPage::GetName() const':
C:/Blitzmax1.52/mod/wx.mod/wxpreferencespage.mod/glue.cpp:39:30: error: 'wx_wxpr
eferencespage_wxPreferencesPage__OnGetName' was not declared in this scope
  return wxStringFromBBString(wx_wxpreferencespage_wxPreferencesPage__OnGetName(
maxHandle));
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Blitzmax1.52/mod/wx.mod/wxpreferencespage.mod/glue.cpp:39:30: note: suggested
 alternative: '_wx_wxpreferencespage_wxPreferencesPage__OnGetName'
  return wxStringFromBBString(wx_wxpreferencespage_wxPreferencesPage__OnGetName(
maxHandle));
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                              _wx_wxpreferencespage_wxPreferencesPage__OnGetName

C:/Blitzmax1.52/mod/wx.mod/wxpreferencespage.mod/glue.cpp: In member function 'v
irtual wxWindow* MaxPreferencesPage::CreateWindow(wxWindow*)':
C:/Blitzmax1.52/mod/wx.mod/wxpreferencespage.mod/glue.cpp:55:9: error: 'wx_wxpre
ferencespage_wxPreferencesPage__OnCreateWindow' was not declared in this scope
  return wx_wxpreferencespage_wxPreferencesPage__OnCreateWindow(maxHandle, paren
t);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
C:/Blitzmax1.52/mod/wx.mod/wxpreferencespage.mod/glue.cpp:55:9: note: suggested
alternative: '_wx_wxpreferencespage_wxPreferencesPage__OnCreateWindow'
  return wx_wxpreferencespage_wxPreferencesPage__OnCreateWindow(maxHandle, paren
t);
         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
         _wx_wxpreferencespage_wxPreferencesPage__OnCreateWindow
Build Error: failed to compile C:/Blitzmax1.52/mod/wx.mod/wxpreferencespage.mod/
glue.cpp

I deleted the wxpreferencespage.mod and wxpreferenceseditor.mod to continue.


What is the difference compiling with command line using this command "bmk makemods -a wx" instead of using the advance module builder from Blide?

The current compiling is for BlitzMax1.52 not in NG. With the NG it have other errors with wxmax2d.mod

Offline takis76

  • Jr. Member
  • **
  • Posts: 85
Re: I am looking for complete guide how to compile wxMax
« Reply #37 on: July 21, 2019, 12:16:50 AM »
Keep deleting modules to continue now I deleted the wxstockpreferencespage.mod which caused error and interrupted the compile.
I will delete the problematic modules which I believe they will not be so important untill whole thing compiles.

I will go to sleep now and I will continue tomorrow. I will tell you what was happened.

Offline dawlane

  • Full Member
  • ***
  • Posts: 106
Re: I am looking for complete guide how to compile wxMax
« Reply #38 on: July 21, 2019, 11:04:31 AM »
OK. Looks like I have figured it out.
You cannot just download wxMax as a standalone module. You have to basically rebuild BlitzMax NG for it to work. It will not work with the current stable release of BlitzMax NG, nor will it work with the vanilla version of BlitzMax.

The process is as follows:

Download and extract the latest stable release of BlitzMax NG from https://blitzmax.org/downloads/ to somewhere. With me being on Windows 10 64bit, I downloaded the x86/x64 version, this allows me to compiler for both 32 bit and 64 bit versions of window.
NOTE: The same process should work with Linux and Mac OSX with the required path changes.

OPTIONAL: You don't need to download any git tools, but you must download the the git zip archives and create the directory tree and extract the archives to their correct locations. Click the https links below in the Git Bash section to take you to the github pages that hold the required downloads if you want to use zip file archives. And skip to ZIP ARCHIVE INSTALL.

Download and install Git for Windows (https://git-scm.com/download/win).
During installation of Git for Window keep all selected components in the second dialog.
   In the third dialog select text editor you would like to use.
   In the fourth dialog select Git from the command line and also from 3rd-part software.
   In the fith dialog select the https security protocol.
   In the sixth dialog leave it as Checkout Windows-style, commit Unix-style line endings.
   In the seventh dialog select Use MinTTY (the default terminal of MSYS2)
   In the eight dialog select Enable file system cashing and Enable Git Credential Manager.

GIT BASH INSTALL:
Once installed, start Git Bash and type:
   mkdir -p ~/Desktop/BlitzMax && cd ~/Desktop/BlitzMax
   git clone https://github.com/bmx-ng/bmx-ng.git

   cd bmx-ng && mkdir -p bin && mkdir -p mod && mkdir -p src && mkdir -p lib

   cd src
   git clone https://github.com/bmx-ng/bcc.git
   git clone https://github.com/bmx-ng/bmk.git
   git clone https://github.com/bmx-ng/maxide.git

   cd ../mod
   git clone https://github.com/bmx-ng/brl.mod.git
   git clone https://github.com/bmx-ng/pub.mod.git
   git clone https://github.com/bmx-ng/maxgui.mod.git
   git clone https://github.com/maxmods/wx.mod.git

This will create a new folder on the desktop and clone the the current sources for BlitzMax NG.

ZIP ARCHIVE INSTALL:
   Create a new directory on your Desktop called BlitzMax.
   Use the http links above in the GIT BASH section to take you to the github pages.
   Click the Clone Or Download button to open a sub-menu and select Download ZIP.
   Download each zip file from the github pages linked above to the BlitzMax directory created on your Desktop.
   Open the BlitzMax directory in your systems file explorer.
   Extract the bmx-ng-master.zip.
   Open the newly extracted directory (bmx-ng-master) and create the additional directories.
   bin
   mod
   lib

Now extract bcc-master.zip, bmk-master.zip and maxide-master.zip to the bmg-ng-master\src directory.
Rename the extracted directories by removing the -master part in their file names.

Now extract the btl.mod-master, pub.mod-master, wx.mod.master.zip and maxgui.mod-master to the bmx-ng-master\mod directory.
Rename the extracted directories by removing the -master part in their file names.

Now rename the bmx-ng-master directory by removing the -master from is file name.

Now you need to use the working downloaded stable release of BlitzMax NG.

AFTER CLONING OR ZIP ARCHIVE EXTRACTION
Start the current stable BlitzMax NG IDE (the one downloaded from https://blitzmax.org/downloads/) and in the IDE in the menu bar click 'Program' and set the following:
   Build Options->Debug (unchecked)
   App Options->Console App (checked)
   Architecture: Set this to either x86 or x64 depending on the architecture of your system and the current stable BlitzMax NG downloaded.

In the BlitzMax NG IDE, open up the bcc.bmk file from Desktop/BlitzMax/bmx-ng/src/bcc and build only.
In the BlitzMax NG IDE, open up the bmk.bmk file from Desktop/BlitzMax/bmx-ng/src/bmk and build only.

You need to copy over the two files below from the current working stable BlitzMax NG bin directory to the Desktop\BlitzMax\bmx-ng\bin directory the files.
   core.bmk
   make.bmk

From the Desktop\BlitzMax\bmx-ng\src\bcc and Desktop\BlitzMax\bmx-ng\src\bmk copy over the new built executable's (bcc.exe and bmk.exe) to the Desktop\BlitzMax\bmx-ng\bin directory.

Copy over the MinGW compiler from the current stable BlitzMax NG directory to the root directory of Desktop\BlitzMax\bmx-ng directory.
Open a Window DOS command prompt and change directory to Desktop\BlitzMax\bmx-ng\bin

Type:
   bmk makemods -a
   bmk makeapp -a -r -o .\makedocs ..\src\makedocs\makedocs.bmx
   bmk makeapp -a -r -o .\docmods ..\src\docmods\docmods.bmx
   bmk makeapp -a -r -t gui -o  ..\maxide ..\src\maxide\maxide.bmx

NOTE: If there is a problem building wxMax. Disable it by renaming it from wx.mod to wx.mod_ and run bmk makemods -a.
Once done, undo the rename and run bmk makemods without any parameters.

NOTE: I haven't test out build the modules with the threading option.
SIDE NOTE: The MaxIDE won't build modules directly unless to make changes to stop it looking of the MINGW environment variable.

Now to check to see if the other modules work or shall I play around with Haxe.?

Offline Derron

  • Hero Member
  • *****
  • Posts: 2337
Re: I am looking for complete guide how to compile wxMax
« Reply #39 on: July 21, 2019, 11:19:16 AM »
@ threading, BMK
- NG is threaded by default, so "?threaded" is always "true".
- BMK (brucey's, so the NG one) auto-builds all necessary modules, so "makemods -a" is not needed except you change something and want to make sure stuff is caught to get updated


Quote
SIDE NOTE: The MaxIDE won't build modules directly unless to make changes to stop it looking of the MINGW environment variable.
What do you mean? I do not understand you (language-wise)? Do you mean that "rebuild modules" is greyed out / disabled as long as a MinGW-variable exists and points to the wrong directory?
If so then yes, it is something I was trying to change for a while now (priority of directories vs path entries vs environment variables).


Thanks for your detailled instruction, hope they help out takis.

Edit: you edited while I posted. Haxe is nice - if you like this "stages" approach some might still now from flash development - as you will most probably use HaxeFlixel or OpenFL for your game development stuff. Then it is similar to other "tree"-oriented projects like Godot. You need to get used to it else it will always feel "limitating" or "too much". Dunno how Haxe compiles these days but you might also run into trouble getting hxcpp (native compilation) and other stuff to work. It's not a "download once and compile for every platform" solution. But yes, mighty it is - so to say for "libGDX" too (which - a pity - only creates java stuff, not native binaries).


bye
Ron

Offline dawlane

  • Full Member
  • ***
  • Posts: 106
Re: I am looking for complete guide how to compile wxMax
« Reply #40 on: July 21, 2019, 11:44:08 AM »
Quote
What do you mean? I do not understand you (language-wise)? Do you mean that "rebuild modules" is greyed out / disabled as long as a MinGW-variable exists and points to the wrong directory?
If so then yes, it is something I was trying to change for a while now (priority of directories vs path entries vs environment variables).
Looks like I was wrong on that. I may have been looking at something in the old vanilla code where it's expecting to if a MINGW environment variable set up.

I'm testing out the latest that I've just built and it's fixed.

The bmx-ng setup_install.script found in github is needs a small up date to remove anything options and file name with the old threading system. And a Powershell script would help a lot on Windows.

So far the wxMax module samples all seem to be working.

Offline Derron

  • Hero Member
  • *****
  • Posts: 2337
Re: I am looking for complete guide how to compile wxMax
« Reply #41 on: July 21, 2019, 11:52:28 AM »
Think Brucey (and me) are only using Windows as secondary OS ... so if you want to try out something with the powershell... nobody will stop you ;-)

The install-shell-script is outdated/not-updated for some months now and I am not knowing anyone using it. There is also a script to build all the bootstrapping stuff (so creates the "c"-code out of the "bmx" files so you only need GCC to create the binaries on the target platform).

MaxIDE got a bit of love the last months (added and created some new icons, removing no longer needed bloat, Windows resume support, ctrl+tab, ...) yet we should not invest too much time in improving MaxIDE as it would need too much time better invested somewhere else. I know that Brucey tinkered with the language server protocol for some time, dunno how progress is there - but it would mean to get proper support in Atom/VS Studio or other lsp-capable editors (means intellisense - maybe also "lint" capabilities?).

If you were satisfied with what BlitzMax (legacy) offered then NG is a step forward even if it has surely some bugs here and there.


@ takis
Sorry for the offtopic and I hope you can still follow the instructions suggested by dawlane.


bye
Ron

Offline takis76

  • Jr. Member
  • **
  • Posts: 85
Re: I am looking for complete guide how to compile wxMax
« Reply #42 on: July 21, 2019, 05:08:04 PM »
The new instructions you gave, confused me even more.
I will continue the current installation of wxMax with deleting the modules which they will not work.
Maybe I will try and this confusing installation.
But even if this process will work, it will make the other modules like "IfsoGUI and Srs and Render2Texture" break and at the end I will return to the old reliable vanilla version of BlitzMax which all modules work except wxMax.
I will program until to finish some game projects I have here Untill to find some other interesting game programming language.
If I will have problem I will post questions (Which sure there will be lots of problems. But sure the other modules which worked before they will break).

Offline Derron

  • Hero Member
  • *****
  • Posts: 2337
Re: I am looking for complete guide how to compile wxMax
« Reply #43 on: July 21, 2019, 06:04:09 PM »
Sooner or later stuff _will_ break with vanilla - so your best bet is and was to move on to NG.

The instructions dawlane gave were _very_ clear and concise enough - they were even "step by step" so I do not have a clue why you cannot follow it?


bye
Ron

Offline takis76

  • Jr. Member
  • **
  • Posts: 85
Re: I am looking for complete guide how to compile wxMax
« Reply #44 on: July 21, 2019, 07:53:30 PM »
After deleting the sub modules the wxMax was compiled.
What is the difference compiling from the command promt and compiling from the Advance Module Builder of Blide?
What I will do to fix the ifsoGUI?