How to build Hugor

This is a discussion / support forum for the Hugo programming language by Kent Tessman. Hugo is a powerful programming language for making text games / interactive fiction with multimedia support.

Hugo download links: https://www.generalcoffee.com/hugo
Roody Yogurt's Hugo Blog: https://notdeadhugo.blogspot.com
The Hugor interpreter by RealNC: http://ifwiki.org/index.php/Hugor

Moderators: Ice Cream Jonsey, joltcountry

User avatar
RealNC
Posts: 2301
Joined: Wed Mar 07, 2012 4:32 am

How to build Hugor

Post by RealNC »

ICJ asked about this a while ago, so I'm writing this here for future reference.

To create Linux and Windows builds, you need a Docker installation that can run Linux docker images. Whether you run Docker on Linux, Windows or macOS doesn't matter. All that's needed is that it can run Linux docker images.

To create macOS builds, you can't use Docker, and you need macOS with XCode installed, and it might not work if your system is too different from mine, because Apple are a bunch of elitist hipsters who despise humans since their parents didn't love them enough and now they hate everyone and want to take revenge on innocent people who are not to blame for any of this.

The directory where you downloaded and extracted the Hugor source code will be referred to as HUGOR_SRC_DIR.

Create 64-bit Linux AppImage

Code: Select all

docker run --rm -it -v "HUGOR_SRC_DIR":/hugor/src -w /hugor/build realnc/hugor-build:linux-x64 bash -c 'qmake ../src && make appimage && mv *.AppImage ../src'
This will create Hugor-x86_64.AppImage in HUGOR_SRC_DIR.

Create 32-bit Linux AppImage

Code: Select all

docker run --rm -it -v "HUGOR_SRC_DIR":/hugor/src -w /hugor/build realnc/hugor-build:linux-x86 bash -c 'qmake ../src && make appimage && mv *.AppImage ../src'
This will create Hugor-i386.AppImage in HUGOR_SRC_DIR.

Create Windows Build

Code: Select all

docker run --rm -it -v "HUGOR_SRC_DIR":/hugor/src -w /hugor/build realnc/hugor-build:mxe-x86 bash -c 'i686-w64-mingw32.static-qmake-qt5 ../src && make windist && mv Hugor-*.zip ../src'
This will create Hugor-VERSION.zip in HUGOR_SRC_DIR.

Create macOS Build
Because hipsters are stuck in the 90s, none of this can really be automated and isolated like the other builds can. So instead of just running one single command to build, you instead get to enjoy the hipster experience of entering a long series of computer gibberish that will probably end up not working anyway, which is normal when dealing with things hipsters made.

You need to install XCode. 12.4 is known to work. Because XCode is the most hipster thing the hipsters ever made, a version that's too old or too new might not work.

If you have Homebrew installed, it can break the build. Move your homebrew installation out of the way first. This is how hipsters design software. You can do something like:

Code: Select all

