Author Topic: Creating FF7 mod installers *need some info*  (Read 4199 times)

pyrozen

  • *
  • Posts: 791
  • Team Avalanche Member
    • View Profile
Creating FF7 mod installers *need some info*
« on: 2010-11-03 19:44:01 »
I'm putting together an installer that i want to be able to find FF7 locations and automatically put files into the respective folders. I have this part figured out, but only on a winXP machine. Can you guys tell me where your FF7 registry entries reside within your computer, preferably on a Vista and Win7 machine. im looking for max compatibility, so having all three will allow the installer to work the same on any of them. I know a few of you have created these already, i've never toyed with installers before so it's more of a experiment than anything else at this point.

Also, what are the registry entries that pertain to Aali's custom driver? I would also like to run a check before install begins that will abort the install if the driver is not found.

Thanks!
lee

Covarr

  • Covarr-Let
  • Administrator
  • *
  • Posts: 3941
  • Just Covarr. No "n".
    • View Profile
Re: Creating FF7 mod installers *need some info*
« Reply #1 on: 2010-11-03 20:16:33 »
Any chance you're using NSIS? You can get FF7's install directory this way:
Code: [Select]
SetRegView 32
ReadRegStr $FF7DIR HKLM "Software\Square Soft, Inc.\Final Fantasy VII\" "AppPath"
It doesn't matter if you're on XP, Vista, or 7. What *DOES* matter is whether you're using x86 or x64, but this bit of code above accounts for both.

If you're not using NSIS, just remember that in 64-bit Windows, it's in "HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Square Soft, Inc.\Final Fantasy VII". Identical to the 32-bit entry, but with "Wow6432Node" in the middle.

Additionally, Aali's driver does not set registry entries anymore. I advise checking to see if the config file exists in the install directory. Again, here's a bit of NSIS code that can do this for you:
Code: [Select]
IfFileExists $FF7DIR\ff7_opengl.cfg +3 0
MessageBox MB_OK "Error: Aali's Custom Graphics Driver is required."
Quit
Obviously, it'll have to be adapted to whatever variable names you're using. If you're using something other than NSIS, the code will be different, but the same basic principles should apply.

pyrozen

  • *
  • Posts: 791
  • Team Avalanche Member
    • View Profile
Re: Creating FF7 mod installers *need some info*
« Reply #2 on: 2010-11-03 21:06:51 »
high five corvarr! That's exactly the info i was looking for. I'm not using NSIS, but after looking it over i think i am going to switch to it. I was using CreateInstall, but the freeware version is very limited in a lot of functionality, while NSIS is free.

lee

sl1982

  • Administrator
  • *
  • Posts: 3764
  • GUI Master :P
    • View Profile
Re: Creating FF7 mod installers *need some info*
« Reply #3 on: 2010-11-04 00:04:21 »
Why didnt you just ask me pyrozen? I did write the avalanche installer after all.

pyrozen

  • *
  • Posts: 791
  • Team Avalanche Member
    • View Profile
Re: Creating FF7 mod installers *need some info*
« Reply #4 on: 2010-11-04 03:11:37 »
Why didnt you just ask me pyrozen? I did write the avalanche installer after all.
honestly, i have no idea why i didn't think of that. I just got it in my head to write and installer and away i went! Trying to get familiar with NSIS, it's definitely more advanced than what i was using, which was GUI based.

I would really appreciate it if you could send me a copy of the .nsi that you used to compile the last TA patch. I'm interested in seeing how a whole installer fits together. The tutorials explained alot, but i want to see something more substantial.

lee

DLPB_

  • Banned
  • *
  • Posts: 11006
    • View Profile
Re: Creating FF7 mod installers *need some info*
« Reply #5 on: 2010-11-04 05:26:51 »
If NSIS becomes too difficult, have a try with inno

pyrozen

  • *
  • Posts: 791
  • Team Avalanche Member
    • View Profile
Re: Creating FF7 mod installers *need some info*
« Reply #6 on: 2010-11-07 19:11:14 »
okay, so i have the code in place, but i am not returning a value for $FF7DIR when i place it in the "InstallDir". All i get is a blank box when i get to the screen that displays install location. I have set FF7DIR as a variable at the start of my install, so im not sure what i am doing wrong. I assume it is pulling the correct value out of the registry, but is there any way to be sure of this? I have the registry value becoming captured with a .OnInit command nears the beginning of my install.

I feel like i am using the code properly, but i can't tell what exactly is going wrong to make things not work! The NSIS wiki is also uninformative, and is written for someone who is much more experienced at programming than i am.

*EDIT*
Okay, sl set me his script and it has cleared up alot of my confusion. Now i have a question...
I was declaring FF7DIR as my variable in my ReadRegStr, but it was not translating as my FF7 installation directory when i placed SetOutPath $FF7DIR

Why?????Once i swapped FF7DIR for INSTDIR as Sl did, everything is working fine now.
« Last Edit: 2010-11-07 19:58:26 by pyrozen »