alexeilebedev / openacr

open-source version of acr & amc
GNU General Public License v3.0
34 stars 18 forks source link

Win32 build - stage 1. Core bootstrap. #90

Open wlvchandler opened 3 months ago

wlvchandler commented 3 months ago

(Resubmitted with correct history)

Note - this is only the bootstrap portion to get a starting point for proper windows acr support. It successfully builds abt, src_hdr, src_func, and gcache build, but abt dies on an early error right now (will be handled in "stage 2"). the other binaries work as intended, verified by

  1. I wrapped all changes to cpp in #if defined(WIN32) blocks. I believe some of these changes would cause 0 issues on *nix builds - for example, casting - but better safe than sorry for now. That testing can occur later.
  2. The win32 build doesn't fit with the current workflow yet, so I added windows-specific .bat files. Dependencies are still being worked out, but this current commit just requires an openssl download (I added a script for a portable Perl download as well but it's unused)
  3. It does not work with MSVS GUI yet (at least, I haven't tried) - so the build process is running bin/win-ai.bat from the command line (works on CMD, PS and MSVS Dev command prompt):
  4. All 4 executables build, but the linker reports the following issues (TODO for next stage):
    • error LNK2019: unresolved external symbol
      • workaround for now: /FORCE:unresolved in linker argument (causes LNK4088 warning)
        • algo::Attr_ReadStrptrMaybe is user-defined
        • gcache: openssl/EVP symbols, Sha1Ctx::Sha1Ctx
    • warning LNK4042: object specified more than once; extras ignored
      • all lib.algo object files. not causing issues, but annoying
    • warning LNK4006: already defined in ; second definition ignored
      • cpp.gen.src_func_gen.obj, cpp.gen.gcache_gen.obj, cpp.gen.abt_gen.obj

      BTW - *nix builds remain unchanged. Hashes of the binaries change of course but I built and tested binaries with affected dependencies

      wlvchandler commented 3 months ago

      (force-pushed a change w/ updated gitfile)