• Welcome to Dark Bit Factory & Gravity.
 
Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - coderJeff

#1
Quote from: Shockwave on May 15, 2023
Thanks for your thoughts, boogop and Jeff :) I remember you from the FB forums, I hope you're doing well.

We'll see what motivation is there when the summer holidays come, maybe I'll try updating it here a bit but I will admit, I find the thought a bit scary, I haven't touched php for years!! :)

heh, I believe I am doing well.  Hard to tell sometimes...

I was very involved with fb early on but because I felt I did not have the time for it, I ended up taking a very long break, about 8 years.  Eventually, when I got back in to it 5 or 6 years ago, I decided to come back with a different attitude where I would (mostly) do things that interest me and are rewarding to me and accept that whatever time I have for this hobby is the time I have for this hobby and not beat myself up about not having capability to do more.  Maybe it can work for you, I dunno.  Basically decide on limitations and what you are willing to give before going back in to it.

Updating fb's server software first time was very scary for me ... still is, tbh.  Ensuring backups work, old incompatible php, deailing with defunct software, etc.  What worked for me to help manage this fear was to set up a test server where can try everything out first.  Backup / restore / update / test / etc and allowed me to plan out the upgrade tasks.  If things go badly, then can restart and try again before deploying to the live server.
#2
Hi folks! Jeff from freebasic forums here.  Good to see the site is still up!

As can see from my post count, I never really posted here, however I often lurked the forums to see what interesting things were going on. I have enjoyed this forum over the years though I never said so.  ://)

Hey Shockwave,
I used discord for the first time only 2 years ago.
I don't know ... I find it great to connect with people for real time chat.  but it doesn't seem like a good fit to share where some amount of persistence is expected.
I know can search discord as a transcript but I feel is not the same as posting on a forum with topics dedicated to specific subjects or projects.
I don't run fb's discord, so maybe it can be used in a way I never seen.

Of course, have to assess the costs: not only real $$$ but also time to maintain any kind of site / server - often a thankless task by very few (or one, I can relate).
Anyway, I appreciate you sharing openly with your members ... whatever might happen next. :)
#3
Thanks Shockware, ninogenio.  Yeah, I lurk in here from time to time.  You guys put out some impressive stuff.  And use FreeBASIC in ways nobody else is even thinking about.  It's always a pleasure to visit.
#4
Here's a trick that makes small exes.  It won't be as small as crinkler,
but it is fairly easy to set-up, and you need no other resources except what's packaged with fbc 0.18.2.

Assume that FreeBASIC is installed at:
C:\FreeBASIC\

and that our "trick" is installed at:
F:\tinyfb\

Create some directories like so:
mkdir F:\tinyfb\
mkdir F:\tinyfb\bin\
mkdir F:\tinyfb\bin\win32\
mkdir F:\tinyfb\lib\
mkdir F:\tinyfb\lib\win32\


Copy two files from C:\FreeBASIC\ to our new directory:
copy C:\FreeBASIC\bin\win32\i386pe.x F:\tinyfb\bin\win32\i386pe.x
copy C:\FreeBASIC\bin\win32\ld.exe F:\tinyfb\bin\win32\ld.exe


Go into F:\tinyfb\lib\win32\ and create some empty object files just to make the fbc.exe command line happy:
F:
cd \tinyfb\lib\win32\
echo REM > crt2.bas
fbc -c crt2.bas
copy crt2.o crtbegin.o
copy crt2.o crtend.o
copy crt2.o fbrt0.o
cd ..\..


Now let's create our example:
'' hello.bas

#include once "windows.bi"

function WinMainCRTStartup cdecl _
  alias "WinMainCRTStartup" () as integer

  Messagebox( 0, "Small EXE example", "Hello", MB_OK )
  return 0

end function


Finally, the last two steps are to compile, then to link our exe:
fbc -c hello.bas
fbc hello.o -s gui -prefix F:\tinyfb -p "C:\FreeBASIC\lib\win32"


The "-prefix F:\tinyfb" option tells fbc where to pick up the extra bits of code.  Since we provided empty object files, no size is added.  The "-p" options tells fbc where to find all the import libs.

For me, this compiles to 2560 bytes. 

I know this is an old-ish thread, but I meant to post something here after I saw this, but never did.

Also, if you are making a Windows App and are planning to use MSVCRT, but want to make sure you don't get any fb-runtime stuff, the fbc command line option '-nodeflibs' was updated not to include 'fbrt0.o'.  Don't know if that's any help, but thought I would mention.