Installing FreeBasic with Scoop on Windows

General discussion for topics related to the FreeBASIC project or its community.
bubacxo
Posts: 12
Joined: May 29, 2019 20:02

Installing FreeBasic with Scoop on Windows

Post by bubacxo »

Windows now has at least two Package Managers, Chocolatey and Scoop.
I found FreeBasic on Scoop, and it's up to date.
This was me installing it:

Code: Select all

c:\arp>scoop info freebasic
Name: freebasic
Description: BASIC compiler for Microsoft Windows, DOS and Linux.
Version: 1.07.1
Website: https://www.freebasic.net
License: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later.html)
Manifest:
  C:\Users\bubacxo\scoop\buckets\main\bucket\freebasic.json
Installed: No
Binaries:
  fbc.exe

c:\arp>scoop install freebasic
Installing 'freebasic' (1.07.1) [64bit]
FreeBASIC-1.07.1-win64.zip (27.8 MB) [====================================================================] 100%
Checking hash of FreeBASIC-1.07.1-win64.zip ... ok.
Extracting FreeBASIC-1.07.1-win64.zip ... done.
Linking ~\scoop\apps\freebasic\current => ~\scoop\apps\freebasic\1.07.1
Creating shim for 'fbc'.
'freebasic' (1.07.1) was installed successfully!

c:\arp>which fbc
/c/Users/bubacxo/scoop/shims/fbc
I wonder how it got on there?
Did someone add it to their site, or did the developers of scoop do it themselves?

Anyway, I thought some folks might like to have this option.
There's an update command, so installing and updating are one-liners now.

According to the Scoop Docs,
you can change the install directory, and you can choose a version to install.

-James
badidea
Posts: 2591
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Installing FreeBasic with Scoop on Windows

Post by badidea »

bubacxo wrote:Windows now has at least two Package Managers, Chocolatey and Scoop.
I found FreeBasic on Scoop, and it's up to date.
Both: "scoop info freebasic" and "scoop install freebasic" do not show (above) form where reeBASIC-1.07.1-win64.zip is downloaded.
So, apparently it works, but how do you know that you aren't downloading and installing something else (virus, malware) with the same name?

Where does "freebasic.json" come from? I cannot find it in the scoop code.
Ah, found it, scoop uses other github repositories maintained by others which contain 'buckets'.
https://github.com/ScoopInstaller/Main/ ... basic.json (check history for who added what)
So it downloads freebasic from sourceforge.

Interesting tool.
Last edited by badidea on Feb 21, 2020 23:22, edited 2 times in total.
bubacxo
Posts: 12
Joined: May 29, 2019 20:02

Re: Installing FreeBasic with Scoop on Windows

Post by bubacxo »

Both: "scoop info freebasic" and "scoop install freebasic" do not show (above) form where reeBASIC-1.07.1-win64.zip is downloaded.
So, apparently it works, but how do you know that you aren't downloading and installing something else (virus, malware) with the same name?
Scoop uses a json file for each package. Here's freebasic.json:

Code: Select all

{
    "homepage": "https://www.freebasic.net",
    "version": "1.07.1",
    "license": "GPL-2.0-or-later",
    "description": "BASIC compiler for Microsoft Windows, DOS and Linux.",
    "architecture": {
        "64bit": {
            "url": "https://downloads.sourceforge.net/project/fbc/Binaries%20-%20Windows/FreeBASIC-1.07.1-win64.zip",
            "hash": "sha1:731491b93f1fd4970392b74d68d3f76c9783fb17",
            "extract_dir": "FreeBASIC-1.07.1-win64"
        },
        "32bit": {
            "url": "https://downloads.sourceforge.net/project/fbc/Binaries%20-%20Windows/FreeBASIC-1.07.1-win32.zip",
            "hash": "sha1:98cd3b1a15f74d98231c430939d05bdd3b3d6e97",
            "extract_dir": "FreeBASIC-1.07.1-win32"
        }
    },
    "bin": "fbc.exe",
    "checkver": {
        "github": "https://github.com/freebasic/fbc"
    },
    "autoupdate": {
        "architecture": {
            "64bit": {
                "url": "https://downloads.sourceforge.net/project/fbc/Binaries%20-%20Windows/FreeBASIC-$version-win64.zip",
                "extract_dir": "FreeBASIC-$version-win64"
            },
            "32bit": {
                "url": "https://downloads.sourceforge.net/project/fbc/Binaries%20-%20Windows/FreeBASIC-$version-win32.zip",
                "extract_dir": "FreeBASIC-$version-win32"
            }
        }
    }
}
If you install it, you'll see the install in: %userprofile%\scoop\apps\freebasic\1.07.1 (~/scoop/apps/freebasic/1.07.1).
It moves fbc.exe into ~/scoop/apps/shims (with all other executables it installs, because scoop adds this directory to your path).
Otherwise, it looks like the normal fbc installation under windows.

I'm not affiliated with Scoop, btw.
badidea
Posts: 2591
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Installing FreeBasic with Scoop on Windows

