You are here

C++ Problem

6 posts / 0 new
Last post
psychedelic-squid
psychedelic-squid's picture
Offline
Last seen: 16 years 8 months ago
Joined: 2007-09-12 10:12
C++ Problem

Can anyone help with a C++ problem?

I've compiled my program (apparently without errors), but it crashes when I try to run it. If anyone's got better debug functionality on their comp, a report of what went wrong will be very welcome.

The program in question is NCRC-Tool, my attempt at coding a PortableApps.com Launcher CRC-check bypass.
It reads in 2 values from an INI file, telling it:
1. Which executable (the launcher) to run, and
2. Whether or not to show an alert telling the user that it is running the file with parameter /NCRC.
The INI file included in the binary download I've posted is for Firefox Portable, so you might need to put that (just the launcher) in the directory before trying to run it.

Edit: Never mind, it seems to be working now. I removed a bit of code that was there just for a flashy effect (stringing together some bits of text), and it runs much better.

Version 0.0.1.36 (Horribly broken)
Source (2.19kB): here
And binary, as compiled on my comp (130kB, bloated IMHO): here

Version 1.0.1.1 (too bloated for practical use, but you can try it, or attempt to slim it down if you want)
Source (17.9kB): here
Binary, as compiled under Dev-C++ 4.9.9.2 (134kB): here
This version, and all previous versions, are licenced under the GPL 3.0, a copy of which is included in the source download.

Thanks in advance!

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 17 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Umm

Why on earth would you want to bypass the CRC check... since that's what ensures the installer and launcher haven't been tampered with by viruses, spyware, etc.

Sometimes, the impossible can become possible, if you're awesome!

psychedelic-squid
psychedelic-squid's picture
Offline
Last seen: 16 years 8 months ago
Joined: 2007-09-12 10:12
Because

If I want to use UPX to compress the launchers, they throw up CRC errors (but will run perfectly when the CRC check is bypassed).

Unfortunately, the current version of NCRC-Tool (which is now working) is bigger, even when UPXed, than the space saved by UPXing the launchers. Hmmm...

It would certainly help if the apps could be specifically told, on an individual basis (in their Data settings, or an ini, or wherever), to expect a (supposed) 'bad' CRC, and to ignore it. If that kind of thing could turn up in a future PAM/PortableApps Platform, that would be useful. But for now, I will stick to improving my solution to the problem.

Q: What do agnostic, insomniac dyslexics do at night?
A: Stay awake and wonder if there's a dog.

nycjv321
Offline
Last seen: 16 years 4 months ago
Joined: 2006-06-04 15:53
...

Well there is a code to let upx compress the nsis launcher, so RTFM (NSIS of course Smile ), and you should be fine, this could be considered a hacking tool :), also I dont think 40kbs of saved space will help anyone.

Slackware 12 for system
MCP (For XP and Server 2003)
Network + Certified
aim is "nycjv321" (minus quotes)

psychedelic-squid
psychedelic-squid's picture
Offline
Last seen: 16 years 8 months ago
Joined: 2007-09-12 10:12
Hmmm

You're probably right.

Q: What do agnostic, insomniac dyslexics do at night?
A: Stay awake and wonder if there's a dog.

nycjv321
Offline
Last seen: 16 years 4 months ago
Joined: 2006-06-04 15:53
...

but don't let that stop you learning C++ dude! create something that is useful for you and learn a thing or two along the way

Slackware 12 for system
MCP (For XP and Server 2003)
Network + Certified
aim is "nycjv321" (minus quotes)

Log in or register to post comments