How to make your own install program?

  • (3 Pages)
  • +
  • 1
  • 2
  • 3

39 Replies - 9561 Views - Last Post: 26 November 2011 - 11:55 AM

#1 hockey97  Icon User is offline

  • D.I.C Regular

Reputation: -77
  • View blog
  • Posts: 300
  • Joined: 25-September 08

How to make your own install program?

Posted 16 July 2011 - 11:42 AM

Hi, I would like to know how can you make your own from scratch in c++ a program that installs your program.

like video games have that nice windows with I agree those legal clauses and then eventually it asks you where you want to install the program.

then it shows a percentage bar that shows how much longer it will take... or is left to install. Then a done window saying it's done installing... would you like to run the game now... or close installer for now.

I would like to make this in pure c++. I don't use ms visual studio.

I have code blocks as my IDE. would like to do this in that IDE.

any ideas on concepts of what I actually do. Do I need to know batch programming for the creating the folders and copying the files or folder of my program to that new folder on the persons hard drive... plus do I add enteries into the windows registry and how would that be done?

Is This A Good Question/Topic? 1
  • +

Replies To: How to make your own install program?

#2 Aphex19  Icon User is offline

  • Born again Pastafarian.
  • member icon

Reputation: 615
  • View blog
  • Posts: 1,873
  • Joined: 02-August 09

Re: How to make your own install program?

Posted 16 July 2011 - 01:20 PM

Personally, if I need to I just use pre-made setup installers, such as Inno.

If you want to make your own, then I guess you will need some knowledge of GUI coding, such as the Windows API, and how to to pack files into an executable (your setup file).
Was This Post Helpful? 2
  • +
  • -

#3 hockey97  Icon User is offline

  • D.I.C Regular

Reputation: -77
  • View blog
  • Posts: 300
  • Joined: 25-September 08

Re: How to make your own install program?

Posted 16 July 2011 - 01:41 PM

View PostAphex19, on 16 July 2011 - 02:20 PM, said:

Personally, if I need to I just use pre-made setup installers, such as Inno.

If you want to make your own, then I guess you will need some knowledge of GUI coding, such as the Windows API, and how to to pack files into an executable (your setup file).



any good resources where I can start learning? ya, I would agree... and do think I would need to learn windows and linux GUI programming. to make a installer for both OS's and then you said pack files into a exe. Don't fully understand what you meant by that.

I assume I would need to know batch and bash programming. That way I can copy and create the folders.

Yet, one thing left would be for windows would be the need to add information to the windows registry.

where would I learn this... any online tutorials?
Was This Post Helpful? 1
  • +
  • -

#4 stackoverflow  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 165
  • View blog
  • Posts: 545
  • Joined: 06-July 11

Re: How to make your own install program?

Posted 17 July 2011 - 04:13 AM

If you want to do Windows and Linux GUIs then try a library like Qt, wxWidgets or GTK+.
Was This Post Helpful? 1
  • +
  • -

#5 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2250
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: How to make your own install program?

Posted 20 July 2011 - 11:12 AM

I do my installers in WiX. I use WixGUI but only to help draft out the GUI dialogs.

For Java I tend to use IzPack - it can work for non-java projects but I don't think I have ever seen it done.
Was This Post Helpful? 2
  • +
  • -

#6 Bench  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 857
  • View blog
  • Posts: 2,343
  • Joined: 20-August 07

Re: How to make your own install program?

Posted 23 July 2011 - 03:54 AM

Another option for creating Windows installers is NSIS. Although I believe NickDMax's suggestion of WIX is the one which is gaining most popularity and support among Windows developers.
Was This Post Helpful? 0
  • +
  • -

#7 anonymouscodder  Icon User is offline

  • member icon

Reputation: 126
  • View blog
  • Posts: 710
  • Joined: 01-January 10

Re: How to make your own install program?

Posted 24 July 2011 - 12:12 AM

You can find a small list here: http://wikipedia.org...lation_software
Was This Post Helpful? 1
  • +
  • -

#8 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5388
  • View blog
  • Posts: 27,384
  • Joined: 10-May 07

Re: How to make your own install program?

Posted 24 July 2011 - 12:30 AM

View PostAphex19, on 16 July 2011 - 04:20 PM, said:

Personally, if I need to I just use pre-made setup installers, such as Inno.

I've used inno in the past. It's a relatively simple scripting language. Not only does it build an installer but you can also provide an uninstaller as well.
Was This Post Helpful? 0
  • +
  • -

#9 hockey97  Icon User is offline

  • D.I.C Regular

Reputation: -77
  • View blog
  • Posts: 300
  • Joined: 25-September 08

Re: How to make your own install program?

Posted 26 July 2011 - 10:15 PM

