drag&drop files installation

New to FreeBASIC? Post your questions here.
srvaldez
Posts: 2729
Joined: Sep 25, 2005 21:54

drag&drop files installation

Postby srvaldez » Feb 23, 2021 13:50

as I was reading this post viewtopic.php?p=280527#p280527 I was thinking of an easy way to install the lib and bi files to the FB distribution, here's a batch file that if placed in the gmp+mpfr folder and the FreeBasic folder is dragged and dropped onto it, will copy the lib and bi and examples to the respective folders

copy-to-folder.bat

Code: Select all

if not defined in_subprocess (cmd /k set in_subprocess=y ^& %0 %*) & exit )
copy "%~d0%~p032-bit\static\libgmp.a" "%*\lib\win32\"
copy "%~d0%~p064-bit\static\libgmp.a" "%*\lib\win64\"

copy "%~d0%~p032-bit\static\libmpfr.a" "%*\lib\win32\"
copy "%~d0%~p064-bit\static\libmpfr.a" "%*\lib\win64\"

copy "%~d0%~p0gmp.bi" "%*\inc\"
copy "%~d0%~p0mpfr.bi" "%*\inc\"
copy "%~d0%~p0gmpf-overload.bi" "%*\inc\"
copy "%~d0%~p0mpfr-fb.bi" "%*\inc\"

copy "%~d0%~p0gmpf-fb test.bas" "%*\examples\"
copy "%~d0%~p0make-lanczos.bas" "%*\examples\"
copy "%~d0%~p0mpfr-fb test.bas" "%*\examples\"

the first line is to keep the cmd window open in case some error occurs
trying to copy to a non-existing folder like lib\win32 or lib\win64 is harmless.

there's no error checking and as is will over-write files, suggestions?

Return to “Beginners”

Who is online

Users browsing this forum: No registered users and 7 guests