summaryrefslogtreecommitdiff
path: root/config/izpack/registry
diff options
context:
space:
mode:
Diffstat (limited to 'config/izpack/registry')
-rw-r--r--config/izpack/registry/bin/ICE_JNIRegistry.dllbin65536 -> 0 bytes
-rw-r--r--config/izpack/registry/bin/readme.txt50
-rw-r--r--config/izpack/registry/bin/registry.jar.desired.sha11
-rw-r--r--config/izpack/registry/bin/setenv.jar.desired.sha11
-rw-r--r--config/izpack/registry/src/MANIFEST.MF3
-rw-r--r--config/izpack/registry/src/Main.java120
6 files changed, 0 insertions, 175 deletions
diff --git a/config/izpack/registry/bin/ICE_JNIRegistry.dll b/config/izpack/registry/bin/ICE_JNIRegistry.dll
deleted file mode 100644
index 5463a70a40..0000000000
--- a/config/izpack/registry/bin/ICE_JNIRegistry.dll
+++ /dev/null
Binary files differ
diff --git a/config/izpack/registry/bin/readme.txt b/config/izpack/registry/bin/readme.txt
deleted file mode 100644
index 19b8731936..0000000000
--- a/config/izpack/registry/bin/readme.txt
+++ /dev/null
@@ -1,50 +0,0 @@
-
- Windows Registry API Native Interface
-
-*Release 3.1.3, September 11, 2003*
-
-The com.ice.jni.registry package is a Java native interface for the
-Windows Registry API. This allows Java program to access, modify, and
-export Windows Registry resources.
-
-The com.ice.jni.registry package has been placed into the public domain.
-Thus, you have absolutely no licensing issues to consider. You may do
-anything you wish with the code. Of course, I always appreciate it when
-you properly credit my work.
-
-The package will work only with Java 1.1 and greater, and uses the
-Javasoft native interface, not the Netscape interface. The package also
-includes a DLL that implements the interface. The package has been used
-with JDK1.2, and JDK1.3, JDK1.4, as well as JDK1.1.8.
-
-The package includes the pre-built DLL (debug and release), source code
-(both the Java and the DLL's C code), as well as the compiled Java classes.
-
-The original release was posted on November 17, 1997. The current
-release is 3.1.3, which was posted on September 11, 2003.
-
-Email me if you have questions. <mailto:time@gjt.org>
-
-
- View The Source Code
-
-You can now directly view the JNIRegistry source code
-<http://www.gjt.org/servlets/JCVSlet/list/ice/com/ice/jni/registry/> and
-source code documentation
-<http://www.gjt.org/javadoc/com/ice/jni/registry/package-summary.html>
-online via the Giant Java Tree. <http://www.gjt.org>
-
-
- Downloads
-
-Download the WinZip-ed package. (FTP)
-<ftp://ftp.gjt.org/pub/users/time/java/registry-3.1.3.zip>
-
-Download the WinZip-ed package. (HTTP)
-<http://www.gjt.org/download/time/java/jnireg/registry-3.1.3.zip>
-
-
-------------------------------------------------------------------------
-* All contents are copyrighted (c) by ICE Engineering, Inc. *
-http://www.trustice.com/ --- http://www.icetoo.com/
-
diff --git a/config/izpack/registry/bin/registry.jar.desired.sha1 b/config/izpack/registry/bin/registry.jar.desired.sha1
deleted file mode 100644
index 634c7ec706..0000000000
--- a/config/izpack/registry/bin/registry.jar.desired.sha1
+++ /dev/null
@@ -1 +0,0 @@
-54ed7dd49e6370b92f67acc20b43a32f4373343f ?registry.jar
diff --git a/config/izpack/registry/bin/setenv.jar.desired.sha1 b/config/izpack/registry/bin/setenv.jar.desired.sha1
deleted file mode 100644
index 30ace1f6cc..0000000000
--- a/config/izpack/registry/bin/setenv.jar.desired.sha1
+++ /dev/null
@@ -1 +0,0 @@
-6cd4b4e5799e861e00d1307f4e0ecd16ee3188cd ?setenv.jar
diff --git a/config/izpack/registry/src/MANIFEST.MF b/config/izpack/registry/src/MANIFEST.MF
deleted file mode 100644
index a99365f10a..0000000000
--- a/config/izpack/registry/src/MANIFEST.MF
+++ /dev/null
@@ -1,3 +0,0 @@
-Manifest-Version: 1.0
-Created-By: 1.4.2_09 (Sun Microsystems Inc.)
-Main-Class: Main
diff --git a/config/izpack/registry/src/Main.java b/config/izpack/registry/src/Main.java
deleted file mode 100644
index 6f5ee96bfd..0000000000
--- a/config/izpack/registry/src/Main.java
+++ /dev/null
@@ -1,120 +0,0 @@
-// File : Main.java
-// Project : Scala
-// Author(s) : Stephane Micheloud (mics)
-// Environment: JNI Registry 3.1.3, Sun JDK 1.4.2_09
-// Version : 01
-// Created : 25.09.2005/mics
-// Modified : -
-
-
-import com.ice.jni.registry.NoSuchKeyException;
-import com.ice.jni.registry.NoSuchValueException;
-import com.ice.jni.registry.Registry;
-import com.ice.jni.registry.RegistryException;
-import com.ice.jni.registry.RegistryKey;
-import com.ice.jni.registry.RegistryValue;
-import com.ice.jni.registry.RegMultiStringValue;
-import com.ice.jni.registry.RegStringValue;
-
-public class Main {
-
- private static final String PATH = "PATH";
- private static final String SCALA_HOME = "SCALA_HOME";
- private static final String SCALA_BIN = "%" + SCALA_HOME + "%\\bin";
-
- private static void updateRegistry(String homePath, String fullName) throws RegistryException {
- // HKEY_CURRENT_USER\Environment
- RegistryKey envKey = Registry.openSubkey(
- Registry.HKEY_CURRENT_USER,
- "Environment",
- RegistryKey.ACCESS_ALL);
- if (homePath != null) {
- // set home directory
- RegStringValue data = new RegStringValue(envKey, SCALA_HOME, homePath);
- envKey.setValue(data);
- // update user path
- String path = envKey.getStringValue(PATH);
- if (path.indexOf(SCALA_BIN) < 0) {
- int inx = path.lastIndexOf(";");
- StringBuffer buf = new StringBuffer(path);
- if (0 < inx && inx < path.length()-1)
- buf.append(";");
- buf.append(SCALA_BIN);
- data = new RegStringValue(envKey, PATH, buf.toString());
- envKey.setValue(data);
- }
- }
- else { // uninstall
- // remove home directory
- try {
- envKey.deleteValue(SCALA_HOME);
- }
- catch (NoSuchValueException e) {
- // do nothing
- }
- String path = envKey.getStringValue(PATH);
- int inx1 = path.indexOf(SCALA_BIN);
- if (inx1 >= 0) {
- int inx2 = path.indexOf(";", inx1);
- StringBuffer buf = new StringBuffer(path.substring(0, inx1));
- if (inx2 >= 0)
- buf.append(path.substring(inx2));
- RegStringValue data = new RegStringValue(envKey, PATH, buf.toString());
- envKey.setValue(data);
- }
- }
-
- // HKEY_CURRENT_USER\Software
- RegistryKey softwareKey = Registry.openSubkey(
- Registry.HKEY_CURRENT_USER,
- "Software",
- RegistryKey.ACCESS_WRITE);
- if (homePath != null) {
- RegistryKey productKey = softwareKey.createSubKey(
- fullName,
- "java.lang.String",
- RegistryKey.ACCESS_WRITE);
- RegStringValue data = new RegStringValue(productKey, "Location", homePath);
- productKey.setValue(data);
- }
- else { // uninstall
- try {
- softwareKey.deleteSubKey(fullName);
- String name = fullName;
- int inx = name.lastIndexOf("\\");
- while (inx != -1) {
- String parentName = name.substring(0, inx);
- RegistryKey key = softwareKey.openSubKey(parentName, RegistryKey.ACCESS_READ);
- int n = key.getNumberSubkeys();
- if (n == 0) softwareKey.deleteSubKey(parentName);
- name = parentName;
- inx = name.lastIndexOf("\\");
- }
- }
- catch (NoSuchKeyException e) {
- // do nothing
- }
- }
- }
-
- public static void main(String[] args) {
- int argc = args.length;
- if (argc != 1 && argc != 2) {
- System.out.println("Usage: java Main <version> [ <installpath> ]\n");
- System.out.println("\tversion number (e.g. 1.4.0.1)");
- System.out.println("\tinstall path (e.g. c:\\\\Program Files\\\\Scala)");
- System.out.println();
- System.exit((argc > 0) ? 1 : 0);
- }
- String homePath = (argc == 2) ? args[1] : null; // e.g. "C:\\Program Files\\Scala"
- String fullName = "EPFL\\Scala\\" + args[0]; // e.g. "EPFL\\Scala\\1.4.0.1"
- try {
- updateRegistry(homePath, fullName);
- }
- catch (RegistryException e) {
- System.out.println(e.getMessage());
- System.exit(1);
- }
- }
-
-}