Inno Setup Compiler: SWBF2 directory auto-detect code

Releasing the source files for your mod or map? Post em' here. (Applies to both SWBF1 & SWBF2)

Moderator: Moderators

Resistance Leader
User avatar
Posts: 5187
Joined: Tue Feb 09, 2010 8:43 pm
Location: Edinburgh, UK
Projects :: EVERYWHERE + Zero Munge + TCW
Games I'm Playing :: Hollow Knight
xbox live or psn: Marth8880

Inno Setup Compiler: SWBF2 directory auto-detect code

Postby Marth8880 » Wed Aug 01, 2018 3:11 pm

I've finally managed to set up some custom code for Inno Setup install scripts to auto-detect SWBF2's game directory! :)

Specifically, it tries to find the registry entry for the game, and if it can't find it it checks Steam's config.vdf file for the user's Steam library locations, then checks each of those until it finds SWBF2. If it's still not found, it just defaults to the normal Program Files location.

The code (and usage notes) can be found HERE.

Jedi Admin
User avatar
Posts: 7419
Joined: Mon Aug 21, 2006 11:03 pm

Re: Inno Setup Compiler: SWBF2 directory auto-detect code

Postby Maveritchell » Thu Aug 02, 2018 12:56 pm

Smart! I'd done the first step with some installers, but had never known/thought about the second (Steam config.vdf).

Return to Released Assets

Who is online

Users browsing this forum: Bing [Bot] and 3 guests