mkdir ~/homebrew-backup
sudo mv /usr/local/* ~/homebrew-backup/
To restore it later on after you're done (or more likely after all this has failed and you're ready to kill yourself):

Code: Select all

sudo rm -rf /usr/local/*
sudo mv ~/homebrew-backup/* /usr/local/
Because zstd was not invented in the 90s and thus hipsters don't use it, macOS doesn't ship it. Download it and put it somewhere in your PATH:

Code: Select all

sudo mkdir /usr/local/bin
curl -L 'https://github.com/realnc/stuff/releases/download/stuff/zstd-macos.tar.xz' | sudo tar x -C /usr/local/bin/
Now install a specially crafted version of Homebrew that I modified to be less hipster than normal Homebrew. (It will produce a build of Hugor that is portable and can run on other macOS versions and not just the one you're using.) It needs to be installed in /Users/Shared:

Code: Select all

curl -L 'https://github.com/realnc/stuff/releases/download/stuff/homebrew-qtads-hugor.tar.zst' | zstd -d | tar x -C /Users/Shared/
Now you must disable the hipster tendency of homebrew to "update" your installation even if you didn't ask it to and thus break everything:

Code: Select all

export HOMEBREW_NO_AUTO_UPDATE=1
Now it's safe to set the needed environment variables with:

Code: Select all

eval $(/Users/Shared/homebrew-qtads-hugor/bin/brew shellenv)
export PKG_CONFIG_PATH="$HOMEBREW_PREFIX/opt/readline/lib/pkgconfig"
Next, download the Qt SDK. You can download it anywhere you want to. Here, we'll just put it in the home directory:

Code: Select all

curl -L 'https://github.com/realnc/stuff/releases/download/stuff/qt-5.15-macos-static.tar.zst' | zstd -d | tar x -C ~
If you haven't killed yourself yet, then you need to download LibVLC next. It needs to go to /usr/local:

Code: Select all

curl -L 'https://github.com/realnc/stuff/releases/download/stuff/vlc-3.0.16-macos.tar.zst' | zstd -d | sudo tar x -C /usr/local/
Now Hugor can be built. Or attempted to be built, more likely. Create a "hugor-build" directory first that's on the same root directory as HUGOR_SRC_DIR:

Code: Select all

cd "HUGOR_SRC_DIR"/..
mkdir hugor-build
cd hugor-build
Now build with:

Code: Select all

~/qt-5.15/bin/qmake "HUGOR_SRC_DIR"
make macdist
This will create Hugor.zip in the current directory. Or it might not. Because hipsters.

User avatar
RealNC
Posts: 2301
Joined: Wed Mar 07, 2012 4:32 am

Re: How to build Hugor

Post by RealNC »

Also, if I made any mistakes in the post, I can't fix them, because I can't edit my posts here.

User avatar
Jizaboz
Posts: 5474
Joined: Tue Jan 31, 2012 2:00 pm
Location: USA
Contact:

Re: How to build Hugor

Post by Jizaboz »

Bro, thanks again for all of this. You are making the obscure plain and modernizing many things. I really am still bouncing around the idea of after my current mobile app game to try to get DPRK into a state that isn't painful on mobile. Maybe it's because I listened to Flack talk about Maniac Mansion on Sprite Castle today as I mowed the yard.. but part of me thinks back to when I was prototyping my "Interactive Dreaming" game in I7. Basically the idea of having shit that you expect the player to type all the fucking time just be something you can click somewhere. Compass directions was my biggest nag. I totally digged clicking the compass in the Spellcasting 101-301 games to move rather than type out directions. Basic verbs like "look" as we type a thousand times should just be a click. If the game has choices for conversation, I should be able to click them rather than have to type "1" and hit enter.

I should add this isn't not only for my own game or mobile platforms. The more I think about Cyberganked the more I envision an interactive fiction world meshed with a CRPG engine like Wizardry. (I think Robb agrees on this but please correct me if I'm dumb) So things like "ATTACK" "PASS" etc, things I know I will be constantly typing in.. if it all possible I would rather there be an action tied to a GUI element. The British system called "QUEST" I messed with when it was first getting started intrigued me in this factor.. I was working out how a Spy Vs Spy game could work on nothing but clicks within the system.

Anyway, bit of a mind-dump on what I love about Hugo and what I hope the future may hold. Also, as Trevor from GTAV sez.. "I fucking HATE hipsters!" lol
(╯°□°)╯︵ ┻━┻

User avatar
Ice Cream Jonsey
Posts: 30175
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Re: How to build Hugor

Post by Ice Cream Jonsey »

Thank you for documenting this and also fighting with the garbage infrastructure we have had forced upon us.
the dark and gritty...Ice Cream Jonsey!

User avatar
Ice Cream Jonsey
Posts: 30175
Joined: Sat Apr 27, 2002 2:44 pm
Location: Colorado
Contact:

Re: How to build Hugor

Post by Ice Cream Jonsey »

If I could figure out how to turn on editing I would.
the dark and gritty...Ice Cream Jonsey!

User avatar
Tdarcos
Posts: 9556
Joined: Fri May 16, 2008 9:25 am
Location: Arlington, Virginia
Contact:

Re: How to build Hugor

Post by Tdarcos »

Ice Cream Jonsey wrote: Thu May 12, 2022 11:19 am If I could figure out how to turn on editing I would.
"If I could turn on editing
I would find a way
To take all those diffs that broke the build
And you'd stay."
"When I die, I want it easy and peaceful in my sleep, like my uncle.
Not screaming and crying like his passengers."

Post Reply