As was foretold, we've added advertisements to the forums! If you have questions, or if you encounter any bugs, please visit this thread: https://forums.penny-arcade.com/discussion/240191/forum-advertisement-faq-and-reports-thread/
Options

Programming Help

tuscloud311tuscloud311 Registered User regular
edited December 2007 in Help / Advice Forum
If this deserves to be in G&T then please move, but a quick look at that section seemed like this would be out of place.

So i was talking to a co-worker, and the best way for me to move up in my company is to go up and beyond what is ever expected of me to do...and that is to write a program/tool that would be used frequently.

Currently, i am a software tester. so writing a peice of code would surely give my manager a better look on me.

So my situation: We have software that we deploy using a simple setup.exe + supportive files. Alongside of this, we have other "features" that can be installed seperately, but mainly used for upgrading purposes and used only in different areas of the company. These other "features" all have a setup.exe that are stored in multiple folders, WITHOUT supportive install files. A quick breakdown:

- Root
-- Feature 1 (folder)
---- Setup.exe
-- Feature 2 (folder)
---- Setup.exe
-- Feature 3 (folder)
---- Setup.exe
-- Feature 4 (folder)
---- Setup.exe

Now, as i said before, some of these features are used in locations that other features are not. SOOOOO, what i plan to do is create a program, or a simple GUI that basically searches the structure of this CD, or any location i point it to, and create these setup.exe's as Checkboxes!

So i go to a person's PC, and i realize they need the standalone software, along with features 1, 2, and 4. I start up my application, check the 1, 2, and 4 feature checkboxes, and click "install". Then it will install the standalone software, then install features 1, 2, and 4 afterward automatically.

This may seem VERY basic, but seeing as i am new, i dont even know where to begin. Is this something i would have to code by hand, or is there a program out there that will allow me to do this very easily? Basically asking in HTML terms, do i have to do it the Notepad way, or can i do the Frontpage way?

tl;dr: i need a program that automatically launches and installs setup.exe files using a GUI with checkboxes.

tuscloud311 on

