Commit 4ed616c8 authored by Adam Štěpánek's avatar Adam Štěpánek
Browse files

Add build instructions

parent d000e278
Loading
Loading
Loading
Loading

README.ad

0 → 100644
+90 −0
Original line number Diff line number Diff line
= HASH: HASH Ain't Simple Hash

Motivation.

== Technologies Used

Docker::
A thing that runs a thing inside an isolated operating system.

Bash::
A script interpreter.

PowerShell::
Another script interpreter.

Processing::
A Java library for generating stuffs.

p5.js::
A Processing clone written in JavaScript.

Firefox::
A web browser / p5.js renderer.

Blender::
A 3D modeling and rendering thing.

ImageMagick::
A command-line tool that changes images.

Libman::
A library manager that isn't npm.

Xvfb::
A dummy X server.

== Instructions

.Reference Build
* Import the provided Docker image using `docker image import`, or
* pull the Docker image from link:https://hub.docker.com/r/cafstep/hash[Dockerhub].

.Manual Build
1. Make sure you have a computer that supports Docker (tested in WSL2), good internet connection, and plenty of disk space.
2. Make sure you have link:https://www.docker.com/[Docker]
    and link:https://docs.microsoft.com/en-us/aspnet/core/client-side/libman[Libman] installed.
3. Run `build.ps1` (or `libman restore` and `docker build`).

=== Execution on Windows

If you can, use the `./run.ps1` script. You have several options:

* Use a pre-computed SHA256 fingerprint:
+
[source, powershell]
----
./run.ps1 -Hash "f5e42602c9f8409e695c317202105bef68248ec97660a648259e758afd8e1918"
----

* Use a string as a seed:
+
[source, powershell]
----
./run.ps1 -Seed "42"
----

* Let the script compute the SHA256 of a file:
+
[source, powershell]
----
./run.ps1 -Path "C:/path/to/a/file.bin"
----

* Additionally, you can specify desired width and height of the output image:
+
[source, powershell]
----
./run.ps1 -Seed "HASH" -Width 3840 -Height 2160
----

* To print more verbose information:
+
[source, powershell]
----
./run.ps1 -Seed "Mugtus" -Debug
----

=== Execution on Linux

You have my full confidence. Good luck!

README.txt

deleted100644 → 0
+0 −5
Original line number Diff line number Diff line
= HASH

HASH Ain't Simple Hash

A final project of PV259 Generative Design Programming.
+1 −1
Original line number Diff line number Diff line
@@ -43,7 +43,7 @@ for L in /scripts/layouts/*.sh; do
        source $L
        HRANDOM=0
        run
        NAME=$(basename $E .sh)
        NAME=$(basename $L .sh)
        TESTOUT="/testout/layouts/$NAME.png"
        cp $OUT $TESTOUT
        pdebug "Saved to '$TESTOUT'"
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ var funColors = [
function decks(options) {
    push();
    const {funColor, width, height, margin, step, spacing, cardSize, cardCount} = options;
    resizeCanvas(width, height);
    // resizeCanvas(width, height);
    background(256);

    noStroke();