Build script on Windows

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Build script on Windows

Ryan Joseph
I’m doing some tests with SDL and I’d like to build the program to work on Windows. I’d like to to automate the build with a script but I can’t seem to figure out even the basics of how to make this work (I develop on Mac). I used Lazarus briefly but it seemed easier to just run a single FPC command and make the package by hand (I’m emulating Windows also so it’s kind of hard to use and this scripts are easier).

Is there a little tutorial that I could follow to build a windows program from the command prompt? After searching for an hour I still can’t even figure out how to open FPC in the command prompt and this is coming from a UNIX user. ;)

Thanks.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Build script on Windows

Jonas Maebe-2
Ryan Joseph wrote:
> I’m doing some tests with SDL and I’d like to build the program to work on Windows. I’d like to to automate the build with a script but I can’t seem to figure out even the basics of how to make this work (I develop on Mac). I used Lazarus briefly but it seemed easier to just run a single FPC command and make the package by hand (I’m emulating Windows also so it’s kind of hard to use and this scripts are easier).
>
> Is there a little tutorial that I could follow to build a windows program from the command prompt? After searching for an hour I still can’t even figure out how to open FPC in the command prompt and this is coming from a UNIX user. ;)

FPC is installed by default in c:\fpc, I think. The compiler binaries
are somewhere under there (c:\fpc\bin\win32 or so?). I think our
installer adds this directory to your PATH by default under Windows, so
you should be able to use the compiler in a command line window just
like on OS X/macOS.


Jonas
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Build script on Windows

Ryan Joseph

> On Oct 11, 2016, at 2:04 PM, Jonas Maebe <[hidden email]> wrote:
>
> FPC is installed by default in c:\fpc, I think. The compiler binaries
> are somewhere under there (c:\fpc\bin\win32 or so?). I think our
> installer adds this directory to your PATH by default under Windows, so
> you should be able to use the compiler in a command line window just
> like on OS X/macOS.

Ok, I did some more research and found that fpc is at  c:\lazarus\fpc\2.6.4\bin\i386-win32 and a “dir” command shows there is a fpc.exe that works. Note just “fpc” doesn’t work so I guess I need to add that myself but I’m struggling trying to figure out the command prompt program. Copy and paste should be easier than this. Is there another terminal that Windows users like? I really don’t understand why you can’t just paste or select text like you would in any other terminal.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Build script on Windows

Sven Barth-2

Am 11.10.2016 10:35 schrieb "Ryan Joseph" <[hidden email]>:
> Ok, I did some more research and found that fpc is at  c:\lazarus\fpc\2.6.4\bin\i386-win32 and a “dir” command shows there is a fpc.exe that works. Note just “fpc” doesn’t work so I guess I need to add that myself but I’m struggling trying to figure out the command prompt program.

Lazarus' installer does not add the compiler's path to the PATH variable, so you need to add this yourself.

> Copy and paste should be easier than this. Is there another terminal that Windows users like? I really don’t understand why you can’t just paste or select text like you would in any other terminal.

You can alternatively use PowerShell were Click+Drag and Right-Click work for copy and paste respectively.
If the PowerShell presents problems you can always start cmd inside the PowerShell window.

Regards,
Sven


_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Build script on Windows

Sandro Cumerlato
In reply to this post by Ryan Joseph

I find convenient create a batch file "_buil.bat" to compile a specific project under Windows, targeting bot i386 and x86_64 in sequence at once.

You can add parameters to set searching paths, output directory, compiler flags, etc... it is hard retype the entire command line every time.

Best regards.

Sandro Cumerlato


On 11 Oct 2016 10:35, "Ryan Joseph" <[hidden email]> wrote:

> On Oct 11, 2016, at 2:04 PM, Jonas Maebe <[hidden email]> wrote:
>
> FPC is installed by default in c:\fpc, I think. The compiler binaries
> are somewhere under there (c:\fpc\bin\win32 or so?). I think our
> installer adds this directory to your PATH by default under Windows, so
> you should be able to use the compiler in a command line window just
> like on OS X/macOS.

Ok, I did some more research and found that fpc is at  c:\lazarus\fpc\2.6.4\bin\i386-win32 and a “dir” command shows there is a fpc.exe that works. Note just “fpc” doesn’t work so I guess I need to add that myself but I’m struggling trying to figure out the command prompt program. Copy and paste should be easier than this. Is there another terminal that Windows users like? I really don’t understand why you can’t just paste or select text like you would in any other terminal.

Regards,
        Ryan Joseph

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal