Browse Source

Fix DataBundle and OpenGL being broken on Windows

master
Macoy Madson 8 months ago
parent
commit
558068c247
  1. 11
      src/DataBundle.cake
  2. 7
      src/OpenGL.cake

11
src/DataBundle.cake

@ -155,9 +155,12 @@
"cross-compile resource files.\n")
(return false)))
(true
(var rc-executable ([] 1024 char) (array 0))
(unless (resolveExecutablePath "rc.exe" rc-executable (array-size rc-executable))
(Log "error: failed to find rc.exe\n")
(return false))
(run-process-start-or current-result
;; TODO: Programmatically find this
("C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86/rc.exe"
(rc-executable
"/nologo" "/fo" cache-filename resource-definition-file)
(Log "error: failed to run Resource Compiler\n")
(return false))))))
@ -209,6 +212,10 @@
(data-bundle-get-resource (token-splice-addr resource-name-token)))
(unless (field resource start-resource)
(return false))
(declare-extern (var (token-splice start-var-name-token)
(* (token-splice base-type-start-token))))
(declare-extern (var (token-splice end-var-name-token)
(* (token-splice base-type-start-token))))
(set (token-splice start-var-name-token)
(type-cast (field resource start-resource) (* (token-splice base-type-start-token))))
(set (token-splice end-var-name-token)

7
src/OpenGL.cake

@ -247,10 +247,15 @@ void main()
(return false))
(addExecutablePermission galogen-executable))
('Windows
(var galogen-output ([] 512 char) (array 0))
(makeExecutableOutputArgument
galogen-output (sizeof galogen-output)
galogen-executable
(call-on c_str (field manager environment compileTimeBuildCommand fileToExecute)))
(run-process-sequential-or
((call-on c_str (field manager environment compileTimeBuildCommand fileToExecute))
galogen-source-file "Dependencies/galogen/third_party/tinyxml2.cpp"
"/Ox" "/EHsc")
"/Ox" "/EHsc" galogen-output)
(Log "error: failed to build galogen. This uses the compile-time build command\n")
(return false)))))

Loading…
Cancel
Save