but does anyone know where I can learn how to make one myself? I don't want to use others work or programs to generate this for me. I am trying to learn it that way I can make my own installers for my own applications. It makes me look more profession in the programming field.

I mean if you called yourself a programmer and someone asked you make me this kind of installer with these features... what would you tell them? ahhh sorry I can't do that but I can use a program that makes it for you. Like if you said that they would fire you on the spot.

but, I ask here to find resources online to teach me how to make such a program to make an installer. I know there are many programs. I even used one when I made mods for a game and used a program that had windows asking where to store or to install the files. I would use the games folders point to a subfolder called plugins. I think it was ino or something the program was called. yet, this program had limitations.. you get one splash screen and a progress bar with a window that pops up at the start about terms and conditions. Then at the end it lets the user know exactly what program you used and the team that made it... It would say thanks for using our app and please download the full version.

The full version just took off that ending part where it lets the user or client know exactly what program you used to make the installer... so it looks unprofessional.

I mean you may notice in pc games today. They have the installer in a full screen where it has a percentage bar on the screen... some like the sims would have a game running while you wait for the game to install.

Those you can tell they made themselves or looks professional that they seemed like they made the installer.. I assume they did but never checked it out. It was done to a point where you feel they made the installer themselves.

I would like to learn how to make such apps so I can create my own or write a class of the code so I can always easily make my own installer programs rather then use demo installers or free installers.
Was This Post Helpful? 0
  • +
  • -

#10 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2250
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: How to make your own install program?

Posted 27 July 2011 - 07:08 AM

Quote

but does anyone know where I can learn how to make one myself? I don't want to use others work or programs to generate this for me. I am trying to learn it that way I can make my own installers for my own applications. It makes me look more profession in the programming field.


No... no it does not. Learning the Windows Installer API is all great and wonderful, but if I see that you are hand coding your installer I am not interested in working with you!

Because, unless you really have some custom requirements (heck even then) you are wasting your time on something that can and should be done using the tools designed to do it.

This is like saying: "How do I write a compiler? I want to show I am professional by writing applications in my own language!"

Use the tools available to you to solve the problems. Don't needlessly reinvent the wheel just because you think it would "look good on a resume" -- you know what looks good: PRODUCTIVITY.

Wasting time hand coding installers that can be generated with a tool is not productive.

That said. If you can make a better WiX or IzPack etc. Go for it! That would be outstanding. That would help me improve my productivity and I would love to work with someone who make a tool that made my life easier.

Quote

I mean if you called yourself a programmer and someone asked you make me this kind of installer with these features... what would you tell them? ahhh sorry I can't do that but I can use a program that makes it for you. Like if you said that they would fire you on the spot.


Well if someone asked me to write a program I would probably tell them: Well I will be using C++ to write the program. I am not going to hand code a new compiler to do it. We use programs to generate other programs -- that is kind of what programmers do.

Now oddly enough it is normally assumed that I will provide some kind of installer so when the requirements conversation turns to deployment I will say: Well the installer will be written using WIX.

Chances are the customer does not know what the WIX tools set is. But should they ask the really dumb question of: "Why are you not writing that in C++ as well?" I will answer: "Do you use a hammer to drive in screws? C++ is not the right tool for the job, it would take much longer to code an installer in C++ than it would to use a better tool like WIX or IzPack to generate the installer".
Was This Post Helpful? 4
  • +
  • -

#11 NickDMax  Icon User is offline

  • Can grep dead trees!
  • member icon

Reputation: 2250
  • View blog
  • Posts: 9,245
  • Joined: 18-February 07

Re: How to make your own install program?

Posted 27 July 2011 - 07:17 AM

BTW -- you can do full splash screens and progress bars and have spooky music playing in the background or play videos or flash tutorials or whatever. These tools don't stop you from doing that, they make it EASIER to do that. (well I am not so sure about the flash tutorial part... that might be a little tricky).

Use the right tool for the job.
Was This Post Helpful? 0
  • +
  • -

#12 Bench  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 857
  • View blog
  • Posts: 2,343
  • Joined: 20-August 07

Re: How to make your own install program?

Posted 27 July 2011 - 11:23 AM

View Posthockey97, on 27 July 2011 - 06:15 AM, said:

but does anyone know where I can learn how to make one myself? I don't want to use others work or programs to generate this for me. I am trying to learn it that way I can make my own installers for my own applications. It makes me look more profession in the programming field.
Learning how to use tools which are widely used in the industry looks better on your CV. When tools exist to help you out, employers expect their employees to use them, and not waste time (and therefore money) re-inventing the wheel. This applies to all kinds of things, and not just installers

View Posthockey97, on 27 July 2011 - 06:15 AM, said:

