2

When you are done with programming, you may have used many libraries that you maybe had to buy, different software and tools and then when your run your programm, your programm compiles and calls constructs from different libraries and everything works fine, but when we are done and want to sell our software we are selling our Machinecode right? will we also have to provide the machine code of the libraries that we have bought etc. in other words how is Programm made executable on other peoples machines how do we know what they need besides OS to run our programm?

Lets take a game for example many tools and software are used and all we have to do as user is to install it and run it what kind of magic happens behind installation ?

I am always writing and running small Programms in an IDE and to run it I always need this IDE but how is it that customers only need the OS and none of the tools that develepors are using?

Can someone please paint the picture using simple words?

4

Will we also have to provide the machine code of the libraries that we have bought etc.?

Yes, but we usually obtain a permissive license that allows us to redistribute that code with our own programs.

How do we know what they need besides OS to run our program?

Nowadays, we use Package Managers like Nuget, which allow us track our software dependencies and keep them up to date with the latest versions of each library.

I am always writing and running small Programms in an IDE and to run it I always need this IDE

You don't. Any decent IDE will allow you to produce a stand-alone program that will run without the IDE.

How is it that customers only need the OS and none of the tools that developers are using?

There are many reasons. Some companies write all of their own code, and have no need for external libraries. Many programs are small, specialized programs that don't require support from additional libraries.

| improve this answer | |
  • 1
    Yeah, as person who learned programming with Visual Studio only, some years ago that was "BIG" discovery for me that I could write c# in notepad, compile with csc.exe file.cs and run produced file.exe – Fabio Nov 19 '19 at 4:09
3

You are right. It is a small miracle that your software can run on many different computers of different hardware and software configurations. But it wasn't always like that. In the early days of software, it was really difficult feat to achieve. Software had to be built for specific architecture and against specific hardware. And running against different architectures often required additional work.

What changed since then are new abstractions and APIs.

When you build your software, you don't build it against specific hardware. You build it against an APIs. Your software then doesn't care about hardware, it only cares about that hardware providing the API it needs. Hardware vendors are then incentivized to implement those APIs, so that lots of software can run on their hardware. Also, they are incentivized to keep those APIs rock-solid with big focus on backwards compatibility, so that their hardware can run old software.

And the same can be said about third party software your own software interacts with. You should only care about APIs and shouldn't care about who or how are they implemented.

Deploying the binaries themselves then becomes mostly a trivial task. As was noted in other answers and comments, your IDE is not required to run the application. If you look what IDE is really doing, you will see that all it does is to create a normal executable fine and then runs it. If you take that executable and copy it to another machine, it should run without need for an IDE. There are some gotchas like debug vs release builds and deploying 3rd party libraries. But that shouldn't be difficult if you study your language's/IDE's documentation on how to create a releasable binaries.

Licensing is another point. But to simplify it a lot, most 3rd party providers rely more on fear of legal action that any technical solution. They rely on the consumer of their binaries, who is the developer, to make sure their binaries are used and deployed correctly. And they rely on the developer to do it in a way they specify in their licensing.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.