Install permutationpuzzles

  • 1.Install Java
  • 2.Install JOGL
  • 3.Install permutationpuzzles
  • 3-1.Install by installer
  • 3-2.Manual installation
  • 3-3.Install from source
  • 4.Update
  • 5.Launch permutationpuzzles
  • 1. Install Java Runtime environment.

    If you have already installed Java Runtime Environment later than v19, you can skip this step.
    Otherwise, visit www.java.com" and follow instructions.

    2.Install JOGL.

    If you have already installed JOGL, you can skip this step.
    1. Visite here and download jogamp-all-platforms.7z.
    2. Extract the downloaded archive under the directory of your choice.

    3.Install permutationpuzzles

    3.1 Install by installer

    This method is abolished due to the security policy of the host.
    The old installer no longer works.

    3.2 Manual installation

    1. Open a terminal window (or a command prompt for Windows).
    2. Create a directory "permuzzle".
    3. Download permuzzle.jar and images.zip to the directory created above. The new version read images directly from the zip file. So no need to extract images.

    3.3 Installation from source (for Linux only)

    1. Install JDK(v19 or later), if you don't have yet. For details, see www.java.com.
    2. Execute the following shell-script after changing "localhost" to this site.
    #!/bin/bash
    HOSTNAME="localhost"                 # hostname of sources
    APPDIR=`pwd`/permuzzle               # installation directory
    TEMPDIR=`mktemp -d`                  # make a temprary directory
    cd $TEMPDIR                          # change to the temprary directory
    wget $HOSTNAME/permuzzle/sources.zip # download "sources.zip"
    unzip sources.zip                    # extract "sources.zip"
    rm sources.zip                       # delete  "sources.zip"
    gedit makefile                       # edit "makefile"
    make                                 # compile sources 
    mkdir $APPDIR                        # make the target directory
    cp permuzzle.jar $APPDIR             # copy "permuzzle.jar"
    cd $APPDIR                           # change to the target directory
    rm -r $TEMPDIR                       # delete the temporary direcory
    wget $HOSTNAME/permuzzle/images.zip  # download "images.zip"
    
    
    Before "make", modify "makefile" if necessary
    ODIR = .# class file directory
    SDIR = ./permuzzle.java# source root
    JDK_PATH=/opt/jdk-19.0.2/bin
    JOGLDIR=/opt/jogamp-all-platforms/jar
    

    4.Update

    Just download and overwrite permuzzle.jar and images.zip.

    5.Launch permutationpuzzles

  • Open the script file ("run.sh" for Linux and "run.bat" for Windows) under the installation folder.
  • If the file doesn't exist create one by a text editor and copy&paste the contents below.
  • Modify the parts in red to fit your installation environment.
  • Open a terminal window(command prompt for Windows),and change the directory.
  • Type "chmod 744 run.sh" and type "./run.sh" (for Linux).
  • Type "run" (for Windows).

    run.sh

    #!/bin/bash
    JAVADIR=/opt/jdk-19.0.2/bin           #JAVA directory
    JOGLDIR=/opt/jogamp-all-platforms/jar #JOGL directory
    APPDIR=$HOME/permuzzle                #application directory
    cd $APPDIR                            #change current directory
    if [ -d jar ]; then                   #check if a symbolic link to JOGL already exists
            :
    else
            ln -s $JOGLDIR $APPDIR        #create a symbolic link to JOGL 
    fi
    $JAVADIR/java -jar permuzzle.jar      #Run jvm(absolute path required for Gnome launcher).
    

    run.bat for JRE8(official runtime at April 2024)

    set JOGLDIR=C:\Users\user\jogamp-all-platforms\jar
    set APPDIR=C:\Users\user\permuzzle
    set JAVADIR=C:\program" "files\java\jre-1.8\bin
    cd %APPDIR%
    %JAVADIR%\java ^
    -cp permuzzle.jar;%JOGLDIR%\gluegen-rt.jar;%JOGLDIR%\jogl-all.jar ^
    jzzz.CStart
    

    run19.bat (for JRE19 or later)

    set JOGLDIR=C:\Users\user\jogamp-all-platforms\jar
    set APPDIR=C:\Users\user\permuzzle
    set JAVADIR=C:\program" "files\java\jdk-19.0.2\bin
    cd %APPDIR%
    %JAVADIR%\java --add-exports java.base/java.lang=ALL-UNNAMED ^
    --add-exports java.desktop/sun.awt=ALL-UNNAMED ^
    --add-exports java.desktop/sun.java2d=ALL-UNNAMED ^
    -cp permuzzle.jar;%JOGLDIR%\gluegen-rt.jar;%JOGLDIR%\jogl-all.jar ^
    jzzz.CStart