Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2016-10

Build script on Windows

5 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

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

Jonas Maebe
to Ryan Joseph
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

Ryan Joseph
to Jonas Maebe
Show quoted text 7 lines
On Oct 11, 2016, at 2:04 PM, Jonas Maebe 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

Sven Barth
"Ryan Joseph" wrote
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

Sandro Cumerlato
to Ryan Joseph: Ok, I did some more research and found that fpc is at …

I find convenient create a batch file "_buil.bat" to compile a specific project under Windows, targeting bot i386 and x86_64 in 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

"Ryan Joseph" wrote 24 lines
> On Oct 11, 2016, at 2:04 PM, Jonas Maebe 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 - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal