Odie / skyui-vr

SkyUI interface mod for SkyrimVR
MIT License
160 stars 27 forks source link

Curious on how to build from source #69

Closed tippisum closed 1 year ago

tippisum commented 2 years ago

When I try to build this project on my own computer from source, Adobe Flash pops up dialogs stating that some fonts are missing in my system and need to be substituted. I would like to know what is the prerequesites and required steps for building this project?

Build machine environment: Windows 10 Enterprise 21H2 Adobe Flash CS6 MSYS2

Steps I've tried for building:

  1. Clone this repo.
  2. Fixup misc/Flash Util/build-all.jsfl to point flaFiles and logfile to the cloned repo.
  3. Install Futura Std fonts systemwide.
  4. (Adobe Flash) Commands -> Run Command... -> misc/Flash Util/build-all.jsfl

What I've encountered:

  1. When building itemcard.fla, a "Font mapping" dialog poped up saying Dragon_script font is missing.
  2. When building bottonArt.xfl, the same dialog poped up again, this time stating a font is missing with a blank name.
  3. After I extracted Dragon_script from Skyrim_VR - Main.bsa/interface/fonts_en.swf and installed this font, I tried again, this time the itemcard.fla says it wants DragonScript-Regular font, and it insists on this name even if I tried again from the very beginning (delete all files, uninstall all fonts and restart from cloning the repo).

By using JPEXS I believe that the correct name for the font used in building itemcard.fla should be Dragon_script and the font used in building bottonArt.xfl should be Futura-CondensedLight-Normal. Nevertheless, Adobe Flash keeps asking me for missing fonts with wrong names, so I doubt that I either missed some prerequesites or did the wrong build step.

Would you mind briefly outline the steps required to build this project from source?

Odie commented 2 years ago

TLDR:


About font errors

Apparently, scaleform will load up "gfxfontlib.swf" and import the included font at runtime. So, the correct fonts will still show up correctly in-game. I've just been ignoring those errors. You don't want to mess with the font setup and accidentally embed fonts directly into the swf files themselves. See the docs here

Building project

You can find the build script by the original skyui team at "dist/make_all.pl". I couldn't figure out what environment to run the scripts in correclty. I think I tried a few different environments for running perl and none of them worked right.

When I make a change to the flash programs, I'd run "misc/Flash Util/build-all.jsfl" from the Flash, then run "misc/cp-built-files" to copy over any files that have changed to a specific location. The location can be defined via $SKYUIVR_TEST_DIR or just given as the first param. When all seems to be working correctly, I'd just pack up that directory with "misc/pack-release".

So... I don't have a script that can just build everything in one go. It's just overwriting a directory that has already been prepped for distribution. It's not ideal, but it kinda works? x_x