Posts

  • Options
    DrFrylockDrFrylock Registered User regular
    edited December 2007
    If you use a programming language with a GUI builder, like say Visual Basic or any of the Visual programming languages really, and you use the GUI builder, you can generate some of the boilerplate code automatically. However, all that code is going to have stuff that reads like this:
    /* DON'T TOUCH THIS STUFF THIS IS GUI BUILDER MAGIC
       {AJDFA-DFJAFD-ADFJAD-12343-DAFAJDSFJ-AHDHAF}...
    */
    void bButton1Pressed(){
      //TODO: Here is where you write the code that does something when Button1 is pressed
    }
    

    And so you have to fill in the blanks. Now if your GUI is relatively static those blanks are relatively easy to fill in. Programming only resembles HTML coding superficially, of course. The biggest similarity is that you have to be careful with your syntax. The biggest difference is that HTML pages (without Javascript) are not stateful. If you want a fancier GUI (like one that generates a tree or a set of checkboxes automatically by searching a CD) then you have to write fancier code. There are APIs for doing fundamental operations - walking around directories, launching an external process, and so on, but you have to call them.

    Once you get a basic version working, then you're going to have to write a lot of code to make it robust against all your customers' conditions. Maybe their CD-ROM drive is E: instead of D:. Maybe they're installing off a network drive that doesn't have a drive letter. Maybe they eject the CD while you're searching it. Maybe the developers screw up and forget to put setup.exe in the right place for a particular build. This is the real hard part of software engineering.

    DrFrylock on
  • Options
    tuscloud311tuscloud311 Registered User regular
    edited December 2007
    Thanks for the reply Frylock.

    It would appear as if this would get my feet wet with programming. I suppose it had to come sooner or later, right?

    The developers here use Delphi for their programming. Would i be able to jump into VB and code something like this, or would i be better off learning Delphi?

    tuscloud311 on
  • Options
    CentipeedCentipeed Registered User regular
    edited December 2007
    Thanks for the reply Frylock.

    It would appear as if this would get my feet wet with programming. I suppose it had to come sooner or later, right?

    The developers here use Delphi for their programming. Would i be able to jump into VB and code something like this, or would i be better off learning Delphi?

    Delphi is quite easy to learn, and as far as I'm concerned, will give you a better grounding in programming languages than VB. Then again, I've never really played with VB.NET, so I don't know if it's better than Delphi.

    I suspect you already have access to Delphi given that they use it at your workplace, but both Delphi and VB are free to download and use from Borland and Microsoft respectively.

    Centipeed on
  • Options
    bremon240bremon240 Registered User regular
    edited December 2007
    Hey Centipeed,

    Just wanted to start this off by saying I work for CodeGear (Formerly Borland's IDE Dept.). Because I might be a little skewed ;)

    If you don't have access to RAD Studio or Delphi 2007, you can download Turbo Delphi for free at http://www.codegear.com/products/turbo. It comes with our Visual Component Library that makes building GUI's really easy.

    I just learned Delphi a while ago after programming in many other languages such as Java, C/C++, perl and other random languages. I like it mostly because its clean. Also, Delphi teaches you a lot of basics in Object oriented programming without having to deal with some of the grossness of C.

    If you need any help getting started or have any questions just PM me and I'll see what I can do. Also a very good site for reference and learning delphi is http://www.delphibasics.co.uk/.

    bremon240 on
  • Options
    CentipeedCentipeed Registered User regular
    edited December 2007
    That was.. Interesting.

    Edit: For clarification in case people take offense at my possibly negative comment, I meant that it's interesting that a person who works for CodeGear happened to find my post referencing Delphi and give me some very helpful information concerning it, even though the person with a problem is the OP. Doesn't anyone else find that interesting?

    Centipeed on
  • Options
    DrFrylockDrFrylock Registered User regular
    edited December 2007
    Delphi is a fine language/environment for this sort of thing. VB would work too; I hear they significantly overhauled the entire language recently and so it's probably much structurally improved over what it used to be. Delphi is (originally) based in Pascal, which is a nice structured programming language.

    If the developers are already using Delphi just go ahead with that. Every time you bring a new tool chain into the loop in a company you need to worry about licensing the compilers, packaging up the redistributables, and so on. If they're already used to packing up and shipping Delphi code, you're in a good way.

    DrFrylock on
  • Options
    bremon240bremon240 Registered User regular
    edited December 2007
    Heh whoops. I had just got out of bed and lost track of who was the OP. But luckily my advice works for both of you. =)

    bremon240 on
  • Options
    tuscloud311tuscloud311 Registered User regular
    edited December 2007
    cool! didnt expect this to be as informative as it is, so that obviously helps. I will sit down with a co-worker so he can give me the jist of it. He is learning Delphi so he may be able to explain things easier than the 20 year veterans weve got here.

    tuscloud311 on
  • Options
    qnx_guyqnx_guy Registered User regular
    edited December 2007
    If you just want to create an installer with multiple options to check, and that installer just runs other installers, you really don't want to write a program to do that. Especially if you don't actually know how to program. What I'd recommend is building an installer using a freeware install builder like Inno Setup.

    Go to http://www.jrsoftware.org/isinfo.php and download the setup tool. Unfortunately, it's pretty daunting to first time users. Then go to http://www.istool.org/ and get the third party GUI front end for it called ISTool. Take the time to read the web pages on these tools, they can be helpful.

    I use these two tools all the time at work to create professional looking installers for our products. I know there are other free install building tools, but that's the one I use. I imagine it would give you bonus points at work, even if it's not programming. It would at least show initiative.

    qnx_guy on
  • Options
    DrFrylockDrFrylock Registered User regular
    edited December 2007
    Jasconius wrote: »
    In VB.NET (and all of .NET really) there is something called a GUID which lets you basically spit out a Gui with a single method call.

    Doesn't get easier than that for generating GUI's.

    Is this a joke or a mistake? A GUID (Globally Unique Identifier) is a 128-bit number generated by a particular algorithm that makes it extremely statistically unlikely that two will ever be generated that are the same. It really has nothing to do with GUIs...

    DrFrylock on
  • Options
    JasconiusJasconius sword criminal mad onlineRegistered User regular
    edited December 2007
    sorry, misread, disregard then.

    Jasconius on
Sign In or Register to comment.