I mean if you called yourself a programmer and someone asked you make me this kind of installer with these features... what would you tell them? ahhh sorry I can't do that but I can use a program that makes it for you. Like if you said that they would fire you on the spot.
That depends on the features you're asking about. There's always a small possibility that you'll be asked for an installer which does something that the tools mentioned here simply cannot do very easily (e.g. distributed deployment by pushing software out over a network); in which case you'd need to spend more time finding out whether these problems are solved by other tools.

However, if you are simply asking for an installer which does a few basic things like copy files, update the registry, perform some database actions, run some custom scripts, run a few custom DLLs, etc, then your employer would be far more likely to fire you when they realised that you are wasting their time & money by re-writing functionality which already exists for free, and is in wide commercial use (Probably by their rivals). The next thing they would do is hire someone who was willing to use the correct tool for the job.

View Posthockey97, on 27 July 2011 - 06:15 AM, said:

but, I ask here to find resources online to teach me how to make such a program to make an installer. I know there are many programs. I even used one when I made mods for a game and used a program that had windows asking where to store or to install the files. I would use the games folders point to a subfolder called plugins. I think it was ino or something the program was called. yet, this program had limitations.. you get one splash screen and a progress bar with a window that pops up at the start about terms and conditions. Then at the end it lets the user know exactly what program you used and the team that made it... It would say thanks for using our app and please download the full version.

The full version just took off that ending part where it lets the user or client know exactly what program you used to make the installer... so it looks unprofessional.
Then that tool clearly isn't right for you; but don't make the mistake of tarring all freeware with the same brush. There are freeware tools out there which do not have licensing restrictions, and do give you unrestricted access to the functionality you need.

View Posthockey97, on 27 July 2011 - 06:15 AM, said:

I mean you may notice in pc games today. They have the installer in a full screen where it has a percentage bar on the screen... some like the sims would have a game running while you wait for the game to install.

Those you can tell they made themselves or looks professional that they seemed like they made the installer.. I assume they did but never checked it out. It was done to a point where you feel they made the installer themselves.

I would like to learn how to make such apps so I can create my own or write a class of the code so I can always easily make my own installer programs rather then use demo installers or free installers.
I have no idea what The Sims installer looks like or does, but I think what you're talking about here is an entirely separate issue and largely unrelated to installers. You can usually run an installer in a silent/quiet/passive mode (i.e. - no GUI, no user interaction, etc), then run whatever you like in the foreground, whose interaction with the installer is probably little more than invoking installer executables/scripts, and passing parameters or creating some kind of configuration file.

I believe such front-end applications are usually referred to as "bootstrappers"; which would probably be an application which presents a GUI entirely of your choosing and then fires off other executables/commands to run the installers while the user is entertained by your exotic singing-dancing environment sitting idly in the foreground.

Writing a custom bootstrapper with a custom GUI to invoke silent installer(s) is fairly common practice for application developers (especially those who want to add on other things to their apps such as .NET, SQL, etc) I would assume that game developers do pretty much the same thing, since games aren't all that different to other applications.

This post has been edited by Bench: 27 July 2011 - 12:09 PM

Was This Post Helpful? 4
  • +
  • -

#13 hockey97  Icon User is offline

  • D.I.C Regular

Reputation: -77
  • View blog
  • Posts: 300
  • Joined: 25-September 08

Re: How to make your own install program?

Posted 31 July 2011 - 11:42 PM

View PostNickDMax, on 27 July 2011 - 08:08 AM, said:

Quote

but does anyone know where I can learn how to make one myself? I don't want to use others work or programs to generate this for me. I am trying to learn it that way I can make my own installers for my own applications. It makes me look more profession in the programming field.


No... no it does not. Learning the Windows Installer API is all great and wonderful, but if I see that you are hand coding your installer I am not interested in working with you!

Because, unless you really have some custom requirements (heck even then) you are wasting your time on something that can and should be done using the tools designed to do it.

This is like saying: "How do I write a compiler? I want to show I am professional by writing applications in my own language!"

Use the tools available to you to solve the problems. Don't needlessly reinvent the wheel just because you think it would "look good on a resume" -- you know what looks good: PRODUCTIVITY.

Wasting time hand coding installers that can be generated with a tool is not productive.

That said. If you can make a better WiX or IzPack etc. Go for it! That would be outstanding. That would help me improve my productivity and I would love to work with someone who make a tool that made my life easier.

Quote

I mean if you called yourself a programmer and someone asked you make me this kind of installer with these features... what would you tell them? ahhh sorry I can't do that but I can use a program that makes it for you. Like if you said that they would fire you on the spot.


Well if someone asked me to write a program I would probably tell them: Well I will be using C++ to write the program. I am not going to hand code a new compiler to do it. We use programs to generate other programs -- that is kind of what programmers do.

Now oddly enough it is normally assumed that I will provide some kind of installer so when the requirements conversation turns to deployment I will say: Well the installer will be written using WIX.

