Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: add NSIS generator settings #29

Merged
merged 3 commits into from Jul 17, 2014
Merged

CMake: add NSIS generator settings #29

merged 3 commits into from Jul 17, 2014

Conversation

Mixaill
Copy link
Contributor

@Mixaill Mixaill commented Jul 13, 2014

  • Add icon to VCMI_client and VCMI_launcher for cmake/windows build.
  • Add ability to build NSIS .exe installers.

How-to build:

  • .exe - cpack -G NSIS
  • .zip - cpack -G ZIP

Output format:
vcmi-x.xx-win32.(exe|zip)

Example:
vcmi-0.96-win32.exe

@IvanSavenko
Copy link
Member

  • Stripping files - probably not needed. If we want to have debug info we can set build type to RelWithDebInfo and if we want "clear" release - then build type can be set to Release.
  • Install directory - as of now VCMI must be installed in the same directory as H3. We need to either:
    • Detect H3 location from registry. Something like HKLM\Software\NWC\HoMM3\AppPath.
    • Or, at least install it into default location of H3 (I think that's something like Program Files\NWC\HoMM3)
    • Another option is to make H3 directory configurable via Launcher. See VCMIDirs::dataPaths().

@Mixaill
Copy link
Contributor Author

Mixaill commented Jul 14, 2014

There is problem. Different versions of HoMM3 (NWC/3DO, GOG.com, Buka) use different registry keys.

GOG.com (Probably 3DO too)

  • HKEY_LOCAL_MACHINE\SOFTWARE\New World Computing\Heroes of Might and Magic® III\1.0

Buka

  • HKEY_LOCAL_MACHINE\SOFTWARE\Buka\3DO\Heroes of Might and Magic III Complete Platinum\1.0

@alexvins
Copy link
Member

I think vcmi should first look into data path in config if it is not set then pull registry and if nothing found may be try also vcmi installation path. If data was found, save path in config or complain and return otherwise.

@IvanSavenko
Copy link
Member

@alexvins
Something like this would be useful BUT only as some way to detect proposed data path - for example when player starts Launcher and if data files are missing show dialog asking him to locate H3 files. Starting location in this dialog would be auto-detected one.

Using search like this is a good idea but player still must select preferred data - in case of multiple installs for example.

@Mixaill
Copy link
Contributor Author

Mixaill commented Jul 17, 2014

I think it is task for another pull request.

@IvanSavenko
Copy link
Member

Yes. Then I'll update my first comment here:

  • Stripping files - probably not needed. If we want to have debug info we can set build type to RelWithDebInfo and if we want "clear" release - then build type can be set to Release.
  • Install directory - as it, installing VCMI with default settings will result in non-functional game. Comment like "Please select your H3 location" would be useful for now.

If you wish to keep both of these as it - I'm OK with that, just want to hear your opinion on these.

@Mixaill
Copy link
Contributor Author

Mixaill commented Jul 17, 2014

Stripping files - probably not needed. If we want to have debug info we can set build type to RelWithDebInfo and if we want "clear" release - then build type can be set to Release.

fixed

Install directory - as it, installing VCMI with default settings will result in non-functional game. Comment like "Please select your H3 location" would be useful for now.

Uh. This is non-trivial to do with CPack and NSIS. I think it's better to leave it as is

@IvanSavenko
Copy link
Member

Ok, merged. Any volunteers to implement data directory selection for Launcher?

EDIT: created issue on Mantis, to keep this tracked: http://bugs.vcmi.eu/view.php?id=1845

IvanSavenko added a commit that referenced this pull request Jul 17, 2014
CMake: add NSIS generator settings
@IvanSavenko IvanSavenko merged commit 4fca583 into vcmi:develop Jul 17, 2014
@Mixaill
Copy link
Contributor Author

Mixaill commented Jul 17, 2014

Ok, merged. Any volunteers to implement data directory selection for Launcher?

I'm trying to do it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants