Bookstore

Recent

Author Topic: How do you publish project?  (Read 187 times)

JamesSci

  • New Member
  • *
  • Posts: 30
How do you publish project?
« on: February 18, 2020, 11:22:04 pm »
Hello,

Today I went to publish my Windows-only project and, I was always under the assumption that the [ Project -> Publish Project ... ] menu option would just create an executable file, but all it did was create duplicates of my project files under a different directory... I couldn't actually find much on Google about this either, maybe I'm missing something...?

What's the easiest way to produce a standalone Windows .exe file from my project?

Thank you.

trev

  • Hero Member
  • *****
  • Posts: 518
  • Former Delphi 1-7 and 10.2 User
Re: How do you publish project?
« Reply #1 on: February 18, 2020, 11:25:18 pm »
For information one "publishing a project" see: https://wiki.freepascal.org/IDE_Window:_Publish_Project_Package

For information on "deploying a project" (which is want you want to do) see: https://wiki.freepascal.org/Deploying_Your_Application
o Lazarus v2.1.0 r62775, FPC v3.3.1 r44289, macOS 10.14.6 (with sup update), Xcode 10.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.0 (Parallels VM)
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

JamesSci

  • New Member
  • *
  • Posts: 30
Re: How do you publish project?
« Reply #2 on: February 18, 2020, 11:50:58 pm »
For information one "publishing a project" see: https://wiki.freepascal.org/IDE_Window:_Publish_Project_Package

For information on "deploying a project" (which is want you want to do) see: https://wiki.freepascal.org/Deploying_Your_Application
Thanks trev, I'll have a look at that page. I just noticed that there is a .exe already in my folder (presumably randomly generated) - is there any problems with just distributing that .exe, or is deployment through an external application absolutely necessary?

ASBzone

  • Sr. Member
  • ****
  • Posts: 323
  • Automation leads to relaxation...
    • BrainWaveCC Utilities
Re: How do you publish project?
« Reply #3 on: February 19, 2020, 12:18:03 am »
Thanks trev, I'll have a look at that page. I just noticed that there is a .exe already in my folder (presumably randomly generated) - is there any problems with just distributing that .exe, or is deployment through an external application absolutely necessary?


When you compile your application, especially if it is a simple one, you will end up with a single binary that you can just provide.

Please review the links you were provided above, as there are some exceptions to this (or at least some nuances to consider), but in general, your compilation will produce a binary.   

Nothing was randomly generated.  :D
-ASB: https://www.BrainWaveCC.com

Lazarus v2.0.7 r62681 / FPC v3.2.0-beta-r44391 (via FpcUpDeluxe) -- Windows 64-bit install w/32-bit cross-compile
Primary System: Windows 10 Pro x64, Version 1909 (Build 18363.720)
Other Systems: Windows 10 Pro x64, Version 1909 or greater