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

harbour -build on Win10 returns wrong platform info #108

Closed
huabas opened this issue Oct 13, 2015 · 7 comments
Closed

harbour -build on Win10 returns wrong platform info #108

huabas opened this issue Oct 13, 2015 · 7 comments

Comments

@huabas
Copy link

huabas commented Oct 13, 2015

I built Harbour on my Win10.
harbour -build wrongly says that my Platform is Win 8

harbour

@alencar
Copy link

alencar commented Oct 26, 2016

For new Windows versions, all applications must specify that it was taregeted for a set of OS versions.

Need to be added to harbour-core\package\harb_win.mft:

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> 
    <application> 
        <!-- Windows 10 --> 
        <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
        <!-- Windows 8.1 -->
        <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
        <!-- Windows Vista -->
        <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> 
        <!-- Windows 7 -->
        <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
        <!-- Windows 8 -->
        <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
    </application> 
</compatibility>

Reference
GetVersion function
https://msdn.microsoft.com/pt-br/library/windows/desktop/ms724439(v=vs.85).aspx

Targeting your application for Windows
https://msdn.microsoft.com/pt-br/library/windows/desktop/dn481241(v=vs.85).aspx

@vszakats
Copy link
Member

vszakats commented Dec 16, 2016

This specific case (and other core/contrib binaries) is resolved in the 3.4 fork. General solution is indeed to include the manifest. MSYS2/mingw also does this out of the box (with some side-effects).

@alencar
Copy link

alencar commented Mar 11, 2017

Any problem in using the solution that includes the manifest section for core binaries?

The proposed solution don't touch binaries generated through harbour/hbmk2 and should not be a problem.

A solution that incorporate correct return for harbour/hbmk2 generated binaries needs more changes, but is doable (and I suggest to be treated as a second issue/feature)

@vszakats
Copy link
Member

Including the manifest will resolve the problem (as it's done in 3.4), though the related Win32 API calls used by 3.2 are all deprecated, so it's not the ultimate solution.

The goal of these manifests is to inform Windows that the user apps were actually developed to be compatible with the listed Windows versions. hbmk2 is not in the position to decide about that, so I don't think is its job to automatically insert any manifest by default.

As stated earlier, MSYS2 will automatically insert a default manifest want it or not, so using its MINGW-W64 C compiler toolchain is one solution to resolve this automatically (by now even binutils have been fixed to deal with the above linked side-effects). The other is to supply the manifest yourself.

@alencar
Copy link

alencar commented Mar 12, 2017

@vszakats the proposal is not to hbmk2 or harbour automatically insert the manifest for end user binaries (I strongly agree with you), but to harbour.exe itself (or any other core binary that shows any OS version information)

So the commands harbour -build or hbmk2 -build can show correct OS info.

@vszakats
Copy link
Member

@alencar For Harbour's own binaries I definitely agree, 3.4 is doing that exactly: https://github.com/vszakats/harbour-core/blob/4aa1879caeb1d623616c403054ddde2a157a33b8/package/harbour.rc#L59-L109

@alcz
Copy link
Contributor

alcz commented Feb 11, 2018

"harbour -build" should be correct after set of changes ending with 8545d4b
Build tested here with old MSVC and OpenWatcom.

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

No branches or pull requests

4 participants