Chances are the customer does not know what the WIX tools set is. But should they ask the really dumb question of: "Why are you not writing that in C++ as well?" I will answer: "Do you use a hammer to drive in screws? C++ is not the right tool for the job, it would take much longer to code an installer in C++ than it would to use a better tool like WIX or IzPack to generate the installer".



Well, just saying in EA games they have their own game engines... well some games are made with their own game engine. I played a few of their games and notice their installation for later games in 2005 to now use their own custome installer for windows.

like the sims 2 series allowed you to play a mini game while it's installing.

I ask you what if your a progammer and you walk into some place like EA games for a job.
They print out lets say 30 different scripts.

They ask you which one is a customized install... then what would I do in that situation?
say???? uhhh... I don't know... use a library lin inno software to make your installer.

It would make you look amature in computer programming. With such an answer they would say next in a heart beat.

I am right now just learning the stuff. I want to learn what stuff does and how stuff work.

I was told you need to reinvent the wheel to understand how the wheel works. However, in a business environmental you will need to know how to use tools to produce your code faster.

In business you need to do things faster. Yet, if you understood the concepts fully. Lets say you make your own classes and later down the road you start using them and adding on to them. You can later on building your own code well enough that it be better then whats on the market.

you can then use those classes in your other projects. While using others work to generate code... there are always legal aspects to it too where your limited... either you have to pay a license fee.. or it could only be used for personal uses. If you don't follow those legal sayings.... then you will have legal troubles.

I want to learn how you would make a installer.

So, I currently been googlying about windows registery .. tutorials trying to understand the windows system and so on.

I was told that I need to learn batch programming. Which will copy all program files and toss it to the program files folder.

I was told in C++ you can use batch programming inside the programming lango. I don't know if that's true.
Was This Post Helpful? 1
  • +
  • -

#14 no2pencil  Icon User is offline

  • Admiral Fancy Pants
  • member icon

Reputation: 5388
  • View blog
  • Posts: 27,384
  • Joined: 10-May 07

Re: How to make your own install program?

Posted 31 July 2011 - 11:47 PM

View Posthockey97, on 27 July 2011 - 01:15 AM, said:

but does anyone know where I can learn how to make one myself? I don't want to use others work or programs to generate this for me. I am trying to learn it that way I can make my own installers for my own applications. It makes me look more profession in the programming field.

This is the same argument you used for not using PayPal in another topic.

You can either be professional, or you can spend your time trying to just look professional.

One of the times I used inno was for software that I obtained a copy-right for, had professionally pressed, shrink wrapped, & sold.

How many pieces of software have you written & sold? Answer me that & then we'll talk about what is professional, & what just looks professional. Or we could go one step further & discuss what looks successful, & compare that to what is successful.

View Posthockey97, on 01 August 2011 - 02:42 AM, said:

I was told you need to reinvent the wheel to understand how the wheel works.

This is true. Building anything will help you understand it. Working with any technology will give you much more experience & insight to how it works, operates, & provides a solution than just reading about it.

However your approach seems to be ill-conceived. You seem to set aside the fact of one thing & replace it with how it is viewed in conversation, or valued by others. If you want to learn something to learn it, or to make it better, than do so. But don't write off productivity because someone may not value the fact that you used an existing tool-set, solution, library, or whatever rather than writing your own.

View PostAphex19, on 16 July 2011 - 04:20 PM, said:

If you want to make your own, then I guess you will need some knowledge of GUI coding, such as the Windows API, and how to to pack files into an executable (your setup file).

As well as building an uninstaller, writing to the Windows Registry, & adding your program to the Windows Application list under add/remove programs.
Was This Post Helpful? 3
  • +
  • -

#15 snoopy11  Icon User is offline

  • Engineering ● Software
  • member icon

Reputation: 840
  • View blog
  • Posts: 2,472
  • Joined: 20-March 10

Re: How to make your own install program?

Posted 01 August 2011 - 12:36 AM

No2Pencil said

Quote

One of the times I used inno was for software that I obtained a copy-right for, had professionally pressed, shrink wrapped, & sold.

How many pieces of software have you written & sold? Answer me that & then we'll talk about what is professional, & what just looks professional. Or we could go one step further & discuss what looks successful, & compare that to what is successful.


Ya, even I have written and sold engineering software on my own website
and I just consider myself a beginner and a hobbyist. But I would never
consider doing something as basic as writing my own installer.

Your just not going to end up with a professional or reliable product.

Inno is fine. I have used Inno in the past.

My own preference is

Advanced Installer

which gives you an .msi

I like this primarily because I develop for windows.

Find an Installer you like, a lot out there are fully customisable anyway.

and stick with that.


Best Wishes Snoopy.
Was This Post Helpful? 0
  • +
  • -

  • (3 Pages)
  • +
  • 1
  • 2
  • 3