small launcher

Ideas and suggestions for how to improve the Warzone 2100 base game only. Ideas for mods go in Mapping/Modding instead. Read sticky posts first!
User avatar
CGi
Greenhorn
Posts: 7
Joined: 07 Jun 2010, 02:11

small launcher

Post by CGi »

Due to the fact, that my Wz2100 is portable, i was somehow in the need for a little launcher tool, that hands over the needed parameter for installed mods and so i made one.

features:
- detects all installed mods (campaign, global and multiplayer) and lists them
- only 1 mod of each section can be activated (dunno if more is possible by what's mentioned in the help, but the code for multi-mod support is already included but not active)
- launcher can't be moved outside the first screen (snaps back to screen edges)
- stay always on top
- closes itself when a game is started
- can be centered by double clicking the windows caption
- displays the version of your installed Wz2100 and the amount of mods ( see picture: [all together (camp/glob/mult)]
- it's only one not this small file (damn pic made it grow almost 150kb)
- alot of tooltips for almost every element

restrictions:
- never use spaces in mod file names (due to how this program works)
- use underscores as space replace in filenames, because the programm will turn them into spaces again before listing them

Note:
i used a runtime packer on it, so most av's will report it as virus.
Feel free to check it's api's and functions with Olly, W32DASM or whetever else.
it does NOT connect to the internet or network. if it does, it has been hacked or you're using a fake.

screenshots:
ImageImage

download:
Wz2100Launcher V0.0.2 Win32 (362kb, installed 379kb)

Update to V0.0.2:
- fixed some minor bugs
- removed the ugly standard windows messagebox for the about and turned it into a creditscroller
- included some music to play while the about is shown
- now really full credit is given ... i hope
- filesize went up by 200kb due to the music and it's player and some more code
- the runtime compressor equalised it by shrinking the file by 180kb again
- installed filesize is now 22kb smaller then before due to code optimizations
- Text2Speech is gone again - was only a test anyway - cuz it destroyed the portability
V0.0.2 Edit:
- fixed the about button bug and some typos with help of KrazyKommy (thx dude ^^)

Feel free to post suggestions and possible bugs.
Last edited by CGi on 08 Jun 2010, 19:58, edited 12 times in total.
Religion must die, for mankind to live.
©Religulous:Bill Maher:2008
stiv
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 876
Joined: 18 Jul 2008, 04:41
Location: 45N 86W

Re: small launcher

Post by stiv »

Download link is to the screenshot.
User avatar
CGi
Greenhorn
Posts: 7
Joined: 07 Jun 2010, 02:11

Re: small launcher

Post by CGi »

Ups. Sorry. Copy & Paste noobishness. ^^

Edit:
i still want to know, if the game can handle multiple parameters for mods of the same category.
Religion must die, for mankind to live.
©Religulous:Bill Maher:2008
User avatar
MetalWarrior95
Trained
Trained
Posts: 332
Joined: 16 May 2010, 01:26
Location: Trnje Neighbourhood, Zagreb, Croatia

Re: small launcher

Post by MetalWarrior95 »

Its good but when i wanted to install then windows error windows shows this text:
Windows cannont access the specified device,path, or file. You may not have the appropriate permision to access the item.

WTF is that? o.0
Il crush you!If i get crushed,il crush you twice stronger!!If you crush me again,then il blow up your PC!!
User avatar
CGi
Greenhorn
Posts: 7
Joined: 07 Jun 2010, 02:11

Re: small launcher

Post by CGi »

Mmmhh... maybe caused by the APi to check the file version by extracting this info from the games executable or by the fact, that the music is played directly from the RAM.

So some questions:
- where did you put the file (path),
- do you have full administrator rights or only partital by using the standard admin account,
- does this error come up immediately after you start the app?
Religion must die, for mankind to live.
©Religulous:Bill Maher:2008
User avatar
MetalWarrior95
Trained
Trained
Posts: 332
Joined: 16 May 2010, 01:26
Location: Trnje Neighbourhood, Zagreb, Croatia

Re: small launcher

Post by MetalWarrior95 »

1. what?
2. I think that i use fill admin rights...
3. yes
Il crush you!If i get crushed,il crush you twice stronger!!If you crush me again,then il blow up your PC!!
User avatar
CGi
Greenhorn
Posts: 7
Joined: 07 Jun 2010, 02:11

Re: small launcher

Post by CGi »

1. You need to place this program inside the Warzone 2100 game directory. if you didn't do so, the prog should tell you.
So my question is: What's the directory name, you installed the game and this program to?
2. You think? Not helpfull. Had to mess around with those things already with NSiS. So please, if you installed the game and this launcher inside the program files directory, place bothsomewhere else and check if the error still comes up.
3. Damn. So it is the Version APi. Please try the things i mentioned before, so i got at least a clue what to look at.

Edit: Due to the usage of a runtime packer, your av might block the program. Please make sure, that's not the case.
i'm already playing around with this problem and for some ppl i could already fix this problem by editing the pe-header by hand.
But this destroys the prog for others. Sorry, until i found a solution for this, you gotta take care of what your av is doing.
Religion must die, for mankind to live.
©Religulous:Bill Maher:2008
User avatar
m1ndgames
Trained
Trained
Posts: 142
Joined: 04 Jun 2010, 20:30
Location: Germany

Re: small launcher

Post by m1ndgames »

why do you use a packer? how big is the unpacked executable?

with a pepacker like upx you get a ratio of like 0.4, is it worth a false positive?
User avatar
CGi
Greenhorn
Posts: 7
Joined: 07 Jun 2010, 02:11

Re: small launcher

Post by CGi »

it's a diff of about 100KB and i'm not using UPX in this case.
But if it's really the PE-Packer who causes MetalWarrior95'S problem, i'm going to not use it again.

Strange fact: CAL: Avira does not come up with a warning, GER: Avira does come up with a warning.

P.s.: Lads mal runter m1ndgames und sag mir ob Dein AV meckert und welches Du benutzt.
Religion must die, for mankind to live.
©Religulous:Bill Maher:2008
User avatar
m1ndgames
Trained
Trained
Posts: 142
Joined: 04 Jun 2010, 20:30
Location: Germany

Re: small launcher

Post by m1ndgames »

i use linux ;)

why dont you leave the ~100kb? i mean.. its 2010! :lol2:
User avatar
CGi
Greenhorn
Posts: 7
Joined: 07 Jun 2010, 02:11

Re: small launcher

Post by CGi »

Ok. This Launcher is not meant for Linux users. No real possibility to have portable apps on this systems anyway.
Not to mention, that Linux users don't like software, that makes things easier. :P Just joking about this one.

But i think you're right. it's just that i'm using Crunchers for some time now, but now av's are somehow bitchy about them, even tho UPX is still the best choice, cuz most av's just revert the changes by unpacking the exe before scanning.
i'll remove the packer with the next realse, if there is one. For me it's done, so i'm waiting for feedback or more bug reports.
Maybe the first reported bug was already solved?

Hope you ppl like the old-school-look of the launcher. Took me some time to create it w/o making it look outdated or complicated. ^^
Religion must die, for mankind to live.
©Religulous:Bill Maher:2008
User avatar
CGi
Greenhorn
Posts: 7
Joined: 07 Jun 2010, 02:11

Re: small launcher

Post by CGi »

Sorry for double post, but i wanted to push this thread in the hope to get some feedback.

i decided to integrate support for all parameters.
And that's what i think about to include:
- catch command prompt output via named-pipe
- read maps directory from special folder %UserProfile%\Documents\Warzone 2100 ?.?.? (version number from executable will be used)
- option to move from the content the folder, mentioned before, to a new folder in case a new game version is used
- override/pre-setup of some game options like resolution
- remove the usage of runtime packers for the launcher executable
- option to start the game with specific compatibility modes, like "run as administrator"

Original purpose of the launcher, was to run a portable version of the game, where the game is packed into a single executable and loaded from RAM by using alot of wrappers, so handing over parameters was not possible and a lot of shortcuts just unhandy.
i'll still focus on portability, but this time integrate a full local support as well, like handling the UAC.

Will take some time, so i hope to get some feedback at last. Doesn't matter if you're going to use it or like it or not.
i just like Warzone and programming. i'm just not good enough at programming to contribute in any other way.
Contructive critics are always welcome.
Religion must die, for mankind to live.
©Religulous:Bill Maher:2008