Post by badidea »

bubacxo wrote:Scoop uses a json file for each package
yes, I figured it out, see previous post.
bubacxo wrote:If you install it...
I'll stick with my linux version, but interesting project anyway. Makes installing software on Windows easy :-)
bubacxo
Posts: 12
Joined: May 29, 2019 20:02

Re: Installing FreeBasic with Scoop on Windows

Post by bubacxo »

just noticed that winfbe and fbide have been added to scoop as well...

>scoop info winfbe
Name: winfbe
Description: FreeBASIC Editor for Windows
Version: 2.0.6
Website: https://github.com/PaulSquires/WinFBE
License: GPL-3.0-or-later (https://spdx.org/licenses/GPL-3.0-or-later.html)

>scoop info fbide
Name: fbide
Description: #1 editor for FreeBASIC
Version: 0.4.6r4
Website: https://fbide.freebasic.net
License: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later.html)

>scoop install winfbe
>scoop install fbide
>scoop install busybox
;-)
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Installing FreeBasic with Scoop on Windows

Post by jj2007 »

This is what I have regarding WinFBE. It works fine, but it doesn't resemble at all the contents of WinFBE-master.zip:

Code: Select all

FreeBasic\WinFBE_Suite\UserTools
FreeBasic\WinFBE_Suite\Templates
FreeBasic\WinFBE_Suite\Settings
FreeBasic\WinFBE_Suite\Sample_Projects
FreeBasic\WinFBE_Suite\Languages
FreeBasic\WinFBE_Suite\Help
FreeBasic\WinFBE_Suite\FreeBASIC-1.06.0
FreeBasic\WinFBE_Suite\Examples
FreeBasic\WinFBE_Suite\changes.txt
FreeBasic\WinFBE_Suite\WinFBE32.exe
FreeBasic\WinFBE_Suite\WinFBE64.exe
FreeBasic\WinFBE_Suite\license.txt
FreeBasic\WinFBE_Suite\SciLexer64.dll
FreeBasic\WinFBE_Suite\SciLexer32.dll
And it has little resemblance to the official (?) FB release by CoderJeff (tiny excerpt of that page regarding "traditional" Windows binaries):

Code: Select all

Windows Binaries (current default is gcc 5.2.0)
FreeBASIC-1.07.1-win32.exe (installer) | .zip archive | .7z archive - 32bit version
FreeBASIC-1.07.1-win64.zip | .7z archive - 64bit version
FreeBASIC-1.07.1-win32-mingworg.zip | .7z archive - alternative to the normal FB-win32 package, may work better for older Win32 systems
gcc-5.2.0-for-FB-win32-gengcc.zip - 32bit gcc for the FB-win32 package, in case you want to use -gen gcc.
fbc-1.07.1-win32.zip | .7z archive - to be extracted into existing 32bit MinGW-w64 toolchain
fbc-1.07.1-win64.zip | .7z archive - to be extracted into existing 64bit MinGW-w64 toolchain
The MinGW-w64 toolchains used for the main win32/win64 builds can be found here:
i686-5.2.0-release-win32-sjlj-rt_v4-rev0.7z
x86_64-5.2.0-release-win32-sjlj-rt_v4-rev0.7z
So yes, I fully agree that it would help n00bs if there was one installer for FreeBasic. ONE.
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Installing FreeBasic with Scoop on Windows

Post by dodicat »

What's wrong with just unzipping the zips?
The zips from the forum news section, i.e. the latest official build.
And all these different gcc.exes, just total confusion for everybody.
OK some members may want to access prematurely the the next version to fiddle about with, but most members (myself included) want a standard build to use and maybe report bugs, until the next release.
It must be a pain for the compiler writer to read posts about compiler idiosyncrasies when they apply to something else, not the actual official compiler.
paul doe
Moderator
Posts: 1733
Joined: Jul 25, 2017 17:22
Location: Argentina

Re: Installing FreeBasic with Scoop on Windows

Post by paul doe »

dodicat wrote:What's wrong with just unzipping the zips?
The zips from the forum news section, i.e. the latest official build.
...
Indeed. Not to mention that the installer can actually install the compiler on a folder that doesn't have the right privileges, causing a lot of confusion for newcomers.

Perhaps separating the official builds (.zip only, no installers) from all the gcc packages might help with this a bit?
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Installing FreeBasic with Scoop on Windows

Post by jj2007 »

dodicat wrote:What's wrong with just unzipping the zips?
Which one of the dozen that is available? And to which folder? Does a n00b know where to put all that stuff? I am sure it's being explained somewhere ;-)

Add to that the fact that we have no FB editor but half a dozen competing FB IDEs, and that syntax and feature move slowly in direction C++: why should a n00b choose FreeBasic?

If somebody with authority puts together a zip file with a minimal Windows installation, I volunteer to write an installer called FB Starter Package.
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: Installing FreeBasic with Scoop on Windows

Post by PaulSquires »

