Rocco
23-09-2010, 20:50
Hi! I'm new here, I just found ThinBasic few days ago and my first impression was "great job"! It's a nice programming tool, reminds me some Visual Basic 6 (even if it's not a RAD (yet... but why not turn it into a powerful RAD?)...
I tried the "ThinBundle", and the first lack I saw is the possibility to add a custom icon (sorry, but the default icon is quite ugly under Windows Vista).
I would like to share my method here. Using NSIS is a possibility. This program was designed to create setups for programs, but it can also be used to create standalone executables for interpreted programming languages like ThinBasic.
You can get it here if you don't know it.
http://nsis.sourceforge.net/Main_Page
The first thing to do is to collect all the required files and place it in the same directory as the script. For a UI program, you need :
thinbasic.exe
thincore.dll
zlib.dll
thinbasic_ui.dll
your script (tbasic or tbasicx).
And here is my NSIS script (creates an exe with icon, version info and even a splash screen... no less, no more!) :
Name 'ThinBasic EXE'
Icon 'icon.ico'
OutFile 'out.exe'
SilentInstall silent
VIProductVersion "1.0.0.0"
VIAddVersionKey "ProductName" "ThinBasic Test"
VIAddVersionKey "Comments" "Just a test"
VIAddVersionKey "CompanyName" "Rocco"
VIAddVersionKey "LegalTrademarks" ""
VIAddVersionKey "LegalCopyright" "© Rocco"
VIAddVersionKey "FileDescription" "ThinBasic Test"
VIAddVersionKey "FileVersion" "1.0.0"
Function .onInit
InitPluginsDir
SetOutPath $PLUGINSDIR
; Splash
File 'splash.bmp'
advsplash::show 2000 500 1500 -1 $PLUGINSDIR\splash
Delete $TEMP\splash.bmp
FunctionEnd
Section "Executable"
; Required files
SetOutPath $PLUGINSDIR
File 'test.tbasicx'
File 'thinbasic.exe'
File 'thincore.dll'
File 'zlib.dll'
; Extra DLLs
File 'thinbasic_ui.dll'
ExecWait '"$PLUGINSDIR\thinbasic.exe" "$PLUGINSDIR\test.tbasicx"'
SectionEnd
Some explanations :
It extracts in the temp directory (PLUGINSDIR means a temporary directory under %temp%).
To compile it, just right click and choose "Compile...".
NSIS is also easy to learn, and can handle even the most complex deployment scenarios. Experiment! :D
I tried the "ThinBundle", and the first lack I saw is the possibility to add a custom icon (sorry, but the default icon is quite ugly under Windows Vista).
I would like to share my method here. Using NSIS is a possibility. This program was designed to create setups for programs, but it can also be used to create standalone executables for interpreted programming languages like ThinBasic.
You can get it here if you don't know it.
http://nsis.sourceforge.net/Main_Page
The first thing to do is to collect all the required files and place it in the same directory as the script. For a UI program, you need :
thinbasic.exe
thincore.dll
zlib.dll
thinbasic_ui.dll
your script (tbasic or tbasicx).
And here is my NSIS script (creates an exe with icon, version info and even a splash screen... no less, no more!) :
Name 'ThinBasic EXE'
Icon 'icon.ico'
OutFile 'out.exe'
SilentInstall silent
VIProductVersion "1.0.0.0"
VIAddVersionKey "ProductName" "ThinBasic Test"
VIAddVersionKey "Comments" "Just a test"
VIAddVersionKey "CompanyName" "Rocco"
VIAddVersionKey "LegalTrademarks" ""
VIAddVersionKey "LegalCopyright" "© Rocco"
VIAddVersionKey "FileDescription" "ThinBasic Test"
VIAddVersionKey "FileVersion" "1.0.0"
Function .onInit
InitPluginsDir
SetOutPath $PLUGINSDIR
; Splash
File 'splash.bmp'
advsplash::show 2000 500 1500 -1 $PLUGINSDIR\splash
Delete $TEMP\splash.bmp
FunctionEnd
Section "Executable"
; Required files
SetOutPath $PLUGINSDIR
File 'test.tbasicx'
File 'thinbasic.exe'
File 'thincore.dll'
File 'zlib.dll'
; Extra DLLs
File 'thinbasic_ui.dll'
ExecWait '"$PLUGINSDIR\thinbasic.exe" "$PLUGINSDIR\test.tbasicx"'
SectionEnd
Some explanations :
It extracts in the temp directory (PLUGINSDIR means a temporary directory under %temp%).
To compile it, just right click and choose "Compile...".
NSIS is also easy to learn, and can handle even the most complex deployment scenarios. Experiment! :D