Results 1 to 6 of 6

Thread: Sharing an open source application

  1. #1
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,173

    Default Sharing an open source application

    First let me explain what this tool was for.

    It's a custom tool I designed to use at work for sysprep. For those of you that aren't sure what that is, it's a Windows utility that preps your system to be imaged so you can deploy it.
    The utility is located under "C:\Windows\system32\sysprep" and there is an XML file in there that you can load with some parameters so that sysprep runs it silently.

    Now the purpose of my tool is:
    it looks in the sysprep folder to see if there are any existing XML files. If there are, you'll see them appear in the drop down.
    A few issues I ran into when I was working with the drop down are:
    1. if you were to delete or move a file from the list, the drop down wouldn't remove the entry even though the file no longer exists.
    2. Over time the little drop down arrow turns to a "6" and you can't do anything (not sure what caused this, but this was happening with the original rendering using strictly Win32 API)

    The next field is the ability to add your own custom XML files. You can browse to the file and if you hit "Move XML" button it will move it to the sysprep folder and show the file in the drop down in realtime.

    Open Explorer - opens a window directly to the sysprep folder in case you need to access the location easily without having to manually browse to it.

    Start - button starts the sysprep process with or without CCleaner integration (assuming you have ccleaner checked. Ccleaner would be run from "C:\Windows\system32\sysprep\Tools\CCleaner"

    When you start the application for the first time, wherever the application is run from a shortcut is automatically placed on your desktop to your file
    --------------------------------------------
    This was a new learning concept for me for a few reasons.
    1. As far as I'm aware, outside of the original Win32API application being glitchy as I mentioned above with the drop down, images have to be bmp format which use up a lot more space and resources. The compiled binary was about 1.3mb

    2. After running into the rendering glitches, I decided to pitch the project and rewrite it from scratch using GDI+. I've never done this before, so it would be a new experience. GDI+ supports more image formats such as png and jpg. For my project I used png.

    3. Initially when I rendered the images, they had to be placed in the same folder as your executable. This isn't a bad thing if you want to update your UI on the fly, however I preferred packaging it all into 1 executable.

    4. After a lot of trial and error I first doubted that it was possible load a PNG as a resource, but after several tests, I got it working perfectly.

    The end result of my binary is only 61kb and no glitches

    I'll post the source code here if anyone is interested in learning *cough* Ryback *cough*

    Source & Binary: www.x-null.net/James/SEAL-Final.zip
    This binary doesn't have my original code, so if you're interested in seeing the version I had before, let me know.

  2. #2
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,604

    Default

    lol ,

    I feel like i'm in shame >_<

    i'll take that as if i won the challenge

    Exams and my study are taking a big part of my time

    still i won't open that source :P

  3. #3
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,173

    Default

    The source is to be learned from. I wasn't competing with you. I think it's still a great way to learn something new. I learned a lot from doing this myself as well. Also the ISTREAM method that I ended up using to load PNG resources, is horribly documented online and on tuts. I feel like they didn't really give good explanations and examples of how to actually render the image onto the window after you stream it so that part I had to do completely from scratch trial and error.

  4. #4
    Developer RyBack's Avatar
    Join Date
    Apr 2014
    Location
    In Front of the screen
    Posts
    1,604

    Default

    I've just run the exe and I've realised that what u did is something called drawable btn
    Also for some reason my lap-friggin 2gb ram with bullsh*t processor-top
    Lagged like hell after closing the program. Not sure if the software is the reason.

  5. #5
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,173

    Default

    Not sure why it would lag. Hmm

  6. #6
    Administrator James's Avatar
    Join Date
    May 2010
    Location
    on the intraweb
    Posts
    3,173

    Default

    Alright, sorry for the delay. Here is a release of all the "test"/Betas I created before the final version that I uploaded above.

    The beta version has more "goodies" that I removed from the final version because it wasn't needed.
    Here is what this version has.

    - Cool custom background
    - GDI rendering of the images, but they need to be in the same spot where the exe is. If you run it with one or any of the images missing, then certain buttons or other dialogs won't render correctly
    - The ability to stream images from a websource if you want during runtime (this option is currently commented out (disabled), but can be turned on easily)
    - Deletes the image files before exiting after they are downloaded from the web (this option is currently commented out (disabled), but can be turned on easily)
    - Scrolling credits (this was a pain in the ass, and it's still a little glitchy (flickers every now and then), but overall it doesn't feel laggy at run time. Basically I had to get this working a "hackish" way. I took a snapshot of the location where the text is, and made a new layer called overlay, and when I invalidate the window, I'm only redrawing the overlay not the whole main window. This is what prevents lag and flickering of all the other buttons.

    All other functionality is the same as it was in the final version released above.

    This is for educational purposes.

    Hope you find this helpful!

    Release: http://www.x-null.net/James/GDItest.zip


    BTW - Don't actually "start" the sysPrep process, because this could possibly mess up your system and I won't take responsibility. You can still run the application to see how it looks, but don't select an XML file and click Start, because if sysprep runs, I'm not sure how it will affect your system.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •