making an installer need help

This is a discussion on making an installer need help within the C++ Programming forums, part of the General Programming Boards category; hi guys i am trying to code an installer for my application in c++ now my application has 3 exe ...

  1. #1
    Registered User hackterr's Avatar
    Join Date
    Aug 2009
    Location
    INDIA
    Posts
    19

    Smile making an installer need help

    hi
    guys i am trying to code an installer for my application in c++
    now my application has 3 exe files a.exe b.exe c.exe
    what i want is to create a single executable file install.exe that contains all the 3 files inside it and when run extracts these exe files to the directory specified and in the file structure specified
    and also i want to place shortcuts for each of the three exe files onto the desktop.
    now i know how to create files and save them where i want to but how to put exe files inside the installer.exe as exe files.
    i tried using const char type variables to hold them as char arrays(strings) but the characters inside exe files are not copied correctly on compiling the code..

    what is the correct way to do this?
    pls dont tell me to use installshield etc.. i want to write the installer myself...
    is using exe files as resource the only way to do it? if so how?(pls be dev environment specific as i use dev cpp that means no VS )
    i m using dev cpp to code...
    thanx a lot for all your help
    i realize there are some threads dealing with these probs but none of them answer the question i have asked..
    any help is highly appreciated..
    thnx
    Its 5.50 a.m. Do you know where your stack pointer is?

  2. #2
    Registered User hackterr's Avatar
    Join Date
    Aug 2009
    Location
    INDIA
    Posts
    19
    Bump
    Its 5.50 a.m. Do you know where your stack pointer is?

  3. #3
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,546
    First of all, I would consider using a separate file for the data your installer needs to install if that is sufficient. I would then look into various compression algorithms, such as zip or 7z to compress the contents into the file and decompress them later.
    You might also check codeproject for samples on how to do installers or things like this.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  4. #4
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,893
    If you really want to write your own installer format (Why?), the trick is basically to have a generic executable that can look at its resources and do things with them (mostly, extract them to somewhere), and then have another program that can modify the resources of existing executables. You create a copy of the former and use the latter to put all the data you need into this copy. The result is your installer.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  5. #5
    Registered User hackterr's Avatar
    Join Date
    Aug 2009
    Location
    INDIA
    Posts
    19
    thanx a lot both
    got it done using a binary version of the file at the end inside my PE
    Its 5.50 a.m. Do you know where your stack pointer is?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. making sprites
    By DavidP in forum Game Programming
    Replies: 9
    Last Post: 02-20-2010, 06:00 AM
  2. Making great graphics
    By MadCow257 in forum Game Programming
    Replies: 1
    Last Post: 02-20-2006, 10:59 PM
  3. Making an installer?
    By Blackroot in forum C++ Programming
    Replies: 8
    Last Post: 01-22-2006, 06:38 AM
  4. Making an installer package using a console app
    By Finchie_88 in forum C++ Programming
    Replies: 22
    Last Post: 10-23-2004, 09:30 PM
  5. About Unix Programming - Making a career desision
    By null in forum C Programming
    Replies: 0
    Last Post: 10-14-2001, 07:37 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21