diff --git a/LISEZMOI b/LISEZMOI new file mode 100644 index 0000000..ea87c6e --- /dev/null +++ b/LISEZMOI @@ -0,0 +1,18 @@ + +Ce programme est sous license libre sans aucune garantie de quelque sorte. + +Il s'agit d'un générateur de labyrinthes écrit en langage java. + +Pour le lancer vous devez avoir installé un environnement java 8 ( avec javafx (*) ) + +java -jar artloglaby-1.0.jar + +mail pl@artisanlogiciel.net + +vous pouvez le distribuer ou bien même le vendre + +ses sources sont sur https://github.com/artlog/labystl +( et utilise aussi https://github.com/artlog/sharedrawweb ) + + + diff --git a/README b/README index a16e4c2..c1423d6 100644 --- a/README +++ b/README @@ -1,6 +1,8 @@ This is a personal project to generate a 2D maze using in depth path generation. +Download the 'latest' laby.zip containing java jar from my blog http://blog.artisanlogiciel.net/public/tech/laby.zip + this can generate a stl file, overall goal was to print it with a 3D printer, i didn't test it yet ( even if i actualy have a 3D printer ). This is the very first usable part. @@ -22,11 +24,16 @@ git clone https://github.com/artlog/labystl.git cd labystl ./init.sh # will create build scripts from artlog_toolbox -./doit.sh -ant -run +# ./doit.sh +ant dist +source ./specificdoit.sh; create_zip_package +unzip laby.zip; cd artloglaby ; ./laby.sh _______________________________________________ +Save raw will actualy create a stl file +together with raw file +______________________________________________ + it ask for three integers : X Y maxpath @@ -51,4 +58,5 @@ It was tested up to 1000x1000 labyrinth and can realy generate huge labyrinth. Entry of labyrinth is upper left corner, exit is lower right ( this is different in 3D since Y axis where reversed ). BUGS are numerous, and every bug was cleverly designed to drive you mad. -DOCUMENTATION is self contained in code an in my brain. +DOCUMENTATION is self contained in code an was in my brain, currenlty vanishing... + diff --git a/java/org/artisanlogiciel/util/UTF8Control.java b/java/org/artisanlogiciel/util/UTF8Control.java new file mode 100644 index 0000000..7f459fc --- /dev/null +++ b/java/org/artisanlogiciel/util/UTF8Control.java @@ -0,0 +1,49 @@ +package org.artisanlogiciel.util; + +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.IOException; +import java.net.URL; +import java.net.URLConnection; +import java.util.PropertyResourceBundle; +import java.util.ResourceBundle; +import java.util.ResourceBundle.Control; +import java.util.Locale; + +/** + UTF8Control borrowed for Stackoverflow +https://stackoverflow.com/questions/4659929/how-to-use-utf-8-in-resource-properties-with-resourcebundle#4660195 + **/ +public class UTF8Control extends Control { + public ResourceBundle newBundle + (String baseName, Locale locale, String format, ClassLoader loader, boolean reload) + throws IllegalAccessException, InstantiationException, IOException + { + // The below is a copy of the default implementation. + String bundleName = toBundleName(baseName, locale); + String resourceName = toResourceName(bundleName, "properties"); + ResourceBundle bundle = null; + InputStream stream = null; + if (reload) { + URL url = loader.getResource(resourceName); + if (url != null) { + URLConnection connection = url.openConnection(); + if (connection != null) { + connection.setUseCaches(false); + stream = connection.getInputStream(); + } + } + } else { + stream = loader.getResourceAsStream(resourceName); + } + if (stream != null) { + try { + // Only this line is changed to make it to read properties files as UTF-8. + bundle = new PropertyResourceBundle(new InputStreamReader(stream, "UTF-8")); + } finally { + stream.close(); + } + } + return bundle; + } +}