blitzmax minGW rant

BlitzMax Forums/BlitzMax Module Tweaks/blitzmax minGW rant

AdamStrange(Posted 2016) [#1]
Picture this:
windows 7
blitzmax 1.50
compile mod - Ef off
minGW
WTF
Info?
Download
Path
setup
run
WTF
EFF OFF
more info
setup vars
EFF OFF
...
...

(2 hours later)
...

You know what? I can only surmise that getting a simple install of BlitzMax on windows (that actually runs as promised and compiles mods) isn't actually possible for a normal person.
I'm not dumb, I tried and F*ck it. F*ck this piece of sh*t back into the ground where it should have stayed.
Unhappy, p*ssed off, really really P*ssed off!

I'm off back to OSX land "where everything Just Works"


(tu) ENAY(Posted 2016) [#2]
Eh? Ok, so I haven't used Blitzmax in quite a few years, didn't even realise it needed mingw installing at all. I thought that was in Monkey. (Windows XP)
As far as my rusty brain recalls, Blitzmax was just an installer just like Blitz3D etc. Sorry to hear of your frustration.


Brucey(Posted 2016) [#3]
Heh :-)


Henri(Posted 2016) [#4]
This Windows stuff is only for the hardcore developers :-)

-Henri


AdamStrange(Posted 2016) [#5]
:p

mods now compiling - Piece of Sh*t


AdamStrange(Posted 2016) [#6]
Nah - load of crap
That's it i'm off - F*CK windows


Naughty Alien(Posted 2016) [#7]
..ha?..i was under impression that bmax/win combo is rather straightforward and works fine..at least thats my experience with it so far..mm


Dabhand(Posted 2016) [#8]
You know the auld North-East saying don't you...

If at first you don't succeed.... Pull your foreskin over your heed!

Then try try again!

:D

Dabz

Ps I made that up! God, I should be like a poet or something! ;)


Shagwana(Posted 2016) [#9]
Dont you only need MINGW if you want to rebuild mods?


AdamStrange(Posted 2016) [#10]
And what do I want to do?


TomToad(Posted 2016) [#11]
Problem is that the instructions on the forum are out of date.

Download from here http://tdm-gcc.tdragon.net/download
install
set environment variable MINGW to install path. Be careful here as sometimes the install will nest the files 1 deep, so you might have either C:\MinGW or C:\MinGW\MinGW . best thing to do here is to locate the bin folder and wherever that is at, use that path (without the bin) So if you have C:\MinGW\bin, then you'd set the environment variable to C:\MinGW.
To set the environment variable
1. Open device manager (Windows key + Pause, or Start/Control panel/hardware and Sound/Device Manager)
2. Click Advanced System Settings, then on the next window, Environment Variables.
3. Under System Variables, click New
4. Variable Name: MINGW - Variable Value: Path you determined earlier
5. Ok, Ok, Ok, until you exit all the screens

Now you should have Build Modules working. If it is not highlighted, or you are getting errors, try rebooting your computer.


TomToad(Posted 2016) [#12]
Also one more thing, make sure you have the latest BlitzMAX. The latest is version 1.50, you can get it by clicking Account at the top of the web site, then under that, click Product Updates.


Brucey(Posted 2016) [#13]
Now you should have Build Modules working.

Except it won't, given your waaaaayy-too-short list of instructions :-)
(or at least, you may be able to compile your modules, but you can *forget* trying to link anything to an executable)

If you introduce a "new" version of MinGW and are using the standard bmk, you will also need to update:
a) ar.exe and ld.exe in BlitzMax/bin
b) all the files in BlitzMax/lib


So you can see why it can be such a schlep for the uninitiated :-p


In an ideal world, you'd simply drop the MinGW dist into BlitzMax/MinGW32 and be done... ...


Derron(Posted 2016) [#14]
@Brucey
That would indeed be wonderful.

@ar.exe etc
There are some batch scripts flying around...am on the phone so I cannot search for them.

The files are within the mingw/bin folder. The lib-files to replace: all files in blitzmax/lib need to get overwritten by their variants of the MInGW installation (there is a lib folder too).

But these two steps are described properly in the outdated guides.


Bye
Ron


LT(Posted 2016) [#15]
Hmm, been using BlitzMax on Windows and rebuilding mods for years. Guess I've forgotten the painful parts. ;)

I do recall that the MinGW distribution that worked was VERY specific and not the standard Windows install. I couldn't just go install the latest and point to it.


TomToad(Posted 2016) [#16]
If you introduce a "new" version of MinGW and are using the standard bmk, you will also need to update:


The link I posted above is the same one in the Readme.txt on the BlitzMAX github site, so I'd assume it is the same version that was compiled with. No need to copy ar and ld. If you do get linking errors, then go ahead and copy them from the minGW folder to the Blitzmax bin folder.


Derron(Posted 2016) [#17]
Just to mention it here again (at my beloved home linux box now):
This Post (of mine) contains a bat-file to ease the process of copying the needed files from MinGW to BlitzMax.

bye
Ron


Yasha(Posted 2016) [#18]
I have reinstalled BlitzMax on Windows several times and literally never had any problem with the official MinGW from the actual MinGW website: http://www.mingw.org/

I found it works fine as long as you do as Brucey said and replace a few things in the BlitzMax folder (why doesn't it come with the correct files?).


skidracer(Posted 2016) [#19]
I have unpinned the topic in the Module Tweaks forum to avoid further confusion.

Not totally sure which advise should be given so feel free to nominate.


TomToad(Posted 2016) [#20]
Well, I'm getting ready to reinstall Windows. At the rate it is taking to backup my files, might take all night. I'll try and install a fresh MinGW and BlitzMAX and let you all know how I got along.


Dabhand(Posted 2016) [#21]

In an ideal world, you'd simply drop the MinGW dist into BlitzMax/MinGW32 and be done... ...



^He's such a tease... Maybe try this: http://www.bmx-ng.com/main/files/BlitzMaxNG_win32_Unoffical_0_71.7z

Remember if something is iffy, then visit the Git repo: https://github.com/bmx-ng or post in Mr H's modules forum on this very site.

You mayyyyy need to edit your module a touch though (And maybe game as well, depending on how you do things)

Dabz


LT(Posted 2016) [#22]
Dabhand, I downloaded that .7z the other day and my 7-zip won't open it.

literally never had any problem with the official MinGW
I think your computer is magical. Incidentally, there are lots of downloads and different versions on that site.


Floyd(Posted 2016) [#23]
Dabhand, I downloaded that .7z the other day and my 7-zip won't open it.
It opens with mine.

My 7-zip is version 9.2 and the most recent one, for late 2015, is 15.14. I guess the implication is that my version is from 2009.


LT(Posted 2016) [#24]
my version is from 2009
Heh, so's mine.


Dabhand(Posted 2016) [#25]

Dabhand, I downloaded that .7z the other day and my 7-zip won't open it.



Works fine here as well: 7-zip v9.20

:/

Dabz


TomToad(Posted 2016) [#26]
Reinstalled Windows 8.1, BlitzMAX, and MinGW. Cannot get anything to compile. Keep getting an error cannot rename such-n-such reason file exists. It will build for a short while, then terminate with the error. It is not giving me the error in the same place, seems to happen randomly. Even trying to build BlitzMAX from github and getting errors with that (even when using the recommended MinGW).

Tried copying a known working MinGW distro from my desktop to my laptop, making sure that I define the environment variables the same way. Still having the error. Next trying to update Windows 8.1. Might take a while as there are a lot of updates.


TomToad(Posted 2016) [#27]
Success! Had a theory that when bmk deleted a file, my laptop drive was slow enough that it didn't delete right away and ar.exe was still seeing the file. I first modified bmk by adding a Delay(500) after the DeleteFile. It almost worked. The compile would get much further than before, before I got an error. I didn't want to slow things even more, so I modified bmk again to go regular speed, but if ar gave an error, to try again. I set it to try 5 times before finally reporting an error. That seemed to be enough. Was able to successfully rebuild all modules in one go.

I will make a copy of my MinGW setup and a copy of the modified bmk.exe and upload it somewhere.


Derron(Posted 2016) [#28]
That is very odd @ delayed file deletion.

Does Win8.x happen to have a "Safe mode" (like Win7/XP had) ? Does this delay happen there too?

For windows 7 you were able to do the following:

you can test my solution before changing any settings, just start the command prompt and enter:
"net start AeLookupSvc"
"net start PcaSvc"

now try to delete some ".exe" file... (or a copy of some .exe) - if windows explorer deletes the files immediately (press F5 to refresh and check), then it works!

open "services.msc" and set the startup type of the "AeLookupSvc" ("Application Experience" or "Anwendungserfahrung") and the "PcaSvc" ("Programm Compatibility Assistant" or "Programmkompatibilitäts-Assistent-Dienst") to "automatic"


Source: www.sevenforums.com

Dunno if this is the same with Windows 8 as my Windows-builds are still done by a small virtual WinXP machine.


bye
Ron


TomToad(Posted 2016) [#29]
Since most system caches HD access to speed things up, I'm thinking that bmk is deleting the file, but the cache isn't written to the HD before ar is trying to access it. ar must be using a more direct HD access than using the Windows API, thus bypassing the cache, and creating errors.