New BCX Installer Disccussion

Started by MrBcx, March 02, 2024, 06:47:44 PM

Previous topic - Next topic

MrBcx

Quote from: airr on March 05, 2024, 10:11:49 PM
I have to slightly modify each povars*.bat file so they look like this:

@echo off
set PellesCDir=%~dp0
rem
echo Setting 64-bit environment for Pelles C...
rem
set PATH=%PellesCDir%Bin;%PATH%
set INCLUDE=%PellesCDir%Include;%PellesCDir%Include\Win;%INCLUDE%
set LIB=%PellesCDir%Lib;%PellesCDir%Lib\Win64;%LIB%


I tested this version of the installer, compiled several demos from the installation folder,
and found everything working as it should.  I can't thank you enough Armando.

airr

#20
I have to slightly modify each povars*.bat file so they look like this:

@echo off
set PellesCDir=%~dp0
rem
echo Setting 64-bit environment for Pelles C...
rem
set PATH=%PellesCDir%Bin;%PATH%
set INCLUDE=%PellesCDir%Include;%PellesCDir%Include\Win;%INCLUDE%
set LIB=%PellesCDir%Lib;%PellesCDir%Lib\Win64;%LIB%


Here is what is hopefully the final version:

https://share.binarymagic.net/-gCxrzw2uDn

AIR.

airr

Thanks, Robert.

I think I can get away with changing that hard path to

set PellesCDir=%~dp0

in each file, instead of having the installer set the path like it does with the Config.bat file (requires additional code to modify the files).  Either approach will require regenerating the installer.  Not a problem for me!

AIR.

Robert

Hi AIR:

The povars32.bat and povars64.bat files in

BED\PellesC\Bin

have the PellesCDir environmental variable set to your machine.

I don't know if it matters in the current context usage.

Looks good.

Thanks for your help.


airr

Quote from: MrBcx on March 05, 2024, 06:57:55 PM
Whatever Inno Setup chops I had over a decade ago have long been forgotten.

I know what you mean!  Back in the day I would have banged this out without having to think about it.

AIR.

MrBcx

Quote from: airr on March 05, 2024, 06:22:41 PM

Here's the latest, reworked and, as mentioned previously, using Inno Setup.  This version modifies the Pelles Config.bat on the fly, so if installing into a custom location (It defaults to C:\BED), the Config file is set with the correct paths to the PellesC compilier and BCX.

Excellent !!
 

The installer and the functioning of BED is working as it should for me.

Barring any bug reports, I think this can be used to replace the outdated BCX install.

I'll give it a day or two for others to kick the tires before I update the main webpage.

Many thanks Armando!


Whatever Inno Setup chops I had over a decade ago have long been forgotten.

airr

#15
Ignore my previous question, I just configured the installer to create the key in both Current_User and Local_Machine.

Here's the latest, reworked and, as mentioned previously, using Inno Setup.  This version modifies the Pelles Config.bat on the fly, so if installing into a custom location (It defaults to C:\BED), the Config file is set with the correct paths to the PellesC compilier and BCX.

See https://bcxbasiccoders.com/smf/index.php?topic=1003.msg5149#msg5149

Attached is the *.iss file used to generate the installer.

AIR.

airr

Quote from: Robert on March 05, 2024, 02:09:06 PM
Don't forget to register BCXPATH.

Computer\HKEY_CURRENT_USER\Software\Bcx-32

Is this only referenced from the USER registry, or will it also work if set at the SYSTEM (LOCAL_MACHINE) level?

I'm just about done, using Inno Setup (for some of the features like setting the config file on the fly, AdvancedInstaller requires $$$ and Wix is a beast to configure to do this).

Robert

Don't forget to register BCXPATH.

Computer\HKEY_CURRENT_USER\Software\Bcx-32

airr

Rats, back to the drawing board!

MrBcx

Thanks again AIR. I found a new bug to report.

I discovered odd behavior with your updated installer.

When I specify an install folder of C:\BCX

the installer creates C:\BCX

but it also creates (or overwrites if it exists) C:\BED

and C:\BED not C:\BCX is the folder where the installation folders and files get installed.

In other words, the option to specify an installation folder is broken.

If I simply accept C:\BED as the default installation, everything else works great. 


Robert

Nice. Simple straightforward, perfect for a beginner.

Windows 11. Worked for me right out of the box. Used default install to C:\BCX.

Icon on desktop and in Start menu.

Perhaps a ReadMe popup in the editor on first run would be helpful.

Very slick!

airr

#9
Changed the MSI builder I used, link in my original post updated.

Here it is just so it's easier to find.

See: https://bcxbasiccoders.com/smf/index.php?topic=1003.msg5149#msg5149

Still have to work out how to best update the config.bat from the installer, but now you can select where to install (defaults to C:\BED, hopefully!).

I have a rather expensive MSI builder from work, but I'm trying to use something that is readily available at no cost in case someone wants to build the installer themselves.

Attached the AdvancedInstaller configuration for building this (assumes BED folder is located at the root of C:\, easy to change, though).

AIR.

Robert

Somewhere in %USERPROFILE% is probably the best default. It's not write protected.

But really, the user should be able to choose where to install.










airr

I think I know what's happening.

Wix, by default, will try to install onto the drive that it detects has the most space.

I need to specify that it installs to the system drive.

Or build in logic that will modify the config.bat file if I configure this to allow specifying where the package content is installed.

AIR.