Source code and finished apps
Source code is the program text you can read and edit. An application, or app, is something a person can run to do a job. Pliro lets you work on the source and later build an application from it.
An exported app and its source are different files. Keep the source if you want to make changes later.
A recipe and a meal
A recipe helps a cook prepare a meal. Giving somebody a meal is different from giving them the recipe. In a similar way, sharing an app lets someone run your work, while sharing the source lets them study how you made it.
The analogy has limits: an app is still instructions a computer executes, not a used-up physical object. You can run it many times.
Start with a source file
Save this as greeting.pliro and use Run in the editor.
# language: en
say "Hello from my own app!"
Predict, then run
The output should be:
Hello from my own app!
Change the message, save the file, and run it again. You have changed the source. An application built earlier still contains the earlier program until you build a new version.
From source to an app
While learning, Pliro can run checked code using its runtime. Building prepares a native application for a chosen target, such as a supported Windows or Linux computer. A compiler translates a program into a form used to produce that application.
Use the IDE’s build workflow when you are ready. With an installed CLI and the required build tools, a Windows console example is:
pliro build -o greeting.exe greeting.pliro
An app for one operating system or processor is not automatically suitable for another. Projects with pictures and sounds also need their assets packaged correctly.
Your challenge
Make two source versions with different greetings. Keep a note of which version you built. Can you explain why editing the source does not change the old exported file?
A common mistake
Renaming greeting.pliro to greeting.exe does not compile it. A filename tells you something about a file; changing the name does not transform its contents. Keep a backup of the editable project and test the exported app on its intended target.
