Browse Source

Bundle files only if they are unique

master
Macoy Madson 9 months ago
parent
commit
7e49e63ec8
  1. 9
      src/DataBundle.cake

9
src/DataBundle.cake

@ -24,7 +24,10 @@
(var filename (* (const char)) (call-on c_str (path filename-token > contents)))
(get-or-create-comptime-var files-to-bundle (<> (in std vector) (in std string)))
(call-on-ptr push_back files-to-bundle filename)
(when (= (call-on-ptr end files-to-bundle)
(FindInContainer (deref files-to-bundle)
(call-on c_str (path start-var-name > contents))))
(call-on-ptr push_back files-to-bundle filename))
(comptime-cond
('Unix
@ -63,7 +66,9 @@
(var-global (token-splice end-var-name) (* (token-splice var-base-type)) null))
;; Bundle more information to use later
(get-or-create-comptime-var data-bundle-invocations (<> (in std vector) (* (const Token))))
(call-on-ptr push_back data-bundle-invocations start-var-name)
(when (= (call-on-ptr end data-bundle-invocations)
(FindInContainer (deref data-bundle-invocations) start-var-name))
(call-on-ptr push_back data-bundle-invocations start-var-name))
(return true)))
(return false))

Loading…
Cancel
Save