Jump to content

Giving a program

Enderg312

I am going to create a program for me and my friends, but when giving a program for someone to use do I need to include the programming language file or do they need to download it? 

 

Link to comment
Share on other sites

Link to post
Share on other sites

13 minutes ago, Enderg312 said:

I am going to create a program for me and my friends, but when giving a program for someone to use do I need to include the programming language file or do they need to download it? 

 

eaither u download python or use online code thing i forgt at yu call

Link to comment
Share on other sites

Link to post
Share on other sites

13 minutes ago, Enderg312 said:

I am going to create a program for me and my friends, but when giving a program for someone to use do I need to include the programming language file or do they need to download it?

Depends on the language. If it's a language that produces a .exe - file, then the .exe is all they should need.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

I am planning on using Python and Java. Only because you can use Java to create a gui rather simply and python for my code. I want my python code to run in the java gui but then when I want to give it to people do I need to include the python and java resource files within the files.

Link to comment
Share on other sites

Link to post
Share on other sites

3 minutes ago, Enderg312 said:

I am planning on using Python and Java. Only because you can use Java to create a gui rather simply and python for my code. I want my python code to run in the java gui

How do you plan to do that?

4 minutes ago, Enderg312 said:

but then when I want to give it to people do I need to include the python code within the files

They'll need both Java and Python installed to run your stuff, yes.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

I don't really understand how to put two different codes into one program yet, I was just trying to figure out how others would be able to use my program.

Link to comment
Share on other sites

Link to post
Share on other sites

4 minutes ago, Enderg312 said:

I don't really understand how to put two different codes into one program yet

That's what I thought. You'd have to make two different programs that communicate over e.g. sockets or you'd need to design bindings between Python and Java. I do not think you have the required skills to do either, so you should just do everything in Java or everything in Python, not mix them.

Hand, n. A singular instrument worn at the end of the human arm and commonly thrust into somebody’s pocket.

Link to comment
Share on other sites

Link to post
Share on other sites

Then I will have to stick to python but learning how to make guis in python, I have not gotten the hang of that so that may take so time.

Link to comment
Share on other sites

Link to post
Share on other sites

39 minutes ago, WereCatf said:

Depends on the language. If it's a language that produces a .exe - file, then the .exe is all they should need.

This is not always true. C# can be compiled to standalone in some circumstances. In others the users will need to have the runtime. In some cases you will need the user to install both the runtime and the libraries.

In all cases you end up with a .exe file.
 

21 minutes ago, Enderg312 said:

python

There are various applications that you can use to package a standalone python application without assuming anything about the users machine. A good search term to get started is "python standalone application". I found this StackOverflow thread, among many other useful results, using that term.

But basically there are two paths you can take:

  • Install the appropriate python interpreter on the users machine if it is not already there
    • Then distribute your .py and your resource files.
    • Be warned that this strategy can have a few pitfalls and is not necessarily as simple as it seems.
  • Run a compiling tool over your project (see above). These tools basically convert your code into the C/C++ that it is scripting, and then compile that. Good tools usually include enough features that what they spit out is a distributable application.

 

Another option is that if your friends are developers as well, just distribute them your source code and resource files. Better still, put your project on GitHub and direct them to the repository. You may just find that they are interested in helping.

ENCRYPTION IS NOT A CRIME

Link to comment
Share on other sites

Link to post
Share on other sites

In Python you use something called tkinter.

It's very similar to java, but IMO a little easier & less complex than Java's swing.

But use what you know. If you know swing & java, use that. If you know Python but don't know TKinter, probably just stick to Java since you know its GUI already.

Link to comment
Share on other sites

Link to post
Share on other sites

You also have C# or even Visual Basic .Net , in which you can easily and quickly make some application with a GUI ... you end up with an .exe file  and that's all you need to send someone.

The other person needs to have a .Net runtime, so worst case scenario they'd have to download the runtime and install it - if a game or other application didn't install it already or if your application needs a runtime version newer than what's already built in.

 

Depending on how many things you use inside the application, you can build the application with an older version of .Net runtime which is built inside Windows 10 so there's no need for extra downloads.

Link to comment
Share on other sites

Link to post
Share on other sites

Some languages do require what's called "runtime libraries" or "script engine". Some of those that usually require such runtime libraries can be built in a way you do not require anything other than the executable file.

 

For example C do not require any runtime libraries or script engine at all. The exe is enough

On C++ typically do not require runtime libraries but that depend on what you are using because it can require some framework install.

On C# it's the inverse, you typically need to install a framework but you can make an executable that doesn't require it.

On Java you absolutely need to install the runtime unless you run in an environment that has it embed by default like android (despite being a heavily modified version)

On Python you do need the script engine matching your version (Never had to deal with as I keep up to date but I assume recent version run old version script too) but this does not require an install. The beauty with script engine is that most of them are stand alone and just need to be beside your application.

Link to comment
Share on other sites

Link to post
Share on other sites

The only runtime free language I know is GoLang, the runtime is built into the executable. The downside is the executables are big (the smallest hello world demo application ends up to around 400 KB compressed) and 80-200 MB executables are not uncommon. 

 

Now that I think about it, probably Free Pascal can also do applications that don't require a runtime (everything built into the executable).

 

Visual Basic 6 requires a single DLL file that's around 1.6 MB to function, as long as it's in the same folder as the executable your executable will run. 

The dll file is  MSVBVM60.dll  (or something like that)

I used to do a lot of small programs for companies (patchers, batch converters, tiny tools) and I just zipped the dll file with the executable. 

 

You could still install Visual Basic 6 from Visual Studio 6 but when you start the installer Windows will complain, saying it's no longer compatible... but there's workarounds and it works and you can do basic applications super fast. 

People even made   custom installers that  go around the installer on the original CDs to successfully install VS 6 on Windows 10 computers , if the installer aborts at some point due to some incompatible dll files or some stupid reasons :  http://nuke.vbcorner.net/Tools/VisualStudio6Installer/tabid/93/language/en-US/Default.aspx

And there's also tutorials on how to install on windows 10 : https://www.codeproject.com/Articles/1191047/Install-Visual-Studio-on-Windows

 

C++ applications may not need runtime, but that's only because it's built into the operating system ... see msvcrt.dll  (microsoft visual c runtime). Depending on visual c++ used, the application may be linked to a more recent runtime dll file, and then it's not guaranteed that library file is present on the users' computer. 

That's why you see lots of games and big applications distribute the runtime redistributable with them... see the downloads on the page here  The latest supported Visual C++ downloads

Link to comment
Share on other sites

Link to post
Share on other sites

17 hours ago, mariushm said:

The only runtime free language I know is GoLang, the runtime is built into the executable.

Which is also how Pascal/Delphi, Lisp and Rust work by default.

Anyway: Link your C application statically and you’ll have the same result.

Write in C.

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×