The WinFBE-master.zip file is essentially the source code for the editor and nothing more. On the project's GitHub releases page you'll find the editor source code download along with the WinFBE_Suite.rar package. https://github.com/PaulSquires/WinFBE/releases (having said that, I even include the WinFBE editor source code within the Suite package as well).

The whole purpose of the WinFBE_Suite package is to make the process of using FreeBasic more noob friendly. Being able to download and simply unzip the package into whatever folder you wish, fire up the editor, and begin to compile and run programs with no other configuration changes, is a huge win for new users. You don't have to navigate multiple downloads or do configuration. The suite download packages both the 32 and 64 bit versions of FBC (the official FBC release version including the official gcc release - not any alternate version) into one folder structure. The include files and gcc backends are combined. The only change needed was that FBC.exe needed to be renamed FBC32.exe and FBC64.exe in order that they could be housed in the same folder.

The whole all-in-one concept is working pretty well and I expect that on Windows at least that anyone using WinFBE is probably using the WinFBE-Suite package when new versions are released as it is the easiest approach to get up and running quickly.
Last edited by PaulSquires on Mar 08, 2020 13:04, edited 1 time in total.
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Installing FreeBasic with Scoop on Windows

Post by dodicat »

jj2007
For me personally I use only the traditional freebasic builds.
I think the other (ALTERNATE GCC VERSIONS), new in 1.07.1, must be a nightmare to maintain, and far too much to ask of the compiler writer.

Regarding WinFBE_Suite, I keep getting
File not found, "Afx/CWindow.inc"
when I try the examples.
Lost Zergling
Posts: 538
Joined: Dec 02, 2011 22:51
Location: France

Re: Installing FreeBasic with Scoop on Windows

Post by Lost Zergling »

There were historical issues of contention between GPLV2 and V3 (https://lwn.net/Articles/343608/), what about? Issues solved?
There are really "weird" things in V3 : as I see it the author seems to give up the right to freely distribute his own code himself. Thus, the code can be distributed under licenses that do not yet exist and for which the author will have no say. Forgive me, the more I see "v3 and above", the more reluctant I am to see it "official", my point. Last word shall always go the author (till it is original). I am skeptical of the interest of v3. Some Licences exists for free use meanwhile protecting your own copyright (CECILL, Gpl V2), or full or assimilated as public domain (zlib, MIT), and so on.
bubacxo
Posts: 12
Joined: May 29, 2019 20:02

Re: Installing FreeBasic with Scoop on Windows

Post by bubacxo »

The whole purpose of the WinFBE_Suite package is to make the process of using FreeBasic more noob friendly.
You mean this file, correct?
WinFBE_Suite.rar
If so, then that is the file that is in your json file on this page (winfbe.json):
Scoop Extras

so they seem to be using the most reasonable version for the given architecture.
or at least, the version you listed first.

as i mentioned earlier, I'm not really advocating Scoop.
instead I thought it was interesting because:
  • it might cause people to try freebasic who might never have known about it all.
    i wanted to know what people thought. is it good or bad? is it being done right? should new users be encouraged or discouraged to use it?
    and finally, because i think the environment surrounding FBC needs any help it can get. (not the compiler, the platform.)
today i was looking at this page:
10 alternatives to Github.

FreeBasic has a platform problem. to me, it's FB's only real problem.
distributing code over a forum is no bueno.
maybe something simple and gratis like Gogs or Gitea, might be just the thing for posting all the projects and example code that seem to have no other home than this forum.
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Installing FreeBasic with Scoop on Windows

Post by MrSwiss »

bubacxo wrote:FreeBasic has a platform problem. to me, it's FB's only real problem.
Don't understand where you are aiming at because, FreeBASIC is hosted on SourceForge & GitHub ???
Are 2 platforms insufficent, do you need more?
PaulSquires
Posts: 1002
Joined: Jul 14, 2005 23:41

Re: Installing FreeBasic with Scoop on Windows

Post by PaulSquires »

dodicat wrote: Regarding WinFBE_Suite, I keep getting
File not found, "Afx/CWindow.inc"
when I try the examples.
Hi dodicat,

I expect that maybe you switched the compiler location to a different one than WinFBE installs? (check Options / Environment Options / Compiler Setup). You simply need to re-point your 32 bit compiler to \WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\fbc32.exe and the 64 bit compiler to \WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\fbc64.exe.

The File not found error you are getting is because the compiler is not finding Jose Roca's Afx library include files.

In a standard WinFBE Suite installation, those include files are already copied to \WinFBE_Suite\FreeBASIC-1.07.1-gcc-5.2\inc\Afx. The official FBC installation does not have the Afx includes. You'd have to copy them yourself if you don't use WinFBE's FBC distribution. You can get Jose's includes from https://github.com/JoseRoca/WinFBX (or obviously from the WinFBE Suite download). Likewise, should you not be using WinFBE's installation includes then you will also need the \inc\WinForms folder of includes if you wish to use WinFBE's visual designer. This is one of the reasons why packaging the FBC installation into WinFBE makes sense. I can already have the Afx and WinForms include files already installed for the user.
Post Reply