فهرست منبع

Resync + a bitwiggler

LH 3 ماه پیش
والد
کامیت
8fe8e4b2f2
100فایلهای تغییر یافته به همراه11527 افزوده شده و 11483 حذف شده
  1. 80 80
      IZPL-A/IZPL/.gitignore
  2. 1 1
      IZPL-A/IZPL/app/.gitignore
  3. 17 17
      IZPL-A/IZPL/app/proguard-rules.pro
  4. 12 12
      IZPL-A/IZPL/app/src/androidTest/java/de/nplusc/izc/izpl/ApplicationTest.java
  5. 25 25
      IZPL-A/IZPL/app/src/main/AndroidManifest.xml
  6. 74 74
      IZPL-A/IZPL/app/src/main/java/de/nplusc/izc/izpl/Enqueue.java
  7. 155 155
      IZPL-A/IZPL/app/src/main/java/de/nplusc/izc/izpl/MainMenu.java
  8. 155 155
      IZPL-A/IZPL/app/src/main/java/de/nplusc/izc/izpl/PlayBackService.java
  9. 50 50
      IZPL-A/IZPL/app/src/main/java/de/nplusc/izc/izpl/PlayListAdapter.java
  10. 101 101
      IZPL-A/IZPL/app/src/main/java/de/nplusc/izc/izpl/PlayListCore.java
  11. 83 83
      IZPL-A/IZPL/app/src/main/java/de/nplusc/izc/izpl/PlayListItemWrapper.java
  12. 16 16
      IZPL-A/IZPL/app/src/main/res/layout/activity_enqueue.xml
  13. 56 56
      IZPL-A/IZPL/app/src/main/res/layout/activity_menu.xml
  14. 20 20
      IZPL-A/IZPL/app/src/main/res/layout/playlistitemview.xml
  15. 6 6
      IZPL-A/IZPL/app/src/main/res/menu/menu_enqueue.xml
  16. 6 6
      IZPL-A/IZPL/app/src/main/res/menu/menu_menu.xml
  17. 6 6
      IZPL-A/IZPL/app/src/main/res/values-w820dp/dimens.xml
  18. 5 5
      IZPL-A/IZPL/app/src/main/res/values/dimens.xml
  19. 9 9
      IZPL-A/IZPL/app/src/main/res/values/strings.xml
  20. 8 8
      IZPL-A/IZPL/app/src/main/res/values/styles.xml
  21. 1 1
      IZPL-A/IZPL/filechooser/.gitignore
  22. 17 17
      IZPL-A/IZPL/filechooser/proguard-rules.pro
  23. 12 12
      IZPL-A/IZPL/filechooser/src/androidTest/java/de/nplusc/izc/filechooser/ApplicationTest.java
  24. 19 19
      IZPL-A/IZPL/filechooser/src/main/AndroidManifest.xml
  25. 9 9
      IZPL-A/IZPL/filechooser/src/main/AndroidManifest.xml.bak
  26. 88 88
      IZPL-A/IZPL/filechooser/src/main/java/br/com/thinkti/android/filechooser/FileArrayAdapter.java
  27. 43 43
      IZPL-A/IZPL/filechooser/src/main/java/br/com/thinkti/android/filechooser/Option.java
  28. 17 17
      IZPL-A/IZPL/gradle.properties
  29. 90 90
      IZPL-A/IZPL/gradlew.bat
  30. 1 1
      IZPL-A/IZPL/settings.gradle
  31. 3 3
      IZPL-A/build.gradle
  32. 9 9
      IZSetup/bundle.izmeta
  33. 417 417
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/BundleVerifyGui.java
  34. 186 186
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/CreateSampleFile.java
  35. 36 36
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/Definitions.java
  36. 240 240
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/ExtendedInstallProgressGui.java
  37. 113 113
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/FolderSelectScreen.java
  38. 35 35
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/InstallAction.java
  39. 87 87
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/InstallFilesManagerAPI.java
  40. 259 259
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/Main.java
  41. 173 173
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/ModeSelectionGUI.java
  42. 382 382
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/PackagerGUIReloaded.java
  43. 252 252
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/SelectionGUI.java
  44. 90 90
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/SharedUtils.java
  45. 32 32
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/Tester.java
  46. 373 373
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/YInstallAction.java
  47. 285 285
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/YamlInstallFiles.java
  48. 200 200
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/__DerpPackagerGUIReloaded.form
  49. 9 9
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/bundle.izmeta
  50. 15 15
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/bundle_yaml.izmeta
  51. 528 528
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/izsetupReader.java
  52. 172 172
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/legacy/InstallManager.java
  53. 403 403
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/legacy/InstallProgressGui.java
  54. 292 292
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/legacy/PackManager.java
  55. 394 394
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/legacy/PackagerGUI.java
  56. 35 35
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/packageMgr/BullshitRequestedException.java
  57. 135 135
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/packageMgr/InstallationRegistry.java
  58. 75 75
      IZSetup/src/main/java/de/nplusc/izc/InstallPak/packageMgr/Program.java
  59. 63 63
      IZSetup/templates/tempalte.izpackage
  60. 26 26
      IZSetup/templates/template.izsetup
  61. 59 59
      IZSetup/templates/yaml.izpackage
  62. 54 54
      IZSetup/templates/yaml.izsetup
  63. 111 111
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/GUI.java
  64. 188 188
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/Level/Builders/LevelGenerations.java
  65. 415 415
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/Level/Builders/StartArea_part1_sheet1F.java
  66. 139 139
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/Level/Chunk.java
  67. 34 34
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/Level/EmptyChunk.java
  68. 26 26
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/Level/Game.java
  69. 34 34
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/Level/OverviewMap.java
  70. 34 34
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/Level/StandardChunk.java
  71. 178 178
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/Objects/Player.java
  72. 50 50
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/cells/BasicCell.java
  73. 77 77
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/cells/DoorCell.java
  74. 59 59
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/cells/EmptyCell.java
  75. 73 73
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/cells/KeyCell.java
  76. 187 187
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/cells/MazeCell.java
  77. 61 61
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/cells/MessageCell.java
  78. 48 48
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/cells/NoteCell.java
  79. 42 42
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/cells/TeleportCell.java
  80. 31 31
      MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/utils/LevelLoaderTest.java
  81. 1 1
      Megatron-Bridge/src/main/java/de/nplusc/izc/MegatronBridge/MegatronService.java
  82. 19 19
      NB-license.txt
  83. 99 99
      QuickStuff/src/main/java/FFBookMarksToPathFile/Converter.java
  84. 44 0
      QuickStuff/src/main/java/QuickVerifyCrap/GECTPatternMassageliege.java
  85. 97 97
      Readme.txt
  86. 514 514
      TWPUtil/src/main/java/de/nplusc/izc/TWPUtil/OpenGUI.java
  87. 91 91
      TWPUtil/src/main/java/de/nplusc/izc/TWPUtil/TileAttrib.java
  88. 255 255
      TWPUtil/src/main/java/de/nplusc/izc/TWPUtil/TileImporter.java
  89. 130 130
      TWPUtil/src/main/java/de/nplusc/izc/TWPUtil/TileRegistry.java
  90. 352 352
      ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/AdvancedDBWriter.java
  91. 34 34
      ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/DBObject.java
  92. 468 468
      ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/DBWriter.java
  93. 114 114
      ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/DebuggingObjectOutputStream.java
  94. 195 195
      ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/DirectoryDB.java
  95. 91 91
      ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/DirectoryTreeNode.java
  96. 95 95
      ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/ExplorerTree.java
  97. 65 65
      ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/IniIface.java
  98. 124 124
      ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/LogStream.java
  99. 93 93
      ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/NativeUtils.java
  100. 245 245
      ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/PrintStreamCapturer.java

+ 80 - 80
IZPL-A/IZPL/.gitignore

@@ -1,81 +1,81 @@
-.gradle
-/local.properties
-/.idea/workspace.xml
-/.idea/libraries
-.DS_Store
-/build
-
-# Built application files
-*.apk
-*.ap_
-
-# Files for the Dalvik VM
-*.dex
-
-# Java class files
-*.class
-
-# Generated files
-bin/
-gen/
-
-# Gradle files
-.gradle/
-build/
-/*/build/
-
-# Local configuration file (sdk path, etc)
-local.properties
-
-# Proguard folder generated by Eclipse
-proguard/
-
-# Log Files
-*.log
-
-# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion
-
-*.iml
-
-## Directory-based project format:
-.idea/
-# if you remove the above rule, at least ignore the following:
-
-# User-specific stuff:
-# .idea/workspace.xml
-# .idea/tasks.xml
-# .idea/dictionaries
-
-# Sensitive or high-churn files:
-# .idea/dataSources.ids
-# .idea/dataSources.xml
-# .idea/sqlDataSources.xml
-# .idea/dynamic.xml
-# .idea/uiDesigner.xml
-
-# Gradle:
-# .idea/gradle.xml
-# .idea/libraries
-
-# Mongo Explorer plugin:
-# .idea/mongoSettings.xml
-
-## File-based project format:
-*.ipr
-*.iws
-
-## Plugin-specific files:
-
-# IntelliJ
-/out/
-
-# mpeltonen/sbt-idea plugin
-.idea_modules/
-
-# JIRA plugin
-atlassian-ide-plugin.xml
-
-# Crashlytics plugin (for Android Studio and IntelliJ)
-com_crashlytics_export_strings.xml
-crashlytics.properties
+.gradle
+/local.properties
+/.idea/workspace.xml
+/.idea/libraries
+.DS_Store
+/build
+
+# Built application files
+*.apk
+*.ap_
+
+# Files for the Dalvik VM
+*.dex
+
+# Java class files
+*.class
+
+# Generated files
+bin/
+gen/
+
+# Gradle files
+.gradle/
+build/
+/*/build/
+
+# Local configuration file (sdk path, etc)
+local.properties
+
+# Proguard folder generated by Eclipse
+proguard/
+
+# Log Files
+*.log
+
+# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion
+
+*.iml
+
+## Directory-based project format:
+.idea/
+# if you remove the above rule, at least ignore the following:
+
+# User-specific stuff:
+# .idea/workspace.xml
+# .idea/tasks.xml
+# .idea/dictionaries
+
+# Sensitive or high-churn files:
+# .idea/dataSources.ids
+# .idea/dataSources.xml
+# .idea/sqlDataSources.xml
+# .idea/dynamic.xml
+# .idea/uiDesigner.xml
+
+# Gradle:
+# .idea/gradle.xml
+# .idea/libraries
+
+# Mongo Explorer plugin:
+# .idea/mongoSettings.xml
+
+## File-based project format:
+*.ipr
+*.iws
+
+## Plugin-specific files:
+
+# IntelliJ
+/out/
+
+# mpeltonen/sbt-idea plugin
+.idea_modules/
+
+# JIRA plugin
+atlassian-ide-plugin.xml
+
+# Crashlytics plugin (for Android Studio and IntelliJ)
+com_crashlytics_export_strings.xml
+crashlytics.properties
 crashlytics-build.properties

+ 1 - 1
IZPL-A/IZPL/app/.gitignore

@@ -1 +1 @@
-/build
+/build

+ 17 - 17
IZPL-A/IZPL/app/proguard-rules.pro

@@ -1,17 +1,17 @@
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in D:\src\android_sdk/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the proguardFiles
-# directive in build.gradle.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in D:\src\android_sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}

+ 12 - 12
IZPL-A/IZPL/app/src/androidTest/java/de/nplusc/izc/izpl/ApplicationTest.java

@@ -1,13 +1,13 @@
-package de.nplusc.izc.izpl;
-
-import android.app.Application;
-import android.test.ApplicationTestCase;
-
-/**
- * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
- */
-public class ApplicationTest extends ApplicationTestCase<Application> {
-    public ApplicationTest() {
-        super(Application.class);
-    }
+package de.nplusc.izc.izpl;
+
+import android.app.Application;
+import android.test.ApplicationTestCase;
+
+/**
+ * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
+ */
+public class ApplicationTest extends ApplicationTestCase<Application> {
+    public ApplicationTest() {
+        super(Application.class);
+    }
 }

+ 25 - 25
IZPL-A/IZPL/app/src/main/AndroidManifest.xml

@@ -1,25 +1,25 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="de.nplusc.izc.izpl" >
-
-    <application
-        android:allowBackup="true"
-        android:icon="@drawable/ic_launcher"
-        android:label="@string/app_name"
-        android:theme="@style/AppTheme" >
-        <activity
-            android:name=".MainMenu"
-            android:label="@string/app_name" >
-            <intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>
-        </activity>
-        <activity
-            android:name="de.nplusc.izc.izpl.Enqueue"
-            android:label="@string/title_activity_enqueue" >
-        </activity>
-    </application>
-
-</manifest>
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="de.nplusc.izc.izpl" >
+
+    <application
+        android:allowBackup="true"
+        android:icon="@drawable/ic_launcher"
+        android:label="@string/app_name"
+        android:theme="@style/AppTheme" >
+        <activity
+            android:name=".MainMenu"
+            android:label="@string/app_name" >
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+        <activity
+            android:name="de.nplusc.izc.izpl.Enqueue"
+            android:label="@string/title_activity_enqueue" >
+        </activity>
+    </application>
+
+</manifest>

+ 74 - 74
IZPL-A/IZPL/app/src/main/java/de/nplusc/izc/izpl/Enqueue.java

@@ -1,74 +1,74 @@
-package de.nplusc.izc.izpl;
-
-import android.app.ActionBar;
-import android.support.v7.app.ActionBarActivity;
-import android.os.Bundle;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-import android.widget.AdapterView;
-import android.widget.ListView;
-
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.List;
-
-import de.nplusc.izc.iZpl.API.shared.PlayListItem;
-
-
-public class Enqueue extends ActionBarActivity {
-
-    PlayListCore c=null;
-    PlayListAdapter adp;
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_enqueue);
-        ActionBar ab = getActionBar();
-        if(ab !=null)ab.hide();
-        ListView poolList = (ListView) findViewById(R.id.lstTracks);
-        c = PlayListCore.openSession();
-        List<PlayListItemWrapper> datat = new ArrayList<>();
-
-        List<PlayListItem> data = c.getPool();
-        for (int i = 0; i < data.size(); i++) {
-            datat.add(new PlayListItemWrapper(data.get(i),i));
-        }
-        Collections.sort(datat,datat.get(0));
-        adp=new PlayListAdapter(this,R.layout.playlistitemview,datat);
-        adp.notifyDataSetChanged();
-        poolList.setAdapter(adp);
-        adp.notifyDataSetChanged();
-        poolList.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
-            @Override
-            public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
-                c.forcePlay(((PlayListItemWrapper)parent.getAdapter().getItem(position)).getRawIDX());
-                return true;
-            }
-        });
-
-    }
-
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        // Inflate the menu; this adds items to the action bar if it is present.
-        getMenuInflater().inflate(R.menu.menu_enqueue, menu);
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        // Handle action bar item clicks here. The action bar will
-        // automatically handle clicks on the Home/Up button, so long
-        // as you specify a parent activity in AndroidManifest.xml.
-        int id = item.getItemId();
-
-        //noinspection SimplifiableIfStatement
-        if (id == R.id.action_settings) {
-            return true;
-        }
-
-        return super.onOptionsItemSelected(item);
-    }
-}
+package de.nplusc.izc.izpl;
+
+import android.app.ActionBar;
+import android.support.v7.app.ActionBarActivity;
+import android.os.Bundle;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+import android.widget.AdapterView;
+import android.widget.ListView;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.List;
+
+import de.nplusc.izc.iZpl.API.shared.PlayListItem;
+
+
+public class Enqueue extends ActionBarActivity {
+
+    PlayListCore c=null;
+    PlayListAdapter adp;
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_enqueue);
+        ActionBar ab = getActionBar();
+        if(ab !=null)ab.hide();
+        ListView poolList = (ListView) findViewById(R.id.lstTracks);
+        c = PlayListCore.openSession();
+        List<PlayListItemWrapper> datat = new ArrayList<>();
+
+        List<PlayListItem> data = c.getPool();
+        for (int i = 0; i < data.size(); i++) {
+            datat.add(new PlayListItemWrapper(data.get(i),i));
+        }
+        Collections.sort(datat,datat.get(0));
+        adp=new PlayListAdapter(this,R.layout.playlistitemview,datat);
+        adp.notifyDataSetChanged();
+        poolList.setAdapter(adp);
+        adp.notifyDataSetChanged();
+        poolList.setOnItemLongClickListener(new AdapterView.OnItemLongClickListener() {
+            @Override
+            public boolean onItemLongClick(AdapterView<?> parent, View view, int position, long id) {
+                c.forcePlay(((PlayListItemWrapper)parent.getAdapter().getItem(position)).getRawIDX());
+                return true;
+            }
+        });
+
+    }
+
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        // Inflate the menu; this adds items to the action bar if it is present.
+        getMenuInflater().inflate(R.menu.menu_enqueue, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        // Handle action bar item clicks here. The action bar will
+        // automatically handle clicks on the Home/Up button, so long
+        // as you specify a parent activity in AndroidManifest.xml.
+        int id = item.getItemId();
+
+        //noinspection SimplifiableIfStatement
+        if (id == R.id.action_settings) {
+            return true;
+        }
+
+        return super.onOptionsItemSelected(item);
+    }
+}

+ 155 - 155
IZPL-A/IZPL/app/src/main/java/de/nplusc/izc/izpl/MainMenu.java

@@ -1,155 +1,155 @@
-package de.nplusc.izc.izpl;
-
-import android.app.ActionBar;
-import android.app.Activity;
-import android.content.ComponentName;
-import android.content.Context;
-import android.content.Intent;
-import android.content.ServiceConnection;
-import android.os.IBinder;
-import android.support.v7.app.ActionBarActivity;
-import android.os.Bundle;
-import android.util.Log;
-import android.view.Menu;
-import android.view.MenuItem;
-import android.view.View;
-
-import java.util.ArrayList;
-
-import br.com.thinkti.android.filechooser.FileChooser;
-
-
-public class MainMenu extends ActionBarActivity {
-
-    @Override
-    protected void onStart() {
-        super.onStart();
-        // Bind to LocalService
-
-
-
-
-        Intent intent = new Intent(this, PlayBackService.class);
-        bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
-    }
-
-    @Override
-    protected void onStop() {
-        super.onStop();
-        plservice=null;
-        // Unbind from the service
-        if (mBound) {
-            unbindService(mConnection);
-            mBound = false;
-        }
-    }
-
-    PlayListCore c;
-    @Override
-    protected void onCreate(Bundle savedInstanceState) {
-        super.onCreate(savedInstanceState);
-        setContentView(R.layout.activity_menu);
-        ActionBar ab = getActionBar();
-        if(ab !=null)ab.hide();
-        c= PlayListCore.openSession();
-
-
-
-
-        if(!c.isLoaded())
-        {
-            startService(new Intent(this, PlayBackService.class));
-            performFileSearch();
-        }
-        findViewById(R.id.btnList).setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                Intent myIntent = new Intent(MainMenu.this, Enqueue.class);
-                MainMenu.this.startActivity(myIntent);
-            }
-        });
-
-        findViewById(R.id.btnPlay).setOnClickListener(new View.OnClickListener() {
-            @Override
-            public void onClick(View v) {
-                Intent myIntent = new Intent(MainMenu.this, Enqueue.class);
-                plservice.startstop();
-            }
-        });
-
-    }
-
-
-    @Override
-    public boolean onCreateOptionsMenu(Menu menu) {
-        // Inflate the menu; this adds items to the action bar if it is present.
-        getMenuInflater().inflate(R.menu.menu_menu, menu);
-        return true;
-    }
-
-    @Override
-    public boolean onOptionsItemSelected(MenuItem item) {
-        // Handle action bar item clicks here. The action bar will
-        // automatically handle clicks on the Home/Up button, so long
-        // as you specify a parent activity in AndroidManifest.xml.
-        int id = item.getItemId();
-
-        //noinspection SimplifiableIfStatement
-        if (id == R.id.action_settings) {
-            return true;
-        }
-
-        return super.onOptionsItemSelected(item);
-    }
-
-    private static final int READ_REQUEST_CODE = 9263;
-    public void performFileSearch() {
-
-        Intent intent = new Intent(this, FileChooser.class);
-        ArrayList<String> extensions = new ArrayList<String>();
-        extensions.add(".izpl");
-        intent.putStringArrayListExtra("filterFileExtension", extensions);
-        startActivityForResult(intent, READ_REQUEST_CODE);
-    }
-
-    @Override
-    public void onActivityResult(int requestCode, int resultCode,
-                                 Intent resultData) {
-
-        // The ACTION_OPEN_DOCUMENT intent was sent with the request code
-        // READ_REQUEST_CODE. If the request code seen here doesn't match, it's the
-        // response to some other intent, and the code below shouldn't run at all.
-
-        if (requestCode == READ_REQUEST_CODE && resultCode == Activity.RESULT_OK) {
-            // The document selected by the user won't be returned in the intent.
-            // Instead, a URI to that document will be contained in the return intent
-            // provided to this method as a parameter.
-            // Pull that URI using resultData.getData().
-            String res = "";
-            if (resultData != null) {
-                res= resultData.getStringExtra("fileSelected");
-                Log.i("IZPL", "FILE: " + res);
-                c.loadPlaylistFile(res);
-            }
-        }
-    }
-    private PlayBackService plservice;
-    private boolean mBound;
-    private ServiceConnection mConnection = new ServiceConnection() {
-
-        @Override
-        public void onServiceConnected(ComponentName className,
-                                       IBinder service) {
-            // We've bound to LocalService, cast the IBinder and get LocalService instance
-            PlayBackService.PLBinder binder = (PlayBackService.PLBinder) service;
-            plservice = binder.getService();
-            mBound = true;
-        }
-
-        @Override
-        public void onServiceDisconnected(ComponentName arg0) {
-            mBound = false;
-        }
-    };
-
-}
+package de.nplusc.izc.izpl;
+
+import android.app.ActionBar;
+import android.app.Activity;
+import android.content.ComponentName;
+import android.content.Context;
+import android.content.Intent;
+import android.content.ServiceConnection;
+import android.os.IBinder;
+import android.support.v7.app.ActionBarActivity;
+import android.os.Bundle;
+import android.util.Log;
+import android.view.Menu;
+import android.view.MenuItem;
+import android.view.View;
+
+import java.util.ArrayList;
+
+import br.com.thinkti.android.filechooser.FileChooser;
+
+
+public class MainMenu extends ActionBarActivity {
+
+    @Override
+    protected void onStart() {
+        super.onStart();
+        // Bind to LocalService
+
+
+
+
+        Intent intent = new Intent(this, PlayBackService.class);
+        bindService(intent, mConnection, Context.BIND_AUTO_CREATE);
+    }
+
+    @Override
+    protected void onStop() {
+        super.onStop();
+        plservice=null;
+        // Unbind from the service
+        if (mBound) {
+            unbindService(mConnection);
+            mBound = false;
+        }
+    }
+
+    PlayListCore c;
+    @Override
+    protected void onCreate(Bundle savedInstanceState) {
+        super.onCreate(savedInstanceState);
+        setContentView(R.layout.activity_menu);
+        ActionBar ab = getActionBar();
+        if(ab !=null)ab.hide();
+        c= PlayListCore.openSession();
+
+
+
+
+        if(!c.isLoaded())
+        {
+            startService(new Intent(this, PlayBackService.class));
+            performFileSearch();
+        }
+        findViewById(R.id.btnList).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                Intent myIntent = new Intent(MainMenu.this, Enqueue.class);
+                MainMenu.this.startActivity(myIntent);
+            }
+        });
+
+        findViewById(R.id.btnPlay).setOnClickListener(new View.OnClickListener() {
+            @Override
+            public void onClick(View v) {
+                Intent myIntent = new Intent(MainMenu.this, Enqueue.class);
+                plservice.startstop();
+            }
+        });
+
+    }
+
+
+    @Override
+    public boolean onCreateOptionsMenu(Menu menu) {
+        // Inflate the menu; this adds items to the action bar if it is present.
+        getMenuInflater().inflate(R.menu.menu_menu, menu);
+        return true;
+    }
+
+    @Override
+    public boolean onOptionsItemSelected(MenuItem item) {
+        // Handle action bar item clicks here. The action bar will
+        // automatically handle clicks on the Home/Up button, so long
+        // as you specify a parent activity in AndroidManifest.xml.
+        int id = item.getItemId();
+
+        //noinspection SimplifiableIfStatement
+        if (id == R.id.action_settings) {
+            return true;
+        }
+
+        return super.onOptionsItemSelected(item);
+    }
+
+    private static final int READ_REQUEST_CODE = 9263;
+    public void performFileSearch() {
+
+        Intent intent = new Intent(this, FileChooser.class);
+        ArrayList<String> extensions = new ArrayList<String>();
+        extensions.add(".izpl");
+        intent.putStringArrayListExtra("filterFileExtension", extensions);
+        startActivityForResult(intent, READ_REQUEST_CODE);
+    }
+
+    @Override
+    public void onActivityResult(int requestCode, int resultCode,
+                                 Intent resultData) {
+
+        // The ACTION_OPEN_DOCUMENT intent was sent with the request code
+        // READ_REQUEST_CODE. If the request code seen here doesn't match, it's the
+        // response to some other intent, and the code below shouldn't run at all.
+
+        if (requestCode == READ_REQUEST_CODE && resultCode == Activity.RESULT_OK) {
+            // The document selected by the user won't be returned in the intent.
+            // Instead, a URI to that document will be contained in the return intent
+            // provided to this method as a parameter.
+            // Pull that URI using resultData.getData().
+            String res = "";
+            if (resultData != null) {
+                res= resultData.getStringExtra("fileSelected");
+                Log.i("IZPL", "FILE: " + res);
+                c.loadPlaylistFile(res);
+            }
+        }
+    }
+    private PlayBackService plservice;
+    private boolean mBound;
+    private ServiceConnection mConnection = new ServiceConnection() {
+
+        @Override
+        public void onServiceConnected(ComponentName className,
+                                       IBinder service) {
+            // We've bound to LocalService, cast the IBinder and get LocalService instance
+            PlayBackService.PLBinder binder = (PlayBackService.PLBinder) service;
+            plservice = binder.getService();
+            mBound = true;
+        }
+
+        @Override
+        public void onServiceDisconnected(ComponentName arg0) {
+            mBound = false;
+        }
+    };
+
+}

+ 155 - 155
IZPL-A/IZPL/app/src/main/java/de/nplusc/izc/izpl/PlayBackService.java

@@ -1,155 +1,155 @@
-package de.nplusc.izc.izpl;
-
-import android.app.Service;
-import android.content.Intent;
-import android.net.Uri;
-import android.os.Binder;
-import android.os.IBinder;
-
-import com.google.android.exoplayer.ExoPlaybackException;
-import com.google.android.exoplayer.ExoPlayer;
-import com.google.android.exoplayer.MediaCodecAudioTrackRenderer;
-import com.google.android.exoplayer.source.DefaultSampleSource;
-import com.google.android.exoplayer.source.FrameworkSampleExtractor;
-
-import java.io.File;
-import java.io.FileDescriptor;
-import java.util.HashMap;
-
-import de.nplusc.izc.iZpl.API.shared.PlayListItem;
-import de.nplusc.izc.iZpl.API.shared.SinglePlayListItem;
-
-/**
- * Created by LH on 04.05.2015.
- */
-public class PlayBackService extends Service implements ExoPlayer.Listener {
-    private boolean playing=false;
-    private ExoPlayer player;
-    private PlayListCore c=null;
-
-    private boolean istbooted=false;
-
-    private IBinder b = new PLBinder();
-
-    private MainMenu listeningUI = null;
-
-    public void registerMainMenu(MainMenu m)
-    {
-        listeningUI=m;
-    }
-
-
-    public void unregisterUI()
-    {
-        listeningUI=null;
-    }
-
-
-    @Override
-    public void onCreate() {
-        super.onCreate();
-        c=PlayListCore.openSession();
-        player = ExoPlayer.Factory.newInstance(1);
-        player.addListener(this);
-    }
-
-    public PlayListCore getPlaylistCore()
-    {
-        return c;
-    }
-
-    public void setPlaylistCore(PlayListCore co)
-    {
-        c=co;
-    }
-
-    @Override
-    public void onPlayerStateChanged(boolean playWhenReady, int playbackState) {
-        if(playbackState==ExoPlayer.STATE_ENDED)
-        {
-            pullTrackFromRandomizer();
-        }
-    }
-
-    @Override
-    public void onPlayWhenReadyCommitted() {
-
-    }
-
-    @Override
-    public void onPlayerError(ExoPlaybackException error) {
-
-    }
-
-    public class PLBinder extends Binder
-    {
-        PlayBackService getService() {
-            // Return this instance of PlaybackService so clients can call public methods
-            return PlayBackService.this;
-        }
-    }
-
-    public void startstop()
-    {
-        if(istbooted)
-        {
-            playing = !playing;
-            player.setPlayWhenReady(playing);
-        }
-        else
-        {
-            pullTrackFromRandomizer();
-        }
-
-    }
-
-    public void startTrack(String path)
-    {
-        player.stop();
-        player.seekTo(0L);
-        MediaCodecAudioTrackRenderer audioRenderer = new MediaCodecAudioTrackRenderer(new DefaultSampleSource
-                (new FrameworkSampleExtractor(this, Uri.fromFile(new File(path)) ,new HashMap<String,String>()),1));
-        player.prepare(audioRenderer);
-        player.setPlayWhenReady(true);
-        playing=true;
-
-    }
-    private String currentTrack="Nothing at the moment";
-    public void pullTrackFromRandomizer()
-    {
-        if(c!=null&&c.isLoaded())
-        {
-            SinglePlayListItem itm = (SinglePlayListItem) c.getNextItem();
-            currentTrack=itm.getTitle();
-            startTrack(itm.getPath());
-        }
-    }
-    public String getCurrentTitle()
-    {
-        return currentTrack;
-    }
-
-
-    public int getTrackLengthInSeconds()
-    {
-        return (int)player.getDuration();
-    }
-
-    public int getCurrentPosition()
-    {
-        return (int)player.getCurrentPosition();
-    }
-    public void seek(int secs)
-    {
-        player.seekTo(secs*1000);
-    }
-
-
-
-
-
-    @Override
-    public IBinder onBind(Intent intent) {
-        return b;
-    }
-}
+package de.nplusc.izc.izpl;
+
+import android.app.Service;
+import android.content.Intent;
+import android.net.Uri;
+import android.os.Binder;
+import android.os.IBinder;
+
+import com.google.android.exoplayer.ExoPlaybackException;
+import com.google.android.exoplayer.ExoPlayer;
+import com.google.android.exoplayer.MediaCodecAudioTrackRenderer;
+import com.google.android.exoplayer.source.DefaultSampleSource;
+import com.google.android.exoplayer.source.FrameworkSampleExtractor;
+
+import java.io.File;
+import java.io.FileDescriptor;
+import java.util.HashMap;
+
+import de.nplusc.izc.iZpl.API.shared.PlayListItem;
+import de.nplusc.izc.iZpl.API.shared.SinglePlayListItem;
+
+/**
+ * Created by LH on 04.05.2015.
+ */
+public class PlayBackService extends Service implements ExoPlayer.Listener {
+    private boolean playing=false;
+    private ExoPlayer player;
+    private PlayListCore c=null;
+
+    private boolean istbooted=false;
+
+    private IBinder b = new PLBinder();
+
+    private MainMenu listeningUI = null;
+
+    public void registerMainMenu(MainMenu m)
+    {
+        listeningUI=m;
+    }
+
+
+    public void unregisterUI()
+    {
+        listeningUI=null;
+    }
+
+
+    @Override
+    public void onCreate() {
+        super.onCreate();
+        c=PlayListCore.openSession();
+        player = ExoPlayer.Factory.newInstance(1);
+        player.addListener(this);
+    }
+
+    public PlayListCore getPlaylistCore()
+    {
+        return c;
+    }
+
+    public void setPlaylistCore(PlayListCore co)
+    {
+        c=co;
+    }
+
+    @Override
+    public void onPlayerStateChanged(boolean playWhenReady, int playbackState) {
+        if(playbackState==ExoPlayer.STATE_ENDED)
+        {
+            pullTrackFromRandomizer();
+        }
+    }
+
+    @Override
+    public void onPlayWhenReadyCommitted() {
+
+    }
+
+    @Override
+    public void onPlayerError(ExoPlaybackException error) {
+
+    }
+
+    public class PLBinder extends Binder
+    {
+        PlayBackService getService() {
+            // Return this instance of PlaybackService so clients can call public methods
+            return PlayBackService.this;
+        }
+    }
+
+    public void startstop()
+    {
+        if(istbooted)
+        {
+            playing = !playing;
+            player.setPlayWhenReady(playing);
+        }
+        else
+        {
+            pullTrackFromRandomizer();
+        }
+
+    }
+
+    public void startTrack(String path)
+    {
+        player.stop();
+        player.seekTo(0L);
+        MediaCodecAudioTrackRenderer audioRenderer = new MediaCodecAudioTrackRenderer(new DefaultSampleSource
+                (new FrameworkSampleExtractor(this, Uri.fromFile(new File(path)) ,new HashMap<String,String>()),1));
+        player.prepare(audioRenderer);
+        player.setPlayWhenReady(true);
+        playing=true;
+
+    }
+    private String currentTrack="Nothing at the moment";
+    public void pullTrackFromRandomizer()
+    {
+        if(c!=null&&c.isLoaded())
+        {
+            SinglePlayListItem itm = (SinglePlayListItem) c.getNextItem();
+            currentTrack=itm.getTitle();
+            startTrack(itm.getPath());
+        }
+    }
+    public String getCurrentTitle()
+    {
+        return currentTrack;
+    }
+
+
+    public int getTrackLengthInSeconds()
+    {
+        return (int)player.getDuration();
+    }
+
+    public int getCurrentPosition()
+    {
+        return (int)player.getCurrentPosition();
+    }
+    public void seek(int secs)
+    {
+        player.seekTo(secs*1000);
+    }
+
+
+
+
+
+    @Override
+    public IBinder onBind(Intent intent) {
+        return b;
+    }
+}

+ 50 - 50
IZPL-A/IZPL/app/src/main/java/de/nplusc/izc/izpl/PlayListAdapter.java

@@ -1,50 +1,50 @@
-package de.nplusc.izc.izpl;
-
-import android.content.Context;
-import android.util.Log;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.TextView;
-
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * Created by LH on 03.05.2015.
- */
-public class PlayListAdapter extends ArrayAdapter<PlayListItemWrapper> {
-
-    private int vid;
-    Context c;
-    public PlayListAdapter(Context context, int resource,List<PlayListItemWrapper> l) {
-        super(context, resource,l);
-        vid=resource;
-        c=context;
-    }
-
-    @Override
-    public View getView(int position, View convertView, ViewGroup parent) {
-        Log.i("IZPL", "getView()");
-        if(convertView==null)
-        {
-            LayoutInflater vi = (LayoutInflater) c
-                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-            convertView = vi.inflate(vid, null);
-        }
-        Log.i("IZPL", "P="+position);
-        PlayListItemWrapper itm = getItem(position);
-        if(itm!=null)
-        {
-            TextView titleView = (TextView) convertView.findViewById(R.id.titleView);
-            TextView detailsView = (TextView) convertView.findViewById(R.id.dataView);
-            titleView.setText(itm.toString());
-            detailsView.setText(itm.getDetails());
-        }
-
-
-        return convertView;
-    }
-
-}
+package de.nplusc.izc.izpl;
+
+import android.content.Context;
+import android.util.Log;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.TextView;
+
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * Created by LH on 03.05.2015.
+ */
+public class PlayListAdapter extends ArrayAdapter<PlayListItemWrapper> {
+
+    private int vid;
+    Context c;
+    public PlayListAdapter(Context context, int resource,List<PlayListItemWrapper> l) {
+        super(context, resource,l);
+        vid=resource;
+        c=context;
+    }
+
+    @Override
+    public View getView(int position, View convertView, ViewGroup parent) {
+        Log.i("IZPL", "getView()");
+        if(convertView==null)
+        {
+            LayoutInflater vi = (LayoutInflater) c
+                    .getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+            convertView = vi.inflate(vid, null);
+        }
+        Log.i("IZPL", "P="+position);
+        PlayListItemWrapper itm = getItem(position);
+        if(itm!=null)
+        {
+            TextView titleView = (TextView) convertView.findViewById(R.id.titleView);
+            TextView detailsView = (TextView) convertView.findViewById(R.id.dataView);
+            titleView.setText(itm.toString());
+            detailsView.setText(itm.getDetails());
+        }
+
+
+        return convertView;
+    }
+
+}

+ 101 - 101
IZPL-A/IZPL/app/src/main/java/de/nplusc/izc/izpl/PlayListCore.java

@@ -1,101 +1,101 @@
-package de.nplusc.izc.izpl;
-
-import java.util.ArrayList;
-import java.util.List;
-
-import de.nplusc.izc.iZpl.API.shared.InvalidPlayListFileException;
-import de.nplusc.izc.iZpl.API.shared.MultiPlayListItem;
-import de.nplusc.izc.iZpl.API.shared.PlayListItem;
-import de.nplusc.izc.iZpl.API.shared.SinglePlayListItem;
-import de.nplusc.izc.iZpl.Utils.shared.PLFileIO;
-
-/**
- * Created by LH on 02.05.2015.
- */
-public class PlayListCore
-{
-    private List<PlayListItem> currentPool;
-    private static PlayListCore session = null;
-    private List<PlayListItem> cache = new ArrayList<>();
-    private List<PlayListItem> forceQueue=new ArrayList<>();
-    private boolean loaded=false;
-    public static synchronized PlayListCore openSession()
-    {
-        if(session==null)
-        {
-            session=new PlayListCore();
-        }
-        return session;
-    }
-
-    public void revalidatePool()
-    {
-        cache.clear();
-        for (PlayListItem itm:currentPool)
-        {
-            for(int i=0;i<itm.getTargetPlaycount()-itm.getCountPlayed();i++)
-            {
-                cache.add(itm);
-            }
-        }
-    }
-
-
-    public void loadPlaylistFile(String path)
-    {
-        loaded=true;
-        try {
-            currentPool = PLFileIO.parseFullList(path);
-        } catch (InvalidPlayListFileException e) {
-            //TODO Error popup
-        }
-    }
-
-    public void forcePlay(int idx)
-    {
-        forceQueue.add(currentPool.get(idx));
-    }
-
-    private List<PlayListItem> multiitemQueue = new ArrayList<>();
-
-    public SinglePlayListItem getNextItem()
-    {
-        if(!multiitemQueue.isEmpty())
-        {
-            return (SinglePlayListItem)multiitemQueue.remove(0);
-        }
-        PlayListItem tempo = getNextItemAux();
-        if(tempo instanceof MultiPlayListItem)
-        {
-            multiitemQueue.addAll(((MultiPlayListItem)tempo).getItems());
-            return (SinglePlayListItem)multiitemQueue.remove(0);
-        }
-        else
-        {
-            return (SinglePlayListItem)tempo;
-        }
-    }
-
-    private PlayListItem getNextItemAux()
-    {
-        if(forceQueue.isEmpty())
-        {
-            return cache.get((int)(Math.random()*((float)cache.size())));
-        }
-        else
-        {
-            return forceQueue.remove(0);
-        }
-    }
-    public List<PlayListItem> getPool()
-    {
-        return currentPool;
-
-    }
-    public boolean isLoaded()
-    {
-        return loaded;
-    }
-
-
-}
+package de.nplusc.izc.izpl;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import de.nplusc.izc.iZpl.API.shared.InvalidPlayListFileException;
+import de.nplusc.izc.iZpl.API.shared.MultiPlayListItem;
+import de.nplusc.izc.iZpl.API.shared.PlayListItem;
+import de.nplusc.izc.iZpl.API.shared.SinglePlayListItem;
+import de.nplusc.izc.iZpl.Utils.shared.PLFileIO;
+
+/**
+ * Created by LH on 02.05.2015.
+ */
+public class PlayListCore
+{
+    private List<PlayListItem> currentPool;
+    private static PlayListCore session = null;
+    private List<PlayListItem> cache = new ArrayList<>();
+    private List<PlayListItem> forceQueue=new ArrayList<>();
+    private boolean loaded=false;
+    public static synchronized PlayListCore openSession()
+    {
+        if(session==null)
+        {
+            session=new PlayListCore();
+        }
+        return session;
+    }
+
+    public void revalidatePool()
+    {
+        cache.clear();
+        for (PlayListItem itm:currentPool)
+        {
+            for(int i=0;i<itm.getTargetPlaycount()-itm.getCountPlayed();i++)
+            {
+                cache.add(itm);
+            }
+        }
+    }
+
+
+    public void loadPlaylistFile(String path)
+    {
+        loaded=true;
+        try {
+            currentPool = PLFileIO.parseFullList(path);
+        } catch (InvalidPlayListFileException e) {
+            //TODO Error popup
+        }
+    }
+
+    public void forcePlay(int idx)
+    {
+        forceQueue.add(currentPool.get(idx));
+    }
+
+    private List<PlayListItem> multiitemQueue = new ArrayList<>();
+
+    public SinglePlayListItem getNextItem()
+    {
+        if(!multiitemQueue.isEmpty())
+        {
+            return (SinglePlayListItem)multiitemQueue.remove(0);
+        }
+        PlayListItem tempo = getNextItemAux();
+        if(tempo instanceof MultiPlayListItem)
+        {
+            multiitemQueue.addAll(((MultiPlayListItem)tempo).getItems());
+            return (SinglePlayListItem)multiitemQueue.remove(0);
+        }
+        else
+        {
+            return (SinglePlayListItem)tempo;
+        }
+    }
+
+    private PlayListItem getNextItemAux()
+    {
+        if(forceQueue.isEmpty())
+        {
+            return cache.get((int)(Math.random()*((float)cache.size())));
+        }
+        else
+        {
+            return forceQueue.remove(0);
+        }
+    }
+    public List<PlayListItem> getPool()
+    {
+        return currentPool;
+
+    }
+    public boolean isLoaded()
+    {
+        return loaded;
+    }
+
+
+}

+ 83 - 83
IZPL-A/IZPL/app/src/main/java/de/nplusc/izc/izpl/PlayListItemWrapper.java

@@ -1,83 +1,83 @@
-package de.nplusc.izc.izpl;
-
-import java.util.Comparator;
-
-import de.nplusc.izc.iZpl.API.shared.MultiPlayListItem;
-import de.nplusc.izc.iZpl.API.shared.PlayListItem;
-import de.nplusc.izc.iZpl.API.shared.SinglePlayListItem;
-
-/**
- * Created by LH on 03.05.2015.
- */
-public class PlayListItemWrapper implements Comparator<PlayListItemWrapper>{
-
-
-    private PlayListItem itm;
-    private int rawIDX;
-
-    public PlayListItemWrapper(PlayListItem cnt,int idx)
-    {
-        itm=cnt;
-        rawIDX=idx;
-    }
-
-
-    public String toString()
-    {
-        if(itm instanceof SinglePlayListItem)
-        {
-            return ((SinglePlayListItem)itm).getTitle().split(",")[1];
-        }
-        else
-        {
-            if(itm instanceof MultiPlayListItem)
-            {
-                return ((MultiPlayListItem)itm).getSrc();
-            }
-            else
-            {
-                return "INVALID";
-            }
-        }
-    }
-
-    public String getDetails()
-    {
-
-        return itm.getCountPlayed()+"/"+itm.getTargetPlaycount();
-    }
-
-
-    public int getRawIDX()
-    {
-        return rawIDX;
-    }
-
-    @Override
-    public int compare(PlayListItemWrapper lhs, PlayListItemWrapper rhs) {
-        PlayListItem o1=lhs.itm;
-        PlayListItem o2=rhs.itm;
-        if(o1 instanceof MultiPlayListItem&&!(o2 instanceof MultiPlayListItem))
-        {
-            return 1;
-        }
-        else if(o2 instanceof MultiPlayListItem&&!(o1 instanceof MultiPlayListItem))
-        {
-            return -1;
-        }
-        else if(o1 instanceof MultiPlayListItem&&(o2 instanceof MultiPlayListItem))
-        {
-            int r=o1.getM3UElement().trim().compareToIgnoreCase(o2.getM3UElement().trim());
-            r=r>0?1:r<0?-1:0;//Fuckyou string.compare
-            return r;
-        }
-        else
-        {                                                   //denk an die API oder es hagelt mysteryerrors
-            String t1=((SinglePlayListItem)o1).getTitle().split(",")[1].trim();
-            String t2=((SinglePlayListItem)o2).getTitle().split(",")[1].trim();
-            int r=t1.compareToIgnoreCase(t2);
-            r=r>0?1:r<0?-1:0;
-            return r;
-        }
-    }
-}
+package de.nplusc.izc.izpl;
+
+import java.util.Comparator;
+
+import de.nplusc.izc.iZpl.API.shared.MultiPlayListItem;
+import de.nplusc.izc.iZpl.API.shared.PlayListItem;
+import de.nplusc.izc.iZpl.API.shared.SinglePlayListItem;
+
+/**
+ * Created by LH on 03.05.2015.
+ */
+public class PlayListItemWrapper implements Comparator<PlayListItemWrapper>{
+
+
+    private PlayListItem itm;
+    private int rawIDX;
+
+    public PlayListItemWrapper(PlayListItem cnt,int idx)
+    {
+        itm=cnt;
+        rawIDX=idx;
+    }
+
+
+    public String toString()
+    {
+        if(itm instanceof SinglePlayListItem)
+        {
+            return ((SinglePlayListItem)itm).getTitle().split(",")[1];
+        }
+        else
+        {
+            if(itm instanceof MultiPlayListItem)
+            {
+                return ((MultiPlayListItem)itm).getSrc();
+            }
+            else
+            {
+                return "INVALID";
+            }
+        }
+    }
+
+    public String getDetails()
+    {
+
+        return itm.getCountPlayed()+"/"+itm.getTargetPlaycount();
+    }
+
+
+    public int getRawIDX()
+    {
+        return rawIDX;
+    }
+
+    @Override
+    public int compare(PlayListItemWrapper lhs, PlayListItemWrapper rhs) {
+        PlayListItem o1=lhs.itm;
+        PlayListItem o2=rhs.itm;
+        if(o1 instanceof MultiPlayListItem&&!(o2 instanceof MultiPlayListItem))
+        {
+            return 1;
+        }
+        else if(o2 instanceof MultiPlayListItem&&!(o1 instanceof MultiPlayListItem))
+        {
+            return -1;
+        }
+        else if(o1 instanceof MultiPlayListItem&&(o2 instanceof MultiPlayListItem))
+        {
+            int r=o1.getM3UElement().trim().compareToIgnoreCase(o2.getM3UElement().trim());
+            r=r>0?1:r<0?-1:0;//Fuckyou string.compare
+            return r;
+        }
+        else
+        {                                                   //denk an die API oder es hagelt mysteryerrors
+            String t1=((SinglePlayListItem)o1).getTitle().split(",")[1].trim();
+            String t2=((SinglePlayListItem)o2).getTitle().split(",")[1].trim();
+            int r=t1.compareToIgnoreCase(t2);
+            r=r>0?1:r<0?-1:0;
+            return r;
+        }
+    }
+}

+ 16 - 16
IZPL-A/IZPL/app/src/main/res/layout/activity_enqueue.xml

@@ -1,16 +1,16 @@
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
-    android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
-    android:paddingRight="@dimen/activity_horizontal_margin"
-    android:paddingTop="@dimen/activity_vertical_margin"
-    android:paddingBottom="@dimen/activity_vertical_margin"
-    tools:context="de.nplusc.izc.izpl.Enqueue">
-
-    <ListView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:id="@+id/lstTracks"
-        android:layout_alignParentTop="true"
-        android:layout_alignParentStart="true"
-        android:layout_alignParentBottom="true" />
-</RelativeLayout>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
+    android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
+    android:paddingRight="@dimen/activity_horizontal_margin"
+    android:paddingTop="@dimen/activity_vertical_margin"
+    android:paddingBottom="@dimen/activity_vertical_margin"
+    tools:context="de.nplusc.izc.izpl.Enqueue">
+
+    <ListView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:id="@+id/lstTracks"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentStart="true"
+        android:layout_alignParentBottom="true" />
+</RelativeLayout>

+ 56 - 56
IZPL-A/IZPL/app/src/main/res/layout/activity_menu.xml

@@ -1,56 +1,56 @@
-<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
-    android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
-    android:paddingRight="@dimen/activity_horizontal_margin"
-    android:paddingTop="@dimen/activity_vertical_margin"
-    android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".Menu">
-
-    <SeekBar
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:id="@+id/seekBar"
-        android:layout_above="@+id/btnPlay"
-        android:layout_alignParentEnd="true"
-        android:layout_alignParentStart="true" />
-
-    <ImageButton
-        android:layout_width="120dp"
-        android:layout_height="80dp"
-        android:id="@+id/btnPlay"
-        android:src="@drawable/play"
-        android:scaleType="fitCenter"
-        android:layout_alignParentBottom="true"
-        android:layout_alignParentStart="true"
-        android:clickable="true" />
-
-    <ImageButton
-        android:layout_width="80dp"
-        android:layout_height="80dp"
-        android:id="@+id/btnSkip"
-        android:layout_alignBottom="@+id/btnPlay"
-        android:layout_below="@+id/seekBar"
-        android:layout_toEndOf="@+id/btnPlay"
-        android:scaleType="fitCenter"
-        android:src="@drawable/skipenqueue"
-        android:clickable="true" />
-
-    <ImageButton
-        android:layout_width="120dp"
-        android:layout_height="80dp"
-        android:id="@+id/btnList"
-        android:layout_alignBottom="@+id/btnSkip"
-        android:layout_toEndOf="@+id/btnSkip"
-        android:scaleType="fitCenter"
-        android:src="@drawable/list"
-        android:clickable="true" />
-
-    <ImageView
-        android:layout_width="wrap_content"
-        android:layout_height="wrap_content"
-        android:id="@+id/vieweAlbumArt"
-        android:layout_above="@+id/seekBar"
-        android:layout_alignParentTop="true"
-        android:layout_alignParentStart="true"
-        android:layout_alignParentEnd="true" />
-
-</RelativeLayout>
+<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:tools="http://schemas.android.com/tools" android:layout_width="match_parent"
+    android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
+    android:paddingRight="@dimen/activity_horizontal_margin"
+    android:paddingTop="@dimen/activity_vertical_margin"
+    android:paddingBottom="@dimen/activity_vertical_margin" tools:context=".Menu">
+
+    <SeekBar
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:id="@+id/seekBar"
+        android:layout_above="@+id/btnPlay"
+        android:layout_alignParentEnd="true"
+        android:layout_alignParentStart="true" />
+
+    <ImageButton
+        android:layout_width="120dp"
+        android:layout_height="80dp"
+        android:id="@+id/btnPlay"
+        android:src="@drawable/play"
+        android:scaleType="fitCenter"
+        android:layout_alignParentBottom="true"
+        android:layout_alignParentStart="true"
+        android:clickable="true" />
+
+    <ImageButton
+        android:layout_width="80dp"
+        android:layout_height="80dp"
+        android:id="@+id/btnSkip"
+        android:layout_alignBottom="@+id/btnPlay"
+        android:layout_below="@+id/seekBar"
+        android:layout_toEndOf="@+id/btnPlay"
+        android:scaleType="fitCenter"
+        android:src="@drawable/skipenqueue"
+        android:clickable="true" />
+
+    <ImageButton
+        android:layout_width="120dp"
+        android:layout_height="80dp"
+        android:id="@+id/btnList"
+        android:layout_alignBottom="@+id/btnSkip"
+        android:layout_toEndOf="@+id/btnSkip"
+        android:scaleType="fitCenter"
+        android:src="@drawable/list"
+        android:clickable="true" />
+
+    <ImageView
+        android:layout_width="wrap_content"
+        android:layout_height="wrap_content"
+        android:id="@+id/vieweAlbumArt"
+        android:layout_above="@+id/seekBar"
+        android:layout_alignParentTop="true"
+        android:layout_alignParentStart="true"
+        android:layout_alignParentEnd="true" />
+
+</RelativeLayout>

+ 20 - 20
IZPL-A/IZPL/app/src/main/res/layout/playlistitemview.xml

@@ -1,21 +1,21 @@
-<?xml version="1.0" encoding="utf-8"?>
-<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
-    android:orientation="vertical" android:layout_width="match_parent"
-    android:layout_height="match_parent"
-    android:weightSum="1">
-
-    <TextView
-        android:layout_width="match_parent"
-        android:layout_height="28dp"
-        android:text="Titel"
-        android:id="@+id/titleView"
-        android:textSize="15dp"
-        android:textStyle="bold" />
-
-    <TextView
-        android:layout_width="match_parent"
-        android:layout_height="wrap_content"
-        android:text="XX/XX"
-        android:id="@+id/dataView"
-        android:textSize="12dp" />
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical" android:layout_width="match_parent"
+    android:layout_height="match_parent"
+    android:weightSum="1">
+
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="28dp"
+        android:text="Titel"
+        android:id="@+id/titleView"
+        android:textSize="15dp"
+        android:textStyle="bold" />
+
+    <TextView
+        android:layout_width="match_parent"
+        android:layout_height="wrap_content"
+        android:text="XX/XX"
+        android:id="@+id/dataView"
+        android:textSize="12dp" />
 </LinearLayout>

+ 6 - 6
IZPL-A/IZPL/app/src/main/res/menu/menu_enqueue.xml

@@ -1,6 +1,6 @@
-<menu xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools" tools:context="de.nplusc.izc.izpl.Enqueue">
-    <item android:id="@+id/action_settings" android:title="@string/action_settings"
-        android:orderInCategory="100" app:showAsAction="never" />
-</menu>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools" tools:context="de.nplusc.izc.izpl.Enqueue">
+    <item android:id="@+id/action_settings" android:title="@string/action_settings"
+        android:orderInCategory="100" app:showAsAction="never" />
+</menu>

+ 6 - 6
IZPL-A/IZPL/app/src/main/res/menu/menu_menu.xml

@@ -1,6 +1,6 @@
-<menu xmlns:android="http://schemas.android.com/apk/res/android"
-    xmlns:app="http://schemas.android.com/apk/res-auto"
-    xmlns:tools="http://schemas.android.com/tools" tools:context=".Menu">
-    <item android:id="@+id/action_settings" android:title="@string/action_settings"
-        android:orderInCategory="100" app:showAsAction="never" />
-</menu>
+<menu xmlns:android="http://schemas.android.com/apk/res/android"
+    xmlns:app="http://schemas.android.com/apk/res-auto"
+    xmlns:tools="http://schemas.android.com/tools" tools:context=".Menu">
+    <item android:id="@+id/action_settings" android:title="@string/action_settings"
+        android:orderInCategory="100" app:showAsAction="never" />
+</menu>

+ 6 - 6
IZPL-A/IZPL/app/src/main/res/values-w820dp/dimens.xml

@@ -1,6 +1,6 @@
-<resources>
-    <!-- Example customization of dimensions originally defined in res/values/dimens.xml
-         (such as screen margins) for screens with more than 820dp of available width. This
-         would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
-    <dimen name="activity_horizontal_margin">64dp</dimen>
-</resources>
+<resources>
+    <!-- Example customization of dimensions originally defined in res/values/dimens.xml
+         (such as screen margins) for screens with more than 820dp of available width. This
+         would include 7" and 10" devices in landscape (~960dp and ~1280dp respectively). -->
+    <dimen name="activity_horizontal_margin">64dp</dimen>
+</resources>

+ 5 - 5
IZPL-A/IZPL/app/src/main/res/values/dimens.xml

@@ -1,5 +1,5 @@
-<resources>
-    <!-- Default screen margins, per the Android Design guidelines. -->
-    <dimen name="activity_horizontal_margin">16dp</dimen>
-    <dimen name="activity_vertical_margin">16dp</dimen>
-</resources>
+<resources>
+    <!-- Default screen margins, per the Android Design guidelines. -->
+    <dimen name="activity_horizontal_margin">16dp</dimen>
+    <dimen name="activity_vertical_margin">16dp</dimen>
+</resources>

+ 9 - 9
IZPL-A/IZPL/app/src/main/res/values/strings.xml

@@ -1,9 +1,9 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources>
-
-    <string name="app_name">iZpl</string>
-    <string name="hello_world">Hello world!</string>
-    <string name="action_settings">Settings</string>
-    <string name="title_activity_enqueue">Enqueue</string>
-
-</resources>
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+
+    <string name="app_name">iZpl</string>
+    <string name="hello_world">Hello world!</string>
+    <string name="action_settings">Settings</string>
+    <string name="title_activity_enqueue">Enqueue</string>
+
+</resources>

+ 8 - 8
IZPL-A/IZPL/app/src/main/res/values/styles.xml

@@ -1,8 +1,8 @@
-<resources>
-
-    <!-- Base application theme. -->
-    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
-        <!-- Customize your theme here. -->
-    </style>
-
-</resources>
+<resources>
+
+    <!-- Base application theme. -->
+    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
+        <!-- Customize your theme here. -->
+    </style>
+
+</resources>

+ 1 - 1
IZPL-A/IZPL/filechooser/.gitignore

@@ -1 +1 @@
-/build
+/build

+ 17 - 17
IZPL-A/IZPL/filechooser/proguard-rules.pro

@@ -1,17 +1,17 @@
-# Add project specific ProGuard rules here.
-# By default, the flags in this file are appended to flags specified
-# in D:/src/android_sdk/tools/proguard/proguard-android.txt
-# You can edit the include path and order by changing the proguardFiles
-# directive in build.gradle.
-#
-# For more details, see
-#   http://developer.android.com/guide/developing/tools/proguard.html
-
-# Add any project specific keep options here:
-
-# If your project uses WebView with JS, uncomment the following
-# and specify the fully qualified class name to the JavaScript interface
-# class:
-#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
-#   public *;
-#}
+# Add project specific ProGuard rules here.
+# By default, the flags in this file are appended to flags specified
+# in D:/src/android_sdk/tools/proguard/proguard-android.txt
+# You can edit the include path and order by changing the proguardFiles
+# directive in build.gradle.
+#
+# For more details, see
+#   http://developer.android.com/guide/developing/tools/proguard.html
+
+# Add any project specific keep options here:
+
+# If your project uses WebView with JS, uncomment the following
+# and specify the fully qualified class name to the JavaScript interface
+# class:
+#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
+#   public *;
+#}

+ 12 - 12
IZPL-A/IZPL/filechooser/src/androidTest/java/de/nplusc/izc/filechooser/ApplicationTest.java

@@ -1,13 +1,13 @@
-package de.nplusc.izc.filechooser;
-
-import android.app.Application;
-import android.test.ApplicationTestCase;
-
-/**
- * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
- */
-public class ApplicationTest extends ApplicationTestCase<Application> {
-    public ApplicationTest() {
-        super(Application.class);
-    }
+package de.nplusc.izc.filechooser;
+
+import android.app.Application;
+import android.test.ApplicationTestCase;
+
+/**
+ * <a href="http://d.android.com/tools/testing/testing_android.html">Testing Fundamentals</a>
+ */
+public class ApplicationTest extends ApplicationTestCase<Application> {
+    public ApplicationTest() {
+        super(Application.class);
+    }
 }

+ 19 - 19
IZPL-A/IZPL/filechooser/src/main/AndroidManifest.xml

@@ -1,20 +1,20 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-      package="br.com.thinkti.android.filechooser"
-      android:versionCode="1"
-      android:versionName="1.0">
-    <!--android:icon="@drawable/android32"-->
-    <application  android:label="@string/app_name">
-        <activity android:name="br.com.thinkti.android.filechooser.FileChooser"
-                  android:label="@string/app_name">
-            <!--<intent-filter>
-                <action android:name="android.intent.action.MAIN" />
-                <category android:name="android.intent.category.LAUNCHER" />
-            </intent-filter>-->
-        </activity>
-
-    </application>
-    <uses-sdk android:minSdkVersion="4" />
-
-<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+      package="br.com.thinkti.android.filechooser"
+      android:versionCode="1"
+      android:versionName="1.0">
+    <!--android:icon="@drawable/android32"-->
+    <application  android:label="@string/app_name">
+        <activity android:name="br.com.thinkti.android.filechooser.FileChooser"
+                  android:label="@string/app_name">
+            <!--<intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>-->
+        </activity>
+
+    </application>
+    <uses-sdk android:minSdkVersion="4" />
+
+<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"></uses-permission>
 </manifest> 

+ 9 - 9
IZPL-A/IZPL/filechooser/src/main/AndroidManifest.xml.bak

@@ -1,9 +1,9 @@
-<manifest xmlns:android="http://schemas.android.com/apk/res/android"
-    package="de.nplusc.izc.filechooser">
-
-    <application android:allowBackup="true" android:label="@string/app_name"
-        android:icon="@drawable/ic_launcher">
-
-    </application>
-
-</manifest>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+    package="de.nplusc.izc.filechooser">
+
+    <application android:allowBackup="true" android:label="@string/app_name"
+        android:icon="@drawable/ic_launcher">
+
+    </application>
+
+</manifest>

+ 88 - 88
IZPL-A/IZPL/filechooser/src/main/java/br/com/thinkti/android/filechooser/FileArrayAdapter.java

@@ -1,88 +1,88 @@
-package br.com.thinkti.android.filechooser;
-
-import java.util.List;
-
-import br.com.thinkti.android.filechooser.R;
-
-import android.content.Context;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.view.ViewGroup;
-import android.widget.ArrayAdapter;
-import android.widget.ImageView;
-import android.widget.TextView;
-
-public class FileArrayAdapter extends ArrayAdapter<Option> {
-
-	private Context c;
-	private int id;
-	private List<Option> items;
-
-	public FileArrayAdapter(Context context, int textViewResourceId,
-			List<Option> objects) {
-		super(context, textViewResourceId, objects);
-		c = context;
-		id = textViewResourceId;
-		items = objects;
-	}
-
-	public Option getItem(int i) {
-		return items.get(i);
-	}
-
-	@Override
-	public View getView(int position, View convertView, ViewGroup parent) {
-		View v = convertView;
-		if (v == null) {
-			LayoutInflater vi = (LayoutInflater) c
-					.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
-			v = vi.inflate(id, null);
-		}
-		final Option o = items.get(position);
-		if (o != null) {
-			ImageView im = (ImageView) v.findViewById(R.id.img1);
-			TextView t1 = (TextView) v.findViewById(R.id.TextView01);
-			TextView t2 = (TextView) v.findViewById(R.id.TextView02);
-			
-			if(o.getData().equalsIgnoreCase("folder")){
-				im.setImageResource(R.drawable.folder);
-			} else if (o.getData().equalsIgnoreCase("parent directory")) {
-				im.setImageResource(R.drawable.back32);
-			} else {
-				String name = o.getName().toLowerCase();
-				if (name.endsWith(".xls") ||  name.endsWith(".xlsx"))
-					im.setImageResource(R.drawable.xls);
-				else if (name.endsWith(".doc") ||  name.endsWith(".docx"))
-					im.setImageResource(R.drawable.doc);
-				else if (name.endsWith(".ppt") ||  o.getName().endsWith(".pptx"))
-					im.setImageResource(R.drawable.ppt);
-				else if (name.endsWith(".pdf"))
-					im.setImageResource(R.drawable.pdf);
-				else if (name.endsWith(".apk"))
-					im.setImageResource(R.drawable.android32);
-				else if (name.endsWith(".txt"))
-					im.setImageResource(R.drawable.txt32);
-				else if (name.endsWith(".jpg") || name.endsWith(".jpeg"))
-					im.setImageResource(R.drawable.jpg32);
-				else if (name.endsWith(".png"))
-					im.setImageResource(R.drawable.png32);
-				else if (name.endsWith(".zip"))
-					im.setImageResource(R.drawable.zip32);
-				else if (name.endsWith(".rtf"))
-					im.setImageResource(R.drawable.rtf32);
-				else if (name.endsWith(".gif"))
-					im.setImageResource(R.drawable.gif32);
-				else
-					im.setImageResource(R.drawable.whitepage32);					
-			}
-
-			if (t1 != null)
-				t1.setText(o.getName());
-			if (t2 != null)
-				t2.setText(o.getData());				
-
-		}
-		return v;
-	}
-
-}
+package br.com.thinkti.android.filechooser;
+
+import java.util.List;
+
+import br.com.thinkti.android.filechooser.R;
+
+import android.content.Context;
+import android.view.LayoutInflater;
+import android.view.View;
+import android.view.ViewGroup;
+import android.widget.ArrayAdapter;
+import android.widget.ImageView;
+import android.widget.TextView;
+
+public class FileArrayAdapter extends ArrayAdapter<Option> {
+
+	private Context c;
+	private int id;
+	private List<Option> items;
+
+	public FileArrayAdapter(Context context, int textViewResourceId,
+			List<Option> objects) {
+		super(context, textViewResourceId, objects);
+		c = context;
+		id = textViewResourceId;
+		items = objects;
+	}
+
+	public Option getItem(int i) {
+		return items.get(i);
+	}
+
+	@Override
+	public View getView(int position, View convertView, ViewGroup parent) {
+		View v = convertView;
+		if (v == null) {
+			LayoutInflater vi = (LayoutInflater) c
+					.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
+			v = vi.inflate(id, null);
+		}
+		final Option o = items.get(position);
+		if (o != null) {
+			ImageView im = (ImageView) v.findViewById(R.id.img1);
+			TextView t1 = (TextView) v.findViewById(R.id.TextView01);
+			TextView t2 = (TextView) v.findViewById(R.id.TextView02);
+			
+			if(o.getData().equalsIgnoreCase("folder")){
+				im.setImageResource(R.drawable.folder);
+			} else if (o.getData().equalsIgnoreCase("parent directory")) {
+				im.setImageResource(R.drawable.back32);
+			} else {
+				String name = o.getName().toLowerCase();
+				if (name.endsWith(".xls") ||  name.endsWith(".xlsx"))
+					im.setImageResource(R.drawable.xls);
+				else if (name.endsWith(".doc") ||  name.endsWith(".docx"))
+					im.setImageResource(R.drawable.doc);
+				else if (name.endsWith(".ppt") ||  o.getName().endsWith(".pptx"))
+					im.setImageResource(R.drawable.ppt);
+				else if (name.endsWith(".pdf"))
+					im.setImageResource(R.drawable.pdf);
+				else if (name.endsWith(".apk"))
+					im.setImageResource(R.drawable.android32);
+				else if (name.endsWith(".txt"))
+					im.setImageResource(R.drawable.txt32);
+				else if (name.endsWith(".jpg") || name.endsWith(".jpeg"))
+					im.setImageResource(R.drawable.jpg32);
+				else if (name.endsWith(".png"))
+					im.setImageResource(R.drawable.png32);
+				else if (name.endsWith(".zip"))
+					im.setImageResource(R.drawable.zip32);
+				else if (name.endsWith(".rtf"))
+					im.setImageResource(R.drawable.rtf32);
+				else if (name.endsWith(".gif"))
+					im.setImageResource(R.drawable.gif32);
+				else
+					im.setImageResource(R.drawable.whitepage32);					
+			}
+
+			if (t1 != null)
+				t1.setText(o.getName());
+			if (t2 != null)
+				t2.setText(o.getData());				
+
+		}
+		return v;
+	}
+
+}

+ 43 - 43
IZPL-A/IZPL/filechooser/src/main/java/br/com/thinkti/android/filechooser/Option.java

@@ -1,43 +1,43 @@
-package br.com.thinkti.android.filechooser;
-
-public class Option implements Comparable<Option>{
-	private String name;
-	private String data;
-	private String path;
-	private boolean folder;
-	private boolean parent;
-	
-	public Option(String n,String d,String p, boolean folder, boolean parent)
-	{
-		name = n;
-		data = d;
-		path = p;
-		this.folder = folder;
-		this.parent = parent;
-	}
-	public String getName()
-	{
-		return name;
-	}
-	public String getData()
-	{
-		return data;
-	}
-	public String getPath()
-	{
-		return path;
-	}
-	@Override
-	public int compareTo(Option o) {
-		if(this.name != null)
-			return this.name.toLowerCase().compareTo(o.getName().toLowerCase()); 
-		else 
-			throw new IllegalArgumentException();
-	}
-	public boolean isFolder() {
-		return folder;
-	}
-	public boolean isParent() {
-		return parent;
-	}
-}
+package br.com.thinkti.android.filechooser;
+
+public class Option implements Comparable<Option>{
+	private String name;
+	private String data;
+	private String path;
+	private boolean folder;
+	private boolean parent;
+	
+	public Option(String n,String d,String p, boolean folder, boolean parent)
+	{
+		name = n;
+		data = d;
+		path = p;
+		this.folder = folder;
+		this.parent = parent;
+	}
+	public String getName()
+	{
+		return name;
+	}
+	public String getData()
+	{
+		return data;
+	}
+	public String getPath()
+	{
+		return path;
+	}
+	@Override
+	public int compareTo(Option o) {
+		if(this.name != null)
+			return this.name.toLowerCase().compareTo(o.getName().toLowerCase()); 
+		else 
+			throw new IllegalArgumentException();
+	}
+	public boolean isFolder() {
+		return folder;
+	}
+	public boolean isParent() {
+		return parent;
+	}
+}

+ 17 - 17
IZPL-A/IZPL/gradle.properties

@@ -1,18 +1,18 @@
-# Project-wide Gradle settings.
-
-# IDE (e.g. Android Studio) users:
-# Gradle settings configured through the IDE *will override*
-# any settings specified in this file.
-
-# For more details on how to configure your build environment visit
-# http://www.gradle.org/docs/current/userguide/build_environment.html
-
-# Specifies the JVM arguments used for the daemon process.
-# The setting is particularly useful for tweaking memory settings.
-# Default value: -Xmx10248m -XX:MaxPermSize=256m
-# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
-
-# When configured, Gradle will run in incubating parallel mode.
-# This option should only be used with decoupled projects. More details, visit
-# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
+# Project-wide Gradle settings.
+
+# IDE (e.g. Android Studio) users:
+# Gradle settings configured through the IDE *will override*
+# any settings specified in this file.
+
+# For more details on how to configure your build environment visit
+# http://www.gradle.org/docs/current/userguide/build_environment.html
+
+# Specifies the JVM arguments used for the daemon process.
+# The setting is particularly useful for tweaking memory settings.
+# Default value: -Xmx10248m -XX:MaxPermSize=256m
+# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
+
+# When configured, Gradle will run in incubating parallel mode.
+# This option should only be used with decoupled projects. More details, visit
+# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
 # org.gradle.parallel=true

+ 90 - 90
IZPL-A/IZPL/gradlew.bat

@@ -1,90 +1,90 @@
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem  Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS=
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto init
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto init
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:init
-@rem Get command-line arguments, handling Windowz variants
-
-if not "%OS%" == "Windows_NT" goto win9xME_args
-if "%@eval[2+2]" == "4" goto 4NT_args
-
-:win9xME_args
-@rem Slurp the command line arguments.
-set CMD_LINE_ARGS=
-set _SKIP=2
-
-:win9xME_args_slurp
-if "x%~1" == "x" goto execute
-
-set CMD_LINE_ARGS=%*
-goto execute
-
-:4NT_args
-@rem Get arguments from the 4NT Shell from JP Software
-set CMD_LINE_ARGS=%$
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@if "%DEBUG%" == "" @echo off
+@rem ##########################################################################
+@rem
+@rem  Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS=
+
+set DIRNAME=%~dp0
+if "%DIRNAME%" == "" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if "%ERRORLEVEL%" == "0" goto init
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto init
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:init
+@rem Get command-line arguments, handling Windowz variants
+
+if not "%OS%" == "Windows_NT" goto win9xME_args
+if "%@eval[2+2]" == "4" goto 4NT_args
+
+:win9xME_args
+@rem Slurp the command line arguments.
+set CMD_LINE_ARGS=
+set _SKIP=2
+
+:win9xME_args_slurp
+if "x%~1" == "x" goto execute
+
+set CMD_LINE_ARGS=%*
+goto execute
+
+:4NT_args
+@rem Get arguments from the 4NT Shell from JP Software
+set CMD_LINE_ARGS=%$
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
+
+:end
+@rem End local scope for the variables with windows NT shell
+if "%ERRORLEVEL%"=="0" goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+if  not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
+exit /b 1
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega

+ 1 - 1
IZPL-A/IZPL/settings.gradle

@@ -1 +1 @@
-include ':app', ':filechooser', ':exoplayer'
+include ':app', ':filechooser', ':exoplayer'

+ 3 - 3
IZPL-A/build.gradle

@@ -1,3 +1,3 @@
-
-
-
+
+
+

+ 9 - 9
IZSetup/bundle.izmeta

@@ -1,10 +1,10 @@
-000|izsetup|1.0.0| 
-000|type|bundle|nur für uer (der kommentar)
-001|meta:isZipped|false|
-CMM|meta:isZipped: bei false sind die dateien als normale dateien neben dieser bundle gelagert -> kein entzippern
-CMM|in tempdir nötig. Muss bei multidisk-bundles deaktiviert sein. bei diskbundles wird Deaktivierung empfohlen
-CMM|da es die Festplatte nicht so vollstopft
-001|bundlename|Testbundle
-001|packagedata|default.izpackage|muss im basedir des Bundles liegen(!!!!!!!!!!!!!!!!!!!!!!!!!!)
-001|Description|Test für bundleGui
+000|izsetup|1.0.0| 
+000|type|bundle|nur für uer (der kommentar)
+001|meta:isZipped|false|
+CMM|meta:isZipped: bei false sind die dateien als normale dateien neben dieser bundle gelagert -> kein entzippern
+CMM|in tempdir nötig. Muss bei multidisk-bundles deaktiviert sein. bei diskbundles wird Deaktivierung empfohlen
+CMM|da es die Festplatte nicht so vollstopft
+001|bundlename|Testbundle
+001|packagedata|default.izpackage|muss im basedir des Bundles liegen(!!!!!!!!!!!!!!!!!!!!!!!!!!)
+001|Description|Test für bundleGui
 001|extractSize|10000|Angabe in Bytes. wird von GUI konvertiert.

+ 417 - 417
IZSetup/src/main/java/de/nplusc/izc/InstallPak/BundleVerifyGui.java

@@ -1,417 +1,417 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.InstallPak;
-
-import de.nplusc.izc.InstallPak.legacy.PackagerGUI;
-import de.nplusc.izc.tools.IOtools.FileTK;
-import de.nplusc.izc.tools.IOtools.ZipFileHandler;
-import de.nplusc.izc.tools.UiToolz.UiTools;
-import de.nplusc.izc.tools.WinToolz.Commands;
-import de.nplusc.izc.tools.baseTools.Detectors;
-import de.nplusc.izc.tools.baseTools.Messagers;
-import de.nplusc.izc.tools.baseTools.Tools;
-import java.awt.EventQueue;
-import java.awt.Point;
-import java.util.Map;
-import javax.swing.UIManager;
-import javax.swing.UnsupportedLookAndFeelException;
-import org.yaml.snakeyaml.Yaml;
-
-/**
- *
- * @author LH
- */
-public class BundleVerifyGui extends javax.swing.JFrame
-{
-    public String zf;
-    /**
-     * Creates new form BundleVerifyGui
-     * @param zfl das FIle des Bundles
-     */
-    public BundleVerifyGui(String zfl)
-    {
-        zf=zfl;
-        z=new ZipFileHandler(zf);
-        initComponents();
-        readInBundle();//file ist im zipfilehandlerdefiniert;
-        updatePosition();
-        lblVID.setText(Definitions.VERSION_GUI_TXT);
-    }
-    private void updatePosition()
-    {
-        Point p = new Point(Main.topleft_coords_x, Main.topleft_coords_y);
-        setLocation(p);
-    }
-    private String fileFormatused="legacy";
-    private boolean isDiskMode=false;
-    private String packfileForInstall;
-    private void readInBundle()
-    {
-        String metafile = z.getStringEntry("bundle.izmeta");
-        if(metafile.startsWith("000|izsetup"))//startsWith("000|izsetup|)
-        {
-            
-            String baseDir = Tools.processEnvVarsinLine("%temp%\\iZsetup");//sird aktualisiert wenn ein UnCopy-Bundle erkannt wurde
-            // <editor-fold defaultstate="collapsed" desc="legacy">     
-            if(metafile.startsWith("000|izsetup|1")||metafile.startsWith("000|izsetup|2")) //version 1 und 2 mit altem format, compat-code
-            {
-                Tools.DebugHelperPrint("LEgacy Mode", true, "iZsetup.enableFinerDebug");
-                String[][] bundledata = izsetupReader.ConvertToSysSpezSetupFile(metafile, false, true, "");
-
-                for (String[] line : bundledata)
-                {
-                    System.err.println(line);
-                    String[] linedata= line;
-                    if(linedata[1].equalsIgnoreCase("meta:isZipped")&&linedata[2].equalsIgnoreCase("false"))
-                    {
-                        Tools.DebugHelperPrint("Disk?", true, "iZsetup.enableFinerDebug");
-                        isDiskMode=true;
-                        Main.baseDir=baseDir;
-                        Main.diskMode=true;
-                        baseDir=FileTK.getFilePath(zf);
-                        unpax.setText("Module auswählen");
-                        monitorBar.setVisible(false);
-                    }
-                    if(linedata[1].equalsIgnoreCase("extractSize"))
-                       lblSize.setText(UiTools.convertToSizeString(Long.valueOf(linedata[2])));
-                    if(linedata[1].equalsIgnoreCase("Description"))
-                       lblDesc.setText(linedata[2]);
-                    if(linedata[1].equalsIgnoreCase("bundlename"))
-                       lblName.setText(linedata[2]);
-                    if(linedata[1].equalsIgnoreCase("packagedata"))
-                    {
-                        packfileForInstall = baseDir+"\\"+linedata[2];
-                        System.err.println("InstPk>>"+packfileForInstall);
-                    }
-                }
-            }//</editor-fold>
-            else
-            {
-                Tools.DebugHelperPrint("New Mode", true, "iZsetup.enableFinerDebug");
-                String idstring = metafile.split("\\\n")[0];
-                System.out.println(idstring);
-                izsetupReader.validateVersion(idstring.split("\\|")[2]);
-                metafile= metafile.substring(idstring.length());//strip off header on YML file
-                Yaml y = new Yaml();
-                Map<String,String> metadata = (Map<String,String>) y.load(metafile);
-                String isZipped = metadata.get("meta:isZipped");
-                Tools.DebugHelperPrint(isZipped, true, "iZsetup.enableFinerDebug");
-                isDiskMode = isZipped==null?true:!Boolean.parseBoolean(isZipped);
-                String packpath = metadata.get("packagedata");
-                Main.baseDir=baseDir;//HOSENFOTZE DASS DU NICHT DA WARSTS
-                System.out.println(metadata);
-                if (false&&metadata.get("meta:needsElevation:")!= null&&Boolean.valueOf(metadata.get("meta:needsElevation")))
-                {
-                    System.out.println("adminrechte?!?!?");
-                    String basecmd = Tools.processEnvVarsinLine("-jar "+Main.class.getProtectionDomain().getCodeSource().getLocation().getPath());
-                    if (!Detectors.detectisAdmin())
-                    {
-                        Tools.DebugHelperPrint("hab keine adminrechte :(", true, "iZsetup.enableCoreDebug");
-                        String cmd = basecmd;
-                        String[] args = Main.getArgs();
-                        for (String arg : args)
-                        {
-                            cmd += " " + arg;
-                        }
-                        System.out.println(cmd);
-                        Commands.executeAsAdministrator("java", (cmd).trim());
-                        System.exit(0);
-                    }
-                }
-                if(packpath==null)
-                {
-                    Messagers.SingleLineMsg("Ungültiges iZsetup-Paket! Error 0x0413416F", "Okay");
-                    System.exit(0x0413416F);
-                }
-                if(isDiskMode)
-                {
-                   Tools.DebugHelperPrint(zf, true, "iZsetup.enableFinerDebug");
-                   baseDir=FileTK.getFilePath(zf); 
-                    Main.baseDir=baseDir;
-                    Main.diskMode=true;
-                }
-                String size = metadata.get("extractSize");
-                lblSize.setText(size==null?"undefined":UiTools.convertToSizeString(Long.valueOf(size)));
-                String descript = metadata.get("description");
-                lblDesc.setText(descript==null?"Keine Bescrheibung":descript);
-                String name = metadata.get("bundlename");
-                lblName.setText(name==null?"Package":name);
-                packfileForInstall = baseDir+"\\"+packpath;
-                fileFormatused = metadata.containsKey("meta:packFormat")?metadata.get("meta:packFormat"):"legacy";
-            }
-            
-        }
-        else
-        {
-            Messagers.SingleLineMsg("Kein iZsetup-Paket! Error 0x4140F113", "Okay");
-            System.exit(0x4140F113);
-        }
-    }
-    
-    
-    
-    /**
-     * This method is called from within the constructor to
-     * initialize the form.
-     * WARNING: Do NOT modify this code. The content of this method is
-     * always regenerated by the Form Editor.
-     */
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents()
-    {
-
-        jSeparator2 = new javax.swing.JSeparator();
-        jSeparator3 = new javax.swing.JSeparator();
-        monitorBar = new javax.swing.JProgressBar();
-        lblName = new javax.swing.JLabel();
-        jLabel2 = new javax.swing.JLabel();
-        jLabel3 = new javax.swing.JLabel();
-        lblDesc = new javax.swing.JLabel();
-        lblSize = new javax.swing.JLabel();
-        lblVID = new javax.swing.JLabel();
-        jSeparator1 = new javax.swing.JSeparator();
-        jSeparator4 = new javax.swing.JSeparator();
-        unpax = new javax.swing.JButton();
-        jLabel7 = new javax.swing.JLabel();
-
-        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
-        setResizable(false);
-        addComponentListener(new java.awt.event.ComponentAdapter()
-        {
-            public void componentMoved(java.awt.event.ComponentEvent evt)
-            {
-                formComponentMoved(evt);
-            }
-        });
-
-        lblName.setText("Name");
-
-        jLabel2.setText("Beschreibung");
-
-        jLabel3.setText("Speicherverbrauch");
-
-        lblDesc.setText("jLabel5");
-
-        lblSize.setText("jLabel6");
-
-        lblVID.setText("izSetup 1.0.0 (c) 2012 iZc");
-
-        unpax.setText("Entpacken und Module auswählen");
-        unpax.addActionListener(new java.awt.event.ActionListener()
-        {
-            public void actionPerformed(java.awt.event.ActionEvent evt)
-            {
-                unpaxActionPerformed(evt);
-            }
-        });
-
-        jLabel7.setText("Status des Entpackens");
-
-        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
-        getContentPane().setLayout(layout);
-        layout.setHorizontalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(layout.createSequentialGroup()
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(layout.createSequentialGroup()
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addGroup(layout.createSequentialGroup()
-                                .addGap(35, 35, 35)
-                                .addComponent(jLabel3)
-                                .addGap(18, 18, 18))
-                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                                .addContainerGap()
-                                .addComponent(jLabel2)
-                                .addGap(35, 35, 35)))
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addComponent(lblDesc, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                            .addGroup(layout.createSequentialGroup()
-                                .addComponent(lblSize, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)
-                                .addGap(0, 0, Short.MAX_VALUE))))
-                    .addGroup(layout.createSequentialGroup()
-                        .addGap(90, 90, 90)
-                        .addComponent(jLabel7)))
-                .addContainerGap())
-            .addGroup(layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(layout.createSequentialGroup()
-                        .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(lblVID)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(jSeparator1))
-                    .addComponent(monitorBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addComponent(unpax, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-                .addContainerGap())
-            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                .addGap(0, 475, Short.MAX_VALUE)
-                .addComponent(lblName)
-                .addGap(350, 350, 350))
-        );
-        layout.setVerticalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                .addGap(21, 21, 21)
-                .addComponent(lblName)
-                .addGap(63, 63, 63)
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(lblDesc)
-                    .addComponent(jLabel2))
-                .addGap(18, 18, 18)
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                    .addComponent(jLabel3)
-                    .addComponent(lblSize))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 74, Short.MAX_VALUE)
-                .addComponent(unpax)
-                .addGap(1, 1, 1)
-                .addComponent(jLabel7)
-                .addGap(3, 3, 3)
-                .addComponent(monitorBar, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
-                    .addComponent(lblVID)
-                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
-                    .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
-                .addGap(11, 11, 11))
-        );
-
-        pack();
-    }// </editor-fold>//GEN-END:initComponents
-    ZipFileHandler z;
-    private void unpaxActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_unpaxActionPerformed
-    {//GEN-HEADEREND:event_unpaxActionPerformed
-        Main.filePath=packfileForInstall;//wird von dem anderen Modul verarbeitet //wird von dem anderen Modul verarbeitet
-        //if(!isDiskMode)
-        //{
-            Tools.DebugHelperPrint("Diskfile Detected", true, "iZsetup.enableCoreDebug");
-            /*try
-            {
-                l.lock();
-            }
-            catch (InterruptedException ex)
-            {
-                ex.printStackTrace();
-            }*/
-            
-            new Thread(new Runnable()
-            {
-                @SuppressWarnings("ResultOfObjectAllocationIgnored")
-                InstallFilesManagerAPI ifm = null;
-                @Override
-                public void run()
-                {
-                    //assert fileFormatused.equals("yaml");
-                    if(!isDiskMode)
-                    {
-                        z.extractAllToDiskWithMonitoringProgressbar(Tools.processEnvVarsinLine("%temp%\\iZsetup"), monitorBar);
-                    }
-                    Tools.DebugHelperPrint("Hmmm...", true, "iZsetup.enableFinerDebug");
-                    switch(fileFormatused)
-                    {
-                        case "yaml":
-                            ifm=new YamlInstallFiles(packfileForInstall);
-                            break;
-                    }
-                    EventQueue.invokeLater(new Runnable()
-                    {
-                        @SuppressWarnings("ResultOfObjectAllocationIgnored")
-                        @Override
-                        public void run()
-                        {
-                            Tools.DebugHelperPrint(fileFormatused, true, "iZsetup.enableFinerDebug");
-                            switch(fileFormatused)
-                            {
-                                case "legacy":
-                                    new PackagerGUI().setVisible(true);
-                                    //System.exit(0xDEADBEEF);
-                                    Tools.DebugHelperPrint(">>>>>ShouldntBeHere", true, "iZsetup.enableFinerDebug");
-                                break;
-                                case "yaml":
-                                    new PackagerGUIReloaded(ifm).setVisible(true);
-                                    break;
-                                default:
-                                    Messagers.SingleLineMsg("Ungültige Metadaten! Error: 0x004140FF", "Okay");
-                                    System.exit(0x004140FF);
-                            }
-                            
-                        }
-                    });
-                    setVisible(false);
-                }
-            }).start();
-        //}
-        /* else
-        {
-            Tools.DebugHelperPrint("daFUQ", true, "iZsetup.enableFinerDebug");
-            EventQueue.invokeLater(new Runnable()
-            {
-                @SuppressWarnings("ResultOfObjectAllocationIgnored")
-                @Override
-                public void run()
-                {
-                    new PackagerGUI().setVisible(true);
-                }
-            });
-            setVisible(false);
-        }*/
-        
-    }//GEN-LAST:event_unpaxActionPerformed
-
-    private void formComponentMoved(java.awt.event.ComponentEvent evt)//GEN-FIRST:event_formComponentMoved
-    {//GEN-HEADEREND:event_formComponentMoved
-        Main.topleft_coords_x=getLocation().x;
-        Main.topleft_coords_y=getLocation().x;
-    }//GEN-LAST:event_formComponentMoved
-
-    /**
-     * @param args the command line arguments
-     */
-    public static void main(String args[])
-    {
-        try {
-	    UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
-	} catch( ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e ) { 
-	    //e.printStackTrace();
-	}
-        /* Create and display the form */
-        java.awt.EventQueue.invokeLater(new Runnable()
-        {
-            public void run()
-            {
-                //System.err.println("FIFO");
-                new BundleVerifyGui("D:\\src\\izsetup\\unpaqtest.zip").setVisible(true);
-            }
-        });
-    }
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JLabel jLabel2;
-    private javax.swing.JLabel jLabel3;
-    private javax.swing.JLabel jLabel7;
-    private javax.swing.JSeparator jSeparator1;
-    private javax.swing.JSeparator jSeparator2;
-    private javax.swing.JSeparator jSeparator3;
-    private javax.swing.JSeparator jSeparator4;
-    private javax.swing.JLabel lblDesc;
-    private javax.swing.JLabel lblName;
-    private javax.swing.JLabel lblSize;
-    private javax.swing.JLabel lblVID;
-    private javax.swing.JProgressBar monitorBar;
-    private javax.swing.JButton unpax;
-    // End of variables declaration//GEN-END:variables
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.InstallPak;
+
+import de.nplusc.izc.InstallPak.legacy.PackagerGUI;
+import de.nplusc.izc.tools.IOtools.FileTK;
+import de.nplusc.izc.tools.IOtools.ZipFileHandler;
+import de.nplusc.izc.tools.UiToolz.UiTools;
+import de.nplusc.izc.tools.WinToolz.Commands;
+import de.nplusc.izc.tools.baseTools.Detectors;
+import de.nplusc.izc.tools.baseTools.Messagers;
+import de.nplusc.izc.tools.baseTools.Tools;
+import java.awt.EventQueue;
+import java.awt.Point;
+import java.util.Map;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+import org.yaml.snakeyaml.Yaml;
+
+/**
+ *
+ * @author LH
+ */
+public class BundleVerifyGui extends javax.swing.JFrame
+{
+    public String zf;
+    /**
+     * Creates new form BundleVerifyGui
+     * @param zfl das FIle des Bundles
+     */
+    public BundleVerifyGui(String zfl)
+    {
+        zf=zfl;
+        z=new ZipFileHandler(zf);
+        initComponents();
+        readInBundle();//file ist im zipfilehandlerdefiniert;
+        updatePosition();
+        lblVID.setText(Definitions.VERSION_GUI_TXT);
+    }
+    private void updatePosition()
+    {
+        Point p = new Point(Main.topleft_coords_x, Main.topleft_coords_y);
+        setLocation(p);
+    }
+    private String fileFormatused="legacy";
+    private boolean isDiskMode=false;
+    private String packfileForInstall;
+    private void readInBundle()
+    {
+        String metafile = z.getStringEntry("bundle.izmeta");
+        if(metafile.startsWith("000|izsetup"))//startsWith("000|izsetup|)
+        {
+            
+            String baseDir = Tools.processEnvVarsinLine("%temp%\\iZsetup");//sird aktualisiert wenn ein UnCopy-Bundle erkannt wurde
+            // <editor-fold defaultstate="collapsed" desc="legacy">     
+            if(metafile.startsWith("000|izsetup|1")||metafile.startsWith("000|izsetup|2")) //version 1 und 2 mit altem format, compat-code
+            {
+                Tools.DebugHelperPrint("LEgacy Mode", true, "iZsetup.enableFinerDebug");
+                String[][] bundledata = izsetupReader.ConvertToSysSpezSetupFile(metafile, false, true, "");
+
+                for (String[] line : bundledata)
+                {
+                    System.err.println(line);
+                    String[] linedata= line;
+                    if(linedata[1].equalsIgnoreCase("meta:isZipped")&&linedata[2].equalsIgnoreCase("false"))
+                    {
+                        Tools.DebugHelperPrint("Disk?", true, "iZsetup.enableFinerDebug");
+                        isDiskMode=true;
+                        Main.baseDir=baseDir;
+                        Main.diskMode=true;
+                        baseDir=FileTK.getFilePath(zf);
+                        unpax.setText("Module auswählen");
+                        monitorBar.setVisible(false);
+                    }
+                    if(linedata[1].equalsIgnoreCase("extractSize"))
+                       lblSize.setText(UiTools.convertToSizeString(Long.valueOf(linedata[2])));
+                    if(linedata[1].equalsIgnoreCase("Description"))
+                       lblDesc.setText(linedata[2]);
+                    if(linedata[1].equalsIgnoreCase("bundlename"))
+                       lblName.setText(linedata[2]);
+                    if(linedata[1].equalsIgnoreCase("packagedata"))
+                    {
+                        packfileForInstall = baseDir+"\\"+linedata[2];
+                        System.err.println("InstPk>>"+packfileForInstall);
+                    }
+                }
+            }//</editor-fold>
+            else
+            {
+                Tools.DebugHelperPrint("New Mode", true, "iZsetup.enableFinerDebug");
+                String idstring = metafile.split("\\\n")[0];
+                System.out.println(idstring);
+                izsetupReader.validateVersion(idstring.split("\\|")[2]);
+                metafile= metafile.substring(idstring.length());//strip off header on YML file
+                Yaml y = new Yaml();
+                Map<String,String> metadata = (Map<String,String>) y.load(metafile);
+                String isZipped = metadata.get("meta:isZipped");
+                Tools.DebugHelperPrint(isZipped, true, "iZsetup.enableFinerDebug");
+                isDiskMode = isZipped==null?true:!Boolean.parseBoolean(isZipped);
+                String packpath = metadata.get("packagedata");
+                Main.baseDir=baseDir;//HOSENFOTZE DASS DU NICHT DA WARSTS
+                System.out.println(metadata);
+                if (false&&metadata.get("meta:needsElevation:")!= null&&Boolean.valueOf(metadata.get("meta:needsElevation")))
+                {
+                    System.out.println("adminrechte?!?!?");
+                    String basecmd = Tools.processEnvVarsinLine("-jar "+Main.class.getProtectionDomain().getCodeSource().getLocation().getPath());
+                    if (!Detectors.detectisAdmin())
+                    {
+                        Tools.DebugHelperPrint("hab keine adminrechte :(", true, "iZsetup.enableCoreDebug");
+                        String cmd = basecmd;
+                        String[] args = Main.getArgs();
+                        for (String arg : args)
+                        {
+                            cmd += " " + arg;
+                        }
+                        System.out.println(cmd);
+                        Commands.executeAsAdministrator("java", (cmd).trim());
+                        System.exit(0);
+                    }
+                }
+                if(packpath==null)
+                {
+                    Messagers.SingleLineMsg("Ungültiges iZsetup-Paket! Error 0x0413416F", "Okay");
+                    System.exit(0x0413416F);
+                }
+                if(isDiskMode)
+                {
+                   Tools.DebugHelperPrint(zf, true, "iZsetup.enableFinerDebug");
+                   baseDir=FileTK.getFilePath(zf); 
+                    Main.baseDir=baseDir;
+                    Main.diskMode=true;
+                }
+                String size = metadata.get("extractSize");
+                lblSize.setText(size==null?"undefined":UiTools.convertToSizeString(Long.valueOf(size)));
+                String descript = metadata.get("description");
+                lblDesc.setText(descript==null?"Keine Bescrheibung":descript);
+                String name = metadata.get("bundlename");
+                lblName.setText(name==null?"Package":name);
+                packfileForInstall = baseDir+"\\"+packpath;
+                fileFormatused = metadata.containsKey("meta:packFormat")?metadata.get("meta:packFormat"):"legacy";
+            }
+            
+        }
+        else
+        {
+            Messagers.SingleLineMsg("Kein iZsetup-Paket! Error 0x4140F113", "Okay");
+            System.exit(0x4140F113);
+        }
+    }
+    
+    
+    
+    /**
+     * This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents()
+    {
+
+        jSeparator2 = new javax.swing.JSeparator();
+        jSeparator3 = new javax.swing.JSeparator();
+        monitorBar = new javax.swing.JProgressBar();
+        lblName = new javax.swing.JLabel();
+        jLabel2 = new javax.swing.JLabel();
+        jLabel3 = new javax.swing.JLabel();
+        lblDesc = new javax.swing.JLabel();
+        lblSize = new javax.swing.JLabel();
+        lblVID = new javax.swing.JLabel();
+        jSeparator1 = new javax.swing.JSeparator();
+        jSeparator4 = new javax.swing.JSeparator();
+        unpax = new javax.swing.JButton();
+        jLabel7 = new javax.swing.JLabel();
+
+        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+        setResizable(false);
+        addComponentListener(new java.awt.event.ComponentAdapter()
+        {
+            public void componentMoved(java.awt.event.ComponentEvent evt)
+            {
+                formComponentMoved(evt);
+            }
+        });
+
+        lblName.setText("Name");
+
+        jLabel2.setText("Beschreibung");
+
+        jLabel3.setText("Speicherverbrauch");
+
+        lblDesc.setText("jLabel5");
+
+        lblSize.setText("jLabel6");
+
+        lblVID.setText("izSetup 1.0.0 (c) 2012 iZc");
+
+        unpax.setText("Entpacken und Module auswählen");
+        unpax.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                unpaxActionPerformed(evt);
+            }
+        });
+
+        jLabel7.setText("Status des Entpackens");
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
+        getContentPane().setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addGroup(layout.createSequentialGroup()
+                                .addGap(35, 35, 35)
+                                .addComponent(jLabel3)
+                                .addGap(18, 18, 18))
+                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                                .addContainerGap()
+                                .addComponent(jLabel2)
+                                .addGap(35, 35, 35)))
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(lblDesc, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                            .addGroup(layout.createSequentialGroup()
+                                .addComponent(lblSize, javax.swing.GroupLayout.PREFERRED_SIZE, 142, javax.swing.GroupLayout.PREFERRED_SIZE)
+                                .addGap(0, 0, Short.MAX_VALUE))))
+                    .addGroup(layout.createSequentialGroup()
+                        .addGap(90, 90, 90)
+                        .addComponent(jLabel7)))
+                .addContainerGap())
+            .addGroup(layout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(lblVID)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(jSeparator1))
+                    .addComponent(monitorBar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                    .addComponent(unpax, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                .addContainerGap())
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                .addGap(0, 475, Short.MAX_VALUE)
+                .addComponent(lblName)
+                .addGap(350, 350, 350))
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                .addGap(21, 21, 21)
+                .addComponent(lblName)
+                .addGap(63, 63, 63)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(lblDesc)
+                    .addComponent(jLabel2))
+                .addGap(18, 18, 18)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                    .addComponent(jLabel3)
+                    .addComponent(lblSize))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 74, Short.MAX_VALUE)
+                .addComponent(unpax)
+                .addGap(1, 1, 1)
+                .addComponent(jLabel7)
+                .addGap(3, 3, 3)
+                .addComponent(monitorBar, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+                    .addComponent(lblVID)
+                    .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
+                    .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addGap(11, 11, 11))
+        );
+
+        pack();
+    }// </editor-fold>//GEN-END:initComponents
+    ZipFileHandler z;
+    private void unpaxActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_unpaxActionPerformed
+    {//GEN-HEADEREND:event_unpaxActionPerformed
+        Main.filePath=packfileForInstall;//wird von dem anderen Modul verarbeitet //wird von dem anderen Modul verarbeitet
+        //if(!isDiskMode)
+        //{
+            Tools.DebugHelperPrint("Diskfile Detected", true, "iZsetup.enableCoreDebug");
+            /*try
+            {
+                l.lock();
+            }
+            catch (InterruptedException ex)
+            {
+                ex.printStackTrace();
+            }*/
+            
+            new Thread(new Runnable()
+            {
+                @SuppressWarnings("ResultOfObjectAllocationIgnored")
+                InstallFilesManagerAPI ifm = null;
+                @Override
+                public void run()
+                {
+                    //assert fileFormatused.equals("yaml");
+                    if(!isDiskMode)
+                    {
+                        z.extractAllToDiskWithMonitoringProgressbar(Tools.processEnvVarsinLine("%temp%\\iZsetup"), monitorBar);
+                    }
+                    Tools.DebugHelperPrint("Hmmm...", true, "iZsetup.enableFinerDebug");
+                    switch(fileFormatused)
+                    {
+                        case "yaml":
+                            ifm=new YamlInstallFiles(packfileForInstall);
+                            break;
+                    }
+                    EventQueue.invokeLater(new Runnable()
+                    {
+                        @SuppressWarnings("ResultOfObjectAllocationIgnored")
+                        @Override
+                        public void run()
+                        {
+                            Tools.DebugHelperPrint(fileFormatused, true, "iZsetup.enableFinerDebug");
+                            switch(fileFormatused)
+                            {
+                                case "legacy":
+                                    new PackagerGUI().setVisible(true);
+                                    //System.exit(0xDEADBEEF);
+                                    Tools.DebugHelperPrint(">>>>>ShouldntBeHere", true, "iZsetup.enableFinerDebug");
+                                break;
+                                case "yaml":
+                                    new PackagerGUIReloaded(ifm).setVisible(true);
+                                    break;
+                                default:
+                                    Messagers.SingleLineMsg("Ungültige Metadaten! Error: 0x004140FF", "Okay");
+                                    System.exit(0x004140FF);
+                            }
+                            
+                        }
+                    });
+                    setVisible(false);
+                }
+            }).start();
+        //}
+        /* else
+        {
+            Tools.DebugHelperPrint("daFUQ", true, "iZsetup.enableFinerDebug");
+            EventQueue.invokeLater(new Runnable()
+            {
+                @SuppressWarnings("ResultOfObjectAllocationIgnored")
+                @Override
+                public void run()
+                {
+                    new PackagerGUI().setVisible(true);
+                }
+            });
+            setVisible(false);
+        }*/
+        
+    }//GEN-LAST:event_unpaxActionPerformed
+
+    private void formComponentMoved(java.awt.event.ComponentEvent evt)//GEN-FIRST:event_formComponentMoved
+    {//GEN-HEADEREND:event_formComponentMoved
+        Main.topleft_coords_x=getLocation().x;
+        Main.topleft_coords_y=getLocation().x;
+    }//GEN-LAST:event_formComponentMoved
+
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String args[])
+    {
+        try {
+	    UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
+	} catch( ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e ) { 
+	    //e.printStackTrace();
+	}
+        /* Create and display the form */
+        java.awt.EventQueue.invokeLater(new Runnable()
+        {
+            public void run()
+            {
+                //System.err.println("FIFO");
+                new BundleVerifyGui("D:\\src\\izsetup\\unpaqtest.zip").setVisible(true);
+            }
+        });
+    }
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JLabel jLabel2;
+    private javax.swing.JLabel jLabel3;
+    private javax.swing.JLabel jLabel7;
+    private javax.swing.JSeparator jSeparator1;
+    private javax.swing.JSeparator jSeparator2;
+    private javax.swing.JSeparator jSeparator3;
+    private javax.swing.JSeparator jSeparator4;
+    private javax.swing.JLabel lblDesc;
+    private javax.swing.JLabel lblName;
+    private javax.swing.JLabel lblSize;
+    private javax.swing.JLabel lblVID;
+    private javax.swing.JProgressBar monitorBar;
+    private javax.swing.JButton unpax;
+    // End of variables declaration//GEN-END:variables
+}

+ 186 - 186
IZSetup/src/main/java/de/nplusc/izc/InstallPak/CreateSampleFile.java

@@ -1,186 +1,186 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.InstallPak;
-
-import de.nplusc.izc.tools.IOtools.FileTK;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.LinkedHashMap;
-import java.util.Map;
-import org.yaml.snakeyaml.DumperOptions;
-import org.yaml.snakeyaml.Yaml;
-
-/**
- *
- * @author LH
- */
-public class CreateSampleFile
-{
-    public static void main(String[] devnulled) throws FileNotFoundException, IOException
-    {
-        //SHARED
-        DumperOptions yamlOptions = new DumperOptions();
-        yamlOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
-        Yaml y = new Yaml(yamlOptions);
-        /*  
-        Map<String,Object> izsetup = new LinkedHashMap<>();
-        izsetup.put("comment:type","izsetup");
-        ArrayList<String> rootEntries=new ArrayList<>();
-        rootEntries.add("Group1");
-        rootEntries.add("Runtimes");
-        rootEntries.add("nichtWin8");
-        izsetup.put("Segments",rootEntries);
-        Map<String,String[]> group1 = new LinkedHashMap<>();
-        group1.put("Condition",new String[]{"IsWin8"});
-        group1.put("ifnode",new String[]{"Group1Win8"});
-        group1.put("postCond",new String[]{"Group1Post"});
-        izsetup.put("Group1",group1);
-        Map<String,String[]> group1win8 = new LinkedHashMap<>();
-        group1win8.put("Condition",new String[]{"Is64Bit"});
-        group1win8.put("elsenode",new String[]{"Group1Win8_32"});
-        izsetup.put("Group1",group1);
-        Map<String,String[]> group1win8_32 = new LinkedHashMap<>();
-        group1win8_32.put("Exec1",new String[]{"Installiere was 32-bit spezifisches","program","ping","google.de"});
-        group1win8_32.put("Comment:exec",new String[]{"Beschreibung","Typ","Parameter1","...","parameterN"});
-        izsetup.put("Group1Win8_32",group1win8_32);
-        Map<String,String[]> group1post = new LinkedHashMap<>();
-        group1post.put("Exec1",new String[]{"Group1Post","program","ping","amazon.de"});
-        izsetup.put("Group1Post",group1post);
-        Map<String,String[]> runtimes = new LinkedHashMap<>();
-        runtimes.put("Exec1",new String[]{"Runtime1","program","ping","ccc.de"});
-        runtimes.put("Exec2",new String[]{"Runtime2","program","ping","microsoft.de"});
-        izsetup.put("Runtimes",runtimes);
-        Map<String,String[]> nonwin8 = new LinkedHashMap<>();
-        nonwin8.put("Condition",new String[]{"IsWin8"});
-        nonwin8.put("elsenode",new String[]{"nonwin8Impl"});
-        izsetup.put("nichtWin8",nonwin8);
-        Map<String,String[]> nonwin8Impl = new LinkedHashMap<>();
-        nonwin8Impl.put("Exec1",new String[]{"Nicht für wind00f 8","program","ping","example.com"});
-        izsetup.put("nonwin8Impl",nonwin8Impl);*/
-        
-        Map<String,Object> izsetup = new LinkedHashMap<>();
-        ArrayList<String> rootEntries=new ArrayList<>();
-        rootEntries.add("GamesTls");
-        izsetup.put("Segments",rootEntries);
-        Map<String,String[]> addons = new LinkedHashMap<>();
-        addons.put("Exec1",new String[]{"NOOP","program","ping","localhost"});
-        izsetup.put("GamesTls", addons);
-        String izbo = "000|izsetup|3.0.0|: valides YAML und trotzdem kompatibel" +"\n"+y.dump(izsetup);
-        FileTK.writeFile(izbo, "D:\\src\\izsetup\\gamestls.izsetup");
-        
-        
-        
-        
-        
-        //izpackage
-        /*
-        Map<String,Object> izpackage = new LinkedHashMap<>();
-        izpackage.put("comment:type","izpackage");
-        ArrayList<String> flags = new ArrayList<>();
-        flags.add("multidisk");
-        izpackage.put("flags",flags);
-        izpackage.put("comment:packagebases","Namen der IDs der echten Packages die auch in der Liste auftauchen\nDer Rest ist von diesen referenziert");
-        ArrayList<String> packageBases=new ArrayList<>();
-        packageBases.add("BaseSystem");
-        packageBases.add("Addons");
-        packageBases.add("XPTools");
-        packageBases.add("Games");
-        packageBases.add("Game-Tools");
-        izpackage.put("packagebases",packageBases);
-        Map<String,String> BaseSystem = new LinkedHashMap<>();
-        BaseSystem.put("Name","BaseSystem");
-        BaseSystem.put("script","#basedir#\\pack001.izsetup");
-        BaseSystem.put("detectInstall","File://C:\\kernel.etl2");
-        BaseSystem.put("desc","Die minimal nötigen Tools und Komponenten fürs System");
-        BaseSystem.put("defaultEnabled","true");
-        izpackage.put("BaseSystem",BaseSystem);
-        Map<String,String> Addons = new LinkedHashMap<>();
-        Addons.put("Name","AddOns");
-        Addons.put("dependsOn","BaseSystem");
-        Addons.put("script","#basedir#\\addons.izsetup");
-        Addons.put("detectInstall","File://%userprofile%\\appdata\\programname\\datei1.dat");
-        Addons.put("desc","Addons und sosntiges was nicht zwingend notwendig ist");
-        Addons.put("defaultEnabled","true");
-        izpackage.put("Addons",Addons);
-        Map<String,String> XPAddons = new LinkedHashMap<>();
-        XPAddons.put("Condition","IsWin7");
-        XPAddons.put("Comment:Condition","Bei Erfüllt das Package aus If enablen, sonst das aus Else verwenden");
-        XPAddons.put("ifnode","XPAddonsIf");
-        izpackage.put("XPTools", XPAddons);
-        Map<String,String> XPAddonsIf = new LinkedHashMap<>();
-        XPAddonsIf.put("Name","XPAddOns");
-        XPAddonsIf.put("dependsOn","BaseSystem");
-        XPAddonsIf.put("script","#basedir#\\xprevocer.izsetup");
-        XPAddonsIf.put("detectInstall","File://C:\\ornder2\\datei2.bin");
-        XPAddonsIf.put("desc","Sach das bei XP defult war aber dort fehlt");
-        XPAddonsIf.put("defaultEnabled","true");
-        izpackage.put("XPAddonsIf", XPAddonsIf);
-        Map<String,String> Games = new LinkedHashMap<>();
-        Games.put("Name","Games");
-        Games.put("comment:waitDisk","Prüft ob spezifizierte datei vorhanden ist und fordert zum einlegen der disk auf falls nicht\n spezifisierte datei sollte nur auf der entsprechenden disk sein");
-        Games.put("waitDisk", "#basedir#\\games.izsetup");
-        Games.put("comment:waitMessage","WaitMessage ist optional, defaulted wenn nur waitDisk");
-        Games.put("waitMessage","Bitte Games-Disk einlegen");
-        Games.put("dependsOn","BaseSystem");
-        Games.put("script","#basedir#\\games.izsetup");
-        Games.put("detectInstall","File://C:\\Program Files\\ImgBurn\\ImgBurn.exexexe");
-        Games.put("desc","Die Games die nicht fehlen dürfen");
-        Games.put("defaultEnabled","true");
-        izpackage.put("Games",Games);
-        Map<String,String> Gamest = new LinkedHashMap<>();
-        Gamest.put("Name","game-Tools");
-        Gamest.put("waitDisk", "#basedir#\\gamestls.izsetup");
-        Gamest.put("comment:dependsOn","Dependency geht zu games und zu den dependencys von games");
-        Gamest.put("dependsOn","Games");
-        Gamest.put("script","#basedir#\\gamestls.izsetup");
-        Gamest.put("detectInstall","File://C:\\Program Files\\ImgBurn\\ImgBurn.exexexe");
-        Gamest.put("desc","Tools für die games aus dem Package");
-        Gamest.put("defaultEnabled","true");
-        izpackage.put("Game-Tools", Gamest);
-        //Yaml y = new Yaml();
-        String izbo = "000|izsetup|3.0.0|: valides YAML und trotzdem kompatibel" +"\n"+y.dump(izpackage);
-        FileTK.writeFile(izbo, "D:\\src\\izsetup\\sample.izpackage");
-        */
-        //bundle.izmeta
-        /*
-        Map<String,String> izbundle = new LinkedHashMap<>();
-        izbundle.put("comment:type","izbundle");
-        izbundle.put("meta:isZipped","true");
-        izbundle.put("comment:meta:isZipped","bei false sind die dateien als normale dateien neben dieser bundle gelagert -> kein entzippern\n" +
-                    "CMM|in tempdir nötig. Muss bei multidisk-bundles deaktiviert sein. bei diskbundles wird Deaktivierung empfohlen\n" +
-                        "CMM|da es die Festplatte nicht so vollstopft");
-        izbundle.put("bundlename","Sample");
-        izbundle.put("packagedata","sample.iZpackage");
-        izbundle.put("description","Beispieldaten und testdaten");
-        izbundle.put("extractSize","123556");
-        
-        String izbo = "000|izsetup|3.0.0|: valides YAML und trotzdem kompatibel" +"\n"+y.dump(izbundle);
-        FileTK.writeFile(izbo, "D:\\src\\izsetup\\bundle.izmeta");
-        */
-        
-        //temp code
-        
-        //FileTK.writeFile(y.dump(y.load(new FileInputStream("D:\\src\\izsetup\\sample.izpackage"))), "D:\\src\\izsetup\\valid");
-        /*System.out.println(FileTK.fileAsString("D:\\src\\izsetup\\valid"));
-        */
-        
-        
-    
-    }
-
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.InstallPak;
+
+import de.nplusc.izc.tools.IOtools.FileTK;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import org.yaml.snakeyaml.DumperOptions;
+import org.yaml.snakeyaml.Yaml;
+
+/**
+ *
+ * @author LH
+ */
+public class CreateSampleFile
+{
+    public static void main(String[] devnulled) throws FileNotFoundException, IOException
+    {
+        //SHARED
+        DumperOptions yamlOptions = new DumperOptions();
+        yamlOptions.setDefaultFlowStyle(DumperOptions.FlowStyle.BLOCK);
+        Yaml y = new Yaml(yamlOptions);
+        /*  
+        Map<String,Object> izsetup = new LinkedHashMap<>();
+        izsetup.put("comment:type","izsetup");
+        ArrayList<String> rootEntries=new ArrayList<>();
+        rootEntries.add("Group1");
+        rootEntries.add("Runtimes");
+        rootEntries.add("nichtWin8");
+        izsetup.put("Segments",rootEntries);
+        Map<String,String[]> group1 = new LinkedHashMap<>();
+        group1.put("Condition",new String[]{"IsWin8"});
+        group1.put("ifnode",new String[]{"Group1Win8"});
+        group1.put("postCond",new String[]{"Group1Post"});
+        izsetup.put("Group1",group1);
+        Map<String,String[]> group1win8 = new LinkedHashMap<>();
+        group1win8.put("Condition",new String[]{"Is64Bit"});
+        group1win8.put("elsenode",new String[]{"Group1Win8_32"});
+        izsetup.put("Group1",group1);
+        Map<String,String[]> group1win8_32 = new LinkedHashMap<>();
+        group1win8_32.put("Exec1",new String[]{"Installiere was 32-bit spezifisches","program","ping","google.de"});
+        group1win8_32.put("Comment:exec",new String[]{"Beschreibung","Typ","Parameter1","...","parameterN"});
+        izsetup.put("Group1Win8_32",group1win8_32);
+        Map<String,String[]> group1post = new LinkedHashMap<>();
+        group1post.put("Exec1",new String[]{"Group1Post","program","ping","amazon.de"});
+        izsetup.put("Group1Post",group1post);
+        Map<String,String[]> runtimes = new LinkedHashMap<>();
+        runtimes.put("Exec1",new String[]{"Runtime1","program","ping","ccc.de"});
+        runtimes.put("Exec2",new String[]{"Runtime2","program","ping","microsoft.de"});
+        izsetup.put("Runtimes",runtimes);
+        Map<String,String[]> nonwin8 = new LinkedHashMap<>();
+        nonwin8.put("Condition",new String[]{"IsWin8"});
+        nonwin8.put("elsenode",new String[]{"nonwin8Impl"});
+        izsetup.put("nichtWin8",nonwin8);
+        Map<String,String[]> nonwin8Impl = new LinkedHashMap<>();
+        nonwin8Impl.put("Exec1",new String[]{"Nicht für wind00f 8","program","ping","example.com"});
+        izsetup.put("nonwin8Impl",nonwin8Impl);*/
+        
+        Map<String,Object> izsetup = new LinkedHashMap<>();
+        ArrayList<String> rootEntries=new ArrayList<>();
+        rootEntries.add("GamesTls");
+        izsetup.put("Segments",rootEntries);
+        Map<String,String[]> addons = new LinkedHashMap<>();
+        addons.put("Exec1",new String[]{"NOOP","program","ping","localhost"});
+        izsetup.put("GamesTls", addons);
+        String izbo = "000|izsetup|3.0.0|: valides YAML und trotzdem kompatibel" +"\n"+y.dump(izsetup);
+        FileTK.writeFile(izbo, "D:\\src\\izsetup\\gamestls.izsetup");
+        
+        
+        
+        
+        
+        //izpackage
+        /*
+        Map<String,Object> izpackage = new LinkedHashMap<>();
+        izpackage.put("comment:type","izpackage");
+        ArrayList<String> flags = new ArrayList<>();
+        flags.add("multidisk");
+        izpackage.put("flags",flags);
+        izpackage.put("comment:packagebases","Namen der IDs der echten Packages die auch in der Liste auftauchen\nDer Rest ist von diesen referenziert");
+        ArrayList<String> packageBases=new ArrayList<>();
+        packageBases.add("BaseSystem");
+        packageBases.add("Addons");
+        packageBases.add("XPTools");
+        packageBases.add("Games");
+        packageBases.add("Game-Tools");
+        izpackage.put("packagebases",packageBases);
+        Map<String,String> BaseSystem = new LinkedHashMap<>();
+        BaseSystem.put("Name","BaseSystem");
+        BaseSystem.put("script","#basedir#\\pack001.izsetup");
+        BaseSystem.put("detectInstall","File://C:\\kernel.etl2");
+        BaseSystem.put("desc","Die minimal nötigen Tools und Komponenten fürs System");
+        BaseSystem.put("defaultEnabled","true");
+        izpackage.put("BaseSystem",BaseSystem);
+        Map<String,String> Addons = new LinkedHashMap<>();
+        Addons.put("Name","AddOns");
+        Addons.put("dependsOn","BaseSystem");
+        Addons.put("script","#basedir#\\addons.izsetup");
+        Addons.put("detectInstall","File://%userprofile%\\appdata\\programname\\datei1.dat");
+        Addons.put("desc","Addons und sosntiges was nicht zwingend notwendig ist");
+        Addons.put("defaultEnabled","true");
+        izpackage.put("Addons",Addons);
+        Map<String,String> XPAddons = new LinkedHashMap<>();
+        XPAddons.put("Condition","IsWin7");
+        XPAddons.put("Comment:Condition","Bei Erfüllt das Package aus If enablen, sonst das aus Else verwenden");
+        XPAddons.put("ifnode","XPAddonsIf");
+        izpackage.put("XPTools", XPAddons);
+        Map<String,String> XPAddonsIf = new LinkedHashMap<>();
+        XPAddonsIf.put("Name","XPAddOns");
+        XPAddonsIf.put("dependsOn","BaseSystem");
+        XPAddonsIf.put("script","#basedir#\\xprevocer.izsetup");
+        XPAddonsIf.put("detectInstall","File://C:\\ornder2\\datei2.bin");
+        XPAddonsIf.put("desc","Sach das bei XP defult war aber dort fehlt");
+        XPAddonsIf.put("defaultEnabled","true");
+        izpackage.put("XPAddonsIf", XPAddonsIf);
+        Map<String,String> Games = new LinkedHashMap<>();
+        Games.put("Name","Games");
+        Games.put("comment:waitDisk","Prüft ob spezifizierte datei vorhanden ist und fordert zum einlegen der disk auf falls nicht\n spezifisierte datei sollte nur auf der entsprechenden disk sein");
+        Games.put("waitDisk", "#basedir#\\games.izsetup");
+        Games.put("comment:waitMessage","WaitMessage ist optional, defaulted wenn nur waitDisk");
+        Games.put("waitMessage","Bitte Games-Disk einlegen");
+        Games.put("dependsOn","BaseSystem");
+        Games.put("script","#basedir#\\games.izsetup");
+        Games.put("detectInstall","File://C:\\Program Files\\ImgBurn\\ImgBurn.exexexe");
+        Games.put("desc","Die Games die nicht fehlen dürfen");
+        Games.put("defaultEnabled","true");
+        izpackage.put("Games",Games);
+        Map<String,String> Gamest = new LinkedHashMap<>();
+        Gamest.put("Name","game-Tools");
+        Gamest.put("waitDisk", "#basedir#\\gamestls.izsetup");
+        Gamest.put("comment:dependsOn","Dependency geht zu games und zu den dependencys von games");
+        Gamest.put("dependsOn","Games");
+        Gamest.put("script","#basedir#\\gamestls.izsetup");
+        Gamest.put("detectInstall","File://C:\\Program Files\\ImgBurn\\ImgBurn.exexexe");
+        Gamest.put("desc","Tools für die games aus dem Package");
+        Gamest.put("defaultEnabled","true");
+        izpackage.put("Game-Tools", Gamest);
+        //Yaml y = new Yaml();
+        String izbo = "000|izsetup|3.0.0|: valides YAML und trotzdem kompatibel" +"\n"+y.dump(izpackage);
+        FileTK.writeFile(izbo, "D:\\src\\izsetup\\sample.izpackage");
+        */
+        //bundle.izmeta
+        /*
+        Map<String,String> izbundle = new LinkedHashMap<>();
+        izbundle.put("comment:type","izbundle");
+        izbundle.put("meta:isZipped","true");
+        izbundle.put("comment:meta:isZipped","bei false sind die dateien als normale dateien neben dieser bundle gelagert -> kein entzippern\n" +
+                    "CMM|in tempdir nötig. Muss bei multidisk-bundles deaktiviert sein. bei diskbundles wird Deaktivierung empfohlen\n" +
+                        "CMM|da es die Festplatte nicht so vollstopft");
+        izbundle.put("bundlename","Sample");
+        izbundle.put("packagedata","sample.iZpackage");
+        izbundle.put("description","Beispieldaten und testdaten");
+        izbundle.put("extractSize","123556");
+        
+        String izbo = "000|izsetup|3.0.0|: valides YAML und trotzdem kompatibel" +"\n"+y.dump(izbundle);
+        FileTK.writeFile(izbo, "D:\\src\\izsetup\\bundle.izmeta");
+        */
+        
+        //temp code
+        
+        //FileTK.writeFile(y.dump(y.load(new FileInputStream("D:\\src\\izsetup\\sample.izpackage"))), "D:\\src\\izsetup\\valid");
+        /*System.out.println(FileTK.fileAsString("D:\\src\\izsetup\\valid"));
+        */
+        
+        
+    
+    }
+
+}

+ 36 - 36
IZSetup/src/main/java/de/nplusc/izc/InstallPak/Definitions.java

@@ -1,36 +1,36 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package de.nplusc.izc.InstallPak;
-
-/**
- *
- * @author LH
- */
-public class Definitions
-{
-    public static final int 
-        VERSION_MAJOR = 3,
-        VERSION_MINOR=2,
-        REVISION=0;
-
-    public static final String VERSION_GUI_TXT="izSetup "+VERSION_MAJOR+"."+VERSION_MINOR+"."+REVISION+" (c) 2014 iZc";
-
-    private Definitions()
-    {
-    }
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package de.nplusc.izc.InstallPak;
+
+/**
+ *
+ * @author LH
+ */
+public class Definitions
+{
+    public static final int 
+        VERSION_MAJOR = 3,
+        VERSION_MINOR=2,
+        REVISION=0;
+
+    public static final String VERSION_GUI_TXT="izSetup "+VERSION_MAJOR+"."+VERSION_MINOR+"."+REVISION+" (c) 2014 iZc";
+
+    private Definitions()
+    {
+    }
+}

+ 240 - 240
IZSetup/src/main/java/de/nplusc/izc/InstallPak/ExtendedInstallProgressGui.java

@@ -1,240 +1,240 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.InstallPak;
-import de.nplusc.izc.InstallPak.legacy.*;
-import de.nplusc.izc.tools.IOtools.FileTK;
-import de.nplusc.izc.tools.baseTools.Lock;
-import de.nplusc.izc.tools.baseTools.Messagers;
-import de.nplusc.izc.tools.baseTools.Tools;
-import java.awt.Point;
-import javax.swing.JFrame;
-        
-
-/**
- *
- * @author LH
- */
-public class ExtendedInstallProgressGui extends javax.swing.JFrame
-{
-    InstallManager im = InstallManager.Main;
-    private String[][] installMe;
-    private Lock l = new Lock();
-    /**
-     * Creates new form InstallProgressGui
-     * @param queue InstallActions intended to be installed with this GUI
-     */
-    public ExtendedInstallProgressGui(String[][]  queue)
-    {
-        installMe=queue;
-        initComponents();
-        updatePosition();
-        btnExit.setVisible(false);
-        pbarPacks.setVisible(false);
-        
-        startInstallation();
-    }
-    private void updatePosition()
-    {
-        lblVID.setText(Definitions.VERSION_GUI_TXT);
-        Point p = new Point(Main.topleft_coords_x, Main.topleft_coords_y);
-        setLocation(p);
-    }
-    
-    public void startInstallation()
-    {
-        setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
-        int packs = installMe.length;
-        pbarPacks.setMinimum(0);
-        pbarPacks.setValue(0);
-        pbarPacks.setMaximum(packs);
-        if(packs>1)
-        {
-            pbarPacks.setVisible(true);
-        }
-        new Thread(()->{
-        
-            for (String[] installMe1 : installMe)
-            {
-                Tools.DebugHelperPrint("setupaction:type://"+installMe1[0], true, "iZsetup.enableCoreDebug");
-                if (installMe1[0].equalsIgnoreCase("file"))
-                {
-                    InstallAction pack = new YInstallAction(installMe1[1]);
-                    pack.doInstall(ptotal, pFilename, lblMsg, tempLog);
-                }
-                else if (installMe1[0].equalsIgnoreCase("waitdisk"))
-                {
-                        boolean rightDisk = FileTK.checkDirExist(installMe1[1]);
-                        while(!rightDisk)
-                        {
-                            Messagers.SingleLineMsg(installMe1[2],"Okee...");
-                            rightDisk = FileTK.checkDirExist(installMe1[1]);
-                        }
-                }
-                java.awt.EventQueue.invokeLater(()->pbarPacks.setValue(pbarPacks.getValue()+1));
-            }
-            java.awt.EventQueue.invokeLater(()->btnExit.setVisible(true));
-            java.awt.EventQueue.invokeLater(()->setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE));
-            
-        }).start();
-    }
-
-    /**
-     * This method is called from within the constructor to
-     * initialize the form.
-     * WARNING: Do NOT modify this code. The content of this method is
-     * always regenerated by the Form Editor.
-     */
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents()
-    {
-
-        jScrollPane1 = new javax.swing.JScrollPane();
-        tempLog = new javax.swing.JTextArea();
-        lblMsg = new javax.swing.JLabel();
-        ptotal = new javax.swing.JProgressBar();
-        btnExit = new javax.swing.JButton();
-        lblVID = new javax.swing.JLabel();
-        pbarPacks = new javax.swing.JProgressBar();
-        jSeparator3 = new javax.swing.JSeparator();
-        jSeparator4 = new javax.swing.JSeparator();
-        pFilename = new javax.swing.JProgressBar();
-        jLabel1 = new javax.swing.JLabel();
-
-        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
-        setMinimumSize(new java.awt.Dimension(852, 331));
-        setResizable(false);
-        addComponentListener(new java.awt.event.ComponentAdapter()
-        {
-            public void componentMoved(java.awt.event.ComponentEvent evt)
-            {
-                formComponentMoved(evt);
-            }
-        });
-
-        tempLog.setColumns(20);
-        tempLog.setRows(5);
-        jScrollPane1.setViewportView(tempLog);
-
-        lblMsg.setText("Starte Installixierung");
-
-        btnExit.setText("Beenden");
-        btnExit.addActionListener(new java.awt.event.ActionListener()
-        {
-            public void actionPerformed(java.awt.event.ActionEvent evt)
-            {
-                btnExitActionPerformed(evt);
-            }
-        });
-
-        lblVID.setText("izSetup 1.0.0 (c) 2012 iZc");
-
-        pbarPacks.setMinimum(10);
-        pbarPacks.setOrientation(1);
-        pbarPacks.setValue(3);
-
-        jLabel1.setText("     ");
-
-        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
-        getContentPane().setLayout(layout);
-        layout.setHorizontalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(ptotal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                        .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(lblVID)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(jSeparator4))
-                    .addGroup(layout.createSequentialGroup()
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
-                            .addComponent(lblMsg, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                            .addComponent(btnExit, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING)
-                            .addGroup(layout.createSequentialGroup()
-                                .addComponent(jLabel1)
-                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                                .addComponent(pFilename, javax.swing.GroupLayout.PREFERRED_SIZE, 763, javax.swing.GroupLayout.PREFERRED_SIZE)))
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(pbarPacks, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)))
-                .addContainerGap())
-        );
-        layout.setVerticalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                .addContainerGap()
-                .addComponent(ptotal, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(layout.createSequentialGroup()
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addComponent(pFilename, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(lblMsg)
-                        .addGap(18, 18, 18)
-                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(btnExit))
-                    .addComponent(pbarPacks, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
-                    .addComponent(lblVID)
-                    .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
-                    .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
-                .addContainerGap())
-        );
-
-        pack();
-    }// </editor-fold>//GEN-END:initComponents
-
-    private void btnExitActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnExitActionPerformed
-    {//GEN-HEADEREND:event_btnExitActionPerformed
-        System.exit(0);
-    }//GEN-LAST:event_btnExitActionPerformed
-
-    private void formComponentMoved(java.awt.event.ComponentEvent evt)//GEN-FIRST:event_formComponentMoved
-    {//GEN-HEADEREND:event_formComponentMoved
-        Main.topleft_coords_x = getLocation().x;
-        Main.topleft_coords_y = getLocation().x;
-    }//GEN-LAST:event_formComponentMoved
-
-    /**
-     * @param args the command line arguments
-     */
-    public static void main(String args[])
-    {
-        System.out.println("Error 0x1D17");
-        System.exit(0x1D17);
-    }
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JButton btnExit;
-    private javax.swing.JLabel jLabel1;
-    private javax.swing.JScrollPane jScrollPane1;
-    private javax.swing.JSeparator jSeparator3;
-    private javax.swing.JSeparator jSeparator4;
-    private javax.swing.JLabel lblMsg;
-    private javax.swing.JLabel lblVID;
-    private javax.swing.JProgressBar pFilename;
-    private javax.swing.JProgressBar pbarPacks;
-    private javax.swing.JProgressBar ptotal;
-    private javax.swing.JTextArea tempLog;
-    // End of variables declaration//GEN-END:variables
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.InstallPak;
+import de.nplusc.izc.InstallPak.legacy.*;
+import de.nplusc.izc.tools.IOtools.FileTK;
+import de.nplusc.izc.tools.baseTools.Lock;
+import de.nplusc.izc.tools.baseTools.Messagers;
+import de.nplusc.izc.tools.baseTools.Tools;
+import java.awt.Point;
+import javax.swing.JFrame;
+        
+
+/**
+ *
+ * @author LH
+ */
+public class ExtendedInstallProgressGui extends javax.swing.JFrame
+{
+    InstallManager im = InstallManager.Main;
+    private String[][] installMe;
+    private Lock l = new Lock();
+    /**
+     * Creates new form InstallProgressGui
+     * @param queue InstallActions intended to be installed with this GUI
+     */
+    public ExtendedInstallProgressGui(String[][]  queue)
+    {
+        installMe=queue;
+        initComponents();
+        updatePosition();
+        btnExit.setVisible(false);
+        pbarPacks.setVisible(false);
+        
+        startInstallation();
+    }
+    private void updatePosition()
+    {
+        lblVID.setText(Definitions.VERSION_GUI_TXT);
+        Point p = new Point(Main.topleft_coords_x, Main.topleft_coords_y);
+        setLocation(p);
+    }
+    
+    public void startInstallation()
+    {
+        setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
+        int packs = installMe.length;
+        pbarPacks.setMinimum(0);
+        pbarPacks.setValue(0);
+        pbarPacks.setMaximum(packs);
+        if(packs>1)
+        {
+            pbarPacks.setVisible(true);
+        }
+        new Thread(()->{
+        
+            for (String[] installMe1 : installMe)
+            {
+                Tools.DebugHelperPrint("setupaction:type://"+installMe1[0], true, "iZsetup.enableCoreDebug");
+                if (installMe1[0].equalsIgnoreCase("file"))
+                {
+                    InstallAction pack = new YInstallAction(installMe1[1]);
+                    pack.doInstall(ptotal, pFilename, lblMsg, tempLog);
+                }
+                else if (installMe1[0].equalsIgnoreCase("waitdisk"))
+                {
+                        boolean rightDisk = FileTK.checkDirExist(installMe1[1]);
+                        while(!rightDisk)
+                        {
+                            Messagers.SingleLineMsg(installMe1[2],"Okee...");
+                            rightDisk = FileTK.checkDirExist(installMe1[1]);
+                        }
+                }
+                java.awt.EventQueue.invokeLater(()->pbarPacks.setValue(pbarPacks.getValue()+1));
+            }
+            java.awt.EventQueue.invokeLater(()->btnExit.setVisible(true));
+            java.awt.EventQueue.invokeLater(()->setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE));
+            
+        }).start();
+    }
+
+    /**
+     * This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents()
+    {
+
+        jScrollPane1 = new javax.swing.JScrollPane();
+        tempLog = new javax.swing.JTextArea();
+        lblMsg = new javax.swing.JLabel();
+        ptotal = new javax.swing.JProgressBar();
+        btnExit = new javax.swing.JButton();
+        lblVID = new javax.swing.JLabel();
+        pbarPacks = new javax.swing.JProgressBar();
+        jSeparator3 = new javax.swing.JSeparator();
+        jSeparator4 = new javax.swing.JSeparator();
+        pFilename = new javax.swing.JProgressBar();
+        jLabel1 = new javax.swing.JLabel();
+
+        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+        setMinimumSize(new java.awt.Dimension(852, 331));
+        setResizable(false);
+        addComponentListener(new java.awt.event.ComponentAdapter()
+        {
+            public void componentMoved(java.awt.event.ComponentEvent evt)
+            {
+                formComponentMoved(evt);
+            }
+        });
+
+        tempLog.setColumns(20);
+        tempLog.setRows(5);
+        jScrollPane1.setViewportView(tempLog);
+
+        lblMsg.setText("Starte Installixierung");
+
+        btnExit.setText("Beenden");
+        btnExit.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                btnExitActionPerformed(evt);
+            }
+        });
+
+        lblVID.setText("izSetup 1.0.0 (c) 2012 iZc");
+
+        pbarPacks.setMinimum(10);
+        pbarPacks.setOrientation(1);
+        pbarPacks.setValue(3);
+
+        jLabel1.setText("     ");
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
+        getContentPane().setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addComponent(ptotal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                        .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(lblVID)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(jSeparator4))
+                    .addGroup(layout.createSequentialGroup()
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+                            .addComponent(lblMsg, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                            .addComponent(btnExit, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING)
+                            .addGroup(layout.createSequentialGroup()
+                                .addComponent(jLabel1)
+                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                                .addComponent(pFilename, javax.swing.GroupLayout.PREFERRED_SIZE, 763, javax.swing.GroupLayout.PREFERRED_SIZE)))
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(pbarPacks, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)))
+                .addContainerGap())
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                .addContainerGap()
+                .addComponent(ptotal, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(pFilename, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                            .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(lblMsg)
+                        .addGap(18, 18, 18)
+                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 153, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(btnExit))
+                    .addComponent(pbarPacks, javax.swing.GroupLayout.PREFERRED_SIZE, 252, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+                    .addComponent(lblVID)
+                    .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
+                    .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addContainerGap())
+        );
+
+        pack();
+    }// </editor-fold>//GEN-END:initComponents
+
+    private void btnExitActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnExitActionPerformed
+    {//GEN-HEADEREND:event_btnExitActionPerformed
+        System.exit(0);
+    }//GEN-LAST:event_btnExitActionPerformed
+
+    private void formComponentMoved(java.awt.event.ComponentEvent evt)//GEN-FIRST:event_formComponentMoved
+    {//GEN-HEADEREND:event_formComponentMoved
+        Main.topleft_coords_x = getLocation().x;
+        Main.topleft_coords_y = getLocation().x;
+    }//GEN-LAST:event_formComponentMoved
+
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String args[])
+    {
+        System.out.println("Error 0x1D17");
+        System.exit(0x1D17);
+    }
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JButton btnExit;
+    private javax.swing.JLabel jLabel1;
+    private javax.swing.JScrollPane jScrollPane1;
+    private javax.swing.JSeparator jSeparator3;
+    private javax.swing.JSeparator jSeparator4;
+    private javax.swing.JLabel lblMsg;
+    private javax.swing.JLabel lblVID;
+    private javax.swing.JProgressBar pFilename;
+    private javax.swing.JProgressBar pbarPacks;
+    private javax.swing.JProgressBar ptotal;
+    private javax.swing.JTextArea tempLog;
+    // End of variables declaration//GEN-END:variables
+}

+ 113 - 113
IZSetup/src/main/java/de/nplusc/izc/InstallPak/FolderSelectScreen.java

@@ -1,113 +1,113 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package de.nplusc.izc.InstallPak;
-
-/**
- *
- * @author LH
- */
-public class FolderSelectScreen extends javax.swing.JFrame
-{
-
-    /**
-     * Creates new form FolderSelectScreen
-     */
-    public FolderSelectScreen()
-    {
-        initComponents();
-    }
-
-    /**
-     * This method is called from within the constructor to
-     * initialize the form.
-     * WARNING: Do NOT modify this code. The content of this method is
-     * always regenerated by the Form Editor.
-     */
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents()
-    {
-
-        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
-
-        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
-        getContentPane().setLayout(layout);
-        layout.setHorizontalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 400, Short.MAX_VALUE)
-        );
-        layout.setVerticalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 300, Short.MAX_VALUE)
-        );
-
-        pack();
-    }// </editor-fold>//GEN-END:initComponents
-
-    /**
-     * @param args the command line arguments
-     */
-    public static void main(String args[])
-    {
-        /* Set the Nimbus look and feel */
-        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
-        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
-         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
-         */
-        try
-        {
-            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
-            {
-                if ("Nimbus".equals(info.getName()))
-                {
-                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
-                    break;
-                }
-            }
-        }
-        catch (ClassNotFoundException ex)
-        {
-            java.util.logging.Logger.getLogger(FolderSelectScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-        catch (InstantiationException ex)
-        {
-            java.util.logging.Logger.getLogger(FolderSelectScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-        catch (IllegalAccessException ex)
-        {
-            java.util.logging.Logger.getLogger(FolderSelectScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-        catch (javax.swing.UnsupportedLookAndFeelException ex)
-        {
-            java.util.logging.Logger.getLogger(FolderSelectScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-        //</editor-fold>
-
-        /* Create and display the form */
-        java.awt.EventQueue.invokeLater(new Runnable()
-        {
-            public void run()
-            {
-                new FolderSelectScreen().setVisible(true);
-            }
-        });
-    }
-
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    // End of variables declaration//GEN-END:variables
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package de.nplusc.izc.InstallPak;
+
+/**
+ *
+ * @author LH
+ */
+public class FolderSelectScreen extends javax.swing.JFrame
+{
+
+    /**
+     * Creates new form FolderSelectScreen
+     */
+    public FolderSelectScreen()
+    {
+        initComponents();
+    }
+
+    /**
+     * This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents()
+    {
+
+        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
+        getContentPane().setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGap(0, 400, Short.MAX_VALUE)
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGap(0, 300, Short.MAX_VALUE)
+        );
+
+        pack();
+    }// </editor-fold>//GEN-END:initComponents
+
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String args[])
+    {
+        /* Set the Nimbus look and feel */
+        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
+        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
+         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
+         */
+        try
+        {
+            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
+            {
+                if ("Nimbus".equals(info.getName()))
+                {
+                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
+                    break;
+                }
+            }
+        }
+        catch (ClassNotFoundException ex)
+        {
+            java.util.logging.Logger.getLogger(FolderSelectScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        catch (InstantiationException ex)
+        {
+            java.util.logging.Logger.getLogger(FolderSelectScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        catch (IllegalAccessException ex)
+        {
+            java.util.logging.Logger.getLogger(FolderSelectScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        catch (javax.swing.UnsupportedLookAndFeelException ex)
+        {
+            java.util.logging.Logger.getLogger(FolderSelectScreen.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        //</editor-fold>
+
+        /* Create and display the form */
+        java.awt.EventQueue.invokeLater(new Runnable()
+        {
+            public void run()
+            {
+                new FolderSelectScreen().setVisible(true);
+            }
+        });
+    }
+
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    // End of variables declaration//GEN-END:variables
+}

+ 35 - 35
IZSetup/src/main/java/de/nplusc/izc/InstallPak/InstallAction.java

@@ -1,35 +1,35 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package de.nplusc.izc.InstallPak;
-
-import javax.swing.JLabel;
-import javax.swing.JProgressBar;
-import javax.swing.JTextArea;
-
-/**
- *
- * @author LH
- */
-public interface InstallAction
-{
-
-    public void doInstall();
-    
-    public void doInstall(final JProgressBar j,JProgressBar singleFile,JLabel statusLine,JTextArea logPane);
- 
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package de.nplusc.izc.InstallPak;
+
+import javax.swing.JLabel;
+import javax.swing.JProgressBar;
+import javax.swing.JTextArea;
+
+/**
+ *
+ * @author LH
+ */
+public interface InstallAction
+{
+
+    public void doInstall();
+    
+    public void doInstall(final JProgressBar j,JProgressBar singleFile,JLabel statusLine,JTextArea logPane);
+ 
+}

+ 87 - 87
IZSetup/src/main/java/de/nplusc/izc/InstallPak/InstallFilesManagerAPI.java

@@ -1,87 +1,87 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package de.nplusc.izc.InstallPak;
-
-/**
- *
- * @author LH
- */
-public interface InstallFilesManagerAPI
-{
-    /**
-     * Returns List of all contained packages with Name
-     * @return array with all packs in this package
-     */
-    public String[] getPacksInPackage();
-    /**
-     * Returns isInstalled State of a package
-     * @param packnr Number of the package selected
-     * @return whether pack is already installed
-     */
-    public boolean getPackInstalled(int packnr);
-    /**
-     * Returns if a package can get installed
-     * @param packid Number of the package selected
-     * @return whether package can be installed
-     */
-    public boolean getPackInstallable(int packid);
-    /**
-     * Gets the pack the selected one depends on
-     * @param packid Number of the package selected
-     * @return packageNumber or -1 if no dependency
-     */
-    public int getDependencyParent(int packid);
-    /**
-     * returns the IDs of the packs that depend on this
-     * @param packID Number of the package selected
-     * @return array with the IDS or null if no pack depending on this
-     */
-    public int[] getChildPacks(int packID);
-    /**
-     * Selects/Deselects package for installation
-     * @param packageID Number of the package selected
-     * @param state Target state of package
-     */
-    public void setPackageState(int packageID,boolean state);
-        
-    /**
-     * Checks if a package will be installed
-     * @param packageID Number of the package selected
-     * @return whether it is enabled for install
-     */
-    public boolean getIsScheduled(int packageID);
-    
-    
-    /**
-     * Returns Package Description
-     * @param packID Number of the package selected
-     * @return Description as String
-     */
-    public String getPackageDescription(int packID);
-    
-    
-    
-    
-    
-    /**
-     * Generates the Data for the main Installmanager
-     * @return Array of Referencing parameters to convert to InstallActions to be run
-     * Elements: type(waitDisk,file),Filename,waitWithDialogMessage on WaitDisk; 
-     */
-    public String[][] packagesQueue();
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package de.nplusc.izc.InstallPak;
+
+/**
+ *
+ * @author LH
+ */
+public interface InstallFilesManagerAPI
+{
+    /**
+     * Returns List of all contained packages with Name
+     * @return array with all packs in this package
+     */
+    public String[] getPacksInPackage();
+    /**
+     * Returns isInstalled State of a package
+     * @param packnr Number of the package selected
+     * @return whether pack is already installed
+     */
+    public boolean getPackInstalled(int packnr);
+    /**
+     * Returns if a package can get installed
+     * @param packid Number of the package selected
+     * @return whether package can be installed
+     */
+    public boolean getPackInstallable(int packid);
+    /**
+     * Gets the pack the selected one depends on
+     * @param packid Number of the package selected
+     * @return packageNumber or -1 if no dependency
+     */
+    public int getDependencyParent(int packid);
+    /**
+     * returns the IDs of the packs that depend on this
+     * @param packID Number of the package selected
+     * @return array with the IDS or null if no pack depending on this
+     */
+    public int[] getChildPacks(int packID);
+    /**
+     * Selects/Deselects package for installation
+     * @param packageID Number of the package selected
+     * @param state Target state of package
+     */
+    public void setPackageState(int packageID,boolean state);
+        
+    /**
+     * Checks if a package will be installed
+     * @param packageID Number of the package selected
+     * @return whether it is enabled for install
+     */
+    public boolean getIsScheduled(int packageID);
+    
+    
+    /**
+     * Returns Package Description
+     * @param packID Number of the package selected
+     * @return Description as String
+     */
+    public String getPackageDescription(int packID);
+    
+    
+    
+    
+    
+    /**
+     * Generates the Data for the main Installmanager
+     * @return Array of Referencing parameters to convert to InstallActions to be run
+     * Elements: type(waitDisk,file),Filename,waitWithDialogMessage on WaitDisk; 
+     */
+    public String[][] packagesQueue();
+}

+ 259 - 259
IZSetup/src/main/java/de/nplusc/izc/InstallPak/Main.java

@@ -1,259 +1,259 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.InstallPak;
-import de.nplusc.izc.InstallPak.legacy.PackManager;
-import de.nplusc.izc.InstallPak.legacy.PackagerGUI;
-import de.nplusc.izc.InstallPak.legacy.InstallManager;
-import de.nplusc.izc.InstallPak.legacy.InstallProgressGui;
-import de.nplusc.izc.InstallPak.makedist.MakeDist;
-import de.nplusc.izc.tools.IOtools.FileTK;
-import de.nplusc.izc.tools.IOtools.LogStream;
-import de.nplusc.izc.tools.UiToolz.BootStrap;
-import de.nplusc.izc.tools.UiToolz.UiTools;
-import de.nplusc.izc.tools.baseTools.Tools;
-import java.io.BufferedOutputStream;
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.PrintStream;
-import java.lang.reflect.Field;
-import java.net.URISyntaxException;
-import javax.swing.UIManager;
-import javax.swing.UnsupportedLookAndFeelException;
-/**
- *
- * @author LH
- */
-public class Main// extends javax.swing.JFrame
-{
-    public static boolean silentMode=false;
-    public static boolean packMode = false;
-    public static String filePath = "";
-    public static String baseDir = "";
-    public static boolean diskMode=false;
-    public static boolean isBundle = false;
-    public static int topleft_coords_x = -1;//Detektion gegen diese Werte. -1=nicht initialisiert
-    public static int topleft_coords_y = -1;//^
-    private static String[] pargs;
-    
-    
-    public static String[] getArgs()
-    {
-        return pargs;
-    }
-    
-    
-    /**
-     * @param args the command line arguments
-     */
-    public static void main(String args[])
-    {
-        PrintStream psOut = null;
-        try
-        {
-            
-           psOut = new LogStream(
-                   new BufferedOutputStream(new FileOutputStream(
-                           new File("iZs.log"))),true, System.out);
-           System.setOut(psOut);
-            PrintStream psOut2 = new LogStream(
-                    new BufferedOutputStream(new FileOutputStream(
-                            new File("iZs-e.log"))),true,System.err);
-            System.setErr(psOut2);
-            pargs=args;
-            String libpath = "";
-            try
-            {
-                //http://www.softicons.com/free-icons/application-icons/installer-icon-by-macuser64/installer-icon
-                //http://www.iconfinder.com/icondetails/61818/128/box_icon
-                //http://openclipart.org/detail/172351/ppa-icon-by-myromance123-172351
-                
-                //installs to C:\program files\iZsetup\
-                
-                //setDefauötPosition
-                //852, 331
-                
-                //HAX_ALERT
-                
-                libpath = FileTK.getFilePath(new File(Main.class.getProtectionDomain()
-                        .getCodeSource().getLocation().toURI().getPath()).getPath());
-            }
-            catch (URISyntaxException ex)
-            {
-                ex.printStackTrace();
-            }
-            System.setProperty( "java.library.path", libpath);
-            Field fieldSysPath;
-            try
-            {
-                fieldSysPath = ClassLoader.class.getDeclaredField( "sys_paths" );
-                fieldSysPath.setAccessible( true );
-                fieldSysPath.set( null, null );
-            }
-            catch (NoSuchFieldException | SecurityException |IllegalAccessException ex)
-            {
-                ex.printStackTrace();
-            }
-            if(args.length>0&&args[0].equals("--makedist"))
-            {
-                MakeDist.main(args);
-                System.exit(0);
-            }
-            topleft_coords_x = (UiTools.getScreenRes()[0]/2)-(852/2);
-            topleft_coords_y = (UiTools.getScreenRes()[1]/2)-(330/2);
-            //args = new String[]{"-file",""
-            for (int i = 0; i < args.length; i++)
-            {
-                System.err.println(i+"|"+args[i]);
-                
-            }
-            //String file = "default.izsetup";
-        //if(izsetupReader.getSysSpezSetupFile(file,true)!=null)
-        //{
-        //  packMode=true;
-        //}
-        //DSAB_FOR_DBG
-        //if(izsetupReader.getSysSpezSetupFile(file)==null&&!args[0].equals("-file"))
-        //{
-        //    return;
-        //}
-        String file="";
-        boolean enableFile = false;
-            if(args.length>1)
-            {
-                //Tester.main(args);
-                if(args[0].equals("-file"))
-                {
-                    file=args[1];
-                    enableFile = true;
-                    //-file gamestls.izsetup --silent
-                }
-                if(args[0].equals("-bundle"))
-                {
-                    file=args[1];
-                    isBundle = true;
-                    enableFile = true;
-                    //-file gamestls.izsetup --silent
-                }
-                else
-                {
-                    isBundle=false;
-                }
-                for (String arg : args)
-                {
-                    if(arg.equals("--silent"))
-                    {
-
-                        silentMode=true;
-                        //packMode=false;
-                        if(izsetupReader.getSysSpezSetupFile(file,true)!=null)
-                        {
-                            packMode=true;
-                        }
-                        else
-                        {
-                            packMode=false;
-                        }
-                    }
-                    if(arg.equals("--pack"))
-                    {
-                        packMode=true;
-                        
-                    }
-                }
-            }
-            //DBG_START
-            //silentMode=false;
-            //packMode=false;
-            if(!enableFile)
-            {
-                System.out.println("Usage help for iZsetup CLI");
-                System.out.println("izsetup [-file|-bundle] <path> <options>");
-                System.out.println("-file for izsetup  or izpackage (requires --pack option to use izpackage");
-                System.out.println("--pack file is packfile");
-                System.out.println("--silent unattended mode");
-                return;
-            }
-        // isBundle = true;
-        //file="default.izbundle";
-        //DBG_END
-        Tools.DebugHelperPrint(file, true, "iZsetup.enableCoreDebug");
-        Tools.DebugHelperPrint("isBundle+|+packMode+|+silentMode", true, "iZsetup.enableCoreDebug");
-            Tools.DebugHelperPrint(isBundle+"|"+packMode+"|"+silentMode, true, "iZsetup.enableCoreDebug");
-            if(!isBundle&&!packMode)
-            {
-                InstallManager.Main.setInstallScript(file);
-            }
-            filePath=file;
-            try {
-                UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
-            } catch( ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e ) {
-                //e.printStackTrace();
-            }
-            java.awt.EventQueue.invokeLater(new Runnable()
-            {
-                @SuppressWarnings("ResultOfObjectAllocationIgnored")
-                @Override
-                public void run()
-                {
-                    System.err.println(packMode+"|"+silentMode);
-                    if(packMode&&!silentMode)
-                    {
-                        new BootStrap(new PackagerGUI());
-                    }
-                    else
-                    {
-                        if(silentMode)
-                        {
-                            if(!packMode)
-                            {
-                                InstallManager.Main.createQueue();
-                                new BootStrap(new InstallProgressGui());
-                            }
-                            else
-                            {
-                                PackManager p = new PackManager();
-                                p.loadPackageData(filePath);
-                                p.createQueue();
-                                new BootStrap(new InstallProgressGui(p.getQueue()));
-                            }
-                        }
-                        else
-                        {
-                            if(isBundle)
-                            {
-                                new BootStrap(new BundleVerifyGui(filePath));
-                            }
-                            else
-                            {
-                                new BootStrap(new ModeSelectionGUI());
-                            }
-                        }
-                    }
-                }
-            });
-        }
-        catch (FileNotFoundException ex)
-        {
-            ex.printStackTrace();
-        }
-        finally
-        {
-            psOut.close();
-        }
-    }             
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.InstallPak;
+import de.nplusc.izc.InstallPak.legacy.PackManager;
+import de.nplusc.izc.InstallPak.legacy.PackagerGUI;
+import de.nplusc.izc.InstallPak.legacy.InstallManager;
+import de.nplusc.izc.InstallPak.legacy.InstallProgressGui;
+import de.nplusc.izc.InstallPak.makedist.MakeDist;
+import de.nplusc.izc.tools.IOtools.FileTK;
+import de.nplusc.izc.tools.IOtools.LogStream;
+import de.nplusc.izc.tools.UiToolz.BootStrap;
+import de.nplusc.izc.tools.UiToolz.UiTools;
+import de.nplusc.izc.tools.baseTools.Tools;
+import java.io.BufferedOutputStream;
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.PrintStream;
+import java.lang.reflect.Field;
+import java.net.URISyntaxException;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+/**
+ *
+ * @author LH
+ */
+public class Main// extends javax.swing.JFrame
+{
+    public static boolean silentMode=false;
+    public static boolean packMode = false;
+    public static String filePath = "";
+    public static String baseDir = "";
+    public static boolean diskMode=false;
+    public static boolean isBundle = false;
+    public static int topleft_coords_x = -1;//Detektion gegen diese Werte. -1=nicht initialisiert
+    public static int topleft_coords_y = -1;//^
+    private static String[] pargs;
+    
+    
+    public static String[] getArgs()
+    {
+        return pargs;
+    }
+    
+    
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String args[])
+    {
+        PrintStream psOut = null;
+        try
+        {
+            
+           psOut = new LogStream(
+                   new BufferedOutputStream(new FileOutputStream(
+                           new File("iZs.log"))),true, System.out);
+           System.setOut(psOut);
+            PrintStream psOut2 = new LogStream(
+                    new BufferedOutputStream(new FileOutputStream(
+                            new File("iZs-e.log"))),true,System.err);
+            System.setErr(psOut2);
+            pargs=args;
+            String libpath = "";
+            try
+            {
+                //http://www.softicons.com/free-icons/application-icons/installer-icon-by-macuser64/installer-icon
+                //http://www.iconfinder.com/icondetails/61818/128/box_icon
+                //http://openclipart.org/detail/172351/ppa-icon-by-myromance123-172351
+                
+                //installs to C:\program files\iZsetup\
+                
+                //setDefauötPosition
+                //852, 331
+                
+                //HAX_ALERT
+                
+                libpath = FileTK.getFilePath(new File(Main.class.getProtectionDomain()
+                        .getCodeSource().getLocation().toURI().getPath()).getPath());
+            }
+            catch (URISyntaxException ex)
+            {
+                ex.printStackTrace();
+            }
+            System.setProperty( "java.library.path", libpath);
+            Field fieldSysPath;
+            try
+            {
+                fieldSysPath = ClassLoader.class.getDeclaredField( "sys_paths" );
+                fieldSysPath.setAccessible( true );
+                fieldSysPath.set( null, null );
+            }
+            catch (NoSuchFieldException | SecurityException |IllegalAccessException ex)
+            {
+                ex.printStackTrace();
+            }
+            if(args.length>0&&args[0].equals("--makedist"))
+            {
+                MakeDist.main(args);
+                System.exit(0);
+            }
+            topleft_coords_x = (UiTools.getScreenRes()[0]/2)-(852/2);
+            topleft_coords_y = (UiTools.getScreenRes()[1]/2)-(330/2);
+            //args = new String[]{"-file",""
+            for (int i = 0; i < args.length; i++)
+            {
+                System.err.println(i+"|"+args[i]);
+                
+            }
+            //String file = "default.izsetup";
+        //if(izsetupReader.getSysSpezSetupFile(file,true)!=null)
+        //{
+        //  packMode=true;
+        //}
+        //DSAB_FOR_DBG
+        //if(izsetupReader.getSysSpezSetupFile(file)==null&&!args[0].equals("-file"))
+        //{
+        //    return;
+        //}
+        String file="";
+        boolean enableFile = false;
+            if(args.length>1)
+            {
+                //Tester.main(args);
+                if(args[0].equals("-file"))
+                {
+                    file=args[1];
+                    enableFile = true;
+                    //-file gamestls.izsetup --silent
+                }
+                if(args[0].equals("-bundle"))
+                {
+                    file=args[1];
+                    isBundle = true;
+                    enableFile = true;
+                    //-file gamestls.izsetup --silent
+                }
+                else
+                {
+                    isBundle=false;
+                }
+                for (String arg : args)
+                {
+                    if(arg.equals("--silent"))
+                    {
+
+                        silentMode=true;
+                        //packMode=false;
+                        if(izsetupReader.getSysSpezSetupFile(file,true)!=null)
+                        {
+                            packMode=true;
+                        }
+                        else
+                        {
+                            packMode=false;
+                        }
+                    }
+                    if(arg.equals("--pack"))
+                    {
+                        packMode=true;
+                        
+                    }
+                }
+            }
+            //DBG_START
+            //silentMode=false;
+            //packMode=false;
+            if(!enableFile)
+            {
+                System.out.println("Usage help for iZsetup CLI");
+                System.out.println("izsetup [-file|-bundle] <path> <options>");
+                System.out.println("-file for izsetup  or izpackage (requires --pack option to use izpackage");
+                System.out.println("--pack file is packfile");
+                System.out.println("--silent unattended mode");
+                return;
+            }
+        // isBundle = true;
+        //file="default.izbundle";
+        //DBG_END
+        Tools.DebugHelperPrint(file, true, "iZsetup.enableCoreDebug");
+        Tools.DebugHelperPrint("isBundle+|+packMode+|+silentMode", true, "iZsetup.enableCoreDebug");
+            Tools.DebugHelperPrint(isBundle+"|"+packMode+"|"+silentMode, true, "iZsetup.enableCoreDebug");
+            if(!isBundle&&!packMode)
+            {
+                InstallManager.Main.setInstallScript(file);
+            }
+            filePath=file;
+            try {
+                UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
+            } catch( ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e ) {
+                //e.printStackTrace();
+            }
+            java.awt.EventQueue.invokeLater(new Runnable()
+            {
+                @SuppressWarnings("ResultOfObjectAllocationIgnored")
+                @Override
+                public void run()
+                {
+                    System.err.println(packMode+"|"+silentMode);
+                    if(packMode&&!silentMode)
+                    {
+                        new BootStrap(new PackagerGUI());
+                    }
+                    else
+                    {
+                        if(silentMode)
+                        {
+                            if(!packMode)
+                            {
+                                InstallManager.Main.createQueue();
+                                new BootStrap(new InstallProgressGui());
+                            }
+                            else
+                            {
+                                PackManager p = new PackManager();
+                                p.loadPackageData(filePath);
+                                p.createQueue();
+                                new BootStrap(new InstallProgressGui(p.getQueue()));
+                            }
+                        }
+                        else
+                        {
+                            if(isBundle)
+                            {
+                                new BootStrap(new BundleVerifyGui(filePath));
+                            }
+                            else
+                            {
+                                new BootStrap(new ModeSelectionGUI());
+                            }
+                        }
+                    }
+                }
+            });
+        }
+        catch (FileNotFoundException ex)
+        {
+            ex.printStackTrace();
+        }
+        finally
+        {
+            psOut.close();
+        }
+    }             
+}

+ 173 - 173
IZSetup/src/main/java/de/nplusc/izc/InstallPak/ModeSelectionGUI.java

@@ -1,173 +1,173 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.InstallPak;
-import de.nplusc.izc.InstallPak.legacy.InstallManager;
-import de.nplusc.izc.InstallPak.legacy.InstallProgressGui;
-import de.nplusc.izc.tools.UiToolz.BootStrap;
-import java.awt.Point;
-import javax.swing.UIManager;
-import javax.swing.UnsupportedLookAndFeelException;
-/**
- *
- * @author LH
- */
-public class ModeSelectionGUI extends javax.swing.JFrame
-{
-
-    /**
-     * Creates new form ModeSel
-     */
-    public ModeSelectionGUI()
-    {
-        initComponents();
-        updatePosition();
-        lblVID.setText(Definitions.VERSION_GUI_TXT);
-    }
-    private void updatePosition()
-    {
-        Point p = new Point(Main.topleft_coords_x, Main.topleft_coords_y);
-        setLocation(p);
-    }
-    /**
-     * This method is called from within the constructor to
-     * initialize the form.
-     * WARNING: Do NOT modify this code. The content of this method is
-     * always regenerated by the Form Editor.
-     */
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents()
-    {
-
-        btnInstall = new javax.swing.JButton();
-        btnCust = new javax.swing.JButton();
-        jSeparator1 = new javax.swing.JSeparator();
-        lblVID = new javax.swing.JLabel();
-        jSeparator2 = new javax.swing.JSeparator();
-
-        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
-        setMaximumSize(new java.awt.Dimension(852, 331));
-        setMinimumSize(new java.awt.Dimension(852, 331));
-        setResizable(false);
-        addComponentListener(new java.awt.event.ComponentAdapter()
-        {
-            public void componentMoved(java.awt.event.ComponentEvent evt)
-            {
-                formComponentMoved(evt);
-            }
-        });
-
-        btnInstall.setText("Installieren");
-        btnInstall.addActionListener(new java.awt.event.ActionListener()
-        {
-            public void actionPerformed(java.awt.event.ActionEvent evt)
-            {
-                btnInstallActionPerformed(evt);
-            }
-        });
-
-        btnCust.setText("Anpassen");
-        btnCust.addActionListener(new java.awt.event.ActionListener()
-        {
-            public void actionPerformed(java.awt.event.ActionEvent evt)
-            {
-                btnCustActionPerformed(evt);
-            }
-        });
-
-        lblVID.setText("izSetup 1.0.0 (c) 2012 iZc");
-
-        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
-        getContentPane().setLayout(layout);
-        layout.setHorizontalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(layout.createSequentialGroup()
-                        .addGap(0, 274, Short.MAX_VALUE)
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                                .addComponent(btnInstall, javax.swing.GroupLayout.PREFERRED_SIZE, 334, javax.swing.GroupLayout.PREFERRED_SIZE)
-                                .addGap(234, 234, 234))
-                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                                .addComponent(btnCust, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)
-                                .addGap(325, 325, 325))))
-                    .addGroup(layout.createSequentialGroup()
-                        .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(lblVID)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(jSeparator2)
-                        .addContainerGap())))
-        );
-        layout.setVerticalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
-                    .addGroup(layout.createSequentialGroup()
-                        .addGap(76, 76, 76)
-                        .addComponent(btnInstall, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addGap(18, 18, 18)
-                        .addComponent(btnCust, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 76, Short.MAX_VALUE)
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
-                            .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)))
-                    .addGroup(layout.createSequentialGroup()
-                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                        .addComponent(lblVID)))
-                .addContainerGap())
-        );
-
-        pack();
-    }// </editor-fold>//GEN-END:initComponents
-
-    private void btnCustActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnCustActionPerformed
-    {//GEN-HEADEREND:event_btnCustActionPerformed
-       SelectionGUI.main(null);
-       this.setVisible(false);
-    }//GEN-LAST:event_btnCustActionPerformed
-
-    private void btnInstallActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnInstallActionPerformed
-    {//GEN-HEADEREND:event_btnInstallActionPerformed
-        InstallManager.Main.createQueue();
-        InstallProgressGui.main(null);
-        this.setVisible(false);
-    }//GEN-LAST:event_btnInstallActionPerformed
-
-    private void formComponentMoved(java.awt.event.ComponentEvent evt)//GEN-FIRST:event_formComponentMoved
-    {//GEN-HEADEREND:event_formComponentMoved
-        Main.topleft_coords_x = getLocation().x;
-        Main.topleft_coords_y = getLocation().x;
-    }//GEN-LAST:event_formComponentMoved
-   public static void main(String args[])
-    {
-        try {
-	    UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
-	} catch( ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e ) { 
-	    //e.printStackTrace();
-	}
-    }
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JButton btnCust;
-    private javax.swing.JButton btnInstall;
-    private javax.swing.JSeparator jSeparator1;
-    private javax.swing.JSeparator jSeparator2;
-    private javax.swing.JLabel lblVID;
-    // End of variables declaration//GEN-END:variables
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.InstallPak;
+import de.nplusc.izc.InstallPak.legacy.InstallManager;
+import de.nplusc.izc.InstallPak.legacy.InstallProgressGui;
+import de.nplusc.izc.tools.UiToolz.BootStrap;
+import java.awt.Point;
+import javax.swing.UIManager;
+import javax.swing.UnsupportedLookAndFeelException;
+/**
+ *
+ * @author LH
+ */
+public class ModeSelectionGUI extends javax.swing.JFrame
+{
+
+    /**
+     * Creates new form ModeSel
+     */
+    public ModeSelectionGUI()
+    {
+        initComponents();
+        updatePosition();
+        lblVID.setText(Definitions.VERSION_GUI_TXT);
+    }
+    private void updatePosition()
+    {
+        Point p = new Point(Main.topleft_coords_x, Main.topleft_coords_y);
+        setLocation(p);
+    }
+    /**
+     * This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents()
+    {
+
+        btnInstall = new javax.swing.JButton();
+        btnCust = new javax.swing.JButton();
+        jSeparator1 = new javax.swing.JSeparator();
+        lblVID = new javax.swing.JLabel();
+        jSeparator2 = new javax.swing.JSeparator();
+
+        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+        setMaximumSize(new java.awt.Dimension(852, 331));
+        setMinimumSize(new java.awt.Dimension(852, 331));
+        setResizable(false);
+        addComponentListener(new java.awt.event.ComponentAdapter()
+        {
+            public void componentMoved(java.awt.event.ComponentEvent evt)
+            {
+                formComponentMoved(evt);
+            }
+        });
+
+        btnInstall.setText("Installieren");
+        btnInstall.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                btnInstallActionPerformed(evt);
+            }
+        });
+
+        btnCust.setText("Anpassen");
+        btnCust.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                btnCustActionPerformed(evt);
+            }
+        });
+
+        lblVID.setText("izSetup 1.0.0 (c) 2012 iZc");
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
+        getContentPane().setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addGap(0, 274, Short.MAX_VALUE)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                                .addComponent(btnInstall, javax.swing.GroupLayout.PREFERRED_SIZE, 334, javax.swing.GroupLayout.PREFERRED_SIZE)
+                                .addGap(234, 234, 234))
+                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                                .addComponent(btnCust, javax.swing.GroupLayout.PREFERRED_SIZE, 141, javax.swing.GroupLayout.PREFERRED_SIZE)
+                                .addGap(325, 325, 325))))
+                    .addGroup(layout.createSequentialGroup()
+                        .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(lblVID)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(jSeparator2)
+                        .addContainerGap())))
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addGap(76, 76, 76)
+                        .addComponent(btnInstall, javax.swing.GroupLayout.PREFERRED_SIZE, 104, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addGap(18, 18, 18)
+                        .addComponent(btnCust, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 76, Short.MAX_VALUE)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
+                            .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)))
+                    .addGroup(layout.createSequentialGroup()
+                        .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                        .addComponent(lblVID)))
+                .addContainerGap())
+        );
+
+        pack();
+    }// </editor-fold>//GEN-END:initComponents
+
+    private void btnCustActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnCustActionPerformed
+    {//GEN-HEADEREND:event_btnCustActionPerformed
+       SelectionGUI.main(null);
+       this.setVisible(false);
+    }//GEN-LAST:event_btnCustActionPerformed
+
+    private void btnInstallActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnInstallActionPerformed
+    {//GEN-HEADEREND:event_btnInstallActionPerformed
+        InstallManager.Main.createQueue();
+        InstallProgressGui.main(null);
+        this.setVisible(false);
+    }//GEN-LAST:event_btnInstallActionPerformed
+
+    private void formComponentMoved(java.awt.event.ComponentEvent evt)//GEN-FIRST:event_formComponentMoved
+    {//GEN-HEADEREND:event_formComponentMoved
+        Main.topleft_coords_x = getLocation().x;
+        Main.topleft_coords_y = getLocation().x;
+    }//GEN-LAST:event_formComponentMoved
+   public static void main(String args[])
+    {
+        try {
+	    UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
+	} catch( ClassNotFoundException | InstantiationException | IllegalAccessException | UnsupportedLookAndFeelException e ) { 
+	    //e.printStackTrace();
+	}
+    }
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JButton btnCust;
+    private javax.swing.JButton btnInstall;
+    private javax.swing.JSeparator jSeparator1;
+    private javax.swing.JSeparator jSeparator2;
+    private javax.swing.JLabel lblVID;
+    // End of variables declaration//GEN-END:variables
+}

+ 382 - 382
IZSetup/src/main/java/de/nplusc/izc/InstallPak/PackagerGUIReloaded.java

@@ -1,382 +1,382 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package de.nplusc.izc.InstallPak;
-
-import de.nplusc.izc.tools.baseTools.HidableTableColumnModel;
-import de.nplusc.izc.tools.baseTools.Tools;
-import java.awt.Point;
-import javax.swing.JFrame;
-import javax.swing.table.DefaultTableModel;
-
-/**
- *
- * @author LH
- */
-public class PackagerGUIReloaded extends JFrame
-{
-    /*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-
-    private InstallFilesManagerAPI p;
-    /**
-     * Creates new form PackagerGUI
-     * @param mdl Object containing the real install file;
-     */
-    public PackagerGUIReloaded(InstallFilesManagerAPI mdl)
-    {
-        p=mdl;
-        initComponents();
-        updatePosition();
-        lblVID.setText(Definitions.VERSION_GUI_TXT);
-        packStatus.setVisible(false);
-        ((HidableTableColumnModel)(tblSelector.getColumnModel())).setColumnVisible(0, false);
-        //^auskommentieren um id-spalte sichtbar zu bekommen (Tempcode fürs Testen)
-        int rows=1;
-        String[] tablefill = p.getPacksInPackage();
-        for (int i = 0; i < tablefill.length; i++)
-        {
-            String GRP = tablefill[i];;
-            if(i>=rows)
-                ((DefaultTableModel)tblSelector.getModel()).addRow(new String[3]);
-            ((DefaultTableModel)tblSelector.getModel()).setValueAt(i, i, 0);
-            ((DefaultTableModel)tblSelector.getModel()).setValueAt(GRP, i, 1);
-            ((DefaultTableModel)tblSelector.getModel()).setValueAt("Wird installiert", i, 2);
-            if(p.getPackInstalled(i))
-            {
-                ((DefaultTableModel)tblSelector.getModel()).setValueAt("Bereits installiert", i, 2);
-            }
-        }
-        tblSelectorMouseClicked(null);
-    }
-    private void updatePosition()
-    {
-        Point p = new Point(Main.topleft_coords_x, Main.topleft_coords_y);
-        setLocation(p);
-    }
-    /**
-     * This method is called from within the constructor to
-     * initialize the form.
-     * WARNING: Do NOT modify this code. The content of this method is
-     * always regenerated by the Form Editor.
-     */
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
-    private void initComponents()
-    {
-
-        jScrollPane1 = new javax.swing.JScrollPane();
-        tblSelector = new javax.swing.JTable();
-        jScrollPane2 = new javax.swing.JScrollPane();
-        packDesc = new javax.swing.JTextArea();
-        packTitle = new javax.swing.JLabel();
-        btnInstall = new javax.swing.JButton();
-        packStatus = new javax.swing.JLabel();
-        jLabel1 = new javax.swing.JLabel();
-        lblVID = new javax.swing.JLabel();
-        jSeparator1 = new javax.swing.JSeparator();
-        jSeparator3 = new javax.swing.JSeparator();
-
-        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
-        addComponentListener(new java.awt.event.ComponentAdapter()
-        {
-            public void componentMoved(java.awt.event.ComponentEvent evt)
-            {
-                formComponentMoved(evt);
-            }
-        });
-
-        tblSelector.setModel(new javax.swing.table.DefaultTableModel(
-            new Object [][]
-            {
-                {null, null, null}
-            },
-            new String []
-            {
-                "meta:id", "Name", "Status"
-            }
-        )
-        {
-            boolean[] canEdit = new boolean []
-            {
-                false, false, false
-            };
-
-            public boolean isCellEditable(int rowIndex, int columnIndex)
-            {
-                return canEdit [columnIndex];
-            }
-        });
-        tblSelector.addMouseListener(new java.awt.event.MouseAdapter()
-        {
-            public void mouseClicked(java.awt.event.MouseEvent evt)
-            {
-                tblSelectorMouseClicked(evt);
-            }
-        });
-        jScrollPane1.setViewportView(tblSelector);
-        tblSelector.setColumnModel(new HidableTableColumnModel(tblSelector.getColumnModel()));
-        if (tblSelector.getColumnModel().getColumnCount() > 0)
-        {
-            tblSelector.getColumnModel().getColumn(0).setResizable(false);
-            tblSelector.getColumnModel().getColumn(0).setPreferredWidth(30);
-            tblSelector.getColumnModel().getColumn(1).setMinWidth(80);
-            tblSelector.getColumnModel().getColumn(1).setPreferredWidth(80);
-            tblSelector.getColumnModel().getColumn(1).setMaxWidth(80);
-            tblSelector.getColumnModel().getColumn(2).setPreferredWidth(80);
-        }
-
-        packDesc.setColumns(20);
-        packDesc.setRows(5);
-        packDesc.addComponentListener(new java.awt.event.ComponentAdapter()
-        {
-            public void componentMoved(java.awt.event.ComponentEvent evt)
-            {
-                packDescComponentMoved(evt);
-            }
-        });
-        jScrollPane2.setViewportView(packDesc);
-
-        packTitle.setText("{PackTitle}");
-
-        btnInstall.setText("Installation starten");
-        btnInstall.addActionListener(new java.awt.event.ActionListener()
-        {
-            public void actionPerformed(java.awt.event.ActionEvent evt)
-            {
-                btnInstallActionPerformed(evt);
-            }
-        });
-
-        packStatus.setText("{DepDetails}");
-
-        jLabel1.setText("Doppelklicken um Status zu ändern");
-
-        lblVID.setText("izSetup 1.0.0 (c) 2012 iZc");
-
-        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
-        getContentPane().setLayout(layout);
-        layout.setHorizontalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(layout.createSequentialGroup()
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE)
-                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE))
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addGroup(layout.createSequentialGroup()
-                                .addGap(34, 34, 34)
-                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                                    .addComponent(packStatus)
-                                    .addComponent(packTitle, javax.swing.GroupLayout.PREFERRED_SIZE, 429, javax.swing.GroupLayout.PREFERRED_SIZE)))
-                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, 12, Short.MAX_VALUE)
-                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                                    .addComponent(btnInstall, javax.swing.GroupLayout.PREFERRED_SIZE, 597, javax.swing.GroupLayout.PREFERRED_SIZE)
-                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 584, javax.swing.GroupLayout.PREFERRED_SIZE))
-                                .addGap(8, 8, 8))))
-                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                        .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(lblVID)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                        .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 642, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addGap(10, 10, 10)))
-                .addContainerGap())
-        );
-        layout.setVerticalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(layout.createSequentialGroup()
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(layout.createSequentialGroup()
-                        .addGap(17, 17, 17)
-                        .addComponent(packStatus))
-                    .addGroup(layout.createSequentialGroup()
-                        .addContainerGap()
-                        .addComponent(jLabel1)))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
-                    .addGroup(layout.createSequentialGroup()
-                        .addComponent(packTitle)
-                        .addGap(18, 18, 18)
-                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                        .addComponent(btnInstall, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE))
-                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
-                    .addComponent(lblVID, javax.swing.GroupLayout.Alignment.TRAILING)
-                    .addComponent(jSeparator3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
-                .addContainerGap())
-        );
-
-        pack();
-    }// </editor-fold>                        
-
-    private void tblSelectorMouseClicked(java.awt.event.MouseEvent evt)                                         
-    {                                             
-        int x = tblSelector.getSelectedRow();
-        x=x!=-1?x:0;
-        System.out.println("Row selected="+x);
-        boolean sel = p.getIsScheduled(x);
-        if(evt !=null&&evt.getClickCount()==2)
-        {
-            if(sel==false&&p.getPackInstallable(x))
-            {
-                sel=true;
-            }
-            else
-            {
-                sel=false;
-            }
-            p.setPackageState(x, sel);
-        }
-        
-        rebuildTable();
-        String _packTitle = p.getPacksInPackage()[x];
-        String packDescr = p.getPackageDescription(x);
-        packTitle.setText(_packTitle);
-        packDesc.setText(packDescr);
-    }                                        
-
-    private String[][] handoverqueue;
-    private void btnInstallActionPerformed(java.awt.event.ActionEvent evt)                                           
-    {                                               
-        handoverqueue = p.packagesQueue();
-        new Thread(() ->
-        {
-            new ExtendedInstallProgressGui(handoverqueue).setVisible(true);
-        }).start();
-        this.setVisible(false);
-    }                                          
-
-    private void packDescComponentMoved(java.awt.event.ComponentEvent evt)                                        
-    {                                            
-        //NOP
-    }                                       
-
-    private void formComponentMoved(java.awt.event.ComponentEvent evt)                                    
-    {                                        
-        Main.topleft_coords_x = getLocation().x;
-        Main.topleft_coords_y = getLocation().x;
-    }                                   
-
-    private void rebuildTable()
-    {
-        String[] tablefill = p.getPacksInPackage();
-        for (int i = 0; i < tablefill.length; i++)
-        {
-            String GRP = tablefill[i];
-            int packid = i;
-            ((DefaultTableModel)tblSelector.getModel()).setValueAt(i, i, 0);
-            ((DefaultTableModel)tblSelector.getModel()).setValueAt(GRP, i, 1);
-            ((DefaultTableModel)tblSelector.getModel()).setValueAt("0xFA11", i, 2);
-            
-            if(p.getPackInstalled(packid))
-            {
-                Tools.DebugHelperPrint(packid+"|exis", true, "iZsetup.enableFinerDebug");
-                ((DefaultTableModel)tblSelector.getModel()).setValueAt("Bereits installiert", i, 2);
-            }
-            else
-            {
-                if(p.getIsScheduled(packid))
-                {
-                    Tools.DebugHelperPrint(packid+"|sched", true, "iZsetup.enableFinerDebug");
-                    ((DefaultTableModel)tblSelector.getModel()).setValueAt("Wird installiert", i, 2);
-                }
-                else
-                {
-                    if(!p.getPackInstallable(packid))
-                    {
-                        String depName = ""; 
-                        int depID = p.getDependencyParent(i);
-                        try
-                        {
-                        depName = tablefill[depID];
-                        }
-                        catch(Exception e)
-                        {
-                        }
-                        Tools.DebugHelperPrint(packid+"|reqdep:"+depID, true, "iZsetup.enableFinerDebug");
-                        ((DefaultTableModel)tblSelector.getModel()).setValueAt(depName+" benötigt", i, 2);
-                    }
-                    else
-                    {
-                        ((DefaultTableModel)tblSelector.getModel()).setValueAt("Abgewählt", i, 2);
-                    }
-                }
-            }
-        }
-    }
-            
-    
-    /**
-     * @param args the command line arguments
-     */    
-    public static void main(String args[])
-    {
-        /* Set the Nimbus look and feel */
-        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
-        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
-         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
-         */
-        try
-        {
-            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
-            {
-                if ("Nimbus".equals(info.getName()))
-                {
-                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
-                    break;
-                }
-            }
-        }
-        catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex)
-        {
-
-        }
-        //</editor-fold>
-
-        /* Create and display the form */
-        java.awt.EventQueue.invokeLater(new Runnable()
-        {
-            public void run()
-            {
-                //new PackagerGUIReloaded().setVisible(true);
-            }
-        });
-    }
-    // Variables declaration - do not modify                     
-    private javax.swing.JButton btnInstall;
-    private javax.swing.JLabel jLabel1;
-    private javax.swing.JScrollPane jScrollPane1;
-    private javax.swing.JScrollPane jScrollPane2;
-    private javax.swing.JSeparator jSeparator1;
-    private javax.swing.JSeparator jSeparator3;
-    private javax.swing.JLabel lblVID;
-    private javax.swing.JTextArea packDesc;
-    private javax.swing.JLabel packStatus;
-    private javax.swing.JLabel packTitle;
-    private javax.swing.JTable tblSelector;
-    // End of variables declaration                   
-}
-
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package de.nplusc.izc.InstallPak;
+
+import de.nplusc.izc.tools.baseTools.HidableTableColumnModel;
+import de.nplusc.izc.tools.baseTools.Tools;
+import java.awt.Point;
+import javax.swing.JFrame;
+import javax.swing.table.DefaultTableModel;
+
+/**
+ *
+ * @author LH
+ */
+public class PackagerGUIReloaded extends JFrame
+{
+    /*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+    private InstallFilesManagerAPI p;
+    /**
+     * Creates new form PackagerGUI
+     * @param mdl Object containing the real install file;
+     */
+    public PackagerGUIReloaded(InstallFilesManagerAPI mdl)
+    {
+        p=mdl;
+        initComponents();
+        updatePosition();
+        lblVID.setText(Definitions.VERSION_GUI_TXT);
+        packStatus.setVisible(false);
+        ((HidableTableColumnModel)(tblSelector.getColumnModel())).setColumnVisible(0, false);
+        //^auskommentieren um id-spalte sichtbar zu bekommen (Tempcode fürs Testen)
+        int rows=1;
+        String[] tablefill = p.getPacksInPackage();
+        for (int i = 0; i < tablefill.length; i++)
+        {
+            String GRP = tablefill[i];;
+            if(i>=rows)
+                ((DefaultTableModel)tblSelector.getModel()).addRow(new String[3]);
+            ((DefaultTableModel)tblSelector.getModel()).setValueAt(i, i, 0);
+            ((DefaultTableModel)tblSelector.getModel()).setValueAt(GRP, i, 1);
+            ((DefaultTableModel)tblSelector.getModel()).setValueAt("Wird installiert", i, 2);
+            if(p.getPackInstalled(i))
+            {
+                ((DefaultTableModel)tblSelector.getModel()).setValueAt("Bereits installiert", i, 2);
+            }
+        }
+        tblSelectorMouseClicked(null);
+    }
+    private void updatePosition()
+    {
+        Point p = new Point(Main.topleft_coords_x, Main.topleft_coords_y);
+        setLocation(p);
+    }
+    /**
+     * This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">                          
+    private void initComponents()
+    {
+
+        jScrollPane1 = new javax.swing.JScrollPane();
+        tblSelector = new javax.swing.JTable();
+        jScrollPane2 = new javax.swing.JScrollPane();
+        packDesc = new javax.swing.JTextArea();
+        packTitle = new javax.swing.JLabel();
+        btnInstall = new javax.swing.JButton();
+        packStatus = new javax.swing.JLabel();
+        jLabel1 = new javax.swing.JLabel();
+        lblVID = new javax.swing.JLabel();
+        jSeparator1 = new javax.swing.JSeparator();
+        jSeparator3 = new javax.swing.JSeparator();
+
+        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+        addComponentListener(new java.awt.event.ComponentAdapter()
+        {
+            public void componentMoved(java.awt.event.ComponentEvent evt)
+            {
+                formComponentMoved(evt);
+            }
+        });
+
+        tblSelector.setModel(new javax.swing.table.DefaultTableModel(
+            new Object [][]
+            {
+                {null, null, null}
+            },
+            new String []
+            {
+                "meta:id", "Name", "Status"
+            }
+        )
+        {
+            boolean[] canEdit = new boolean []
+            {
+                false, false, false
+            };
+
+            public boolean isCellEditable(int rowIndex, int columnIndex)
+            {
+                return canEdit [columnIndex];
+            }
+        });
+        tblSelector.addMouseListener(new java.awt.event.MouseAdapter()
+        {
+            public void mouseClicked(java.awt.event.MouseEvent evt)
+            {
+                tblSelectorMouseClicked(evt);
+            }
+        });
+        jScrollPane1.setViewportView(tblSelector);
+        tblSelector.setColumnModel(new HidableTableColumnModel(tblSelector.getColumnModel()));
+        if (tblSelector.getColumnModel().getColumnCount() > 0)
+        {
+            tblSelector.getColumnModel().getColumn(0).setResizable(false);
+            tblSelector.getColumnModel().getColumn(0).setPreferredWidth(30);
+            tblSelector.getColumnModel().getColumn(1).setMinWidth(80);
+            tblSelector.getColumnModel().getColumn(1).setPreferredWidth(80);
+            tblSelector.getColumnModel().getColumn(1).setMaxWidth(80);
+            tblSelector.getColumnModel().getColumn(2).setPreferredWidth(80);
+        }
+
+        packDesc.setColumns(20);
+        packDesc.setRows(5);
+        packDesc.addComponentListener(new java.awt.event.ComponentAdapter()
+        {
+            public void componentMoved(java.awt.event.ComponentEvent evt)
+            {
+                packDescComponentMoved(evt);
+            }
+        });
+        jScrollPane2.setViewportView(packDesc);
+
+        packTitle.setText("{PackTitle}");
+
+        btnInstall.setText("Installation starten");
+        btnInstall.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                btnInstallActionPerformed(evt);
+            }
+        });
+
+        packStatus.setText("{DepDetails}");
+
+        jLabel1.setText("Doppelklicken um Status zu ändern");
+
+        lblVID.setText("izSetup 1.0.0 (c) 2012 iZc");
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
+        getContentPane().setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE)
+                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE))
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addGroup(layout.createSequentialGroup()
+                                .addGap(34, 34, 34)
+                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                    .addComponent(packStatus)
+                                    .addComponent(packTitle, javax.swing.GroupLayout.PREFERRED_SIZE, 429, javax.swing.GroupLayout.PREFERRED_SIZE)))
+                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, 12, Short.MAX_VALUE)
+                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                    .addComponent(btnInstall, javax.swing.GroupLayout.PREFERRED_SIZE, 597, javax.swing.GroupLayout.PREFERRED_SIZE)
+                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 584, javax.swing.GroupLayout.PREFERRED_SIZE))
+                                .addGap(8, 8, 8))))
+                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                        .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(lblVID)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                        .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 642, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addGap(10, 10, 10)))
+                .addContainerGap())
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addGap(17, 17, 17)
+                        .addComponent(packStatus))
+                    .addGroup(layout.createSequentialGroup()
+                        .addContainerGap()
+                        .addComponent(jLabel1)))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
+                    .addGroup(layout.createSequentialGroup()
+                        .addComponent(packTitle)
+                        .addGap(18, 18, 18)
+                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                        .addComponent(btnInstall, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE))
+                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
+                    .addComponent(lblVID, javax.swing.GroupLayout.Alignment.TRAILING)
+                    .addComponent(jSeparator3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addContainerGap())
+        );
+
+        pack();
+    }// </editor-fold>                        
+
+    private void tblSelectorMouseClicked(java.awt.event.MouseEvent evt)                                         
+    {                                             
+        int x = tblSelector.getSelectedRow();
+        x=x!=-1?x:0;
+        System.out.println("Row selected="+x);
+        boolean sel = p.getIsScheduled(x);
+        if(evt !=null&&evt.getClickCount()==2)
+        {
+            if(sel==false&&p.getPackInstallable(x))
+            {
+                sel=true;
+            }
+            else
+            {
+                sel=false;
+            }
+            p.setPackageState(x, sel);
+        }
+        
+        rebuildTable();
+        String _packTitle = p.getPacksInPackage()[x];
+        String packDescr = p.getPackageDescription(x);
+        packTitle.setText(_packTitle);
+        packDesc.setText(packDescr);
+    }                                        
+
+    private String[][] handoverqueue;
+    private void btnInstallActionPerformed(java.awt.event.ActionEvent evt)                                           
+    {                                               
+        handoverqueue = p.packagesQueue();
+        new Thread(() ->
+        {
+            new ExtendedInstallProgressGui(handoverqueue).setVisible(true);
+        }).start();
+        this.setVisible(false);
+    }                                          
+
+    private void packDescComponentMoved(java.awt.event.ComponentEvent evt)                                        
+    {                                            
+        //NOP
+    }                                       
+
+    private void formComponentMoved(java.awt.event.ComponentEvent evt)                                    
+    {                                        
+        Main.topleft_coords_x = getLocation().x;
+        Main.topleft_coords_y = getLocation().x;
+    }                                   
+
+    private void rebuildTable()
+    {
+        String[] tablefill = p.getPacksInPackage();
+        for (int i = 0; i < tablefill.length; i++)
+        {
+            String GRP = tablefill[i];
+            int packid = i;
+            ((DefaultTableModel)tblSelector.getModel()).setValueAt(i, i, 0);
+            ((DefaultTableModel)tblSelector.getModel()).setValueAt(GRP, i, 1);
+            ((DefaultTableModel)tblSelector.getModel()).setValueAt("0xFA11", i, 2);
+            
+            if(p.getPackInstalled(packid))
+            {
+                Tools.DebugHelperPrint(packid+"|exis", true, "iZsetup.enableFinerDebug");
+                ((DefaultTableModel)tblSelector.getModel()).setValueAt("Bereits installiert", i, 2);
+            }
+            else
+            {
+                if(p.getIsScheduled(packid))
+                {
+                    Tools.DebugHelperPrint(packid+"|sched", true, "iZsetup.enableFinerDebug");
+                    ((DefaultTableModel)tblSelector.getModel()).setValueAt("Wird installiert", i, 2);
+                }
+                else
+                {
+                    if(!p.getPackInstallable(packid))
+                    {
+                        String depName = ""; 
+                        int depID = p.getDependencyParent(i);
+                        try
+                        {
+                        depName = tablefill[depID];
+                        }
+                        catch(Exception e)
+                        {
+                        }
+                        Tools.DebugHelperPrint(packid+"|reqdep:"+depID, true, "iZsetup.enableFinerDebug");
+                        ((DefaultTableModel)tblSelector.getModel()).setValueAt(depName+" benötigt", i, 2);
+                    }
+                    else
+                    {
+                        ((DefaultTableModel)tblSelector.getModel()).setValueAt("Abgewählt", i, 2);
+                    }
+                }
+            }
+        }
+    }
+            
+    
+    /**
+     * @param args the command line arguments
+     */    
+    public static void main(String args[])
+    {
+        /* Set the Nimbus look and feel */
+        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
+        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
+         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
+         */
+        try
+        {
+            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
+            {
+                if ("Nimbus".equals(info.getName()))
+                {
+                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
+                    break;
+                }
+            }
+        }
+        catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex)
+        {
+
+        }
+        //</editor-fold>
+
+        /* Create and display the form */
+        java.awt.EventQueue.invokeLater(new Runnable()
+        {
+            public void run()
+            {
+                //new PackagerGUIReloaded().setVisible(true);
+            }
+        });
+    }
+    // Variables declaration - do not modify                     
+    private javax.swing.JButton btnInstall;
+    private javax.swing.JLabel jLabel1;
+    private javax.swing.JScrollPane jScrollPane1;
+    private javax.swing.JScrollPane jScrollPane2;
+    private javax.swing.JSeparator jSeparator1;
+    private javax.swing.JSeparator jSeparator3;
+    private javax.swing.JLabel lblVID;
+    private javax.swing.JTextArea packDesc;
+    private javax.swing.JLabel packStatus;
+    private javax.swing.JLabel packTitle;
+    private javax.swing.JTable tblSelector;
+    // End of variables declaration                   
+}
+

+ 252 - 252
IZSetup/src/main/java/de/nplusc/izc/InstallPak/SelectionGUI.java

@@ -1,252 +1,252 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.InstallPak;
-
-import de.nplusc.izc.InstallPak.legacy.InstallManager;
-import de.nplusc.izc.InstallPak.legacy.InstallProgressGui;
-import de.nplusc.izc.tools.baseTools.HidableTableColumnModel;
-import java.awt.Point;
-import javax.swing.UIManager;
-import javax.swing.table.DefaultTableModel;
-
-/**
- *
- * @author LH
- */
-public class SelectionGUI extends javax.swing.JFrame
-{
-    /**
-     * Creates new form SelectionGUI
-     */
-    InstallManager im = InstallManager.Main;
-    public SelectionGUI()
-    {
-        initComponents();
-        updatePosition();
-        lblVID.setText(Definitions.VERSION_GUI_TXT);
-        ((HidableTableColumnModel)(tblSelector.getColumnModel())).setColumnVisible(0, false);
-        //^Tempcode fürs Testen
-        int rows=1;
-        String[] tablefill = im.getToggleAblePrograms();
-        for (int i = 0; i < tablefill.length; i++)
-        {
-            String GRP = tablefill[i];
-            String[] data = GRP.split("\\|");
-            if(i>=rows)
-                ((DefaultTableModel)tblSelector.getModel()).addRow(new String[3]);
-            ((DefaultTableModel)tblSelector.getModel()).setValueAt(data[0], i, 0);
-            ((DefaultTableModel)tblSelector.getModel()).setValueAt(data[1], i, 1);
-            ((DefaultTableModel)tblSelector.getModel()).setValueAt("Wird installiert", i, 2);
-        }
-        
-    }
-    private void updatePosition()
-    {
-        Point p = new Point(Main.topleft_coords_x, Main.topleft_coords_y);
-        setLocation(p);
-    }
-    /**
-     * This method is called from within the constructor to
-     * initialize the form.
-     * WARNING: Do NOT modify this code. The content of this method is
-     * always regenerated by the Form Editor.
-     */
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents()
-    {
-
-        btnInstall = new javax.swing.JButton();
-        jScrollPane1 = new javax.swing.JScrollPane();
-        tblSelector = new javax.swing.JTable();
-        lblVID = new javax.swing.JLabel();
-        jSeparator1 = new javax.swing.JSeparator();
-        jSeparator2 = new javax.swing.JSeparator();
-
-        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
-        addComponentListener(new java.awt.event.ComponentAdapter()
-        {
-            public void componentMoved(java.awt.event.ComponentEvent evt)
-            {
-                formComponentMoved(evt);
-            }
-        });
-
-        btnInstall.setText("Install");
-        btnInstall.addActionListener(new java.awt.event.ActionListener()
-        {
-            public void actionPerformed(java.awt.event.ActionEvent evt)
-            {
-                btnInstallActionPerformed(evt);
-            }
-        });
-
-        tblSelector.setModel(new javax.swing.table.DefaultTableModel(
-            new Object [][]
-            {
-                {null, null, null}
-            },
-            new String []
-            {
-                "meta:id", "Name", "Status"
-            }
-        )
-        {
-            Class[] types = new Class []
-            {
-                java.lang.String.class, java.lang.String.class, java.lang.String.class
-            };
-            boolean[] canEdit = new boolean []
-            {
-                false, false, false
-            };
-
-            public Class getColumnClass(int columnIndex)
-            {
-                return types [columnIndex];
-            }
-
-            public boolean isCellEditable(int rowIndex, int columnIndex)
-            {
-                return canEdit [columnIndex];
-            }
-        });
-        tblSelector.setColumnSelectionAllowed(true);
-        tblSelector.getTableHeader().setReorderingAllowed(false);
-        tblSelector.setColumnModel(new HidableTableColumnModel(tblSelector.getColumnModel()));
-        tblSelector.addMouseListener(new java.awt.event.MouseAdapter()
-        {
-            public void mouseClicked(java.awt.event.MouseEvent evt)
-            {
-                tblSelectorMouseClicked(evt);
-            }
-        });
-        jScrollPane1.setViewportView(tblSelector);
-        tblSelector.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
-        tblSelector.getColumnModel().getColumn(0).setResizable(false);
-        tblSelector.getColumnModel().getColumn(0).setPreferredWidth(1);
-        tblSelector.getColumnModel().getColumn(2).setMinWidth(120);
-        tblSelector.getColumnModel().getColumn(2).setPreferredWidth(120);
-        tblSelector.getColumnModel().getColumn(2).setMaxWidth(120);
-
-        lblVID.setText("izSetup 1.0.0 (c) 2012 iZc");
-
-        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
-        getContentPane().setLayout(layout);
-        layout.setHorizontalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(layout.createSequentialGroup()
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(layout.createSequentialGroup()
-                        .addContainerGap()
-                        .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(lblVID)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(jSeparator2))
-                    .addGroup(layout.createSequentialGroup()
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addGroup(layout.createSequentialGroup()
-                                .addContainerGap()
-                                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 420, javax.swing.GroupLayout.PREFERRED_SIZE))
-                            .addGroup(layout.createSequentialGroup()
-                                .addGap(55, 55, 55)
-                                .addComponent(btnInstall, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE)))
-                        .addGap(0, 412, Short.MAX_VALUE)))
-                .addContainerGap())
-        );
-        layout.setVerticalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(layout.createSequentialGroup()
-                .addContainerGap()
-                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(btnInstall, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 43, Short.MAX_VALUE)
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(lblVID, javax.swing.GroupLayout.Alignment.TRAILING)
-                    .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
-                    .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
-                .addContainerGap())
-        );
-
-        pack();
-    }// </editor-fold>//GEN-END:initComponents
-
-    private void btnInstallActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnInstallActionPerformed
-    {//GEN-HEADEREND:event_btnInstallActionPerformed
-        InstallManager.Main.createQueue();
-        InstallProgressGui.main(null);
-            this.setVisible(false);
-    }//GEN-LAST:event_btnInstallActionPerformed
-
-    private void tblSelectorMouseClicked(java.awt.event.MouseEvent evt)//GEN-FIRST:event_tblSelectorMouseClicked
-    {//GEN-HEADEREND:event_tblSelectorMouseClicked
-                //int y = tblSelector.getSelectedColumn();
-        int x = tblSelector.getSelectedRow();
-        boolean sel = ((DefaultTableModel)tblSelector.getModel()).getValueAt(x, 2).equals("Wird installiert");
-        //if(evt.getClickCount()==2)
-        {
-            if(sel==false)
-            {
-                ((DefaultTableModel)tblSelector.getModel()).setValueAt("Wird installiert", x, 2);
-                sel=true;
-            }
-            else
-            {
-                ((DefaultTableModel)tblSelector.getModel()).setValueAt("Wird nicht installiert", x, 2);
-                sel=false;
-            }
-            im.setGroupState((String)((DefaultTableModel)tblSelector.getModel()).getValueAt(x, 0), sel);
-        }
-        
-    }//GEN-LAST:event_tblSelectorMouseClicked
-
-    private void formComponentMoved(java.awt.event.ComponentEvent evt)//GEN-FIRST:event_formComponentMoved
-    {//GEN-HEADEREND:event_formComponentMoved
-        Main.topleft_coords_x = getLocation().x;
-        Main.topleft_coords_y = getLocation().x;
-    }//GEN-LAST:event_formComponentMoved
-
-    /**
-     * @param args the command line arguments
-     */
-    public static void main(String args[])
-    {
-                        try {
-	    UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
-	} catch( Exception e ) { 
-	    //e.printStackTrace();
-	}
-        /* Create and display the form */
-        java.awt.EventQueue.invokeLater(new Runnable()
-        {
-            public void run()
-            {
-                new SelectionGUI().setVisible(true);
-            }
-        });
-    }
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JButton btnInstall;
-    private javax.swing.JScrollPane jScrollPane1;
-    private javax.swing.JSeparator jSeparator1;
-    private javax.swing.JSeparator jSeparator2;
-    private javax.swing.JLabel lblVID;
-    private javax.swing.JTable tblSelector;
-    // End of variables declaration//GEN-END:variables
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.InstallPak;
+
+import de.nplusc.izc.InstallPak.legacy.InstallManager;
+import de.nplusc.izc.InstallPak.legacy.InstallProgressGui;
+import de.nplusc.izc.tools.baseTools.HidableTableColumnModel;
+import java.awt.Point;
+import javax.swing.UIManager;
+import javax.swing.table.DefaultTableModel;
+
+/**
+ *
+ * @author LH
+ */
+public class SelectionGUI extends javax.swing.JFrame
+{
+    /**
+     * Creates new form SelectionGUI
+     */
+    InstallManager im = InstallManager.Main;
+    public SelectionGUI()
+    {
+        initComponents();
+        updatePosition();
+        lblVID.setText(Definitions.VERSION_GUI_TXT);
+        ((HidableTableColumnModel)(tblSelector.getColumnModel())).setColumnVisible(0, false);
+        //^Tempcode fürs Testen
+        int rows=1;
+        String[] tablefill = im.getToggleAblePrograms();
+        for (int i = 0; i < tablefill.length; i++)
+        {
+            String GRP = tablefill[i];
+            String[] data = GRP.split("\\|");
+            if(i>=rows)
+                ((DefaultTableModel)tblSelector.getModel()).addRow(new String[3]);
+            ((DefaultTableModel)tblSelector.getModel()).setValueAt(data[0], i, 0);
+            ((DefaultTableModel)tblSelector.getModel()).setValueAt(data[1], i, 1);
+            ((DefaultTableModel)tblSelector.getModel()).setValueAt("Wird installiert", i, 2);
+        }
+        
+    }
+    private void updatePosition()
+    {
+        Point p = new Point(Main.topleft_coords_x, Main.topleft_coords_y);
+        setLocation(p);
+    }
+    /**
+     * This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents()
+    {
+
+        btnInstall = new javax.swing.JButton();
+        jScrollPane1 = new javax.swing.JScrollPane();
+        tblSelector = new javax.swing.JTable();
+        lblVID = new javax.swing.JLabel();
+        jSeparator1 = new javax.swing.JSeparator();
+        jSeparator2 = new javax.swing.JSeparator();
+
+        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+        addComponentListener(new java.awt.event.ComponentAdapter()
+        {
+            public void componentMoved(java.awt.event.ComponentEvent evt)
+            {
+                formComponentMoved(evt);
+            }
+        });
+
+        btnInstall.setText("Install");
+        btnInstall.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                btnInstallActionPerformed(evt);
+            }
+        });
+
+        tblSelector.setModel(new javax.swing.table.DefaultTableModel(
+            new Object [][]
+            {
+                {null, null, null}
+            },
+            new String []
+            {
+                "meta:id", "Name", "Status"
+            }
+        )
+        {
+            Class[] types = new Class []
+            {
+                java.lang.String.class, java.lang.String.class, java.lang.String.class
+            };
+            boolean[] canEdit = new boolean []
+            {
+                false, false, false
+            };
+
+            public Class getColumnClass(int columnIndex)
+            {
+                return types [columnIndex];
+            }
+
+            public boolean isCellEditable(int rowIndex, int columnIndex)
+            {
+                return canEdit [columnIndex];
+            }
+        });
+        tblSelector.setColumnSelectionAllowed(true);
+        tblSelector.getTableHeader().setReorderingAllowed(false);
+        tblSelector.setColumnModel(new HidableTableColumnModel(tblSelector.getColumnModel()));
+        tblSelector.addMouseListener(new java.awt.event.MouseAdapter()
+        {
+            public void mouseClicked(java.awt.event.MouseEvent evt)
+            {
+                tblSelectorMouseClicked(evt);
+            }
+        });
+        jScrollPane1.setViewportView(tblSelector);
+        tblSelector.getColumnModel().getSelectionModel().setSelectionMode(javax.swing.ListSelectionModel.SINGLE_SELECTION);
+        tblSelector.getColumnModel().getColumn(0).setResizable(false);
+        tblSelector.getColumnModel().getColumn(0).setPreferredWidth(1);
+        tblSelector.getColumnModel().getColumn(2).setMinWidth(120);
+        tblSelector.getColumnModel().getColumn(2).setPreferredWidth(120);
+        tblSelector.getColumnModel().getColumn(2).setMaxWidth(120);
+
+        lblVID.setText("izSetup 1.0.0 (c) 2012 iZc");
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
+        getContentPane().setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addContainerGap()
+                        .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(lblVID)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(jSeparator2))
+                    .addGroup(layout.createSequentialGroup()
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addGroup(layout.createSequentialGroup()
+                                .addContainerGap()
+                                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 420, javax.swing.GroupLayout.PREFERRED_SIZE))
+                            .addGroup(layout.createSequentialGroup()
+                                .addGap(55, 55, 55)
+                                .addComponent(btnInstall, javax.swing.GroupLayout.PREFERRED_SIZE, 342, javax.swing.GroupLayout.PREFERRED_SIZE)))
+                        .addGap(0, 412, Short.MAX_VALUE)))
+                .addContainerGap())
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addContainerGap()
+                .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 185, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(btnInstall, javax.swing.GroupLayout.PREFERRED_SIZE, 61, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 43, Short.MAX_VALUE)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addComponent(lblVID, javax.swing.GroupLayout.Alignment.TRAILING)
+                    .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
+                    .addComponent(jSeparator2, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addContainerGap())
+        );
+
+        pack();
+    }// </editor-fold>//GEN-END:initComponents
+
+    private void btnInstallActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnInstallActionPerformed
+    {//GEN-HEADEREND:event_btnInstallActionPerformed
+        InstallManager.Main.createQueue();
+        InstallProgressGui.main(null);
+            this.setVisible(false);
+    }//GEN-LAST:event_btnInstallActionPerformed
+
+    private void tblSelectorMouseClicked(java.awt.event.MouseEvent evt)//GEN-FIRST:event_tblSelectorMouseClicked
+    {//GEN-HEADEREND:event_tblSelectorMouseClicked
+                //int y = tblSelector.getSelectedColumn();
+        int x = tblSelector.getSelectedRow();
+        boolean sel = ((DefaultTableModel)tblSelector.getModel()).getValueAt(x, 2).equals("Wird installiert");
+        //if(evt.getClickCount()==2)
+        {
+            if(sel==false)
+            {
+                ((DefaultTableModel)tblSelector.getModel()).setValueAt("Wird installiert", x, 2);
+                sel=true;
+            }
+            else
+            {
+                ((DefaultTableModel)tblSelector.getModel()).setValueAt("Wird nicht installiert", x, 2);
+                sel=false;
+            }
+            im.setGroupState((String)((DefaultTableModel)tblSelector.getModel()).getValueAt(x, 0), sel);
+        }
+        
+    }//GEN-LAST:event_tblSelectorMouseClicked
+
+    private void formComponentMoved(java.awt.event.ComponentEvent evt)//GEN-FIRST:event_formComponentMoved
+    {//GEN-HEADEREND:event_formComponentMoved
+        Main.topleft_coords_x = getLocation().x;
+        Main.topleft_coords_y = getLocation().x;
+    }//GEN-LAST:event_formComponentMoved
+
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String args[])
+    {
+                        try {
+	    UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
+	} catch( Exception e ) { 
+	    //e.printStackTrace();
+	}
+        /* Create and display the form */
+        java.awt.EventQueue.invokeLater(new Runnable()
+        {
+            public void run()
+            {
+                new SelectionGUI().setVisible(true);
+            }
+        });
+    }
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JButton btnInstall;
+    private javax.swing.JScrollPane jScrollPane1;
+    private javax.swing.JSeparator jSeparator1;
+    private javax.swing.JSeparator jSeparator2;
+    private javax.swing.JLabel lblVID;
+    private javax.swing.JTable tblSelector;
+    // End of variables declaration//GEN-END:variables
+}

+ 90 - 90
IZSetup/src/main/java/de/nplusc/izc/InstallPak/SharedUtils.java

@@ -1,90 +1,90 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package de.nplusc.izc.InstallPak;
-
-import de.nplusc.izc.tools.IOtools.FileTK;
-import de.nplusc.izc.tools.IOtools.registryReader;
-import de.nplusc.izc.tools.baseTools.Detectors;
-
-/**
- *
- * @author LH
- */
-public class SharedUtils
-{
-    public static  boolean checkCondition(String condition)
-    {
-        boolean conditionsClear = false;
-
-        if (condition.equalsIgnoreCase("IsWin8"))
-        {
-            conditionsClear = Detectors.detectIsWin8();
-        }
-        if (condition.equalsIgnoreCase("Is64Bit") && !conditionsClear)
-        {
-            conditionsClear = Detectors.detect64bitWinon7and8();
-        }
-        if (condition.equalsIgnoreCase("IsWinXP") && !conditionsClear)
-        {
-            conditionsClear = Detectors.detectWInXP();
-        }
-        if (condition.equalsIgnoreCase("IsWin7") && !conditionsClear)
-        {
-            conditionsClear = Detectors.detectWin7();
-        }
-        if (condition.startsWith("PathExists:"))
-        {
-            conditionsClear = FileTK.checkDirExist(condition.substring(11));//kann zum Erkennen beliebiger Programme genutzt werden
-        }
-        if (condition.startsWith("RegKeyExists:"))
-        {
-            // prüft Registryeinträge//sollte hinter ne CheckWIndows geglemmt werden
-            conditionsClear = registryReader.checkExistenceOfRegKey(condition.substring(13));
-            if (!conditionsClear)
-            {
-                conditionsClear = registryReader.checkExistenceOfRegKeyEntry(condition.substring(13));
-            }
-        }
-        return conditionsClear;
-    }
-
-    public static boolean detectInstall(String detecString)
-    {
-        if (detecString.substring(0, 7).equalsIgnoreCase("File://"))
-        {
-            String detecpart = detecString.substring(7);
-            if (FileTK.checkDirExist(detecpart))
-            {
-                return true;
-            }
-        }
-        if (detecString.substring(0, 6).equalsIgnoreCase("Reg://"))
-        {
-            String detecpart = detecString.substring(6);
-            if (registryReader.checkExistenceOfRegKey(detecpart) || registryReader.checkExistenceOfRegKeyEntry(detecpart))
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-
-    private SharedUtils()
-    {
-    }
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package de.nplusc.izc.InstallPak;
+
+import de.nplusc.izc.tools.IOtools.FileTK;
+import de.nplusc.izc.tools.IOtools.registryReader;
+import de.nplusc.izc.tools.baseTools.Detectors;
+
+/**
+ *
+ * @author LH
+ */
+public class SharedUtils
+{
+    public static  boolean checkCondition(String condition)
+    {
+        boolean conditionsClear = false;
+
+        if (condition.equalsIgnoreCase("IsWin8"))
+        {
+            conditionsClear = Detectors.detectIsWin8();
+        }
+        if (condition.equalsIgnoreCase("Is64Bit") && !conditionsClear)
+        {
+            conditionsClear = Detectors.detect64bitWinon7and8();
+        }
+        if (condition.equalsIgnoreCase("IsWinXP") && !conditionsClear)
+        {
+            conditionsClear = Detectors.detectWInXP();
+        }
+        if (condition.equalsIgnoreCase("IsWin7") && !conditionsClear)
+        {
+            conditionsClear = Detectors.detectWin7();
+        }
+        if (condition.startsWith("PathExists:"))
+        {
+            conditionsClear = FileTK.checkDirExist(condition.substring(11));//kann zum Erkennen beliebiger Programme genutzt werden
+        }
+        if (condition.startsWith("RegKeyExists:"))
+        {
+            // prüft Registryeinträge//sollte hinter ne CheckWIndows geglemmt werden
+            conditionsClear = registryReader.checkExistenceOfRegKey(condition.substring(13));
+            if (!conditionsClear)
+            {
+                conditionsClear = registryReader.checkExistenceOfRegKeyEntry(condition.substring(13));
+            }
+        }
+        return conditionsClear;
+    }
+
+    public static boolean detectInstall(String detecString)
+    {
+        if (detecString.substring(0, 7).equalsIgnoreCase("File://"))
+        {
+            String detecpart = detecString.substring(7);
+            if (FileTK.checkDirExist(detecpart))
+            {
+                return true;
+            }
+        }
+        if (detecString.substring(0, 6).equalsIgnoreCase("Reg://"))
+        {
+            String detecpart = detecString.substring(6);
+            if (registryReader.checkExistenceOfRegKey(detecpart) || registryReader.checkExistenceOfRegKeyEntry(detecpart))
+            {
+                return true;
+            }
+        }
+        return false;
+    }
+
+    private SharedUtils()
+    {
+    }
+}

+ 32 - 32
IZSetup/src/main/java/de/nplusc/izc/InstallPak/Tester.java

@@ -1,32 +1,32 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.InstallPak;
-
-import de.nplusc.izc.tools.IOtools.ZipFileHandler;
-
-/**
- *
- * @author LH
- */
-public class Tester
-{
-    public static void main(String args[])
-    {
-       
-        new ZipFileHandler("D:\\zip\\burnme2\\PSPDevsrc1.zip").extractAllToDiskWithMonitoringProgressbar(null, null);
-    }
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.InstallPak;
+
+import de.nplusc.izc.tools.IOtools.ZipFileHandler;
+
+/**
+ *
+ * @author LH
+ */
+public class Tester
+{
+    public static void main(String args[])
+    {
+       
+        new ZipFileHandler("D:\\zip\\burnme2\\PSPDevsrc1.zip").extractAllToDiskWithMonitoringProgressbar(null, null);
+    }
+}

+ 373 - 373
IZSetup/src/main/java/de/nplusc/izc/InstallPak/YInstallAction.java

@@ -1,373 +1,373 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package de.nplusc.izc.InstallPak;
-
-import de.nplusc.izc.tools.IOtools.FileTK;
-import de.nplusc.izc.tools.baseTools.Messagers;
-import de.nplusc.izc.tools.baseTools.Tools;
-import java.awt.EventQueue;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.LinkedHashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-import javax.swing.JLabel;
-import javax.swing.JProgressBar;
-import javax.swing.JTextArea;
-import javax.swing.text.DefaultCaret;
-import org.yaml.snakeyaml.Yaml;
-
-/**
- *
- * @author LH
- */
-public class YInstallAction implements InstallAction
-{
-    //idx1=position in queue idx2: 0=type,1_onwards=arguments
-    Map<String,Object> iZsetupScript;
-    Map<String,List<List<String>>> pkg;
-    /**
-     * Generates the InstallAction Object
-     * @param filepath Absolute and preprocessed path to the iZsetup-file
-     */
-    public YInstallAction(String filepath)
-    {
-        try
-        {
-            pkg = new LinkedHashMap<>();
-            Yaml y = new Yaml();
-            iZsetupScript = (Map<String,Object>) y.load(new FileInputStream(filepath));
-            System.out.println("############################\n"+iZsetupScript+"\n");
-            List<String> rootPackages = (List<String>) iZsetupScript.get("Segments");
-            for (String id : rootPackages)
-            {
-                pkg.put(id, getElement(id));
-            }
-        }
-        catch (FileNotFoundException ex)
-        {
-            ex.printStackTrace();
-        }
-    }
-    
-    @Override
-    public void doInstall()
-    {
-        doInstall(new JProgressBar(0,1000),null,new JLabel(),new JTextArea());
-    }
-    
-    private double segmentSize = 1.0;
-    private int installedSize;
-    private int[] checkpoints_main;
-    private int i_g;
-    private long totalSize;
-    private double fs;
-    //private List<String> lmaa2;
-    @Override
-    public void doInstall(final JProgressBar pbarTotal,JProgressBar subProgress,JLabel statusLine,JTextArea logPane)
-    {
-        pbarTotal.setValue(0);
-        pbarTotal.setMaximum(1000);
-        DefaultCaret caret = (DefaultCaret) logPane.getCaret();
-        caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);
-        checkpoints_main = new int[pkg.size()+1];
-        int chunks = checkpoints_main.length-1;
-        checkpoints_main[0]=0;
-        //progressbar_chunks
-        Tools.DebugHelperPrint(chunks+"", true, "iZsetup.enableFinerDebug");
-        for (int i = 0; i < chunks; i++)
-        {
-            checkpoints_main[i+1]=(1000/chunks)*(i+1);
-        }
-        Set<String> chunkIDs = pkg.keySet();
-        //int i=0;
-        for (int i=0;i<chunkIDs.size();i++)
-        {
-            i_g=i;
-            String id = chunkIDs.toArray(new String[]{})[i];
-            statusLine.setText("Kalkuliere zu kopierende Datenmenge");
-            logPane.append("Kalkuliere zu kopierende Datenmenge\n");
-            List<String[]> actions = new ArrayList<>();
-            //program,copydir,copyfile,mkdir -> internal use only,copyfile2 -> internal use only
-            boolean mixed=false; //wenn mixed ->  jedes file gleiche schrittzahl im gebälk
-            String[] type = new String[0];
-            System.out.println("baseDir=="+Main.baseDir+"\n");
-            totalSize=0;
-            for (List<String> actionRaw : pkg.get(id))
-            {
-                System.out.println(actionRaw+"\n");
-                switch(actionRaw.get(1))
-                {
-                    
-                    case "program"://intended slipthru
-                        actions.add(actionRaw.toArray(type));
-                        mixed=true;
-                    break;
-                    case "copyfile":
-                        String fn = Tools.replaceHashmarkedVars(actionRaw.get(2), "basedir", Main.baseDir);
-                        String fsi = new File(fn).length()+"";
-                        actions.add(new String[]{actionRaw.get(0),"copyfile",fsi,fn,(actionRaw.get(3))});
-                        break;
-                    case "copydir":
-                        String indir = Tools.replaceHashmarkedVars(actionRaw.get(2), "basedir", Main.baseDir);
-                        String statusMessage = "Kopiere neue Dateien für "+actionRaw.get(0);
-                        String target = actionRaw.get(3);
-                        String[] filesToCopy = FileTK.walkDirectoryRecursively(indir);
-                        for (String element : filesToCopy)
-                        {
-                            element = Tools.replaceHashmarkedVars(element, "basedir", Main.baseDir);
-                            element = Tools.processEnvVarsinLine(element);
-                            //message,"copyfile2",size,in,out
-                            //message,"mkdir",0,which_dir
-                            String element_r = FileTK.getRelativePath(element, indir).substring(3);
-                            if(new File(element).isDirectory())
-                            {
-                                actions.add(new String[]{statusMessage,"mkdir","0",(target+"\\"+element_r).replace("\\\\", "\\")});
-                            }
-                            else
-                            {
-                                long fs = new File(element).length();
-                                totalSize+=fs;
-                                actions.add(new String[]{statusMessage,"copyfile2",fs+"",element,(target+"\\"+element_r).replace("\\\\", "\\")});
-                            }
-                        }
-                        int lmaa=1;
-                    break;
-                }
-            }
-            if (mixed)
-            {
-                totalSize = actions.size();
-            }
-            Tools.DebugHelperPrint("Chunk"+i+"totalSize:"+totalSize, true, "iZsetup.enableCoreDebug");
-            Tools.DebugHelperPrint("checkpointValue"+checkpoints_main[i], true, "iZsetup.enableCoreDebug");
-            //pbarbefore = pbarTotal.getValue();
-            segmentSize = (checkpoints_main[i+1]-checkpoints_main[i]);
-            Tools.DebugHelperPrint("antidivbyzero:"+(checkpoints_main[i+1]-checkpoints_main[i]), true, "iZsetup.enableCoreDebug");
-            installedSize=0;
-            
-            //eigentliches setup
-            for (String[] actionLines : actions)
-            {
-                if(subProgress!=null)
-                {
-                    subProgress.setVisible(false);
-                }
-                int sizetoAdd=1;
-                //List<String> lmaa = Arrays.asList("");
-                //List<String> lmaa2= new ArrayList<>();
-                
-                for (int j = 0; j < actionLines.length; j++)
-                {
-                    actionLines[j]=Tools.replaceHashmarkedVars(actionLines[j], "basedir", Main.baseDir);
-                    actionLines[j]=Tools.processEnvVarsinLine(actionLines[j]);
-                }
-               /*for (String x : lmaa)
-                {
-                    String y = Tools.replaceHashmarkedVars(x, "basedir", Main.baseDir);
-                    lmaa2.add(y);
-                }*/
-               // lmaa.forEach(x -> {);
-                //actionLines = lmaa2.toArray(actionLines);
-                statusLine.setText(actionLines[0]);
-                if(!(actionLines[1].equals("copyfile2")||actionLines[1].equals("mkdir")))
-                {
-                    logPane.append(actionLines[0]+"\n");
-                }
-                boolean largerFile=false;
-                //program,copydir,copyfile,mkdir -> internal use only,copyfile2 -> internal use only
-                switch(actionLines[1])
-                {
-                    
-                    case "program":
-                    Tools.runCmdWithOutToTextField(logPane, Arrays.copyOfRange(actionLines, 2, actionLines.length));//die internen metadaten killen
-                    break;
-                    case "copyfile":
-                    case "copyfile2":
-                        FileInputStream fis=null;
-                        FileOutputStream fos=null;
-                        Tools.DebugHelperPrint(Arrays.toString(actionLines), true, "iZsetup.enableCoreDebug");
-                        try
-                        {
-                            if(Integer.valueOf(actionLines[2])>1000000)
-                            {
-                                largerFile=true;
-                            }
-                            if(largerFile&&subProgress!=null)
-                            {
-                                subProgress.setVisible(true);
-                                subProgress.setMinimum(0);
-                                subProgress.setMaximum(1000);
-                                subProgress.setValue(0);
-                            }
-                            String logExisting = logPane.getText();
-                            String progressLine = "Kopiere %s (%s %%)"; //dateiname und fortschritt
-                            fs=0;
-                            logPane.setText(logExisting+"\n"+String.format(progressLine, FileTK.getFileName(actionLines[3]),(int)fs));
-                            byte[] cp = new byte[4096]; //copybuffer
-                        
-                            fis = new FileInputStream(actionLines[3]);
-                            FileTK.ensuredirExistence(actionLines[4]);
-                            Tools.DebugHelperPrint("file_totals"+actionLines[2], true, "iZsetup.enableCoreDebug");
-                            fos = new FileOutputStream(actionLines[4]);
-                            int bytesDone=0,bytesTotal=Integer.valueOf(actionLines[2]);
-                            int x= fis.read(cp);
-                            int bytesWrittenSinceLastUpdate=0;
-                            while(x >-1)
-                            {
-                                fos.write(cp, 0, x);
-                                bytesDone+=x;
-                                //double progress=bytesDone/bytesTotal;
-                                if(bytesTotal>1000000 && bytesWrittenSinceLastUpdate>100000 && bytesWrittenSinceLastUpdate>bytesTotal/1000)
-                                {
-                                    bytesWrittenSinceLastUpdate=0;
-                                    fs=((double)bytesDone/(double)bytesTotal)*1000;
-                                    logPane.setText(logExisting+"\n"+String.format(progressLine, FileTK.getFileName(actionLines[3]),(int)fs/10));
-                                    if(subProgress!=null)
-                                    {
-                                        EventQueue.invokeLater(() ->
-                                        {
-                                            Tools.DebugHelperPrint("cprogress|"+fs, true, "iZsetup.enableProgressDebug");
-                                            subProgress.setValue((int)fs);
-                                        });
-                                        
-                                    }
-                                    //PBAR!!
-                                }
-                                bytesWrittenSinceLastUpdate+=x;
-                                x= fis.read(cp);
-                            }
-                            logPane.setText(logExisting+"\n"+String.format(progressLine, FileTK.getFileName(actionLines[3]),100));
-                            if(!mixed)
-                            {
-                                sizetoAdd = bytesTotal;
-                            }
-                            
-                        }
-                        catch (FileNotFoundException ex)
-                        {
-                            ex.printStackTrace();
-                        }
-                        catch (IOException ex)
-                        {
-                            ex.printStackTrace();
-                        }
-                        finally
-                        {
-                            try
-                            {
-                                fis.close();
-                                fos.close();
-                            }
-                            catch (IOException ex)
-                            {
-                                ex.printStackTrace();
-                            }
-                        }
-                        
-                        
-                    break;
-                    case "mkdir":
-                        FileTK.ensuredirExistence(new File(actionLines[2]+"\\nope.null"));//erlaubt auch dateien in vorhandene strukturen zu patchen
-                    sizetoAdd=0;
-                    break;
-                }
-                
-                
-                installedSize+=sizetoAdd;
-                //final int cInstalledSize = installedSize;
-                EventQueue.invokeLater(() ->
-                {
-                    pbarTotal.setValue((int) (checkpoints_main[i_g] + ((double)installedSize / (double)totalSize)*segmentSize));
-                });
-                
-            }
-            
-            EventQueue.invokeLater(() ->
-                {
-                    pbarTotal.setValue(checkpoints_main[i_g]);
-                });
-            //i++;
-        }
-        EventQueue.invokeLater(() ->
-                {
-                    pbarTotal.setValue(1000);
-                });
-    }
-   
-    
-    private List<List<String>> getElement(String metaKey)
-    {
-        List<List<String>> ret = new ArrayList<>();
-        Map<String, List<String>> rawData = (Map<String, List<String>>) iZsetupScript.get(metaKey);
-        if (rawData == null)
-        {
-            Messagers.SingleLineMsg("Package " + metaKey + " nicht deklariert! Error 0x0005414D", "Okay");
-            System.exit(0x0005414D);
-        }
-        if (rawData.containsKey("Condition"))
-        {
-            if (rawData.containsKey("preCond"))
-            {
-                String fid = rawData.get("preCond").get(0);
-                ret.addAll(getElement(fid));
-            }//else:nope
-            
-            boolean conditionResult = SharedUtils.checkCondition(rawData.get("Condition").get(0));
-            if (conditionResult)
-            {
-                if (rawData.containsKey("ifnode"))
-                {
-                    String fid = rawData.get("ifnode").get(0);
-                    ret.addAll(getElement(fid));
-                }//else:nope
-            }
-            else
-            {
-                if (rawData.containsKey("elsenode"))
-                {
-                    String fid = rawData.get("elsenode").get(0);
-                    return getElement(fid);
-                }//else:nope
-            }
-            if (rawData.containsKey("postCond"))
-            {
-                String fid = rawData.get("postCond").get(0);
-                ret.addAll(getElement(fid));
-            }//else:nope
-        }
-        else
-        {
-            Set<String> lk = rawData.keySet();
-            for (String id : lk)
-            {
-                if(!id.toLowerCase().startsWith("comment:"))
-                {
-                    ret.add(rawData.get(id));
-                }
-            }
-        }
-        return ret;
-    }
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package de.nplusc.izc.InstallPak;
+
+import de.nplusc.izc.tools.IOtools.FileTK;
+import de.nplusc.izc.tools.baseTools.Messagers;
+import de.nplusc.izc.tools.baseTools.Tools;
+import java.awt.EventQueue;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+import javax.swing.JLabel;
+import javax.swing.JProgressBar;
+import javax.swing.JTextArea;
+import javax.swing.text.DefaultCaret;
+import org.yaml.snakeyaml.Yaml;
+
+/**
+ *
+ * @author LH
+ */
+public class YInstallAction implements InstallAction
+{
+    //idx1=position in queue idx2: 0=type,1_onwards=arguments
+    Map<String,Object> iZsetupScript;
+    Map<String,List<List<String>>> pkg;
+    /**
+     * Generates the InstallAction Object
+     * @param filepath Absolute and preprocessed path to the iZsetup-file
+     */
+    public YInstallAction(String filepath)
+    {
+        try
+        {
+            pkg = new LinkedHashMap<>();
+            Yaml y = new Yaml();
+            iZsetupScript = (Map<String,Object>) y.load(new FileInputStream(filepath));
+            System.out.println("############################\n"+iZsetupScript+"\n");
+            List<String> rootPackages = (List<String>) iZsetupScript.get("Segments");
+            for (String id : rootPackages)
+            {
+                pkg.put(id, getElement(id));
+            }
+        }
+        catch (FileNotFoundException ex)
+        {
+            ex.printStackTrace();
+        }
+    }
+    
+    @Override
+    public void doInstall()
+    {
+        doInstall(new JProgressBar(0,1000),null,new JLabel(),new JTextArea());
+    }
+    
+    private double segmentSize = 1.0;
+    private int installedSize;
+    private int[] checkpoints_main;
+    private int i_g;
+    private long totalSize;
+    private double fs;
+    //private List<String> lmaa2;
+    @Override
+    public void doInstall(final JProgressBar pbarTotal,JProgressBar subProgress,JLabel statusLine,JTextArea logPane)
+    {
+        pbarTotal.setValue(0);
+        pbarTotal.setMaximum(1000);
+        DefaultCaret caret = (DefaultCaret) logPane.getCaret();
+        caret.setUpdatePolicy(DefaultCaret.ALWAYS_UPDATE);
+        checkpoints_main = new int[pkg.size()+1];
+        int chunks = checkpoints_main.length-1;
+        checkpoints_main[0]=0;
+        //progressbar_chunks
+        Tools.DebugHelperPrint(chunks+"", true, "iZsetup.enableFinerDebug");
+        for (int i = 0; i < chunks; i++)
+        {
+            checkpoints_main[i+1]=(1000/chunks)*(i+1);
+        }
+        Set<String> chunkIDs = pkg.keySet();
+        //int i=0;
+        for (int i=0;i<chunkIDs.size();i++)
+        {
+            i_g=i;
+            String id = chunkIDs.toArray(new String[]{})[i];
+            statusLine.setText("Kalkuliere zu kopierende Datenmenge");
+            logPane.append("Kalkuliere zu kopierende Datenmenge\n");
+            List<String[]> actions = new ArrayList<>();
+            //program,copydir,copyfile,mkdir -> internal use only,copyfile2 -> internal use only
+            boolean mixed=false; //wenn mixed ->  jedes file gleiche schrittzahl im gebälk
+            String[] type = new String[0];
+            System.out.println("baseDir=="+Main.baseDir+"\n");
+            totalSize=0;
+            for (List<String> actionRaw : pkg.get(id))
+            {
+                System.out.println(actionRaw+"\n");
+                switch(actionRaw.get(1))
+                {
+                    
+                    case "program"://intended slipthru
+                        actions.add(actionRaw.toArray(type));
+                        mixed=true;
+                    break;
+                    case "copyfile":
+                        String fn = Tools.replaceHashmarkedVars(actionRaw.get(2), "basedir", Main.baseDir);
+                        String fsi = new File(fn).length()+"";
+                        actions.add(new String[]{actionRaw.get(0),"copyfile",fsi,fn,(actionRaw.get(3))});
+                        break;
+                    case "copydir":
+                        String indir = Tools.replaceHashmarkedVars(actionRaw.get(2), "basedir", Main.baseDir);
+                        String statusMessage = "Kopiere neue Dateien für "+actionRaw.get(0);
+                        String target = actionRaw.get(3);
+                        String[] filesToCopy = FileTK.walkDirectoryRecursively(indir);
+                        for (String element : filesToCopy)
+                        {
+                            element = Tools.replaceHashmarkedVars(element, "basedir", Main.baseDir);
+                            element = Tools.processEnvVarsinLine(element);
+                            //message,"copyfile2",size,in,out
+                            //message,"mkdir",0,which_dir
+                            String element_r = FileTK.getRelativePath(element, indir).substring(3);
+                            if(new File(element).isDirectory())
+                            {
+                                actions.add(new String[]{statusMessage,"mkdir","0",(target+"\\"+element_r).replace("\\\\", "\\")});
+                            }
+                            else
+                            {
+                                long fs = new File(element).length();
+                                totalSize+=fs;
+                                actions.add(new String[]{statusMessage,"copyfile2",fs+"",element,(target+"\\"+element_r).replace("\\\\", "\\")});
+                            }
+                        }
+                        int lmaa=1;
+                    break;
+                }
+            }
+            if (mixed)
+            {
+                totalSize = actions.size();
+            }
+            Tools.DebugHelperPrint("Chunk"+i+"totalSize:"+totalSize, true, "iZsetup.enableCoreDebug");
+            Tools.DebugHelperPrint("checkpointValue"+checkpoints_main[i], true, "iZsetup.enableCoreDebug");
+            //pbarbefore = pbarTotal.getValue();
+            segmentSize = (checkpoints_main[i+1]-checkpoints_main[i]);
+            Tools.DebugHelperPrint("antidivbyzero:"+(checkpoints_main[i+1]-checkpoints_main[i]), true, "iZsetup.enableCoreDebug");
+            installedSize=0;
+            
+            //eigentliches setup
+            for (String[] actionLines : actions)
+            {
+                if(subProgress!=null)
+                {
+                    subProgress.setVisible(false);
+                }
+                int sizetoAdd=1;
+                //List<String> lmaa = Arrays.asList("");
+                //List<String> lmaa2= new ArrayList<>();
+                
+                for (int j = 0; j < actionLines.length; j++)
+                {
+                    actionLines[j]=Tools.replaceHashmarkedVars(actionLines[j], "basedir", Main.baseDir);
+                    actionLines[j]=Tools.processEnvVarsinLine(actionLines[j]);
+                }
+               /*for (String x : lmaa)
+                {
+                    String y = Tools.replaceHashmarkedVars(x, "basedir", Main.baseDir);
+                    lmaa2.add(y);
+                }*/
+               // lmaa.forEach(x -> {);
+                //actionLines = lmaa2.toArray(actionLines);
+                statusLine.setText(actionLines[0]);
+                if(!(actionLines[1].equals("copyfile2")||actionLines[1].equals("mkdir")))
+                {
+                    logPane.append(actionLines[0]+"\n");
+                }
+                boolean largerFile=false;
+                //program,copydir,copyfile,mkdir -> internal use only,copyfile2 -> internal use only
+                switch(actionLines[1])
+                {
+                    
+                    case "program":
+                    Tools.runCmdWithOutToTextField(logPane, Arrays.copyOfRange(actionLines, 2, actionLines.length));//die internen metadaten killen
+                    break;
+                    case "copyfile":
+                    case "copyfile2":
+                        FileInputStream fis=null;
+                        FileOutputStream fos=null;
+                        Tools.DebugHelperPrint(Arrays.toString(actionLines), true, "iZsetup.enableCoreDebug");
+                        try
+                        {
+                            if(Integer.valueOf(actionLines[2])>1000000)
+                            {
+                                largerFile=true;
+                            }
+                            if(largerFile&&subProgress!=null)
+                            {
+                                subProgress.setVisible(true);
+                                subProgress.setMinimum(0);
+                                subProgress.setMaximum(1000);
+                                subProgress.setValue(0);
+                            }
+                            String logExisting = logPane.getText();
+                            String progressLine = "Kopiere %s (%s %%)"; //dateiname und fortschritt
+                            fs=0;
+                            logPane.setText(logExisting+"\n"+String.format(progressLine, FileTK.getFileName(actionLines[3]),(int)fs));
+                            byte[] cp = new byte[4096]; //copybuffer
+                        
+                            fis = new FileInputStream(actionLines[3]);
+                            FileTK.ensuredirExistence(actionLines[4]);
+                            Tools.DebugHelperPrint("file_totals"+actionLines[2], true, "iZsetup.enableCoreDebug");
+                            fos = new FileOutputStream(actionLines[4]);
+                            int bytesDone=0,bytesTotal=Integer.valueOf(actionLines[2]);
+                            int x= fis.read(cp);
+                            int bytesWrittenSinceLastUpdate=0;
+                            while(x >-1)
+                            {
+                                fos.write(cp, 0, x);
+                                bytesDone+=x;
+                                //double progress=bytesDone/bytesTotal;
+                                if(bytesTotal>1000000 && bytesWrittenSinceLastUpdate>100000 && bytesWrittenSinceLastUpdate>bytesTotal/1000)
+                                {
+                                    bytesWrittenSinceLastUpdate=0;
+                                    fs=((double)bytesDone/(double)bytesTotal)*1000;
+                                    logPane.setText(logExisting+"\n"+String.format(progressLine, FileTK.getFileName(actionLines[3]),(int)fs/10));
+                                    if(subProgress!=null)
+                                    {
+                                        EventQueue.invokeLater(() ->
+                                        {
+                                            Tools.DebugHelperPrint("cprogress|"+fs, true, "iZsetup.enableProgressDebug");
+                                            subProgress.setValue((int)fs);
+                                        });
+                                        
+                                    }
+                                    //PBAR!!
+                                }
+                                bytesWrittenSinceLastUpdate+=x;
+                                x= fis.read(cp);
+                            }
+                            logPane.setText(logExisting+"\n"+String.format(progressLine, FileTK.getFileName(actionLines[3]),100));
+                            if(!mixed)
+                            {
+                                sizetoAdd = bytesTotal;
+                            }
+                            
+                        }
+                        catch (FileNotFoundException ex)
+                        {
+                            ex.printStackTrace();
+                        }
+                        catch (IOException ex)
+                        {
+                            ex.printStackTrace();
+                        }
+                        finally
+                        {
+                            try
+                            {
+                                fis.close();
+                                fos.close();
+                            }
+                            catch (IOException ex)
+                            {
+                                ex.printStackTrace();
+                            }
+                        }
+                        
+                        
+                    break;
+                    case "mkdir":
+                        FileTK.ensuredirExistence(new File(actionLines[2]+"\\nope.null"));//erlaubt auch dateien in vorhandene strukturen zu patchen
+                    sizetoAdd=0;
+                    break;
+                }
+                
+                
+                installedSize+=sizetoAdd;
+                //final int cInstalledSize = installedSize;
+                EventQueue.invokeLater(() ->
+                {
+                    pbarTotal.setValue((int) (checkpoints_main[i_g] + ((double)installedSize / (double)totalSize)*segmentSize));
+                });
+                
+            }
+            
+            EventQueue.invokeLater(() ->
+                {
+                    pbarTotal.setValue(checkpoints_main[i_g]);
+                });
+            //i++;
+        }
+        EventQueue.invokeLater(() ->
+                {
+                    pbarTotal.setValue(1000);
+                });
+    }
+   
+    
+    private List<List<String>> getElement(String metaKey)
+    {
+        List<List<String>> ret = new ArrayList<>();
+        Map<String, List<String>> rawData = (Map<String, List<String>>) iZsetupScript.get(metaKey);
+        if (rawData == null)
+        {
+            Messagers.SingleLineMsg("Package " + metaKey + " nicht deklariert! Error 0x0005414D", "Okay");
+            System.exit(0x0005414D);
+        }
+        if (rawData.containsKey("Condition"))
+        {
+            if (rawData.containsKey("preCond"))
+            {
+                String fid = rawData.get("preCond").get(0);
+                ret.addAll(getElement(fid));
+            }//else:nope
+            
+            boolean conditionResult = SharedUtils.checkCondition(rawData.get("Condition").get(0));
+            if (conditionResult)
+            {
+                if (rawData.containsKey("ifnode"))
+                {
+                    String fid = rawData.get("ifnode").get(0);
+                    ret.addAll(getElement(fid));
+                }//else:nope
+            }
+            else
+            {
+                if (rawData.containsKey("elsenode"))
+                {
+                    String fid = rawData.get("elsenode").get(0);
+                    return getElement(fid);
+                }//else:nope
+            }
+            if (rawData.containsKey("postCond"))
+            {
+                String fid = rawData.get("postCond").get(0);
+                ret.addAll(getElement(fid));
+            }//else:nope
+        }
+        else
+        {
+            Set<String> lk = rawData.keySet();
+            for (String id : lk)
+            {
+                if(!id.toLowerCase().startsWith("comment:"))
+                {
+                    ret.add(rawData.get(id));
+                }
+            }
+        }
+        return ret;
+    }
+}

+ 285 - 285
IZSetup/src/main/java/de/nplusc/izc/InstallPak/YamlInstallFiles.java

@@ -1,285 +1,285 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.InstallPak;
-
-import de.nplusc.izc.tools.IOtools.FileTK;
-import de.nplusc.izc.tools.baseTools.Messagers;
-import de.nplusc.izc.tools.baseTools.Tools;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import org.yaml.snakeyaml.Yaml;
-
-/**
- *
- * @author LH
- */
-public class YamlInstallFiles implements InstallFilesManagerAPI
-{
-
-    private String packagesDeclaration;
-    private boolean multidisk;
-    private Map<String, Object> packRaw;
-    private List<Map<String, String>> packagesParsed;
-    private List<String> packNames;//lookup list to avoid map usage for getPacksInPackage:
-    private List<String> packIDs;//internal mapping from stringname to numeric ID
-    private boolean[] packsInstalled;
-    private boolean[] packsScheduled;
-    private boolean[] packsInstallable;
-    private int[] packsParent;
-
-    public YamlInstallFiles(String filepath)
-    {
-        try
-        {
-            packagesDeclaration = filepath;
-            Yaml y = new Yaml();
-            packRaw = (Map<String, Object>) y.load(new FileInputStream(filepath));
-            List<String> Flags = (List<String>) packRaw.get("flags");
-            if (Flags!=null && Flags.contains("multidisk"))
-            {
-                multidisk = true;
-            }
-            List<String> startingPoints = (List<String>) packRaw.get("packagebases");
-            packagesParsed = new ArrayList<>();
-            packNames = new ArrayList<>();
-            packIDs = new ArrayList<>();
-            for (String pid : startingPoints)
-            {
-                Map<String, String> pret = getPackEntry(pid);
-                if (!pret.isEmpty())
-                {
-                    packIDs.add(pid);
-                    packNames.add(pret.get("Name"));
-                    packagesParsed.add(pret);
-                }
-            }
-            int packsCount = packIDs.size();
-            packsInstalled = new boolean[packsCount];
-            packsInstallable = new boolean[packsCount];
-            packsScheduled = new boolean[packsCount];
-            packsParent = new int[packsCount];
-            
-            for (int i = 0; i < packsCount; i++)
-            {
-                packsInstallable[i]=true;
-                Map<String,String> pdata = packagesParsed.get(i);
-                if(pdata.containsKey("detectInstall"))
-                {
-                    packsInstalled[i] = SharedUtils.detectInstall(pdata.get("detectInstall"));
-                }
-                else
-                {
-                    packsInstalled[i]=false;
-                }
-                if(pdata.containsKey("defaultEnabled"))
-                {
-                    packsScheduled[i] = Boolean.valueOf((pdata.get("defaultEnabled")));
-                }
-                else
-                {
-                    packsScheduled[i]=false;
-                }
-                if(pdata.containsKey("dependsOn"))
-                {
-                    packsParent[i] = packIDs.indexOf(pdata.get("dependsOn"));
-                    if(packsInstallable[packsParent[i]]==false||packsScheduled[packsParent[i]])
-                    {
-                        packsInstallable[i]=false;
-                    }
-                }
-                else
-                {
-                    packsParent[i]=-1;
-                    packsInstallable[i]=true;
-                }
-                revalidate(0);//Hax
-            }
-        }
-        catch (IOException ex)
-        {
-            ex.printStackTrace();
-        }
-        
-    }
-
-    private Map<String, String> getPackEntry(String packID)
-    {
-        Map<String, String> rawData = (Map<String, String>) packRaw.get(packID);
-        if (rawData == null)
-        {
-            Messagers.SingleLineMsg("Package " + packID + " nicht deklariert! Error 0x0416414D", "Okay");
-            System.exit(0x0416414D);
-        }
-        if (rawData.containsKey("Condition"))
-        {
-            boolean conditionResult = SharedUtils.checkCondition(rawData.get("Condition"));
-            if (conditionResult)
-            {
-                if (rawData.containsKey("ifnode"))
-                {
-                    String fid = rawData.get("ifnode");
-                    return getPackEntry(fid);
-                }
-                else
-                {
-                    return new HashMap<>();//leere map um NPX zu vermeiden da packs nicht immer vorhanden sein müssen
-                }
-            }
-            else
-            {
-                if (rawData.containsKey("elsenode"))
-                {
-                    String fid = rawData.get("elsenode");
-                    return getPackEntry(fid);
-                }
-                else
-                {
-                    return new HashMap<>();
-                }
-
-            }
-        }
-        return rawData;
-    }
-
-
-
-    @Override
-    public String[] getPacksInPackage()
-    {
-        return packNames.toArray(new String[]{});
-    }
-
-    @Override
-    public boolean getPackInstalled(int packnr)
-    {
-       return packsInstalled[packnr];
-    }
-
-    @Override
-    public boolean getPackInstallable(int packid)
-    {
-        return  packsInstallable[packid];
-    }
-
-    @Override
-    public int getDependencyParent(int packid)
-    {
-       return packsParent[packid];
-    }
-
-    @Override
-    public int[] getChildPacks(int packID)
-    {
-        ArrayList<Integer> tmp = new ArrayList<>();
-        for (int i = 0; i < packsParent.length; i++)
-        {
-            int b = packsParent[i];
-            if(b==packID)
-            {
-                tmp.add(i);
-            }
-        }
-        int[] r = new int[tmp.size()];
-        for (int i = 0; i < tmp.size(); i++)
-        {
-            r[i]=tmp.get(i);
-            
-        }
-        return r;
-    }
-
-    @Override
-    public void setPackageState(int packageID, boolean state)
-    {
-        packsScheduled[packageID]=state||packsInstalled[packageID];
-        
-        revalidate(packageID);
-    }
-
-    private void revalidate(int packID)
-    {
-        int[] c = getChildPacks(packID);
-        for (int i : c)
-        {
-            if((packsScheduled[packID]==false||packsInstallable[packID]==false)&&!packsInstalled[i])
-            {
-                packsInstallable[i]=false;
-            }
-            if((packsScheduled[packID]&&packsInstallable[packID])||packsInstalled[i])
-            {
-                packsInstallable[i]=true;
-            }
-            revalidate(i);
-        }
-        
-    }
-    @Override
-    public boolean getIsScheduled(int packageID)
-    {
-        System.out.println("checking "+packageID+"|parent="+packsParent[packageID]);
-        return packsScheduled[packageID]&&packsInstallable[packageID];
-    }
-
-    @Override
-    public String getPackageDescription(int packID)
-    {
-        Map<String,String> pd = packagesParsed.get(packID);
-        return pd.containsKey("desc")?pd.get("desc"):"no description";
-    }
-
-    @Override
-    public String[][] packagesQueue()
-    {
-        String baseDir = FileTK.getFilePath(packagesDeclaration);
-        if(Main.diskMode)
-        {
-            baseDir=Main.baseDir;
-        }
-        List<String[]> transferData = new ArrayList<>();
-        for (int i=0;i<packagesParsed.size();i++)
-        {
-            if(packsInstalled[i])
-                continue;
-            Map<String, String> map =packagesParsed.get(i);
-            if(!getIsScheduled(i)) continue;
-            if(multidisk&&(map.containsKey("waitDisk")||map.containsKey("waitdisk")))
-            {
-                
-                String[] waitDisk = new String[]{"waitDisk",map.get("waitdisk"),"Bitte nächste DVD einlegen"};
-                if(map.containsKey("waitDisk"))
-                {
-                    waitDisk[1] = map.get("waitDisk");
-                }
-                waitDisk[1] = Tools.replaceHashmarkedVars(waitDisk[1], "basedir", Main.baseDir);
-                if(map.containsKey("waitMessage"))
-                {
-                    waitDisk[2]=map.get("waitMessage");
-                }
-                transferData.add(waitDisk);
-            }
-            String[] packageItem = new String[]{"file",Tools.replaceHashmarkedVars(packagesParsed.get(i).get("script"), "basedir", baseDir)};
-            transferData.add(packageItem);
-        }
-        return transferData.toArray(new String[][]{{}});
-    }
-
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.InstallPak;
+
+import de.nplusc.izc.tools.IOtools.FileTK;
+import de.nplusc.izc.tools.baseTools.Messagers;
+import de.nplusc.izc.tools.baseTools.Tools;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import org.yaml.snakeyaml.Yaml;
+
+/**
+ *
+ * @author LH
+ */
+public class YamlInstallFiles implements InstallFilesManagerAPI
+{
+
+    private String packagesDeclaration;
+    private boolean multidisk;
+    private Map<String, Object> packRaw;
+    private List<Map<String, String>> packagesParsed;
+    private List<String> packNames;//lookup list to avoid map usage for getPacksInPackage:
+    private List<String> packIDs;//internal mapping from stringname to numeric ID
+    private boolean[] packsInstalled;
+    private boolean[] packsScheduled;
+    private boolean[] packsInstallable;
+    private int[] packsParent;
+
+    public YamlInstallFiles(String filepath)
+    {
+        try
+        {
+            packagesDeclaration = filepath;
+            Yaml y = new Yaml();
+            packRaw = (Map<String, Object>) y.load(new FileInputStream(filepath));
+            List<String> Flags = (List<String>) packRaw.get("flags");
+            if (Flags!=null && Flags.contains("multidisk"))
+            {
+                multidisk = true;
+            }
+            List<String> startingPoints = (List<String>) packRaw.get("packagebases");
+            packagesParsed = new ArrayList<>();
+            packNames = new ArrayList<>();
+            packIDs = new ArrayList<>();
+            for (String pid : startingPoints)
+            {
+                Map<String, String> pret = getPackEntry(pid);
+                if (!pret.isEmpty())
+                {
+                    packIDs.add(pid);
+                    packNames.add(pret.get("Name"));
+                    packagesParsed.add(pret);
+                }
+            }
+            int packsCount = packIDs.size();
+            packsInstalled = new boolean[packsCount];
+            packsInstallable = new boolean[packsCount];
+            packsScheduled = new boolean[packsCount];
+            packsParent = new int[packsCount];
+            
+            for (int i = 0; i < packsCount; i++)
+            {
+                packsInstallable[i]=true;
+                Map<String,String> pdata = packagesParsed.get(i);
+                if(pdata.containsKey("detectInstall"))
+                {
+                    packsInstalled[i] = SharedUtils.detectInstall(pdata.get("detectInstall"));
+                }
+                else
+                {
+                    packsInstalled[i]=false;
+                }
+                if(pdata.containsKey("defaultEnabled"))
+                {
+                    packsScheduled[i] = Boolean.valueOf((pdata.get("defaultEnabled")));
+                }
+                else
+                {
+                    packsScheduled[i]=false;
+                }
+                if(pdata.containsKey("dependsOn"))
+                {
+                    packsParent[i] = packIDs.indexOf(pdata.get("dependsOn"));
+                    if(packsInstallable[packsParent[i]]==false||packsScheduled[packsParent[i]])
+                    {
+                        packsInstallable[i]=false;
+                    }
+                }
+                else
+                {
+                    packsParent[i]=-1;
+                    packsInstallable[i]=true;
+                }
+                revalidate(0);//Hax
+            }
+        }
+        catch (IOException ex)
+        {
+            ex.printStackTrace();
+        }
+        
+    }
+
+    private Map<String, String> getPackEntry(String packID)
+    {
+        Map<String, String> rawData = (Map<String, String>) packRaw.get(packID);
+        if (rawData == null)
+        {
+            Messagers.SingleLineMsg("Package " + packID + " nicht deklariert! Error 0x0416414D", "Okay");
+            System.exit(0x0416414D);
+        }
+        if (rawData.containsKey("Condition"))
+        {
+            boolean conditionResult = SharedUtils.checkCondition(rawData.get("Condition"));
+            if (conditionResult)
+            {
+                if (rawData.containsKey("ifnode"))
+                {
+                    String fid = rawData.get("ifnode");
+                    return getPackEntry(fid);
+                }
+                else
+                {
+                    return new HashMap<>();//leere map um NPX zu vermeiden da packs nicht immer vorhanden sein müssen
+                }
+            }
+            else
+            {
+                if (rawData.containsKey("elsenode"))
+                {
+                    String fid = rawData.get("elsenode");
+                    return getPackEntry(fid);
+                }
+                else
+                {
+                    return new HashMap<>();
+                }
+
+            }
+        }
+        return rawData;
+    }
+
+
+
+    @Override
+    public String[] getPacksInPackage()
+    {
+        return packNames.toArray(new String[]{});
+    }
+
+    @Override
+    public boolean getPackInstalled(int packnr)
+    {
+       return packsInstalled[packnr];
+    }
+
+    @Override
+    public boolean getPackInstallable(int packid)
+    {
+        return  packsInstallable[packid];
+    }
+
+    @Override
+    public int getDependencyParent(int packid)
+    {
+       return packsParent[packid];
+    }
+
+    @Override
+    public int[] getChildPacks(int packID)
+    {
+        ArrayList<Integer> tmp = new ArrayList<>();
+        for (int i = 0; i < packsParent.length; i++)
+        {
+            int b = packsParent[i];
+            if(b==packID)
+            {
+                tmp.add(i);
+            }
+        }
+        int[] r = new int[tmp.size()];
+        for (int i = 0; i < tmp.size(); i++)
+        {
+            r[i]=tmp.get(i);
+            
+        }
+        return r;
+    }
+
+    @Override
+    public void setPackageState(int packageID, boolean state)
+    {
+        packsScheduled[packageID]=state||packsInstalled[packageID];
+        
+        revalidate(packageID);
+    }
+
+    private void revalidate(int packID)
+    {
+        int[] c = getChildPacks(packID);
+        for (int i : c)
+        {
+            if((packsScheduled[packID]==false||packsInstallable[packID]==false)&&!packsInstalled[i])
+            {
+                packsInstallable[i]=false;
+            }
+            if((packsScheduled[packID]&&packsInstallable[packID])||packsInstalled[i])
+            {
+                packsInstallable[i]=true;
+            }
+            revalidate(i);
+        }
+        
+    }
+    @Override
+    public boolean getIsScheduled(int packageID)
+    {
+        System.out.println("checking "+packageID+"|parent="+packsParent[packageID]);
+        return packsScheduled[packageID]&&packsInstallable[packageID];
+    }
+
+    @Override
+    public String getPackageDescription(int packID)
+    {
+        Map<String,String> pd = packagesParsed.get(packID);
+        return pd.containsKey("desc")?pd.get("desc"):"no description";
+    }
+
+    @Override
+    public String[][] packagesQueue()
+    {
+        String baseDir = FileTK.getFilePath(packagesDeclaration);
+        if(Main.diskMode)
+        {
+            baseDir=Main.baseDir;
+        }
+        List<String[]> transferData = new ArrayList<>();
+        for (int i=0;i<packagesParsed.size();i++)
+        {
+            if(packsInstalled[i])
+                continue;
+            Map<String, String> map =packagesParsed.get(i);
+            if(!getIsScheduled(i)) continue;
+            if(multidisk&&(map.containsKey("waitDisk")||map.containsKey("waitdisk")))
+            {
+                
+                String[] waitDisk = new String[]{"waitDisk",map.get("waitdisk"),"Bitte nächste DVD einlegen"};
+                if(map.containsKey("waitDisk"))
+                {
+                    waitDisk[1] = map.get("waitDisk");
+                }
+                waitDisk[1] = Tools.replaceHashmarkedVars(waitDisk[1], "basedir", Main.baseDir);
+                if(map.containsKey("waitMessage"))
+                {
+                    waitDisk[2]=map.get("waitMessage");
+                }
+                transferData.add(waitDisk);
+            }
+            String[] packageItem = new String[]{"file",Tools.replaceHashmarkedVars(packagesParsed.get(i).get("script"), "basedir", baseDir)};
+            transferData.add(packageItem);
+        }
+        return transferData.toArray(new String[][]{{}});
+    }
+
+}

+ 200 - 200
IZSetup/src/main/java/de/nplusc/izc/InstallPak/__DerpPackagerGUIReloaded.form

@@ -1,200 +1,200 @@
-<?xml version="1.0" encoding="UTF-8" ?>
-
-<Form version="1.5" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
-  <Properties>
-    <Property name="defaultCloseOperation" type="int" value="3"/>
-  </Properties>
-  <SyntheticProperties>
-    <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
-    <SyntheticProperty name="generateCenter" type="boolean" value="false"/>
-  </SyntheticProperties>
-  <Events>
-    <EventHandler event="componentMoved" listener="java.awt.event.ComponentListener" parameters="java.awt.event.ComponentEvent" handler="formComponentMoved"/>
-  </Events>
-  <AuxValues>
-    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
-    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
-    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
-    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
-    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
-    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
-  </AuxValues>
-
-  <Layout>
-    <DimensionLayout dim="0">
-      <Group type="103" groupAlignment="0" attributes="0">
-          <Group type="102" attributes="0">
-              <EmptySpace max="-2" attributes="0"/>
-              <Group type="103" groupAlignment="0" attributes="0">
-                  <Group type="102" attributes="0">
-                      <Group type="103" groupAlignment="0" attributes="0">
-                          <Component id="jLabel1" min="-2" pref="225" max="-2" attributes="0"/>
-                          <Component id="jScrollPane1" alignment="0" min="-2" pref="216" max="-2" attributes="0"/>
-                      </Group>
-                      <Group type="103" groupAlignment="0" attributes="0">
-                          <Group type="102" attributes="0">
-                              <EmptySpace min="-2" pref="34" max="-2" attributes="0"/>
-                              <Group type="103" groupAlignment="0" attributes="0">
-                                  <Component id="packStatus" min="-2" max="-2" attributes="0"/>
-                                  <Component id="packTitle" min="-2" pref="429" max="-2" attributes="0"/>
-                              </Group>
-                          </Group>
-                          <Group type="102" alignment="1" attributes="0">
-                              <EmptySpace type="unrelated" pref="12" max="32767" attributes="0"/>
-                              <Group type="103" groupAlignment="0" attributes="0">
-                                  <Component id="btnInstall" min="-2" pref="597" max="-2" attributes="0"/>
-                                  <Component id="jScrollPane2" min="-2" pref="584" max="-2" attributes="0"/>
-                              </Group>
-                              <EmptySpace min="-2" pref="8" max="-2" attributes="0"/>
-                          </Group>
-                      </Group>
-                  </Group>
-                  <Group type="102" alignment="1" attributes="0">
-                      <Component id="jSeparator3" min="-2" pref="50" max="-2" attributes="0"/>
-                      <EmptySpace max="-2" attributes="0"/>
-                      <Component id="lblVID" min="-2" max="-2" attributes="0"/>
-                      <EmptySpace max="32767" attributes="0"/>
-                      <Component id="jSeparator1" min="-2" pref="642" max="-2" attributes="0"/>
-                      <EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
-                  </Group>
-              </Group>
-              <EmptySpace max="-2" attributes="0"/>
-          </Group>
-      </Group>
-    </DimensionLayout>
-    <DimensionLayout dim="1">
-      <Group type="103" groupAlignment="0" attributes="0">
-          <Group type="102" attributes="0">
-              <Group type="103" groupAlignment="0" attributes="0">
-                  <Group type="102" attributes="0">
-                      <EmptySpace min="-2" pref="17" max="-2" attributes="0"/>
-                      <Component id="packStatus" min="-2" max="-2" attributes="0"/>
-                  </Group>
-                  <Group type="102" alignment="0" attributes="0">
-                      <EmptySpace max="-2" attributes="0"/>
-                      <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
-                  </Group>
-              </Group>
-              <EmptySpace max="-2" attributes="0"/>
-              <Group type="103" groupAlignment="0" max="-2" attributes="0">
-                  <Group type="102" attributes="0">
-                      <Component id="packTitle" min="-2" max="-2" attributes="0"/>
-                      <EmptySpace type="separate" max="-2" attributes="0"/>
-                      <Component id="jScrollPane2" min="-2" pref="137" max="-2" attributes="0"/>
-                      <EmptySpace max="32767" attributes="0"/>
-                      <Component id="btnInstall" min="-2" pref="72" max="-2" attributes="0"/>
-                  </Group>
-                  <Component id="jScrollPane1" min="-2" pref="249" max="-2" attributes="0"/>
-              </Group>
-              <EmptySpace pref="20" max="32767" attributes="0"/>
-              <Group type="103" groupAlignment="0" attributes="0">
-                  <Component id="jSeparator1" alignment="1" min="-2" pref="10" max="-2" attributes="0"/>
-                  <Component id="lblVID" alignment="1" min="-2" max="-2" attributes="0"/>
-                  <Component id="jSeparator3" alignment="1" min="-2" pref="10" max="-2" attributes="0"/>
-              </Group>
-              <EmptySpace max="-2" attributes="0"/>
-          </Group>
-      </Group>
-    </DimensionLayout>
-  </Layout>
-  <SubComponents>
-    <Container class="javax.swing.JScrollPane" name="jScrollPane1">
-      <AuxValues>
-        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
-      </AuxValues>
-
-      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
-      <SubComponents>
-        <Component class="javax.swing.JTable" name="tblSelector">
-          <Properties>
-            <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
-              <Table columnCount="3" rowCount="1">
-                <Column editable="false" title="meta:id" type="java.lang.Object"/>
-                <Column editable="false" title="Name" type="java.lang.Object"/>
-                <Column editable="false" title="Status" type="java.lang.Object"/>
-              </Table>
-            </Property>
-            <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor" preCode="tblSelector.setColumnModel(new HidableTableColumnModel(tblSelector.getColumnModel()));">
-              <TableColumnModel selectionModel="0">
-                <Column maxWidth="-1" minWidth="-1" prefWidth="30" resizable="false">
-                  <Title/>
-                  <Editor/>
-                  <Renderer/>
-                </Column>
-                <Column maxWidth="80" minWidth="80" prefWidth="80" resizable="true">
-                  <Title/>
-                  <Editor/>
-                  <Renderer/>
-                </Column>
-                <Column maxWidth="-1" minWidth="-1" prefWidth="80" resizable="true">
-                  <Title/>
-                  <Editor/>
-                  <Renderer/>
-                </Column>
-              </TableColumnModel>
-            </Property>
-            <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor">
-              <TableHeader reorderingAllowed="true" resizingAllowed="true"/>
-            </Property>
-          </Properties>
-          <Events>
-            <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="tblSelectorMouseClicked"/>
-          </Events>
-        </Component>
-      </SubComponents>
-    </Container>
-    <Container class="javax.swing.JScrollPane" name="jScrollPane2">
-      <AuxValues>
-        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
-      </AuxValues>
-
-      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
-      <SubComponents>
-        <Component class="javax.swing.JTextArea" name="packDesc">
-          <Properties>
-            <Property name="columns" type="int" value="20"/>
-            <Property name="rows" type="int" value="5"/>
-          </Properties>
-          <Events>
-            <EventHandler event="componentMoved" listener="java.awt.event.ComponentListener" parameters="java.awt.event.ComponentEvent" handler="packDescComponentMoved"/>
-          </Events>
-        </Component>
-      </SubComponents>
-    </Container>
-    <Component class="javax.swing.JLabel" name="packTitle">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="{PackTitle}"/>
-      </Properties>
-    </Component>
-    <Component class="javax.swing.JButton" name="btnInstall">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Installation starten"/>
-      </Properties>
-      <Events>
-        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnInstallActionPerformed"/>
-      </Events>
-    </Component>
-    <Component class="javax.swing.JLabel" name="packStatus">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="{DepDetails}"/>
-      </Properties>
-    </Component>
-    <Component class="javax.swing.JLabel" name="jLabel1">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="Doppelklicken um Status zu &#xe4;ndern"/>
-      </Properties>
-    </Component>
-    <Component class="javax.swing.JLabel" name="lblVID">
-      <Properties>
-        <Property name="text" type="java.lang.String" value="izSetup 1.0.0 (c) 2012 iZc"/>
-      </Properties>
-    </Component>
-    <Component class="javax.swing.JSeparator" name="jSeparator1">
-    </Component>
-    <Component class="javax.swing.JSeparator" name="jSeparator3">
-    </Component>
-  </SubComponents>
-</Form>
+<?xml version="1.0" encoding="UTF-8" ?>
+
+<Form version="1.5" maxVersion="1.8" type="org.netbeans.modules.form.forminfo.JFrameFormInfo">
+  <Properties>
+    <Property name="defaultCloseOperation" type="int" value="3"/>
+  </Properties>
+  <SyntheticProperties>
+    <SyntheticProperty name="formSizePolicy" type="int" value="1"/>
+    <SyntheticProperty name="generateCenter" type="boolean" value="false"/>
+  </SyntheticProperties>
+  <Events>
+    <EventHandler event="componentMoved" listener="java.awt.event.ComponentListener" parameters="java.awt.event.ComponentEvent" handler="formComponentMoved"/>
+  </Events>
+  <AuxValues>
+    <AuxValue name="FormSettings_autoResourcing" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_autoSetComponentName" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_generateFQN" type="java.lang.Boolean" value="true"/>
+    <AuxValue name="FormSettings_generateMnemonicsCode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_i18nAutoMode" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_layoutCodeTarget" type="java.lang.Integer" value="1"/>
+    <AuxValue name="FormSettings_listenerGenerationStyle" type="java.lang.Integer" value="0"/>
+    <AuxValue name="FormSettings_variablesLocal" type="java.lang.Boolean" value="false"/>
+    <AuxValue name="FormSettings_variablesModifier" type="java.lang.Integer" value="2"/>
+  </AuxValues>
+
+  <Layout>
+    <DimensionLayout dim="0">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" attributes="0">
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Group type="102" attributes="0">
+                      <Group type="103" groupAlignment="0" attributes="0">
+                          <Component id="jLabel1" min="-2" pref="225" max="-2" attributes="0"/>
+                          <Component id="jScrollPane1" alignment="0" min="-2" pref="216" max="-2" attributes="0"/>
+                      </Group>
+                      <Group type="103" groupAlignment="0" attributes="0">
+                          <Group type="102" attributes="0">
+                              <EmptySpace min="-2" pref="34" max="-2" attributes="0"/>
+                              <Group type="103" groupAlignment="0" attributes="0">
+                                  <Component id="packStatus" min="-2" max="-2" attributes="0"/>
+                                  <Component id="packTitle" min="-2" pref="429" max="-2" attributes="0"/>
+                              </Group>
+                          </Group>
+                          <Group type="102" alignment="1" attributes="0">
+                              <EmptySpace type="unrelated" pref="12" max="32767" attributes="0"/>
+                              <Group type="103" groupAlignment="0" attributes="0">
+                                  <Component id="btnInstall" min="-2" pref="597" max="-2" attributes="0"/>
+                                  <Component id="jScrollPane2" min="-2" pref="584" max="-2" attributes="0"/>
+                              </Group>
+                              <EmptySpace min="-2" pref="8" max="-2" attributes="0"/>
+                          </Group>
+                      </Group>
+                  </Group>
+                  <Group type="102" alignment="1" attributes="0">
+                      <Component id="jSeparator3" min="-2" pref="50" max="-2" attributes="0"/>
+                      <EmptySpace max="-2" attributes="0"/>
+                      <Component id="lblVID" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace max="32767" attributes="0"/>
+                      <Component id="jSeparator1" min="-2" pref="642" max="-2" attributes="0"/>
+                      <EmptySpace min="-2" pref="10" max="-2" attributes="0"/>
+                  </Group>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+    <DimensionLayout dim="1">
+      <Group type="103" groupAlignment="0" attributes="0">
+          <Group type="102" attributes="0">
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Group type="102" attributes="0">
+                      <EmptySpace min="-2" pref="17" max="-2" attributes="0"/>
+                      <Component id="packStatus" min="-2" max="-2" attributes="0"/>
+                  </Group>
+                  <Group type="102" alignment="0" attributes="0">
+                      <EmptySpace max="-2" attributes="0"/>
+                      <Component id="jLabel1" min="-2" max="-2" attributes="0"/>
+                  </Group>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+              <Group type="103" groupAlignment="0" max="-2" attributes="0">
+                  <Group type="102" attributes="0">
+                      <Component id="packTitle" min="-2" max="-2" attributes="0"/>
+                      <EmptySpace type="separate" max="-2" attributes="0"/>
+                      <Component id="jScrollPane2" min="-2" pref="137" max="-2" attributes="0"/>
+                      <EmptySpace max="32767" attributes="0"/>
+                      <Component id="btnInstall" min="-2" pref="72" max="-2" attributes="0"/>
+                  </Group>
+                  <Component id="jScrollPane1" min="-2" pref="249" max="-2" attributes="0"/>
+              </Group>
+              <EmptySpace pref="20" max="32767" attributes="0"/>
+              <Group type="103" groupAlignment="0" attributes="0">
+                  <Component id="jSeparator1" alignment="1" min="-2" pref="10" max="-2" attributes="0"/>
+                  <Component id="lblVID" alignment="1" min="-2" max="-2" attributes="0"/>
+                  <Component id="jSeparator3" alignment="1" min="-2" pref="10" max="-2" attributes="0"/>
+              </Group>
+              <EmptySpace max="-2" attributes="0"/>
+          </Group>
+      </Group>
+    </DimensionLayout>
+  </Layout>
+  <SubComponents>
+    <Container class="javax.swing.JScrollPane" name="jScrollPane1">
+      <AuxValues>
+        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+      </AuxValues>
+
+      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+      <SubComponents>
+        <Component class="javax.swing.JTable" name="tblSelector">
+          <Properties>
+            <Property name="model" type="javax.swing.table.TableModel" editor="org.netbeans.modules.form.editors2.TableModelEditor">
+              <Table columnCount="3" rowCount="1">
+                <Column editable="false" title="meta:id" type="java.lang.Object"/>
+                <Column editable="false" title="Name" type="java.lang.Object"/>
+                <Column editable="false" title="Status" type="java.lang.Object"/>
+              </Table>
+            </Property>
+            <Property name="columnModel" type="javax.swing.table.TableColumnModel" editor="org.netbeans.modules.form.editors2.TableColumnModelEditor" preCode="tblSelector.setColumnModel(new HidableTableColumnModel(tblSelector.getColumnModel()));">
+              <TableColumnModel selectionModel="0">
+                <Column maxWidth="-1" minWidth="-1" prefWidth="30" resizable="false">
+                  <Title/>
+                  <Editor/>
+                  <Renderer/>
+                </Column>
+                <Column maxWidth="80" minWidth="80" prefWidth="80" resizable="true">
+                  <Title/>
+                  <Editor/>
+                  <Renderer/>
+                </Column>
+                <Column maxWidth="-1" minWidth="-1" prefWidth="80" resizable="true">
+                  <Title/>
+                  <Editor/>
+                  <Renderer/>
+                </Column>
+              </TableColumnModel>
+            </Property>
+            <Property name="tableHeader" type="javax.swing.table.JTableHeader" editor="org.netbeans.modules.form.editors2.JTableHeaderEditor">
+              <TableHeader reorderingAllowed="true" resizingAllowed="true"/>
+            </Property>
+          </Properties>
+          <Events>
+            <EventHandler event="mouseClicked" listener="java.awt.event.MouseListener" parameters="java.awt.event.MouseEvent" handler="tblSelectorMouseClicked"/>
+          </Events>
+        </Component>
+      </SubComponents>
+    </Container>
+    <Container class="javax.swing.JScrollPane" name="jScrollPane2">
+      <AuxValues>
+        <AuxValue name="autoScrollPane" type="java.lang.Boolean" value="true"/>
+      </AuxValues>
+
+      <Layout class="org.netbeans.modules.form.compat2.layouts.support.JScrollPaneSupportLayout"/>
+      <SubComponents>
+        <Component class="javax.swing.JTextArea" name="packDesc">
+          <Properties>
+            <Property name="columns" type="int" value="20"/>
+            <Property name="rows" type="int" value="5"/>
+          </Properties>
+          <Events>
+            <EventHandler event="componentMoved" listener="java.awt.event.ComponentListener" parameters="java.awt.event.ComponentEvent" handler="packDescComponentMoved"/>
+          </Events>
+        </Component>
+      </SubComponents>
+    </Container>
+    <Component class="javax.swing.JLabel" name="packTitle">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="{PackTitle}"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JButton" name="btnInstall">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Installation starten"/>
+      </Properties>
+      <Events>
+        <EventHandler event="actionPerformed" listener="java.awt.event.ActionListener" parameters="java.awt.event.ActionEvent" handler="btnInstallActionPerformed"/>
+      </Events>
+    </Component>
+    <Component class="javax.swing.JLabel" name="packStatus">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="{DepDetails}"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JLabel" name="jLabel1">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="Doppelklicken um Status zu &#xe4;ndern"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JLabel" name="lblVID">
+      <Properties>
+        <Property name="text" type="java.lang.String" value="izSetup 1.0.0 (c) 2012 iZc"/>
+      </Properties>
+    </Component>
+    <Component class="javax.swing.JSeparator" name="jSeparator1">
+    </Component>
+    <Component class="javax.swing.JSeparator" name="jSeparator3">
+    </Component>
+  </SubComponents>
+</Form>

+ 9 - 9
IZSetup/src/main/java/de/nplusc/izc/InstallPak/bundle.izmeta

@@ -1,10 +1,10 @@
-000|izsetup|1.0.0
-000|type|bundle|nur für uer (der kommentar)
-001|meta:isZipped|true|
-CMM|meta:isZipped: bei false sind die dateien als normale dateien neben dieser bundle gelagert -> kein entzippern
-CMM|in tempdir nötig. Muss bei multidisk-bundles deaktiviert sein. bei diskbundles wird Deaktivierung empfohlen
-CMM|da es die Festplatte nicht so vollstopft
-001|bundlename|Testbundle
-001|packagedata|packs.izpackage|muss im basedir des Bundles liegen(!!!!!!!!!!!!!!!!!!!!!!!!!!)
-001|Description|Test für bundleGui
+000|izsetup|1.0.0
+000|type|bundle|nur für uer (der kommentar)
+001|meta:isZipped|true|
+CMM|meta:isZipped: bei false sind die dateien als normale dateien neben dieser bundle gelagert -> kein entzippern
+CMM|in tempdir nötig. Muss bei multidisk-bundles deaktiviert sein. bei diskbundles wird Deaktivierung empfohlen
+CMM|da es die Festplatte nicht so vollstopft
+001|bundlename|Testbundle
+001|packagedata|packs.izpackage|muss im basedir des Bundles liegen(!!!!!!!!!!!!!!!!!!!!!!!!!!)
+001|Description|Test für bundleGui
 001|extractSize|10000|Angabe in Bytes. wird von GUI konvertiert.

+ 15 - 15
IZSetup/src/main/java/de/nplusc/izc/InstallPak/bundle_yaml.izmeta

@@ -1,15 +1,15 @@
-000|izsetup|3.0.0|: valides YAML und trotzdem kompatibel
-comment:type: izbundle
-meta:isZipped: 'true'
-meta:needsElevation: 'false'
-comment:meta:isZipped: |-
-  bei false sind die dateien als normale dateien neben dieser bundle gelagert -> kein entzippern
-  CMM|in tempdir nötig. Muss bei multidisk-bundles deaktiviert sein. bei diskbundles wird Deaktivierung empfohlen
-  CMM|da es die Festplatte nicht so vollstopft
-meta:packFormat: 'yaml'
-comment:meta:packFormat: |-
-  gibt an welches format das izpackage benutzt
-bundlename: Sample
-packagedata: sample.iZpackage
-description: Beispieldaten und testdaten
-extractSize: '123556'
+000|izsetup|3.0.0|: valides YAML und trotzdem kompatibel
+comment:type: izbundle
+meta:isZipped: 'true'
+meta:needsElevation: 'false'
+comment:meta:isZipped: |-
+  bei false sind die dateien als normale dateien neben dieser bundle gelagert -> kein entzippern
+  CMM|in tempdir nötig. Muss bei multidisk-bundles deaktiviert sein. bei diskbundles wird Deaktivierung empfohlen
+  CMM|da es die Festplatte nicht so vollstopft
+meta:packFormat: 'yaml'
+comment:meta:packFormat: |-
+  gibt an welches format das izpackage benutzt
+bundlename: Sample
+packagedata: sample.iZpackage
+description: Beispieldaten und testdaten
+extractSize: '123556'

+ 528 - 528
IZSetup/src/main/java/de/nplusc/izc/InstallPak/izsetupReader.java

@@ -1,528 +1,528 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.InstallPak;
-import de.nplusc.izc.tools.IOtools.FileTK;
-import de.nplusc.izc.tools.IOtools.registryReader;
-import de.nplusc.izc.tools.WinToolz.Commands;
-import de.nplusc.izc.tools.baseTools.Detectors;
-import de.nplusc.izc.tools.baseTools.Messagers;
-import de.nplusc.izc.tools.baseTools.Tools;
-import de.nplusc.izc.tools.baseTools.arraytools;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-
-/**
- *
- * @author LH
- */
-public class izsetupReader
-{
-    private static HashMap<String,ArrayList<String>> groupsplitted = new HashMap<>();
-    
-    /**
-     * Verarbeitet iZsetup-Daten
-     * @param content der String mit dem SetupFile
-     * @param packagesOnly ob packagefiles als einzigesdurch dürfen
-     * @param dbgenab debugmode (gint content auf err-stream aus)?
-     * @param baseDir baasedir für #basedir#-ersetzung
-     * @return konvertiertes file
-     */
-    public static String[][] ConvertToSysSpezSetupFile(String content, boolean packagesOnly, boolean dbgenab, String baseDir)
-    {
-        groupsplitted = new HashMap<>();
-        String[] rawFile = content.split("\\n");
-        if(!rawFile[0].startsWith("000|izsetup|"))
-        {
-            Messagers.SingleLineMsg("Das war leider keine gültige datei...", "Okay");
-            System.exit(0);
-        }
-        //12
-        //000|izsetup|1.0.0|
-        String versCode = rawFile[0].substring(12);
-        validateVersion(versCode);
-        ArrayList<String> SubGroup = new ArrayList<>();
-        String previousGRPID="000";
-        String groupID="000";
-        boolean isPak = true;
-        if(packagesOnly)
-        {
-            isPak=false;
-        }
-        for (String line : rawFile)
-        {
-            if(dbgenab)
-            {
-                System.err.println("RAW>>>"+line);
-            }
-            
-            if(!(line.length()<6))
-            {
-                String[] splittedLine = line.split("\\|");
-                //DBG_START
-                // System.err.println(splittedLine[0]+"|GRP");
-                // System.err.println(splittedLine[1]+"|KEY");
-                // System.err.println(splittedLine[2]+"|VAL");
-                // System.err.println(splittedLine[3]+"|CMNT");
-                //DBG_STOP
-                
-                boolean _999 = false;
-                if(packagesOnly)
-                {
-                    
-                    if(splittedLine[0].equals("999"))
-                        _999=true;
-                }
-                if(!splittedLine[0].equals("000")&&!_999&&isPak)
-                {
-                    groupID=splittedLine[0];
-                    if(!splittedLine[0].equalsIgnoreCase("CMM"))
-                    {
-                        if(!previousGRPID.equals(groupID)&&!previousGRPID.equals("000"))
-                        {
-                            groupsplitted.put(previousGRPID, SubGroup);//Einlagern der abgeschlossenen gruppe
-                            SubGroup = new ArrayList<>();//resetten für neue daten;
-                        }
-                        
-                        line = Tools.processEnvVarsinLine(line);
-                        line = Tools.replaceHashmarkedVars(line, "basedir", baseDir);
-                        //Detectfor envvars
-                        
-                        //FileTK.
-                        //line = line.re
-                        //#basedir# durch pfad von izSetup-file ersetzen
-                        //userprofile-variable und appdata-variable unterstützt
-                        SubGroup.add(line);
-                        if(dbgenab)
-                            System.err.println(line);
-                        previousGRPID=groupID;
-                    }
-
-                }
-                else
-                {
-                    //000|privileges|elevated
-                    if (splittedLine[1].equalsIgnoreCase("privileges"))
-                    {
-                        Tools.DebugHelperPrint("COnvert_Privilegienkram....", true, "iZsetup.enableCoreDebug");
-                        System.err.println(splittedLine[2]+"|elevated");
-                        if(splittedLine[2].equalsIgnoreCase("elevated"))
-                        {
-                            Tools.DebugHelperPrint("AdminRechte her! aber dalli", true, "iZsetup.enableCoreDebug");
-
-                            String basecmd = Tools.processEnvVarsinLine("-jar %appdata%/izsetup/izsetupLauncher.jar");
-                            if(!Detectors.detectisAdmin())
-                            {
-                                  Tools.DebugHelperPrint(">((((((((()°> nix gfunden", true, "iZsetup.enableCoreDebug");
-                                
-                                System.err.println("noAdmin");
-                                String cmd = basecmd;
-                                String[] args = Main.getArgs();
-                                for (String arg : args)
-                                {
-                                    cmd +=" "+arg;
-                                }
-                                Commands.executeAsAdministrator("java"  , cmd.trim());
-                                System.exit(0);
-                            }
-                        }
-                    }
-                    //000|type|script|
-                    if(splittedLine[1].equalsIgnoreCase("type")
-                            &&packagesOnly
-                            &&!isPak
-                            &&((!splittedLine[2].equalsIgnoreCase("packages"))||(!splittedLine[2].equalsIgnoreCase("package")))
-                            )
-                    {
-                        isPak=true;//errort aus wenn nur packagefiles erlaubt aber ein normales file kommt
-                    }
-                }
-            }
-        }
-        groupsplitted.put(previousGRPID, SubGroup);
-        
-        return finalizeSessi0n();
-    }
-    
-    
-    
-   /**
-    * Verarbeitet iZsetup-Daten
-    * @param filepath datei des files
-    * @return konvertiertes setuoFile
-    */
-    public static String[][] getSysSpezSetupFile(String filepath)
-    {
-        return getSysSpezSetupFile(filepath,false);
-    }
-    
-    
-    /**
-     * Verarbeitet iZsetup-Daten
-     * @param filepath dateipfad des files
-     * @param packagesOnly ob nur packfiles gelesenwerden dürfen
-     * @return konvertiertes file
-     */
-            
-    public static String[][] getSysSpezSetupFile(String filepath, boolean packagesOnly)
-    {
-        return getSysSpezSetupFile(filepath, packagesOnly,false);
-    }
-    
-    /**
-     * 
-     * Verarbeitet iZsetup-Daten
-     * @param filepath dateipfad des files
-     * @param packagesOnly ob nur packfiles gelesenwerden dürfen
-     * @param dbgenab debugmode (gint content auf err-stream aus)?
-     * @return konvertiertes file
-     */
-    public static String[][] getSysSpezSetupFile(String filepath, boolean packagesOnly,boolean dbgenab)
-    {
-        groupsplitted = new HashMap<>();
-        String[] rawFile = FileTK.fileload(filepath, false);
-        if(!rawFile[0].startsWith("000|izsetup|"))
-        {
-            System.err.println(filepath);
-            Messagers.SingleLineMsg("Das war leider keine gültige datei...", "Okay");
-            System.exit(0);
-        }
-        //12
-        //000|izsetup|1.0.0|
-        String versCode = rawFile[0].substring(12);
-        validateVersion(versCode);
-        ArrayList<String> SubGroup = new ArrayList<>();
-        String previousGRPID="000";
-        String groupID="000";
-        boolean isPak = true;
-        if(packagesOnly)
-        {
-            isPak=false;
-        }
-        for (String line : rawFile)
-        {
-            if(!(line.length()<6))
-            {
-                String[] splittedLine = line.split("\\|");
-                //DBG_START
-               // System.err.println(splittedLine[0]+"|GRP");
-               // System.err.println(splittedLine[1]+"|KEY");
-               // System.err.println(splittedLine[2]+"|VAL");
-               // System.err.println(splittedLine[3]+"|CMNT");
-                //DBG_STOP
-                
-                boolean _999 = false;
-                if(packagesOnly)
-                {
-                    
-                    if(splittedLine[0].equals("999"))
-                        _999=true;
-                }
-                if(!splittedLine[0].equals("000")&&!_999&&isPak)
-                {
-                    groupID=splittedLine[0];
-                    if(!splittedLine[0].equalsIgnoreCase("CMM"))
-                    {
-                        if(!previousGRPID.equals(groupID)&&!previousGRPID.equals("000"))
-                        {
-                            groupsplitted.put(previousGRPID, SubGroup);//Einlagern der abgeschlossenen gruppe
-                            SubGroup = new ArrayList<>();//resetten für neue daten;
-                        }
-                        
-                        line = Tools.processEnvVarsinLine(line);
-                        String baseDir = FileTK.getFilePath(filepath);
-                        line = Tools.replaceHashmarkedVars(line, "basedir", baseDir);
-                        //Detectfor envvars
-                        
-                        //FileTK.
-                        //line = line.re
-                        //#basedir# durch pfad von izSetup-file ersetzen
-                        //userprofile-variable und appdata-variable unterstützt
-                        SubGroup.add(line);
-                        if(dbgenab)
-                            System.err.println(line);
-                        previousGRPID=groupID;
-                    }
-
-                }
-                else
-                {
-                                        //000|privileges|elevated
-                    if (splittedLine[1].equalsIgnoreCase("privileges"))
-                    {
-                        Tools.DebugHelperPrint("Read_Privilegienkram....", true, "iZsetup.enableCoreDebug");
-
-                        if(splittedLine[2].equalsIgnoreCase("elevated"))
-                        {
-                            Tools.DebugHelperPrint("AdminRechte her! aber dalli", true, "iZsetup.enableCoreDebug");
-
-                            String basecmd = Tools.processEnvVarsinLine("-jar %appdata%/izsetup/izsetupLauncher.jar");
-                            if(!Detectors.detectisAdmin())
-                            {
-                                Tools.DebugHelperPrint("<°()))))))))< nix gfunden", true, "iZsetup.enableCoreDebug");
-                                String cmd = basecmd;
-                                String[] args = Main.getArgs();
-                                for (String arg : args)
-                                {
-                                    cmd +=" "+arg;
-                                }
-                                Commands.executeAsAdministrator("java"  , cmd.trim());
-                                System.exit(0);
-                                
-                            }
-                        }
-                    }
-                    //000|type|script|
-                    if(splittedLine[1].equalsIgnoreCase("type")
-                            &&packagesOnly
-                            &&!isPak
-                            &&((!splittedLine[2].equalsIgnoreCase("packages"))||(!splittedLine[2].equalsIgnoreCase("package")))
-                            )
-                    {
-                        isPak=true;//errort aus wenn nur packagefiles erlaubt aber ein normales file kommt
-                    }
-                }
-            }
-        }
-        groupsplitted.put(previousGRPID, SubGroup);
-        
-        
-        
-        return finalizeSessi0n();
-    }
-    /*
-    public static void main(String args[])
-    {
-        //NOP
-    }*/
-                    
-    private static void clearGroupFromCrap(String groupkey)
-    {
-        ArrayList<String> GroupContentPP = groupsplitted.get(groupkey);//wird später durch ne neue List ersetzt
-        String[] Groupcontent  = GroupContentPP.toArray(new String[0]);
-        for (int i = 0; i < Groupcontent.length; i++)
-        {
-            String line = Groupcontent[i];
-            if(line.length()>0)
-            {
-                String[] linesegs = line.split("\\|");
-                if(linesegs[1].startsWith("cond"))
-                {
-                    String condelsemarker="else"+linesegs[1];
-                    String condendmarker="end"+linesegs[1];
-                    int elseline = 0,endline=0;
-                    boolean conditionsClear = false;
-                    if(linesegs[2].equalsIgnoreCase("IsWin8"))
-                    {
-                        conditionsClear =Detectors.detectIsWin8();
-                    }
-                    if(linesegs[2].equalsIgnoreCase("Is64Bit")&&!conditionsClear)
-                    {
-                        conditionsClear = Detectors.detect64bitWinon7and8();
-                    }
-                    if(linesegs[2].equalsIgnoreCase("IsWinXP")&&!conditionsClear)
-                    {
-                        conditionsClear = Detectors.detectWInXP();
-                    }
-                    if(linesegs[2].equalsIgnoreCase("IsWin7")&&!conditionsClear)
-                    {
-                        conditionsClear = Detectors.detectWin7();
-                    }
-                    if(linesegs[2].startsWith("PathExists:"))
-                    {
-                        conditionsClear = FileTK.checkDirExist(linesegs[2].substring(11));//kann zum Erkennen beliebiger Programme genutzt werden
-                    }
-                    if(linesegs[2].startsWith("RegKeyExists:"))
-                    {
-                        // prüft Registryeinträge//sollte hinter ne CheckWIndows geglemmt werden
-                        conditionsClear = registryReader.checkExistenceOfRegKey(linesegs[2].substring(13));
-                        if(!conditionsClear)
-                        {
-                            conditionsClear = registryReader.checkExistenceOfRegKeyEntry(linesegs[2].substring(13));
-                        }
-                    }
-                    Groupcontent[i]="";
-                    if(!conditionsClear)
-                    //<editor-fold defaultstate="collapsed" desc="BEdingung nicht erfüllt">
-                    {
-                        boolean elseContained= false;
-                        //int endofCond = 0;
-                        for (int j = i; j < Groupcontent.length; j++)
-                        {
-                            
-                            String linei = Groupcontent[j];
-                            //System.err.println("XXX"+linei);
-                            
-                            if(linei.length()>0)
-                            {
-                                String[] linesegsi = linei.split("\\|");
-                                if(linesegsi[1].startsWith(condelsemarker))
-                                {
-                                    elseline=j;
-                                    Groupcontent[j]="";
-                                    elseContained=true;
-                                    for (int k = i; k < j; k++)
-                                    {
-                                        Groupcontent[k]="";//entfernt die nicht passenden Werte
-                                    }
-                                }
-                                if(linesegsi[1].startsWith(condendmarker))
-                                {
-                                    endline=j;
-                                    Groupcontent[j]="";
-                                    if(!elseContained)
-                                    {
-                                        for (int k = i; k < j; k++)
-                                        {
-                                            Groupcontent[k]="";//entfernt die nicht passenden Werte
-                                            
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    //</editor-fold>
-                    else
-                    //<editor-fold defaultstate="collapsed" desc="BEdingung erfüllt">
-                    {
-                        boolean elseContained= false;
-                        for (int j = i; j < Groupcontent.length; j++)
-                        {
-                            String linei = Groupcontent[j];
-                            //System.err.println("|||"+linei);
-                            if(linei.length()>0)
-                            {
-                                String[] linesegsi = linei.split("\\|");
-                                if(linesegsi[1].startsWith(condelsemarker))
-                                {
-                                    elseline=j;
-                                    Groupcontent[j]="";
-                                    elseContained=true;
-                                }
-                                if(linesegsi[1].startsWith(condendmarker))
-                                {
-                                    endline=j;
-                                    Groupcontent[j]="";
-                                    if(elseContained)
-                                    {
-                                        for (int k = elseline; k < j; k++)
-                                        {
-                                            Groupcontent[k]="";//entfernt die nicht passenden Werte
-                                            
-                                        }
-                                    }
-                                }
-                            }
-                        }
-                    }
-                    //</editor-fold>
-                }
-            }
-        }
-        
-        
-        
-     GroupContentPP = new ArrayList<>();
-        for (String string : Groupcontent)
-        {
-            if(!string.isEmpty())
-                GroupContentPP.add(string);
-        }
-        groupsplitted.put(groupkey, GroupContentPP);
-        
-    }
-    
-    
-    
-    
-    private static String[][] finalizeSessi0n()
-    {
-        ArrayList<String[]> returnValuesTemp = new ArrayList<>();
-        
-        
-        String[] groupids = groupsplitted.keySet().toArray(new String[0]);
-        for (String key : groupids)
-        {
-            clearGroupFromCrap(key);//ausgelagert um Coide zu entwirren
-        }
-        Arrays.sort(groupids);
-        for (String key : groupids)
-        {
-            ArrayList<String> GC= groupsplitted.get(key);
-            String[] splittedLine1,splittedLine2,splittedLine3;
-            for (String val : GC)
-            {
-                if(val.length()>6)
-                {
-                splittedLine1 = val.split("\\|");
-                splittedLine2 = splittedLine1[2].split(";");
-                splittedLine3 = arraytools.concatAll(Arrays.copyOf(splittedLine1, 2), splittedLine2);
-                
-                returnValuesTemp.add(splittedLine3);
-                }
-                else
-                {
-                    returnValuesTemp.add(null);
-                }
-            }
-        }
-        String[][] ret = new String[returnValuesTemp.size()][];
-        for (int i = 0; i < ret.length; i++)
-        {
-            ret[i] = returnValuesTemp.get(i);
-        }
-        return ret;
-    }
-    public static void validateVersion(String versCode)
-    {
-        versCode = versCode.split("\\|")[0]; //rest abkoppeln
-        String[] versCodeSpl = versCode.split("\\.");
-        Tools.DebugHelperPrint(">>Version:"+versCode+"\n"+versCodeSpl[0]+"|"+Definitions.VERSION_MAJOR+
-                "\n"+versCodeSpl[1]+"|"+Definitions.VERSION_MINOR+"\n"+versCodeSpl[2]+"|"+Definitions.REVISION, true, "iZsetup.enableCoreDebug");
-        
-        if ((Integer.valueOf(versCodeSpl[0]) > Definitions.VERSION_MAJOR))
-        {
-            Messagers.SingleLineMsg("iZsetup ist veraltet. Mindestens " + versCode + " benötigt", "Okay");
-            System.exit(0);
-        }
-        else
-        {
-            if(Integer.valueOf(versCodeSpl[0]) < Definitions.VERSION_MAJOR)
-            {
-                return; // minor und rev nicht überprüfen falls major größer
-            }
-        }
-        if ((Integer.valueOf(versCodeSpl[1]) > Definitions.VERSION_MINOR))
-        {
-            Messagers.SingleLineMsg("iZsetup ist veraltet. Mindestens " + versCode + " benötigt", "Okay");
-            System.exit(0);
-        }
-        else
-        {
-            if(Integer.valueOf(versCodeSpl[1]) < Definitions.VERSION_MINOR)
-            {
-                return;//rev nicht überprüfen falls minor größer
-            }
-        }
-        if ((Integer.valueOf(versCodeSpl[2]) > Definitions.REVISION))
-        {
-            Messagers.SingleLineMsg("iZsetup ist veraltet. Mindestens " + versCode + " benötigt", "Okay");
-            System.exit(0x0012500D);
-        }
-    }
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.InstallPak;
+import de.nplusc.izc.tools.IOtools.FileTK;
+import de.nplusc.izc.tools.IOtools.registryReader;
+import de.nplusc.izc.tools.WinToolz.Commands;
+import de.nplusc.izc.tools.baseTools.Detectors;
+import de.nplusc.izc.tools.baseTools.Messagers;
+import de.nplusc.izc.tools.baseTools.Tools;
+import de.nplusc.izc.tools.baseTools.arraytools;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+
+/**
+ *
+ * @author LH
+ */
+public class izsetupReader
+{
+    private static HashMap<String,ArrayList<String>> groupsplitted = new HashMap<>();
+    
+    /**
+     * Verarbeitet iZsetup-Daten
+     * @param content der String mit dem SetupFile
+     * @param packagesOnly ob packagefiles als einzigesdurch dürfen
+     * @param dbgenab debugmode (gint content auf err-stream aus)?
+     * @param baseDir baasedir für #basedir#-ersetzung
+     * @return konvertiertes file
+     */
+    public static String[][] ConvertToSysSpezSetupFile(String content, boolean packagesOnly, boolean dbgenab, String baseDir)
+    {
+        groupsplitted = new HashMap<>();
+        String[] rawFile = content.split("\\n");
+        if(!rawFile[0].startsWith("000|izsetup|"))
+        {
+            Messagers.SingleLineMsg("Das war leider keine gültige datei...", "Okay");
+            System.exit(0);
+        }
+        //12
+        //000|izsetup|1.0.0|
+        String versCode = rawFile[0].substring(12);
+        validateVersion(versCode);
+        ArrayList<String> SubGroup = new ArrayList<>();
+        String previousGRPID="000";
+        String groupID="000";
+        boolean isPak = true;
+        if(packagesOnly)
+        {
+            isPak=false;
+        }
+        for (String line : rawFile)
+        {
+            if(dbgenab)
+            {
+                System.err.println("RAW>>>"+line);
+            }
+            
+            if(!(line.length()<6))
+            {
+                String[] splittedLine = line.split("\\|");
+                //DBG_START
+                // System.err.println(splittedLine[0]+"|GRP");
+                // System.err.println(splittedLine[1]+"|KEY");
+                // System.err.println(splittedLine[2]+"|VAL");
+                // System.err.println(splittedLine[3]+"|CMNT");
+                //DBG_STOP
+                
+                boolean _999 = false;
+                if(packagesOnly)
+                {
+                    
+                    if(splittedLine[0].equals("999"))
+                        _999=true;
+                }
+                if(!splittedLine[0].equals("000")&&!_999&&isPak)
+                {
+                    groupID=splittedLine[0];
+                    if(!splittedLine[0].equalsIgnoreCase("CMM"))
+                    {
+                        if(!previousGRPID.equals(groupID)&&!previousGRPID.equals("000"))
+                        {
+                            groupsplitted.put(previousGRPID, SubGroup);//Einlagern der abgeschlossenen gruppe
+                            SubGroup = new ArrayList<>();//resetten für neue daten;
+                        }
+                        
+                        line = Tools.processEnvVarsinLine(line);
+                        line = Tools.replaceHashmarkedVars(line, "basedir", baseDir);
+                        //Detectfor envvars
+                        
+                        //FileTK.
+                        //line = line.re
+                        //#basedir# durch pfad von izSetup-file ersetzen
+                        //userprofile-variable und appdata-variable unterstützt
+                        SubGroup.add(line);
+                        if(dbgenab)
+                            System.err.println(line);
+                        previousGRPID=groupID;
+                    }
+
+                }
+                else
+                {
+                    //000|privileges|elevated
+                    if (splittedLine[1].equalsIgnoreCase("privileges"))
+                    {
+                        Tools.DebugHelperPrint("COnvert_Privilegienkram....", true, "iZsetup.enableCoreDebug");
+                        System.err.println(splittedLine[2]+"|elevated");
+                        if(splittedLine[2].equalsIgnoreCase("elevated"))
+                        {
+                            Tools.DebugHelperPrint("AdminRechte her! aber dalli", true, "iZsetup.enableCoreDebug");
+
+                            String basecmd = Tools.processEnvVarsinLine("-jar %appdata%/izsetup/izsetupLauncher.jar");
+                            if(!Detectors.detectisAdmin())
+                            {
+                                  Tools.DebugHelperPrint(">((((((((()°> nix gfunden", true, "iZsetup.enableCoreDebug");
+                                
+                                System.err.println("noAdmin");
+                                String cmd = basecmd;
+                                String[] args = Main.getArgs();
+                                for (String arg : args)
+                                {
+                                    cmd +=" "+arg;
+                                }
+                                Commands.executeAsAdministrator("java"  , cmd.trim());
+                                System.exit(0);
+                            }
+                        }
+                    }
+                    //000|type|script|
+                    if(splittedLine[1].equalsIgnoreCase("type")
+                            &&packagesOnly
+                            &&!isPak
+                            &&((!splittedLine[2].equalsIgnoreCase("packages"))||(!splittedLine[2].equalsIgnoreCase("package")))
+                            )
+                    {
+                        isPak=true;//errort aus wenn nur packagefiles erlaubt aber ein normales file kommt
+                    }
+                }
+            }
+        }
+        groupsplitted.put(previousGRPID, SubGroup);
+        
+        return finalizeSessi0n();
+    }
+    
+    
+    
+   /**
+    * Verarbeitet iZsetup-Daten
+    * @param filepath datei des files
+    * @return konvertiertes setuoFile
+    */
+    public static String[][] getSysSpezSetupFile(String filepath)
+    {
+        return getSysSpezSetupFile(filepath,false);
+    }
+    
+    
+    /**
+     * Verarbeitet iZsetup-Daten
+     * @param filepath dateipfad des files
+     * @param packagesOnly ob nur packfiles gelesenwerden dürfen
+     * @return konvertiertes file
+     */
+            
+    public static String[][] getSysSpezSetupFile(String filepath, boolean packagesOnly)
+    {
+        return getSysSpezSetupFile(filepath, packagesOnly,false);
+    }
+    
+    /**
+     * 
+     * Verarbeitet iZsetup-Daten
+     * @param filepath dateipfad des files
+     * @param packagesOnly ob nur packfiles gelesenwerden dürfen
+     * @param dbgenab debugmode (gint content auf err-stream aus)?
+     * @return konvertiertes file
+     */
+    public static String[][] getSysSpezSetupFile(String filepath, boolean packagesOnly,boolean dbgenab)
+    {
+        groupsplitted = new HashMap<>();
+        String[] rawFile = FileTK.fileload(filepath, false);
+        if(!rawFile[0].startsWith("000|izsetup|"))
+        {
+            System.err.println(filepath);
+            Messagers.SingleLineMsg("Das war leider keine gültige datei...", "Okay");
+            System.exit(0);
+        }
+        //12
+        //000|izsetup|1.0.0|
+        String versCode = rawFile[0].substring(12);
+        validateVersion(versCode);
+        ArrayList<String> SubGroup = new ArrayList<>();
+        String previousGRPID="000";
+        String groupID="000";
+        boolean isPak = true;
+        if(packagesOnly)
+        {
+            isPak=false;
+        }
+        for (String line : rawFile)
+        {
+            if(!(line.length()<6))
+            {
+                String[] splittedLine = line.split("\\|");
+                //DBG_START
+               // System.err.println(splittedLine[0]+"|GRP");
+               // System.err.println(splittedLine[1]+"|KEY");
+               // System.err.println(splittedLine[2]+"|VAL");
+               // System.err.println(splittedLine[3]+"|CMNT");
+                //DBG_STOP
+                
+                boolean _999 = false;
+                if(packagesOnly)
+                {
+                    
+                    if(splittedLine[0].equals("999"))
+                        _999=true;
+                }
+                if(!splittedLine[0].equals("000")&&!_999&&isPak)
+                {
+                    groupID=splittedLine[0];
+                    if(!splittedLine[0].equalsIgnoreCase("CMM"))
+                    {
+                        if(!previousGRPID.equals(groupID)&&!previousGRPID.equals("000"))
+                        {
+                            groupsplitted.put(previousGRPID, SubGroup);//Einlagern der abgeschlossenen gruppe
+                            SubGroup = new ArrayList<>();//resetten für neue daten;
+                        }
+                        
+                        line = Tools.processEnvVarsinLine(line);
+                        String baseDir = FileTK.getFilePath(filepath);
+                        line = Tools.replaceHashmarkedVars(line, "basedir", baseDir);
+                        //Detectfor envvars
+                        
+                        //FileTK.
+                        //line = line.re
+                        //#basedir# durch pfad von izSetup-file ersetzen
+                        //userprofile-variable und appdata-variable unterstützt
+                        SubGroup.add(line);
+                        if(dbgenab)
+                            System.err.println(line);
+                        previousGRPID=groupID;
+                    }
+
+                }
+                else
+                {
+                                        //000|privileges|elevated
+                    if (splittedLine[1].equalsIgnoreCase("privileges"))
+                    {
+                        Tools.DebugHelperPrint("Read_Privilegienkram....", true, "iZsetup.enableCoreDebug");
+
+                        if(splittedLine[2].equalsIgnoreCase("elevated"))
+                        {
+                            Tools.DebugHelperPrint("AdminRechte her! aber dalli", true, "iZsetup.enableCoreDebug");
+
+                            String basecmd = Tools.processEnvVarsinLine("-jar %appdata%/izsetup/izsetupLauncher.jar");
+                            if(!Detectors.detectisAdmin())
+                            {
+                                Tools.DebugHelperPrint("<°()))))))))< nix gfunden", true, "iZsetup.enableCoreDebug");
+                                String cmd = basecmd;
+                                String[] args = Main.getArgs();
+                                for (String arg : args)
+                                {
+                                    cmd +=" "+arg;
+                                }
+                                Commands.executeAsAdministrator("java"  , cmd.trim());
+                                System.exit(0);
+                                
+                            }
+                        }
+                    }
+                    //000|type|script|
+                    if(splittedLine[1].equalsIgnoreCase("type")
+                            &&packagesOnly
+                            &&!isPak
+                            &&((!splittedLine[2].equalsIgnoreCase("packages"))||(!splittedLine[2].equalsIgnoreCase("package")))
+                            )
+                    {
+                        isPak=true;//errort aus wenn nur packagefiles erlaubt aber ein normales file kommt
+                    }
+                }
+            }
+        }
+        groupsplitted.put(previousGRPID, SubGroup);
+        
+        
+        
+        return finalizeSessi0n();
+    }
+    /*
+    public static void main(String args[])
+    {
+        //NOP
+    }*/
+                    
+    private static void clearGroupFromCrap(String groupkey)
+    {
+        ArrayList<String> GroupContentPP = groupsplitted.get(groupkey);//wird später durch ne neue List ersetzt
+        String[] Groupcontent  = GroupContentPP.toArray(new String[0]);
+        for (int i = 0; i < Groupcontent.length; i++)
+        {
+            String line = Groupcontent[i];
+            if(line.length()>0)
+            {
+                String[] linesegs = line.split("\\|");
+                if(linesegs[1].startsWith("cond"))
+                {
+                    String condelsemarker="else"+linesegs[1];
+                    String condendmarker="end"+linesegs[1];
+                    int elseline = 0,endline=0;
+                    boolean conditionsClear = false;
+                    if(linesegs[2].equalsIgnoreCase("IsWin8"))
+                    {
+                        conditionsClear =Detectors.detectIsWin8();
+                    }
+                    if(linesegs[2].equalsIgnoreCase("Is64Bit")&&!conditionsClear)
+                    {
+                        conditionsClear = Detectors.detect64bitWinon7and8();
+                    }
+                    if(linesegs[2].equalsIgnoreCase("IsWinXP")&&!conditionsClear)
+                    {
+                        conditionsClear = Detectors.detectWInXP();
+                    }
+                    if(linesegs[2].equalsIgnoreCase("IsWin7")&&!conditionsClear)
+                    {
+                        conditionsClear = Detectors.detectWin7();
+                    }
+                    if(linesegs[2].startsWith("PathExists:"))
+                    {
+                        conditionsClear = FileTK.checkDirExist(linesegs[2].substring(11));//kann zum Erkennen beliebiger Programme genutzt werden
+                    }
+                    if(linesegs[2].startsWith("RegKeyExists:"))
+                    {
+                        // prüft Registryeinträge//sollte hinter ne CheckWIndows geglemmt werden
+                        conditionsClear = registryReader.checkExistenceOfRegKey(linesegs[2].substring(13));
+                        if(!conditionsClear)
+                        {
+                            conditionsClear = registryReader.checkExistenceOfRegKeyEntry(linesegs[2].substring(13));
+                        }
+                    }
+                    Groupcontent[i]="";
+                    if(!conditionsClear)
+                    //<editor-fold defaultstate="collapsed" desc="BEdingung nicht erfüllt">
+                    {
+                        boolean elseContained= false;
+                        //int endofCond = 0;
+                        for (int j = i; j < Groupcontent.length; j++)
+                        {
+                            
+                            String linei = Groupcontent[j];
+                            //System.err.println("XXX"+linei);
+                            
+                            if(linei.length()>0)
+                            {
+                                String[] linesegsi = linei.split("\\|");
+                                if(linesegsi[1].startsWith(condelsemarker))
+                                {
+                                    elseline=j;
+                                    Groupcontent[j]="";
+                                    elseContained=true;
+                                    for (int k = i; k < j; k++)
+                                    {
+                                        Groupcontent[k]="";//entfernt die nicht passenden Werte
+                                    }
+                                }
+                                if(linesegsi[1].startsWith(condendmarker))
+                                {
+                                    endline=j;
+                                    Groupcontent[j]="";
+                                    if(!elseContained)
+                                    {
+                                        for (int k = i; k < j; k++)
+                                        {
+                                            Groupcontent[k]="";//entfernt die nicht passenden Werte
+                                            
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    //</editor-fold>
+                    else
+                    //<editor-fold defaultstate="collapsed" desc="BEdingung erfüllt">
+                    {
+                        boolean elseContained= false;
+                        for (int j = i; j < Groupcontent.length; j++)
+                        {
+                            String linei = Groupcontent[j];
+                            //System.err.println("|||"+linei);
+                            if(linei.length()>0)
+                            {
+                                String[] linesegsi = linei.split("\\|");
+                                if(linesegsi[1].startsWith(condelsemarker))
+                                {
+                                    elseline=j;
+                                    Groupcontent[j]="";
+                                    elseContained=true;
+                                }
+                                if(linesegsi[1].startsWith(condendmarker))
+                                {
+                                    endline=j;
+                                    Groupcontent[j]="";
+                                    if(elseContained)
+                                    {
+                                        for (int k = elseline; k < j; k++)
+                                        {
+                                            Groupcontent[k]="";//entfernt die nicht passenden Werte
+                                            
+                                        }
+                                    }
+                                }
+                            }
+                        }
+                    }
+                    //</editor-fold>
+                }
+            }
+        }
+        
+        
+        
+     GroupContentPP = new ArrayList<>();
+        for (String string : Groupcontent)
+        {
+            if(!string.isEmpty())
+                GroupContentPP.add(string);
+        }
+        groupsplitted.put(groupkey, GroupContentPP);
+        
+    }
+    
+    
+    
+    
+    private static String[][] finalizeSessi0n()
+    {
+        ArrayList<String[]> returnValuesTemp = new ArrayList<>();
+        
+        
+        String[] groupids = groupsplitted.keySet().toArray(new String[0]);
+        for (String key : groupids)
+        {
+            clearGroupFromCrap(key);//ausgelagert um Coide zu entwirren
+        }
+        Arrays.sort(groupids);
+        for (String key : groupids)
+        {
+            ArrayList<String> GC= groupsplitted.get(key);
+            String[] splittedLine1,splittedLine2,splittedLine3;
+            for (String val : GC)
+            {
+                if(val.length()>6)
+                {
+                splittedLine1 = val.split("\\|");
+                splittedLine2 = splittedLine1[2].split(";");
+                splittedLine3 = arraytools.concatAll(Arrays.copyOf(splittedLine1, 2), splittedLine2);
+                
+                returnValuesTemp.add(splittedLine3);
+                }
+                else
+                {
+                    returnValuesTemp.add(null);
+                }
+            }
+        }
+        String[][] ret = new String[returnValuesTemp.size()][];
+        for (int i = 0; i < ret.length; i++)
+        {
+            ret[i] = returnValuesTemp.get(i);
+        }
+        return ret;
+    }
+    public static void validateVersion(String versCode)
+    {
+        versCode = versCode.split("\\|")[0]; //rest abkoppeln
+        String[] versCodeSpl = versCode.split("\\.");
+        Tools.DebugHelperPrint(">>Version:"+versCode+"\n"+versCodeSpl[0]+"|"+Definitions.VERSION_MAJOR+
+                "\n"+versCodeSpl[1]+"|"+Definitions.VERSION_MINOR+"\n"+versCodeSpl[2]+"|"+Definitions.REVISION, true, "iZsetup.enableCoreDebug");
+        
+        if ((Integer.valueOf(versCodeSpl[0]) > Definitions.VERSION_MAJOR))
+        {
+            Messagers.SingleLineMsg("iZsetup ist veraltet. Mindestens " + versCode + " benötigt", "Okay");
+            System.exit(0);
+        }
+        else
+        {
+            if(Integer.valueOf(versCodeSpl[0]) < Definitions.VERSION_MAJOR)
+            {
+                return; // minor und rev nicht überprüfen falls major größer
+            }
+        }
+        if ((Integer.valueOf(versCodeSpl[1]) > Definitions.VERSION_MINOR))
+        {
+            Messagers.SingleLineMsg("iZsetup ist veraltet. Mindestens " + versCode + " benötigt", "Okay");
+            System.exit(0);
+        }
+        else
+        {
+            if(Integer.valueOf(versCodeSpl[1]) < Definitions.VERSION_MINOR)
+            {
+                return;//rev nicht überprüfen falls minor größer
+            }
+        }
+        if ((Integer.valueOf(versCodeSpl[2]) > Definitions.REVISION))
+        {
+            Messagers.SingleLineMsg("iZsetup ist veraltet. Mindestens " + versCode + " benötigt", "Okay");
+            System.exit(0x0012500D);
+        }
+    }
+}

+ 172 - 172
IZSetup/src/main/java/de/nplusc/izc/InstallPak/legacy/InstallManager.java

@@ -1,172 +1,172 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.InstallPak.legacy;
-import de.nplusc.izc.InstallPak.izsetupReader;
-
-
-import de.nplusc.izc.tools.baseTools.Messagers;
-import de.nplusc.izc.tools.baseTools.Tools;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-
-/**
- *
- * @author LH
- */
-public class InstallManager
-{
-
-    
-    
-    public static InstallManager Main;
-    private String[][] InstallQueue;
-    private String[] Groups;
-    private String[] enabledGroupIDs;
-    private HashMap<String,ArrayList<String[]>> groupsplitted = new HashMap<>();
-    static{
-        Main=  new InstallManager();
-      //  Main.setInstallScript(ModeSel.filePath);
-    }
-    
-    public String[] getToggleAblePrograms()
-    {
-        Arrays.sort(Groups);
-        return Groups;
-    }
-    
-    public void setInstallScript(String path)
-    {
-        String[][] data = izsetupReader.getSysSpezSetupFile(path);
-        if(data==null)
-        {
-            Messagers.SingleLineMsg("WTF?!?!?!?!?!?!?!?", "...");
-            System.exit(0xfa11);
-        }
-        String groupID="000"; 
-        String previousGRPID ="000";
-        
-        ArrayList<String[]> SubGroup = new ArrayList<>();
-        for (String[] line : data)
-        {
-            if(!(line==null))
-            {
-                //DBG_START
-                try{
-                Tools.DebugHelperPrint(line[0]+"|GRP", true, "iZsetup.enableFinerDebug");
-                Tools.DebugHelperPrint(line[1]+"|KEY", true, "iZsetup.enableFinerDebug");
-                Tools.DebugHelperPrint(line[2]+"|VAL", true, "iZsetup.enableFinerDebug");
-                //Tools.DebugHelperPrint(splittedLine[3]+"|CMNT", true, "iZsetup.enableFinerDebug");
-                //DBG_STOP
-                }
-                catch(Exception ignored)//wenn 4ter null da kein CMNT feld vorhanden solls nicht errorn
-                {
-                    
-                }
-                if(!line[0].equals("000"))
-                {
-                    groupID=line[0];
-                    if(!previousGRPID.equals(groupID)&&!previousGRPID.equals("000"))
-                    {
-                        groupsplitted.put(previousGRPID, SubGroup);//Einlagern der abgeschlossenen gruppe
-                        SubGroup = new ArrayList<>();//resetten für neue daten;
-                    }
-                    SubGroup.add(line);
-                    previousGRPID=groupID;
-
-                }
-            }
-        }
-        groupsplitted.put(previousGRPID, SubGroup);//die letzte auch noch einflanschen
-        String[] groupIDs = groupsplitted.keySet().toArray(new String[0]);
-        ArrayList<String> lenabledGroupIDs = new ArrayList<>();
-        ArrayList<String> lGroups = new ArrayList<>();
-        for (String id : groupIDs)
-        {
-            lenabledGroupIDs.add(id);
-            
-            if(groupsplitted.get(id).get(0)[1].equalsIgnoreCase("grp")||groupsplitted.get(id).get(0)[1].equalsIgnoreCase("group"))
-            {
-                String groupname = groupsplitted.get(id).get(0)[2];//angelt sich erste zeile der Gruppe davon 3. Wert
-                                                                                //wenn nicht mit grp oder group eingeleitetdann immer ausgeführt
-                lGroups.add(id+"|"+groupname);
-            }
-        }
-        Groups = lGroups.toArray(new String[0]);
-        enabledGroupIDs=lenabledGroupIDs.toArray(new String[0]);
-    }
-    public void setGroupState(String grpid,boolean state)
-    {
-        boolean exists = false;
-        for (int i = 0; i < enabledGroupIDs.length; i++)
-        {
-            String id = enabledGroupIDs[i];
-            if(grpid.equals(id))
-            {
-                exists=true;
-                if(!state)
-                {
-                    enabledGroupIDs[i]="";
-                }
-            }
-        }
-        ArrayList<String> newGrps = new ArrayList<>();
-        for (String cnt : enabledGroupIDs)
-        {
-            if(cnt.length()>1)
-            {
-                newGrps.add(cnt);
-            }
-        }
-        if(!exists&&state)
-        {
-            newGrps.add(grpid);
-        }
-        enabledGroupIDs = newGrps.toArray(new String[0]);
-    }
-    public String[][] getInstallQueue()
-    {
-        return InstallQueue;
-    }
-    
-    
-    public void createQueue()
-    {
-        ArrayList<String[]> TempQueue = new ArrayList<>();
-        Arrays.sort(enabledGroupIDs);
-        //System.err.println("nop");
-        for (String id : enabledGroupIDs)
-        {
-            ArrayList<String[]> loadedGroup = groupsplitted.get(id);
-            for (String[] lines : loadedGroup)
-            {
-                String[] linedata =lines;
-                if(linedata[1].equalsIgnoreCase("msg")||linedata[1].equalsIgnoreCase("exec")||linedata[1].equalsIgnoreCase("requireExec"))
-                {
-                    TempQueue.add(Arrays.copyOfRange(lines, 2, lines.length));
-                }
-            }
-        }
-        //InstallQueue = TempQueue.toArray(new String[0]);
-        InstallQueue=new String[TempQueue.size()][];
-        for (int i = 0; i < InstallQueue.length; i++)
-        {
-            InstallQueue[i]=TempQueue.get(i);
-            
-        }
-    }
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.InstallPak.legacy;
+import de.nplusc.izc.InstallPak.izsetupReader;
+
+
+import de.nplusc.izc.tools.baseTools.Messagers;
+import de.nplusc.izc.tools.baseTools.Tools;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+
+/**
+ *
+ * @author LH
+ */
+public class InstallManager
+{
+
+    
+    
+    public static InstallManager Main;
+    private String[][] InstallQueue;
+    private String[] Groups;
+    private String[] enabledGroupIDs;
+    private HashMap<String,ArrayList<String[]>> groupsplitted = new HashMap<>();
+    static{
+        Main=  new InstallManager();
+      //  Main.setInstallScript(ModeSel.filePath);
+    }
+    
+    public String[] getToggleAblePrograms()
+    {
+        Arrays.sort(Groups);
+        return Groups;
+    }
+    
+    public void setInstallScript(String path)
+    {
+        String[][] data = izsetupReader.getSysSpezSetupFile(path);
+        if(data==null)
+        {
+            Messagers.SingleLineMsg("WTF?!?!?!?!?!?!?!?", "...");
+            System.exit(0xfa11);
+        }
+        String groupID="000"; 
+        String previousGRPID ="000";
+        
+        ArrayList<String[]> SubGroup = new ArrayList<>();
+        for (String[] line : data)
+        {
+            if(!(line==null))
+            {
+                //DBG_START
+                try{
+                Tools.DebugHelperPrint(line[0]+"|GRP", true, "iZsetup.enableFinerDebug");
+                Tools.DebugHelperPrint(line[1]+"|KEY", true, "iZsetup.enableFinerDebug");
+                Tools.DebugHelperPrint(line[2]+"|VAL", true, "iZsetup.enableFinerDebug");
+                //Tools.DebugHelperPrint(splittedLine[3]+"|CMNT", true, "iZsetup.enableFinerDebug");
+                //DBG_STOP
+                }
+                catch(Exception ignored)//wenn 4ter null da kein CMNT feld vorhanden solls nicht errorn
+                {
+                    
+                }
+                if(!line[0].equals("000"))
+                {
+                    groupID=line[0];
+                    if(!previousGRPID.equals(groupID)&&!previousGRPID.equals("000"))
+                    {
+                        groupsplitted.put(previousGRPID, SubGroup);//Einlagern der abgeschlossenen gruppe
+                        SubGroup = new ArrayList<>();//resetten für neue daten;
+                    }
+                    SubGroup.add(line);
+                    previousGRPID=groupID;
+
+                }
+            }
+        }
+        groupsplitted.put(previousGRPID, SubGroup);//die letzte auch noch einflanschen
+        String[] groupIDs = groupsplitted.keySet().toArray(new String[0]);
+        ArrayList<String> lenabledGroupIDs = new ArrayList<>();
+        ArrayList<String> lGroups = new ArrayList<>();
+        for (String id : groupIDs)
+        {
+            lenabledGroupIDs.add(id);
+            
+            if(groupsplitted.get(id).get(0)[1].equalsIgnoreCase("grp")||groupsplitted.get(id).get(0)[1].equalsIgnoreCase("group"))
+            {
+                String groupname = groupsplitted.get(id).get(0)[2];//angelt sich erste zeile der Gruppe davon 3. Wert
+                                                                                //wenn nicht mit grp oder group eingeleitetdann immer ausgeführt
+                lGroups.add(id+"|"+groupname);
+            }
+        }
+        Groups = lGroups.toArray(new String[0]);
+        enabledGroupIDs=lenabledGroupIDs.toArray(new String[0]);
+    }
+    public void setGroupState(String grpid,boolean state)
+    {
+        boolean exists = false;
+        for (int i = 0; i < enabledGroupIDs.length; i++)
+        {
+            String id = enabledGroupIDs[i];
+            if(grpid.equals(id))
+            {
+                exists=true;
+                if(!state)
+                {
+                    enabledGroupIDs[i]="";
+                }
+            }
+        }
+        ArrayList<String> newGrps = new ArrayList<>();
+        for (String cnt : enabledGroupIDs)
+        {
+            if(cnt.length()>1)
+            {
+                newGrps.add(cnt);
+            }
+        }
+        if(!exists&&state)
+        {
+            newGrps.add(grpid);
+        }
+        enabledGroupIDs = newGrps.toArray(new String[0]);
+    }
+    public String[][] getInstallQueue()
+    {
+        return InstallQueue;
+    }
+    
+    
+    public void createQueue()
+    {
+        ArrayList<String[]> TempQueue = new ArrayList<>();
+        Arrays.sort(enabledGroupIDs);
+        //System.err.println("nop");
+        for (String id : enabledGroupIDs)
+        {
+            ArrayList<String[]> loadedGroup = groupsplitted.get(id);
+            for (String[] lines : loadedGroup)
+            {
+                String[] linedata =lines;
+                if(linedata[1].equalsIgnoreCase("msg")||linedata[1].equalsIgnoreCase("exec")||linedata[1].equalsIgnoreCase("requireExec"))
+                {
+                    TempQueue.add(Arrays.copyOfRange(lines, 2, lines.length));
+                }
+            }
+        }
+        //InstallQueue = TempQueue.toArray(new String[0]);
+        InstallQueue=new String[TempQueue.size()][];
+        for (int i = 0; i < InstallQueue.length; i++)
+        {
+            InstallQueue[i]=TempQueue.get(i);
+            
+        }
+    }
+}

+ 403 - 403
IZSetup/src/main/java/de/nplusc/izc/InstallPak/legacy/InstallProgressGui.java

@@ -1,403 +1,403 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.InstallPak.legacy;
-import de.nplusc.izc.InstallPak.Definitions;
-import de.nplusc.izc.InstallPak.Main;
-
-
-import de.nplusc.izc.tools.IOtools.FileTK;
-import de.nplusc.izc.tools.UiToolz.BootStrap;
-import de.nplusc.izc.tools.baseTools.Lock;
-import de.nplusc.izc.tools.baseTools.Messagers;
-import de.nplusc.izc.tools.baseTools.Tools;
-import de.nplusc.izc.tools.baseTools.arraytools;
-import java.awt.Point;
-import java.io.File;
-import java.io.IOException;
-import java.nio.file.Files;
-import java.nio.file.Paths;
-import java.nio.file.StandardCopyOption;
-import java.util.ArrayList;
-import javax.swing.UIManager;
-        
-
-/**
- *
- * @author LH
- */
-public class InstallProgressGui extends javax.swing.JFrame
-{
-    InstallManager im = InstallManager.Main;
-    private boolean autoExit = true;
-    private boolean packMode = false;//ändert GUI ein hisschen und arbeitet ne zweite queue ab
-    private String[] packList;
-    private Lock l = new Lock();
-    /**
-     * Creates new form InstallProgressGui
-     */
-    public InstallProgressGui()
-    {
-
-        initComponents();
-        updatePosition();
-        btnExit.setVisible(false);
-        pbarPacks.setVisible(false);
-        startInstallation();
-        
-    }
-    private void updatePosition()
-    {
-        lblVID.setText(Definitions.VERSION_GUI_TXT);
-        Point p = new Point(Main.topleft_coords_x, Main.topleft_coords_y);
-        setLocation(p);
-    }
-    public InstallProgressGui(String[] packQueue)
-    {
-        Tools.DebugHelperPrint("PAck", true, "iZsetup.enableCoreDebug");
-        initComponents();
-        updatePosition();
-        pbarPacks.setVisible(true);
-        btnExit.setVisible(false);
-        packList = packQueue;
-        startPackInstall();
-    }
-    public void startPackInstall()
-    {
-        ArrayList<String> packListCopyTemp = new ArrayList<>();
-        for (String qe : packList)
-        {
-            String comparer = qe.substring(0,9);
-            if(comparer.equalsIgnoreCase("packfile:"))
-                packListCopyTemp.add(qe);
-        }
-        pbarPacks.setMaximum(packListCopyTemp.size());
-        pbarPacks.setMinimum(0);
-        pbarPacks.setValue(0);
-        packMode=true;
-        autoExit=false;
-        new Thread(new Runnable()
-        {
-            @Override
-            @SuppressWarnings("SleepWhileInLoop")
-            public void run()
-            {
-                try
-                {
-                    BootStrap.bootLock.lock();
-                    BootStrap.bootLock.unlock();
-                }
-                catch (InterruptedException ex)
-                {
-                    ex.printStackTrace();
-                }
-                for (String packcmd : packList)
-                {
-                    im =new InstallManager();
-                    String fileToHandle = packcmd.substring(9);
-                    //substring(9)
-                    String comparer = packcmd.substring(0,9);
-                    String metadata = packcmd.substring(9);
-                    if(comparer.equalsIgnoreCase("packfile:"))
-                    {
-                        im.setInstallScript(fileToHandle);
-                        im.createQueue();
-                        try
-                        {
-                            Tools.DebugHelperPrint("", true, "iZsetup.enableCoreDebug");
-                            l.lock();//das 2. geht erst durch wenn von wo anderst geunlockt wurde;
-                            startInstallation();
-                            
-                            l.lock();
-                            Tools.DebugHelperPrint("UnloxDetected", true, "iZsetup.enableCoreDebug");
-                            l.unlock();    
-                        }
-                        catch (InterruptedException ex)
-                        {
-                            ex.printStackTrace();
-                        }
-                        pbarPacks.setValue(pbarPacks.getValue()+1);
-                    }
-                    if(comparer.equalsIgnoreCase("waitdisk:"))
-                    {
-                        Tools.DebugHelperPrint("WaitDetected;", true, "iZsetup.enableCoreDebug");
-                        boolean rightDisk = FileTK.checkDirExist(fileToHandle);
-                        while(!rightDisk)
-                        {
-                            Messagers.SingleLineMsg("Erwarte DIsk:"+metadata, "OKee...");
-                            rightDisk = FileTK.checkDirExist(fileToHandle);
-                        }
-                        
-                    }
-                    
-                }
-                btnExit.setVisible(true);
-                
-            }
-        }).start();
-    }
-    
-    public void startInstallation()
-    {
-
-        int count = im.getInstallQueue().length;
-        ptotal.setMinimum(0);
-        ptotal.setValue(0);
-        ptotal.setMaximum((count/2));
-        if(packMode)
-            ptotal.setMaximum((count/2)-1);
-        
-        new Thread(new Runnable()
-        {
-
-            @Override
-            @SuppressWarnings("SleepWhileInLoop")
-            public void run()
-            {
-                try
-                {
-                    BootStrap.bootLock.lock();
-                    BootStrap.bootLock.unlock();
-                }
-                catch (InterruptedException ex)
-                {
-                    ex.printStackTrace();
-                }
-                String[][] queue = im.getInstallQueue();
-                for (int i = 0; i + 1 < queue.length; i++)
-                {
-                    String msg = queue[i][0];
-                    tempLog.append(lblMsg.getText() + "\n");//Trockentest für Cmd-s
-                    lblMsg.setText(msg);
-                    i++;
-                    String[] cmd = queue[i];
-                    if(!cmd[0].equalsIgnoreCase("wait"))
-                    {
-                                    //safeguard gegen nullpointer bei <4 strings
-                        if((cmd[0].length()>4&&(!cmd[0].substring(0,5).equalsIgnoreCase("Copy:")))||(cmd[0].length()<5))
-                        {
-                        Tools.DebugHelperPrint(msg, true, "iZsetup.enableFinerDebug");
-                        Tools.DebugHelperPrint(cmd[0]/*sollte zumindest grundlegendes über befehl verraten*/, true, "iZsetup.enableFinerDebug");
-                        Tools.runSingleCmd(true,true,false,true,tempLog,cmd);//scharfgesetzt
-                                            
-                        }
-                        else
-                        {
-                            cmd[0] = cmd[0].substring(5);
-                            String[] cmdspl = cmd[0].split(">");
-                            //File src = new File(cmdspl[0]);
-                            File trg = new File(FileTK.getFilePath(cmdspl[1]));
-                            trg.mkdirs();
-                            try
-                            {
-                                Files.copy(Paths.get(cmdspl[0]), Paths.get(cmdspl[1]), StandardCopyOption.REPLACE_EXISTING);
-                                //copy:src>trg
-                            }
-                            catch (IOException ex)
-                            {
-                                ex.printStackTrace();
-                            }
-                        }
-                    }
-                    else
-                    {
-                        autoExit = false;
-                    }
-                    try
-                    {
-                        Thread.sleep(1000);
-                    }
-                    catch (InterruptedException ex)
-                    {
-                        //ex.printStackTrace();
-                    }
-                    ptotal.setValue(ptotal.getValue()+1);
-                }
-                Tools.DebugHelperPrint("...", true, "iZsetup.enableCoreDebug");
-                //lblMsg.setText("finito");
-                if(!packMode)
-                    btnExit.setVisible(true);
-                if(autoExit)
-                {
-                    try
-                    {
-                        Thread.sleep(20000);
-                    }
-                    catch (InterruptedException ex)
-                    {
-                        ex.printStackTrace();
-                    }
-                }
-                else
-                {
-                    if(!packMode)
-                    {
-                        System.exit(0);
-                    }
-                    else
-                    {
-                        Tools.DebugHelperPrint("unlox", true, "iZsetup.enableCoreDebug");
-                        l.unlock();
-                    }
-                }
-            }
-        }).start();
-
-    }
-
-    /**
-     * This method is called from within the constructor to
-     * initialize the form.
-     * WARNING: Do NOT modify this code. The content of this method is
-     * always regenerated by the Form Editor.
-     */
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents()
-    {
-
-        jScrollPane1 = new javax.swing.JScrollPane();
-        tempLog = new javax.swing.JTextArea();
-        lblMsg = new javax.swing.JLabel();
-        ptotal = new javax.swing.JProgressBar();
-        btnExit = new javax.swing.JButton();
-        lblVID = new javax.swing.JLabel();
-        pbarPacks = new javax.swing.JProgressBar();
-        jSeparator3 = new javax.swing.JSeparator();
-        jSeparator4 = new javax.swing.JSeparator();
-
-        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
-        setMinimumSize(new java.awt.Dimension(852, 331));
-        setResizable(false);
-        addComponentListener(new java.awt.event.ComponentAdapter()
-        {
-            public void componentMoved(java.awt.event.ComponentEvent evt)
-            {
-                formComponentMoved(evt);
-            }
-        });
-
-        tempLog.setColumns(20);
-        tempLog.setRows(5);
-        jScrollPane1.setViewportView(tempLog);
-
-        lblMsg.setText("Starte Installixierung");
-
-        btnExit.setText("Beenden");
-        btnExit.addActionListener(new java.awt.event.ActionListener()
-        {
-            public void actionPerformed(java.awt.event.ActionEvent evt)
-            {
-                btnExitActionPerformed(evt);
-            }
-        });
-
-        lblVID.setText("izSetup 1.0.0 (c) 2012 iZc");
-
-        pbarPacks.setMinimum(10);
-        pbarPacks.setOrientation(1);
-        pbarPacks.setValue(3);
-
-        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
-        getContentPane().setLayout(layout);
-        layout.setHorizontalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                        .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(lblVID)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(jSeparator4))
-                    .addComponent(ptotal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addGroup(layout.createSequentialGroup()
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
-                            .addComponent(lblMsg, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                            .addComponent(btnExit, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 787, Short.MAX_VALUE))
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(pbarPacks, javax.swing.GroupLayout.DEFAULT_SIZE, 39, Short.MAX_VALUE)))
-                .addContainerGap())
-        );
-        layout.setVerticalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                .addContainerGap()
-                .addComponent(ptotal, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(layout.createSequentialGroup()
-                        .addComponent(lblMsg)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 22, Short.MAX_VALUE)
-                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(btnExit))
-                    .addComponent(pbarPacks, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
-                    .addComponent(lblVID)
-                    .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
-                    .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
-                .addContainerGap())
-        );
-
-        pack();
-    }// </editor-fold>//GEN-END:initComponents
-
-    private void btnExitActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnExitActionPerformed
-    {//GEN-HEADEREND:event_btnExitActionPerformed
-        System.exit(0);
-    }//GEN-LAST:event_btnExitActionPerformed
-
-    private void formComponentMoved(java.awt.event.ComponentEvent evt)//GEN-FIRST:event_formComponentMoved
-    {//GEN-HEADEREND:event_formComponentMoved
-        Main.topleft_coords_x = getLocation().x;
-        Main.topleft_coords_y = getLocation().x;
-    }//GEN-LAST:event_formComponentMoved
-
-    /**
-     * @param args the command line arguments
-     */
-    public static void main(String args[])
-    {
-                        try {
-	    UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
-	} catch( Exception e ) { 
-	    //e.printStackTrace();
-	}
-        /* Create and display the form */
-        java.awt.EventQueue.invokeLater(new Runnable()
-        {
-            public void run()
-            {
-                new InstallProgressGui().setVisible(true);
-            }
-        });
-    }
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JButton btnExit;
-    private javax.swing.JScrollPane jScrollPane1;
-    private javax.swing.JSeparator jSeparator3;
-    private javax.swing.JSeparator jSeparator4;
-    private javax.swing.JLabel lblMsg;
-    private javax.swing.JLabel lblVID;
-    private javax.swing.JProgressBar pbarPacks;
-    private javax.swing.JProgressBar ptotal;
-    private javax.swing.JTextArea tempLog;
-    // End of variables declaration//GEN-END:variables
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.InstallPak.legacy;
+import de.nplusc.izc.InstallPak.Definitions;
+import de.nplusc.izc.InstallPak.Main;
+
+
+import de.nplusc.izc.tools.IOtools.FileTK;
+import de.nplusc.izc.tools.UiToolz.BootStrap;
+import de.nplusc.izc.tools.baseTools.Lock;
+import de.nplusc.izc.tools.baseTools.Messagers;
+import de.nplusc.izc.tools.baseTools.Tools;
+import de.nplusc.izc.tools.baseTools.arraytools;
+import java.awt.Point;
+import java.io.File;
+import java.io.IOException;
+import java.nio.file.Files;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.ArrayList;
+import javax.swing.UIManager;
+        
+
+/**
+ *
+ * @author LH
+ */
+public class InstallProgressGui extends javax.swing.JFrame
+{
+    InstallManager im = InstallManager.Main;
+    private boolean autoExit = true;
+    private boolean packMode = false;//ändert GUI ein hisschen und arbeitet ne zweite queue ab
+    private String[] packList;
+    private Lock l = new Lock();
+    /**
+     * Creates new form InstallProgressGui
+     */
+    public InstallProgressGui()
+    {
+
+        initComponents();
+        updatePosition();
+        btnExit.setVisible(false);
+        pbarPacks.setVisible(false);
+        startInstallation();
+        
+    }
+    private void updatePosition()
+    {
+        lblVID.setText(Definitions.VERSION_GUI_TXT);
+        Point p = new Point(Main.topleft_coords_x, Main.topleft_coords_y);
+        setLocation(p);
+    }
+    public InstallProgressGui(String[] packQueue)
+    {
+        Tools.DebugHelperPrint("PAck", true, "iZsetup.enableCoreDebug");
+        initComponents();
+        updatePosition();
+        pbarPacks.setVisible(true);
+        btnExit.setVisible(false);
+        packList = packQueue;
+        startPackInstall();
+    }
+    public void startPackInstall()
+    {
+        ArrayList<String> packListCopyTemp = new ArrayList<>();
+        for (String qe : packList)
+        {
+            String comparer = qe.substring(0,9);
+            if(comparer.equalsIgnoreCase("packfile:"))
+                packListCopyTemp.add(qe);
+        }
+        pbarPacks.setMaximum(packListCopyTemp.size());
+        pbarPacks.setMinimum(0);
+        pbarPacks.setValue(0);
+        packMode=true;
+        autoExit=false;
+        new Thread(new Runnable()
+        {
+            @Override
+            @SuppressWarnings("SleepWhileInLoop")
+            public void run()
+            {
+                try
+                {
+                    BootStrap.bootLock.lock();
+                    BootStrap.bootLock.unlock();
+                }
+                catch (InterruptedException ex)
+                {
+                    ex.printStackTrace();
+                }
+                for (String packcmd : packList)
+                {
+                    im =new InstallManager();
+                    String fileToHandle = packcmd.substring(9);
+                    //substring(9)
+                    String comparer = packcmd.substring(0,9);
+                    String metadata = packcmd.substring(9);
+                    if(comparer.equalsIgnoreCase("packfile:"))
+                    {
+                        im.setInstallScript(fileToHandle);
+                        im.createQueue();
+                        try
+                        {
+                            Tools.DebugHelperPrint("", true, "iZsetup.enableCoreDebug");
+                            l.lock();//das 2. geht erst durch wenn von wo anderst geunlockt wurde;
+                            startInstallation();
+                            
+                            l.lock();
+                            Tools.DebugHelperPrint("UnloxDetected", true, "iZsetup.enableCoreDebug");
+                            l.unlock();    
+                        }
+                        catch (InterruptedException ex)
+                        {
+                            ex.printStackTrace();
+                        }
+                        pbarPacks.setValue(pbarPacks.getValue()+1);
+                    }
+                    if(comparer.equalsIgnoreCase("waitdisk:"))
+                    {
+                        Tools.DebugHelperPrint("WaitDetected;", true, "iZsetup.enableCoreDebug");
+                        boolean rightDisk = FileTK.checkDirExist(fileToHandle);
+                        while(!rightDisk)
+                        {
+                            Messagers.SingleLineMsg("Erwarte DIsk:"+metadata, "OKee...");
+                            rightDisk = FileTK.checkDirExist(fileToHandle);
+                        }
+                        
+                    }
+                    
+                }
+                btnExit.setVisible(true);
+                
+            }
+        }).start();
+    }
+    
+    public void startInstallation()
+    {
+
+        int count = im.getInstallQueue().length;
+        ptotal.setMinimum(0);
+        ptotal.setValue(0);
+        ptotal.setMaximum((count/2));
+        if(packMode)
+            ptotal.setMaximum((count/2)-1);
+        
+        new Thread(new Runnable()
+        {
+
+            @Override
+            @SuppressWarnings("SleepWhileInLoop")
+            public void run()
+            {
+                try
+                {
+                    BootStrap.bootLock.lock();
+                    BootStrap.bootLock.unlock();
+                }
+                catch (InterruptedException ex)
+                {
+                    ex.printStackTrace();
+                }
+                String[][] queue = im.getInstallQueue();
+                for (int i = 0; i + 1 < queue.length; i++)
+                {
+                    String msg = queue[i][0];
+                    tempLog.append(lblMsg.getText() + "\n");//Trockentest für Cmd-s
+                    lblMsg.setText(msg);
+                    i++;
+                    String[] cmd = queue[i];
+                    if(!cmd[0].equalsIgnoreCase("wait"))
+                    {
+                                    //safeguard gegen nullpointer bei <4 strings
+                        if((cmd[0].length()>4&&(!cmd[0].substring(0,5).equalsIgnoreCase("Copy:")))||(cmd[0].length()<5))
+                        {
+                        Tools.DebugHelperPrint(msg, true, "iZsetup.enableFinerDebug");
+                        Tools.DebugHelperPrint(cmd[0]/*sollte zumindest grundlegendes über befehl verraten*/, true, "iZsetup.enableFinerDebug");
+                        Tools.runSingleCmd(true,true,false,true,tempLog,cmd);//scharfgesetzt
+                                            
+                        }
+                        else
+                        {
+                            cmd[0] = cmd[0].substring(5);
+                            String[] cmdspl = cmd[0].split(">");
+                            //File src = new File(cmdspl[0]);
+                            File trg = new File(FileTK.getFilePath(cmdspl[1]));
+                            trg.mkdirs();
+                            try
+                            {
+                                Files.copy(Paths.get(cmdspl[0]), Paths.get(cmdspl[1]), StandardCopyOption.REPLACE_EXISTING);
+                                //copy:src>trg
+                            }
+                            catch (IOException ex)
+                            {
+                                ex.printStackTrace();
+                            }
+                        }
+                    }
+                    else
+                    {
+                        autoExit = false;
+                    }
+                    try
+                    {
+                        Thread.sleep(1000);
+                    }
+                    catch (InterruptedException ex)
+                    {
+                        //ex.printStackTrace();
+                    }
+                    ptotal.setValue(ptotal.getValue()+1);
+                }
+                Tools.DebugHelperPrint("...", true, "iZsetup.enableCoreDebug");
+                //lblMsg.setText("finito");
+                if(!packMode)
+                    btnExit.setVisible(true);
+                if(autoExit)
+                {
+                    try
+                    {
+                        Thread.sleep(20000);
+                    }
+                    catch (InterruptedException ex)
+                    {
+                        ex.printStackTrace();
+                    }
+                }
+                else
+                {
+                    if(!packMode)
+                    {
+                        System.exit(0);
+                    }
+                    else
+                    {
+                        Tools.DebugHelperPrint("unlox", true, "iZsetup.enableCoreDebug");
+                        l.unlock();
+                    }
+                }
+            }
+        }).start();
+
+    }
+
+    /**
+     * This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents()
+    {
+
+        jScrollPane1 = new javax.swing.JScrollPane();
+        tempLog = new javax.swing.JTextArea();
+        lblMsg = new javax.swing.JLabel();
+        ptotal = new javax.swing.JProgressBar();
+        btnExit = new javax.swing.JButton();
+        lblVID = new javax.swing.JLabel();
+        pbarPacks = new javax.swing.JProgressBar();
+        jSeparator3 = new javax.swing.JSeparator();
+        jSeparator4 = new javax.swing.JSeparator();
+
+        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+        setMinimumSize(new java.awt.Dimension(852, 331));
+        setResizable(false);
+        addComponentListener(new java.awt.event.ComponentAdapter()
+        {
+            public void componentMoved(java.awt.event.ComponentEvent evt)
+            {
+                formComponentMoved(evt);
+            }
+        });
+
+        tempLog.setColumns(20);
+        tempLog.setRows(5);
+        jScrollPane1.setViewportView(tempLog);
+
+        lblMsg.setText("Starte Installixierung");
+
+        btnExit.setText("Beenden");
+        btnExit.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                btnExitActionPerformed(evt);
+            }
+        });
+
+        lblVID.setText("izSetup 1.0.0 (c) 2012 iZc");
+
+        pbarPacks.setMinimum(10);
+        pbarPacks.setOrientation(1);
+        pbarPacks.setValue(3);
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
+        getContentPane().setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                        .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(lblVID)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(jSeparator4))
+                    .addComponent(ptotal, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                    .addGroup(layout.createSequentialGroup()
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
+                            .addComponent(lblMsg, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                            .addComponent(btnExit, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                            .addComponent(jScrollPane1, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 787, Short.MAX_VALUE))
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(pbarPacks, javax.swing.GroupLayout.DEFAULT_SIZE, 39, Short.MAX_VALUE)))
+                .addContainerGap())
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                .addContainerGap()
+                .addComponent(ptotal, javax.swing.GroupLayout.PREFERRED_SIZE, 31, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addComponent(lblMsg)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 22, Short.MAX_VALUE)
+                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(btnExit))
+                    .addComponent(pbarPacks, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+                    .addComponent(lblVID)
+                    .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
+                    .addComponent(jSeparator4, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addContainerGap())
+        );
+
+        pack();
+    }// </editor-fold>//GEN-END:initComponents
+
+    private void btnExitActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnExitActionPerformed
+    {//GEN-HEADEREND:event_btnExitActionPerformed
+        System.exit(0);
+    }//GEN-LAST:event_btnExitActionPerformed
+
+    private void formComponentMoved(java.awt.event.ComponentEvent evt)//GEN-FIRST:event_formComponentMoved
+    {//GEN-HEADEREND:event_formComponentMoved
+        Main.topleft_coords_x = getLocation().x;
+        Main.topleft_coords_y = getLocation().x;
+    }//GEN-LAST:event_formComponentMoved
+
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String args[])
+    {
+                        try {
+	    UIManager.setLookAndFeel( UIManager.getSystemLookAndFeelClassName() );
+	} catch( Exception e ) { 
+	    //e.printStackTrace();
+	}
+        /* Create and display the form */
+        java.awt.EventQueue.invokeLater(new Runnable()
+        {
+            public void run()
+            {
+                new InstallProgressGui().setVisible(true);
+            }
+        });
+    }
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JButton btnExit;
+    private javax.swing.JScrollPane jScrollPane1;
+    private javax.swing.JSeparator jSeparator3;
+    private javax.swing.JSeparator jSeparator4;
+    private javax.swing.JLabel lblMsg;
+    private javax.swing.JLabel lblVID;
+    private javax.swing.JProgressBar pbarPacks;
+    private javax.swing.JProgressBar ptotal;
+    private javax.swing.JTextArea tempLog;
+    // End of variables declaration//GEN-END:variables
+}

+ 292 - 292
IZSetup/src/main/java/de/nplusc/izc/InstallPak/legacy/PackManager.java

@@ -1,292 +1,292 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.InstallPak.legacy;
-import de.nplusc.izc.InstallPak.izsetupReader;
-
-
-import de.nplusc.izc.tools.IOtools.FileTK;
-import de.nplusc.izc.tools.IOtools.registryReader;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-
-/**
- *
- * @author LH
- */
-public class PackManager
-{
-    private HashMap<String,ArrayList<String[]>> groupsplitted = new HashMap<>();
-    private String[] installingPacks,AllPacks,DetectedPacks,queue;
-    
-    /**
-     * Lädt die Liste aller Packs aus der aktiven Datei
-     * @return PAckliste im FOrmat ID|Name
-     * 
-     */
-    public String[] getPackList()
-    {
-        String[] ret = new String[AllPacks.length];
-        for (int i=0;i<AllPacks.length;i++)
-        {
-            String id=AllPacks[i];
-            ArrayList<String[]> group=groupsplitted.get(id);
-            for (String row[] : group)
-            {
-                String[] rowSplit = row;
-                if(rowSplit[1].equalsIgnoreCase("pack"))
-                    ret[i] = id+"|"+rowSplit[2];
-            }
-        }
-        return ret;
-    }
-    
-    public void loadPackageData(String path)
-    {
-        String[][] data = izsetupReader.getSysSpezSetupFile(path,true,true);
-        String groupID="000"; 
-        String previousGRPID ="000";
-        
-        ArrayList<String[]> SubGroup = new ArrayList<>();
-        for (String[] line : data)
-        {
-            if(!(line==null))
-            {
-                String[] splittedLine=line;
-                if(!splittedLine[0].equals("000"))
-                {
-                    groupID=splittedLine[0];
-                    if(!previousGRPID.equals(groupID)&&!previousGRPID.equals("000"))
-                    {
-                        groupsplitted.put(previousGRPID, SubGroup);//Einlagern der abgeschlossenen gruppe
-                        SubGroup = new ArrayList<>();//resetten für neue daten;
-                    }
-                    SubGroup.add(line);
-                    previousGRPID=groupID;
-
-                }
-            }
-        }
-        groupsplitted.put(previousGRPID, SubGroup);//die letzte auch noch einflanschen
-        String[] groupIDs = groupsplitted.keySet().toArray(new String[0]);
-        Arrays.sort(groupIDs);
-        AllPacks = groupIDs;
-        checkForpackInstalled();
-        ArrayList<String> installables = new ArrayList<>();
-        for (String id : AllPacks)
-        {
-            if(!packIsInstalled(id))
-                installables.add(id);
-        }
-        installingPacks = installables.toArray(new String[0]);
-        Arrays.sort(installingPacks);
-    }
-
-    public void setPackInstallState(String packid, boolean state)
-    {
-        boolean exists = false;
-        for (int i = 0; i < installingPacks.length; i++)
-        {
-            String id = installingPacks[i];
-            if(packid.equals(id))
-            {
-                exists=true;
-                if(!state)
-                {
-                    installingPacks[i]="";
-                }
-            }
-        }
-        ArrayList<String> newGrps = new ArrayList<>();
-        for (String cnt : installingPacks)
-        {
-            if(cnt.length()>1)
-            {
-                newGrps.add(cnt);
-            }
-        }
-        if(!exists&&state)
-        {
-            newGrps.add(packid);
-        }
-        installingPacks = newGrps.toArray(new String[0]);
-        newGrps = new ArrayList<>();
-        for (String cnt : installingPacks)
-        {
-            if(packIsInstallable(cnt))
-                newGrps.add(cnt);
-            
-        }
-        installingPacks = newGrps.toArray(new String[0]);
-    }
-    public boolean packIsInstallable(String packid)
-    {
-        return packIsInstallable(packid, false);
-    }
-    public boolean packIsInstallable(String packid,boolean blocksItself)
-    {
-        String reqPack = packDependency(packid);
-        
-        for (String pack : DetectedPacks)//Detektiere obDependency installiert(dependency erfüllt wenn pack bereits installiert
-        {
-            if(reqPack.equalsIgnoreCase(pack))
-                return true;
-        }
-        if(blocksItself)
-        {
-            for (String pack : installingPacks)//detektiere obDependency in installierliste
-            {
-                if(packid.equalsIgnoreCase(pack))
-                    return false;
-            }
-        }
-        for (String pack : installingPacks)//detektiere obDependency in installierliste
-        {
-            if(reqPack.equalsIgnoreCase(pack)&&packIsInstallable(reqPack))
-                return true;
-        }
-        if(reqPack.equals("none"))
-            return true;
-        return false;
-    }
-    
-    public boolean packIsInstalled(String packid)
-    {
-        for (String cntnt : DetectedPacks)
-        {
-            if(cntnt.equalsIgnoreCase(packid))
-                return true;
-        }
-        return false;
-    }
-    
-    
-    
-    public boolean packIsScheduled(String packid)
-    {
-        for (String cntnt : installingPacks)
-        {
-            if(cntnt.equalsIgnoreCase(packid))
-                return true;
-        }
-        return false;
-    }
-   
-    public String packDependency(String packid)
-    {
-        ArrayList<String[]> selectedPack = groupsplitted.get(packid);
-        //002|req|001|nummer des benötigten packs//kann weitere erfordernwenn
-        for (String[] line : selectedPack)
-        {
-            String[] linesegs = line;
-            if(linesegs[1].equalsIgnoreCase("req"))
-                return linesegs[2];
-        }
-        
-        
-        return "none";
-    }
-
-    //005|Description|Tools für die games aus dem Package
-    public String getPackDescription(String packid)
-    {
-        ArrayList<String[]> selectedPack = groupsplitted.get(packid);
-        for (String[] line : selectedPack)
-        {
-            String[] linesegs = line;
-            if(linesegs[1].equalsIgnoreCase("Description"))
-                return linesegs[2];
-        }
-        return "Error 0x0404: keine Beschreiubung gefunden";
-    }
-    
-    public String getPackName(String packid)
-    {
-        ArrayList<String[]> selectedPack = groupsplitted.get(packid);
-        for (String line[] : selectedPack)
-        {
-            String[] linesegs = line;
-            if(linesegs[1].equalsIgnoreCase("pack"))
-                return linesegs[2];
-        }
-        return "Error 0x0404: kein Name gefunden";
-    }
-    
-    
-    private void checkForpackInstalled()
-    {
-        ArrayList<String> installedPack = new ArrayList<>();
-        for (int i=0;i<AllPacks.length;i++)
-        {
-            String id=AllPacks[i];
-            ArrayList<String[]> group=groupsplitted.get(id);
-            for (String[] row : group)
-            {
-                String[] rowSplit = row;
-                if(rowSplit[1].equalsIgnoreCase("detectInstall"))
-                {
-                    String detecString = rowSplit[2];
-                    //CMM|File:// benutzt den DateiExistiert-operator
-                    //CMM|Reg:// detektiert unter Win auf Exitenz von Regwert
-                    if(detecString.substring(0,7).equalsIgnoreCase("File://"))
-                    {
-                        String detecpart = detecString.substring(7);
-                        if(FileTK.checkDirExist(detecpart))
-                        {
-                            installedPack.add(id);
-                        }
-                    }
-                    if(detecString.substring(0,6).equalsIgnoreCase("Reg://"))
-                    {
-                        String detecpart = detecString.substring(6);
-                        if(registryReader.checkExistenceOfRegKey(detecpart)||registryReader.checkExistenceOfRegKeyEntry(detecpart))
-                        {
-                            installedPack.add(id);
-                        }
-                    }
-                }
-            }
-        }
-        DetectedPacks = installedPack.toArray(new String[0]);
-    }
-    public void createQueue()
-    {
-        Arrays.sort(installingPacks);
-        ArrayList<String> queuetmp = new ArrayList<>();
-        for (String id : installingPacks)
-        {
-            ArrayList<String[]> grpldr =groupsplitted.get(id);
-            for (String[] line : grpldr)
-            {
-                String[] data = line;
-                if(data[1].equalsIgnoreCase("packfile"))
-                {
-                    queuetmp.add("packfile:"+data[2]);
-                }
-                if(data[1].startsWith("waitdisk:"))
-                {
-                    queuetmp.add("waitdisk:"+data[2]+"|"+data[1].substring(9));
-                }
-            }
-        }
-        queue=queuetmp.toArray(new String[0]);
-    }
-    public String[] getQueue()
-    {
-        return queue;
-    } 
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.InstallPak.legacy;
+import de.nplusc.izc.InstallPak.izsetupReader;
+
+
+import de.nplusc.izc.tools.IOtools.FileTK;
+import de.nplusc.izc.tools.IOtools.registryReader;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.HashMap;
+
+/**
+ *
+ * @author LH
+ */
+public class PackManager
+{
+    private HashMap<String,ArrayList<String[]>> groupsplitted = new HashMap<>();
+    private String[] installingPacks,AllPacks,DetectedPacks,queue;
+    
+    /**
+     * Lädt die Liste aller Packs aus der aktiven Datei
+     * @return PAckliste im FOrmat ID|Name
+     * 
+     */
+    public String[] getPackList()
+    {
+        String[] ret = new String[AllPacks.length];
+        for (int i=0;i<AllPacks.length;i++)
+        {
+            String id=AllPacks[i];
+            ArrayList<String[]> group=groupsplitted.get(id);
+            for (String row[] : group)
+            {
+                String[] rowSplit = row;
+                if(rowSplit[1].equalsIgnoreCase("pack"))
+                    ret[i] = id+"|"+rowSplit[2];
+            }
+        }
+        return ret;
+    }
+    
+    public void loadPackageData(String path)
+    {
+        String[][] data = izsetupReader.getSysSpezSetupFile(path,true,true);
+        String groupID="000"; 
+        String previousGRPID ="000";
+        
+        ArrayList<String[]> SubGroup = new ArrayList<>();
+        for (String[] line : data)
+        {
+            if(!(line==null))
+            {
+                String[] splittedLine=line;
+                if(!splittedLine[0].equals("000"))
+                {
+                    groupID=splittedLine[0];
+                    if(!previousGRPID.equals(groupID)&&!previousGRPID.equals("000"))
+                    {
+                        groupsplitted.put(previousGRPID, SubGroup);//Einlagern der abgeschlossenen gruppe
+                        SubGroup = new ArrayList<>();//resetten für neue daten;
+                    }
+                    SubGroup.add(line);
+                    previousGRPID=groupID;
+
+                }
+            }
+        }
+        groupsplitted.put(previousGRPID, SubGroup);//die letzte auch noch einflanschen
+        String[] groupIDs = groupsplitted.keySet().toArray(new String[0]);
+        Arrays.sort(groupIDs);
+        AllPacks = groupIDs;
+        checkForpackInstalled();
+        ArrayList<String> installables = new ArrayList<>();
+        for (String id : AllPacks)
+        {
+            if(!packIsInstalled(id))
+                installables.add(id);
+        }
+        installingPacks = installables.toArray(new String[0]);
+        Arrays.sort(installingPacks);
+    }
+
+    public void setPackInstallState(String packid, boolean state)
+    {
+        boolean exists = false;
+        for (int i = 0; i < installingPacks.length; i++)
+        {
+            String id = installingPacks[i];
+            if(packid.equals(id))
+            {
+                exists=true;
+                if(!state)
+                {
+                    installingPacks[i]="";
+                }
+            }
+        }
+        ArrayList<String> newGrps = new ArrayList<>();
+        for (String cnt : installingPacks)
+        {
+            if(cnt.length()>1)
+            {
+                newGrps.add(cnt);
+            }
+        }
+        if(!exists&&state)
+        {
+            newGrps.add(packid);
+        }
+        installingPacks = newGrps.toArray(new String[0]);
+        newGrps = new ArrayList<>();
+        for (String cnt : installingPacks)
+        {
+            if(packIsInstallable(cnt))
+                newGrps.add(cnt);
+            
+        }
+        installingPacks = newGrps.toArray(new String[0]);
+    }
+    public boolean packIsInstallable(String packid)
+    {
+        return packIsInstallable(packid, false);
+    }
+    public boolean packIsInstallable(String packid,boolean blocksItself)
+    {
+        String reqPack = packDependency(packid);
+        
+        for (String pack : DetectedPacks)//Detektiere obDependency installiert(dependency erfüllt wenn pack bereits installiert
+        {
+            if(reqPack.equalsIgnoreCase(pack))
+                return true;
+        }
+        if(blocksItself)
+        {
+            for (String pack : installingPacks)//detektiere obDependency in installierliste
+            {
+                if(packid.equalsIgnoreCase(pack))
+                    return false;
+            }
+        }
+        for (String pack : installingPacks)//detektiere obDependency in installierliste
+        {
+            if(reqPack.equalsIgnoreCase(pack)&&packIsInstallable(reqPack))
+                return true;
+        }
+        if(reqPack.equals("none"))
+            return true;
+        return false;
+    }
+    
+    public boolean packIsInstalled(String packid)
+    {
+        for (String cntnt : DetectedPacks)
+        {
+            if(cntnt.equalsIgnoreCase(packid))
+                return true;
+        }
+        return false;
+    }
+    
+    
+    
+    public boolean packIsScheduled(String packid)
+    {
+        for (String cntnt : installingPacks)
+        {
+            if(cntnt.equalsIgnoreCase(packid))
+                return true;
+        }
+        return false;
+    }
+   
+    public String packDependency(String packid)
+    {
+        ArrayList<String[]> selectedPack = groupsplitted.get(packid);
+        //002|req|001|nummer des benötigten packs//kann weitere erfordernwenn
+        for (String[] line : selectedPack)
+        {
+            String[] linesegs = line;
+            if(linesegs[1].equalsIgnoreCase("req"))
+                return linesegs[2];
+        }
+        
+        
+        return "none";
+    }
+
+    //005|Description|Tools für die games aus dem Package
+    public String getPackDescription(String packid)
+    {
+        ArrayList<String[]> selectedPack = groupsplitted.get(packid);
+        for (String[] line : selectedPack)
+        {
+            String[] linesegs = line;
+            if(linesegs[1].equalsIgnoreCase("Description"))
+                return linesegs[2];
+        }
+        return "Error 0x0404: keine Beschreiubung gefunden";
+    }
+    
+    public String getPackName(String packid)
+    {
+        ArrayList<String[]> selectedPack = groupsplitted.get(packid);
+        for (String line[] : selectedPack)
+        {
+            String[] linesegs = line;
+            if(linesegs[1].equalsIgnoreCase("pack"))
+                return linesegs[2];
+        }
+        return "Error 0x0404: kein Name gefunden";
+    }
+    
+    
+    private void checkForpackInstalled()
+    {
+        ArrayList<String> installedPack = new ArrayList<>();
+        for (int i=0;i<AllPacks.length;i++)
+        {
+            String id=AllPacks[i];
+            ArrayList<String[]> group=groupsplitted.get(id);
+            for (String[] row : group)
+            {
+                String[] rowSplit = row;
+                if(rowSplit[1].equalsIgnoreCase("detectInstall"))
+                {
+                    String detecString = rowSplit[2];
+                    //CMM|File:// benutzt den DateiExistiert-operator
+                    //CMM|Reg:// detektiert unter Win auf Exitenz von Regwert
+                    if(detecString.substring(0,7).equalsIgnoreCase("File://"))
+                    {
+                        String detecpart = detecString.substring(7);
+                        if(FileTK.checkDirExist(detecpart))
+                        {
+                            installedPack.add(id);
+                        }
+                    }
+                    if(detecString.substring(0,6).equalsIgnoreCase("Reg://"))
+                    {
+                        String detecpart = detecString.substring(6);
+                        if(registryReader.checkExistenceOfRegKey(detecpart)||registryReader.checkExistenceOfRegKeyEntry(detecpart))
+                        {
+                            installedPack.add(id);
+                        }
+                    }
+                }
+            }
+        }
+        DetectedPacks = installedPack.toArray(new String[0]);
+    }
+    public void createQueue()
+    {
+        Arrays.sort(installingPacks);
+        ArrayList<String> queuetmp = new ArrayList<>();
+        for (String id : installingPacks)
+        {
+            ArrayList<String[]> grpldr =groupsplitted.get(id);
+            for (String[] line : grpldr)
+            {
+                String[] data = line;
+                if(data[1].equalsIgnoreCase("packfile"))
+                {
+                    queuetmp.add("packfile:"+data[2]);
+                }
+                if(data[1].startsWith("waitdisk:"))
+                {
+                    queuetmp.add("waitdisk:"+data[2]+"|"+data[1].substring(9));
+                }
+            }
+        }
+        queue=queuetmp.toArray(new String[0]);
+    }
+    public String[] getQueue()
+    {
+        return queue;
+    } 
+}

+ 394 - 394
IZSetup/src/main/java/de/nplusc/izc/InstallPak/legacy/PackagerGUI.java

@@ -1,394 +1,394 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.InstallPak.legacy;
-import de.nplusc.izc.InstallPak.Definitions;
-import de.nplusc.izc.InstallPak.Main;
-
-
-import de.nplusc.izc.tools.baseTools.HidableTableColumnModel;
-import de.nplusc.izc.tools.baseTools.Tools;
-import java.awt.Point;
-import javax.swing.table.DefaultTableModel;
-
-/**
- *
- * @author LH
- */
-public class PackagerGUI extends javax.swing.JFrame
-{
-
-    /**
-     * Creates new form PackagerGUI
-     */
-    private PackManager p;
-    public PackagerGUI()
-    {
-        initComponents();
-        updatePosition();
-        lblVID.setText(Definitions.VERSION_GUI_TXT);
-        packStatus.setVisible(false);
-        p = new PackManager();
-        p.loadPackageData(Main.filePath);
-        ((HidableTableColumnModel)(tblSelector.getColumnModel())).setColumnVisible(0, false);
-        //^auskommentieren um id-spalte sichtbar zu bekommenTempcode fürs Testen
-        int rows=1;
-        String[] tablefill = p.getPackList();
-        for (int i = 0; i < tablefill.length; i++)
-        {
-            String GRP = tablefill[i];
-            String[] data = GRP.split("\\|");
-            if(i>=rows)
-                ((DefaultTableModel)tblSelector.getModel()).addRow(new String[3]);
-            ((DefaultTableModel)tblSelector.getModel()).setValueAt(data[0], i, 0);
-            ((DefaultTableModel)tblSelector.getModel()).setValueAt(data[1], i, 1);
-            ((DefaultTableModel)tblSelector.getModel()).setValueAt("Wird installiert", i, 2);
-            if(p.packIsInstalled(data[0]))
-            {
-                ((DefaultTableModel)tblSelector.getModel()).setValueAt("Bereits installiert", i, 2);
-            }
-        }
-    }
-    private void updatePosition()
-    {
-        Point p = new Point(Main.topleft_coords_x, Main.topleft_coords_y);
-        setLocation(p);
-    }
-    /**
-     * This method is called from within the constructor to
-     * initialize the form.
-     * WARNING: Do NOT modify this code. The content of this method is
-     * always regenerated by the Form Editor.
-     */
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents()
-    {
-
-        jScrollPane1 = new javax.swing.JScrollPane();
-        tblSelector = new javax.swing.JTable();
-        jScrollPane2 = new javax.swing.JScrollPane();
-        packDesc = new javax.swing.JTextArea();
-        packTitle = new javax.swing.JLabel();
-        btnInstall = new javax.swing.JButton();
-        packStatus = new javax.swing.JLabel();
-        jLabel1 = new javax.swing.JLabel();
-        lblVID = new javax.swing.JLabel();
-        jSeparator1 = new javax.swing.JSeparator();
-        jSeparator3 = new javax.swing.JSeparator();
-
-        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
-        addComponentListener(new java.awt.event.ComponentAdapter()
-        {
-            public void componentMoved(java.awt.event.ComponentEvent evt)
-            {
-                formComponentMoved(evt);
-            }
-        });
-
-        tblSelector.setModel(new javax.swing.table.DefaultTableModel(
-            new Object [][]
-            {
-                {null, null, null}
-            },
-            new String []
-            {
-                "meta:id", "Name", "Status"
-            }
-        )
-        {
-            boolean[] canEdit = new boolean []
-            {
-                false, false, false
-            };
-
-            public boolean isCellEditable(int rowIndex, int columnIndex)
-            {
-                return canEdit [columnIndex];
-            }
-        });
-        tblSelector.addMouseListener(new java.awt.event.MouseAdapter()
-        {
-            public void mouseClicked(java.awt.event.MouseEvent evt)
-            {
-                tblSelectorMouseClicked(evt);
-            }
-        });
-        jScrollPane1.setViewportView(tblSelector);
-        tblSelector.setColumnModel(new HidableTableColumnModel(tblSelector.getColumnModel()));
-        if (tblSelector.getColumnModel().getColumnCount() > 0)
-        {
-            tblSelector.getColumnModel().getColumn(0).setResizable(false);
-            tblSelector.getColumnModel().getColumn(0).setPreferredWidth(30);
-            tblSelector.getColumnModel().getColumn(1).setMinWidth(80);
-            tblSelector.getColumnModel().getColumn(1).setPreferredWidth(80);
-            tblSelector.getColumnModel().getColumn(1).setMaxWidth(80);
-            tblSelector.getColumnModel().getColumn(2).setPreferredWidth(80);
-        }
-
-        packDesc.setColumns(20);
-        packDesc.setRows(5);
-        packDesc.addComponentListener(new java.awt.event.ComponentAdapter()
-        {
-            public void componentMoved(java.awt.event.ComponentEvent evt)
-            {
-                packDescComponentMoved(evt);
-            }
-        });
-        jScrollPane2.setViewportView(packDesc);
-
-        packTitle.setText("{PackTitle}");
-
-        btnInstall.setText("Installation starten");
-        btnInstall.addActionListener(new java.awt.event.ActionListener()
-        {
-            public void actionPerformed(java.awt.event.ActionEvent evt)
-            {
-                btnInstallActionPerformed(evt);
-            }
-        });
-
-        packStatus.setText("{DepDetails}");
-
-        jLabel1.setText("Doppelklicken um Status zu ändern");
-
-        lblVID.setText("izSetup 1.0.0 (c) 2012 iZc");
-
-        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
-        getContentPane().setLayout(layout);
-        layout.setHorizontalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(layout.createSequentialGroup()
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE)
-                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE))
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addGroup(layout.createSequentialGroup()
-                                .addGap(34, 34, 34)
-                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                                    .addComponent(packStatus)
-                                    .addComponent(packTitle, javax.swing.GroupLayout.PREFERRED_SIZE, 429, javax.swing.GroupLayout.PREFERRED_SIZE)))
-                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, 12, Short.MAX_VALUE)
-                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                                    .addComponent(btnInstall, javax.swing.GroupLayout.PREFERRED_SIZE, 597, javax.swing.GroupLayout.PREFERRED_SIZE)
-                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 584, javax.swing.GroupLayout.PREFERRED_SIZE))
-                                .addGap(8, 8, 8))))
-                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                        .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addComponent(lblVID)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                        .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 642, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addGap(10, 10, 10)))
-                .addContainerGap())
-        );
-        layout.setVerticalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(layout.createSequentialGroup()
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(layout.createSequentialGroup()
-                        .addGap(17, 17, 17)
-                        .addComponent(packStatus))
-                    .addGroup(layout.createSequentialGroup()
-                        .addContainerGap()
-                        .addComponent(jLabel1)))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
-                    .addGroup(layout.createSequentialGroup()
-                        .addComponent(packTitle)
-                        .addGap(18, 18, 18)
-                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                        .addComponent(btnInstall, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE))
-                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
-                    .addComponent(lblVID, javax.swing.GroupLayout.Alignment.TRAILING)
-                    .addComponent(jSeparator3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
-                .addContainerGap())
-        );
-
-        pack();
-    }// </editor-fold>//GEN-END:initComponents
-
-    private void tblSelectorMouseClicked(java.awt.event.MouseEvent evt)//GEN-FIRST:event_tblSelectorMouseClicked
-    {//GEN-HEADEREND:event_tblSelectorMouseClicked
-        int x = tblSelector.getSelectedRow();
-        String packid=(String)((DefaultTableModel)tblSelector.getModel()).getValueAt(x, 0);
-        boolean sel = p.packIsScheduled(packid);
-        if(evt.getClickCount()==2)
-        {
-            if(sel==false&&p.packIsInstallable(packid))
-            {
-                sel=true;
-            }
-            else
-            {
-                sel=false;
-            }
-            p.setPackInstallState(packid, sel);
-        }
-        rebuildTable();
-        String _packTitle = p.getPackName(packid);
-        String packDescr = p.getPackDescription(packid);
-        packTitle.setText(_packTitle);
-        packDesc.setText(packDescr);
-    }//GEN-LAST:event_tblSelectorMouseClicked
-
-    private String[] handoverqueue;
-    private void btnInstallActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnInstallActionPerformed
-    {//GEN-HEADEREND:event_btnInstallActionPerformed
-        p.createQueue();
-        handoverqueue = p.getQueue();
-        new Thread(new Runnable()
-        {
-            @Override
-            @SuppressWarnings("SleepWhileInLoop")
-            public void run()
-            {
-                new InstallProgressGui(handoverqueue).setVisible(true);
-            }
-        }).start();
-        this.setVisible(false);
-    }//GEN-LAST:event_btnInstallActionPerformed
-
-    private void packDescComponentMoved(java.awt.event.ComponentEvent evt)//GEN-FIRST:event_packDescComponentMoved
-    {//GEN-HEADEREND:event_packDescComponentMoved
-        //NOP
-    }//GEN-LAST:event_packDescComponentMoved
-
-    private void formComponentMoved(java.awt.event.ComponentEvent evt)//GEN-FIRST:event_formComponentMoved
-    {//GEN-HEADEREND:event_formComponentMoved
-        Main.topleft_coords_x = getLocation().x;
-        Main.topleft_coords_y = getLocation().x;
-    }//GEN-LAST:event_formComponentMoved
-
-    private void rebuildTable()
-    {
-        String[] tablefill = p.getPackList();
-        for (int i = 0; i < tablefill.length; i++)
-        {
-            String GRP = tablefill[i];
-            String[] data = GRP.split("\\|");
-            String packid = data[0];
-            ((DefaultTableModel)tblSelector.getModel()).setValueAt(data[0], i, 0);
-            ((DefaultTableModel)tblSelector.getModel()).setValueAt(data[1], i, 1);
-            ((DefaultTableModel)tblSelector.getModel()).setValueAt("0xFA11", i, 2);
-            if(p.packIsScheduled(packid))
-            {
-                Tools.DebugHelperPrint(packid+"|sched", true, "iZsetup.enableFinerDebug");
-                ((DefaultTableModel)tblSelector.getModel()).setValueAt("Wird installiert", i, 2);
-            }
-            else
-            {
-                if(p.packIsInstalled(data[0]))
-                {
-                    Tools.DebugHelperPrint(packid+"|exis", true, "iZsetup.enableFinerDebug");
-                    ((DefaultTableModel)tblSelector.getModel()).setValueAt("Bereits installiert", i, 2);
-                }
-                else
-                {
-                    if(!p.packIsInstallable(packid))
-                    {
-                        String depName = ""; 
-                        String depID = p.packDependency(data[0]);
-                        try
-                        {
-                        depName = p.getPackName(depID);
-                        }
-                        catch(Exception e)
-                        {
-                        }
-                        Tools.DebugHelperPrint(packid+"|reqdep:"+depID, true, "iZsetup.enableFinerDebug");
-                        ((DefaultTableModel)tblSelector.getModel()).setValueAt(depName+" benötigt", i, 2);
-                    }
-                    else
-                    {
-                        ((DefaultTableModel)tblSelector.getModel()).setValueAt("Abgewählt", i, 2);
-                    }
-                }
-            }
-        }
-    }
-            
-    
-    /**
-     * @param args the command line arguments
-     */    
-    public static void main(String args[])
-    {
-        /* Set the Nimbus look and feel */
-        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
-        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
-         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
-         */
-        try
-        {
-            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
-            {
-                if ("Nimbus".equals(info.getName()))
-                {
-                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
-                    break;
-                }
-            }
-        }
-        catch (ClassNotFoundException ex)
-        {
-            java.util.logging.Logger.getLogger(PackagerGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-        catch (InstantiationException ex)
-        {
-            java.util.logging.Logger.getLogger(PackagerGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-        catch (IllegalAccessException ex)
-        {
-            java.util.logging.Logger.getLogger(PackagerGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-        catch (javax.swing.UnsupportedLookAndFeelException ex)
-        {
-            java.util.logging.Logger.getLogger(PackagerGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-        //</editor-fold>
-
-        /* Create and display the form */
-        java.awt.EventQueue.invokeLater(new Runnable()
-        {
-            public void run()
-            {
-                new PackagerGUI().setVisible(true);
-            }
-        });
-    }
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JButton btnInstall;
-    private javax.swing.JLabel jLabel1;
-    private javax.swing.JScrollPane jScrollPane1;
-    private javax.swing.JScrollPane jScrollPane2;
-    private javax.swing.JSeparator jSeparator1;
-    private javax.swing.JSeparator jSeparator3;
-    private javax.swing.JLabel lblVID;
-    private javax.swing.JTextArea packDesc;
-    private javax.swing.JLabel packStatus;
-    private javax.swing.JLabel packTitle;
-    private javax.swing.JTable tblSelector;
-    // End of variables declaration//GEN-END:variables
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.InstallPak.legacy;
+import de.nplusc.izc.InstallPak.Definitions;
+import de.nplusc.izc.InstallPak.Main;
+
+
+import de.nplusc.izc.tools.baseTools.HidableTableColumnModel;
+import de.nplusc.izc.tools.baseTools.Tools;
+import java.awt.Point;
+import javax.swing.table.DefaultTableModel;
+
+/**
+ *
+ * @author LH
+ */
+public class PackagerGUI extends javax.swing.JFrame
+{
+
+    /**
+     * Creates new form PackagerGUI
+     */
+    private PackManager p;
+    public PackagerGUI()
+    {
+        initComponents();
+        updatePosition();
+        lblVID.setText(Definitions.VERSION_GUI_TXT);
+        packStatus.setVisible(false);
+        p = new PackManager();
+        p.loadPackageData(Main.filePath);
+        ((HidableTableColumnModel)(tblSelector.getColumnModel())).setColumnVisible(0, false);
+        //^auskommentieren um id-spalte sichtbar zu bekommenTempcode fürs Testen
+        int rows=1;
+        String[] tablefill = p.getPackList();
+        for (int i = 0; i < tablefill.length; i++)
+        {
+            String GRP = tablefill[i];
+            String[] data = GRP.split("\\|");
+            if(i>=rows)
+                ((DefaultTableModel)tblSelector.getModel()).addRow(new String[3]);
+            ((DefaultTableModel)tblSelector.getModel()).setValueAt(data[0], i, 0);
+            ((DefaultTableModel)tblSelector.getModel()).setValueAt(data[1], i, 1);
+            ((DefaultTableModel)tblSelector.getModel()).setValueAt("Wird installiert", i, 2);
+            if(p.packIsInstalled(data[0]))
+            {
+                ((DefaultTableModel)tblSelector.getModel()).setValueAt("Bereits installiert", i, 2);
+            }
+        }
+    }
+    private void updatePosition()
+    {
+        Point p = new Point(Main.topleft_coords_x, Main.topleft_coords_y);
+        setLocation(p);
+    }
+    /**
+     * This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents()
+    {
+
+        jScrollPane1 = new javax.swing.JScrollPane();
+        tblSelector = new javax.swing.JTable();
+        jScrollPane2 = new javax.swing.JScrollPane();
+        packDesc = new javax.swing.JTextArea();
+        packTitle = new javax.swing.JLabel();
+        btnInstall = new javax.swing.JButton();
+        packStatus = new javax.swing.JLabel();
+        jLabel1 = new javax.swing.JLabel();
+        lblVID = new javax.swing.JLabel();
+        jSeparator1 = new javax.swing.JSeparator();
+        jSeparator3 = new javax.swing.JSeparator();
+
+        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+        addComponentListener(new java.awt.event.ComponentAdapter()
+        {
+            public void componentMoved(java.awt.event.ComponentEvent evt)
+            {
+                formComponentMoved(evt);
+            }
+        });
+
+        tblSelector.setModel(new javax.swing.table.DefaultTableModel(
+            new Object [][]
+            {
+                {null, null, null}
+            },
+            new String []
+            {
+                "meta:id", "Name", "Status"
+            }
+        )
+        {
+            boolean[] canEdit = new boolean []
+            {
+                false, false, false
+            };
+
+            public boolean isCellEditable(int rowIndex, int columnIndex)
+            {
+                return canEdit [columnIndex];
+            }
+        });
+        tblSelector.addMouseListener(new java.awt.event.MouseAdapter()
+        {
+            public void mouseClicked(java.awt.event.MouseEvent evt)
+            {
+                tblSelectorMouseClicked(evt);
+            }
+        });
+        jScrollPane1.setViewportView(tblSelector);
+        tblSelector.setColumnModel(new HidableTableColumnModel(tblSelector.getColumnModel()));
+        if (tblSelector.getColumnModel().getColumnCount() > 0)
+        {
+            tblSelector.getColumnModel().getColumn(0).setResizable(false);
+            tblSelector.getColumnModel().getColumn(0).setPreferredWidth(30);
+            tblSelector.getColumnModel().getColumn(1).setMinWidth(80);
+            tblSelector.getColumnModel().getColumn(1).setPreferredWidth(80);
+            tblSelector.getColumnModel().getColumn(1).setMaxWidth(80);
+            tblSelector.getColumnModel().getColumn(2).setPreferredWidth(80);
+        }
+
+        packDesc.setColumns(20);
+        packDesc.setRows(5);
+        packDesc.addComponentListener(new java.awt.event.ComponentAdapter()
+        {
+            public void componentMoved(java.awt.event.ComponentEvent evt)
+            {
+                packDescComponentMoved(evt);
+            }
+        });
+        jScrollPane2.setViewportView(packDesc);
+
+        packTitle.setText("{PackTitle}");
+
+        btnInstall.setText("Installation starten");
+        btnInstall.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                btnInstallActionPerformed(evt);
+            }
+        });
+
+        packStatus.setText("{DepDetails}");
+
+        jLabel1.setText("Doppelklicken um Status zu ändern");
+
+        lblVID.setText("izSetup 1.0.0 (c) 2012 iZc");
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
+        getContentPane().setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 225, javax.swing.GroupLayout.PREFERRED_SIZE)
+                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 216, javax.swing.GroupLayout.PREFERRED_SIZE))
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addGroup(layout.createSequentialGroup()
+                                .addGap(34, 34, 34)
+                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                    .addComponent(packStatus)
+                                    .addComponent(packTitle, javax.swing.GroupLayout.PREFERRED_SIZE, 429, javax.swing.GroupLayout.PREFERRED_SIZE)))
+                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED, 12, Short.MAX_VALUE)
+                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                    .addComponent(btnInstall, javax.swing.GroupLayout.PREFERRED_SIZE, 597, javax.swing.GroupLayout.PREFERRED_SIZE)
+                                    .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 584, javax.swing.GroupLayout.PREFERRED_SIZE))
+                                .addGap(8, 8, 8))))
+                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                        .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addComponent(lblVID)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                        .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 642, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addGap(10, 10, 10)))
+                .addContainerGap())
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addGap(17, 17, 17)
+                        .addComponent(packStatus))
+                    .addGroup(layout.createSequentialGroup()
+                        .addContainerGap()
+                        .addComponent(jLabel1)))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
+                    .addGroup(layout.createSequentialGroup()
+                        .addComponent(packTitle)
+                        .addGap(18, 18, 18)
+                        .addComponent(jScrollPane2, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                        .addComponent(btnInstall, javax.swing.GroupLayout.PREFERRED_SIZE, 72, javax.swing.GroupLayout.PREFERRED_SIZE))
+                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 20, Short.MAX_VALUE)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addComponent(jSeparator1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
+                    .addComponent(lblVID, javax.swing.GroupLayout.Alignment.TRAILING)
+                    .addComponent(jSeparator3, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE))
+                .addContainerGap())
+        );
+
+        pack();
+    }// </editor-fold>//GEN-END:initComponents
+
+    private void tblSelectorMouseClicked(java.awt.event.MouseEvent evt)//GEN-FIRST:event_tblSelectorMouseClicked
+    {//GEN-HEADEREND:event_tblSelectorMouseClicked
+        int x = tblSelector.getSelectedRow();
+        String packid=(String)((DefaultTableModel)tblSelector.getModel()).getValueAt(x, 0);
+        boolean sel = p.packIsScheduled(packid);
+        if(evt.getClickCount()==2)
+        {
+            if(sel==false&&p.packIsInstallable(packid))
+            {
+                sel=true;
+            }
+            else
+            {
+                sel=false;
+            }
+            p.setPackInstallState(packid, sel);
+        }
+        rebuildTable();
+        String _packTitle = p.getPackName(packid);
+        String packDescr = p.getPackDescription(packid);
+        packTitle.setText(_packTitle);
+        packDesc.setText(packDescr);
+    }//GEN-LAST:event_tblSelectorMouseClicked
+
+    private String[] handoverqueue;
+    private void btnInstallActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnInstallActionPerformed
+    {//GEN-HEADEREND:event_btnInstallActionPerformed
+        p.createQueue();
+        handoverqueue = p.getQueue();
+        new Thread(new Runnable()
+        {
+            @Override
+            @SuppressWarnings("SleepWhileInLoop")
+            public void run()
+            {
+                new InstallProgressGui(handoverqueue).setVisible(true);
+            }
+        }).start();
+        this.setVisible(false);
+    }//GEN-LAST:event_btnInstallActionPerformed
+
+    private void packDescComponentMoved(java.awt.event.ComponentEvent evt)//GEN-FIRST:event_packDescComponentMoved
+    {//GEN-HEADEREND:event_packDescComponentMoved
+        //NOP
+    }//GEN-LAST:event_packDescComponentMoved
+
+    private void formComponentMoved(java.awt.event.ComponentEvent evt)//GEN-FIRST:event_formComponentMoved
+    {//GEN-HEADEREND:event_formComponentMoved
+        Main.topleft_coords_x = getLocation().x;
+        Main.topleft_coords_y = getLocation().x;
+    }//GEN-LAST:event_formComponentMoved
+
+    private void rebuildTable()
+    {
+        String[] tablefill = p.getPackList();
+        for (int i = 0; i < tablefill.length; i++)
+        {
+            String GRP = tablefill[i];
+            String[] data = GRP.split("\\|");
+            String packid = data[0];
+            ((DefaultTableModel)tblSelector.getModel()).setValueAt(data[0], i, 0);
+            ((DefaultTableModel)tblSelector.getModel()).setValueAt(data[1], i, 1);
+            ((DefaultTableModel)tblSelector.getModel()).setValueAt("0xFA11", i, 2);
+            if(p.packIsScheduled(packid))
+            {
+                Tools.DebugHelperPrint(packid+"|sched", true, "iZsetup.enableFinerDebug");
+                ((DefaultTableModel)tblSelector.getModel()).setValueAt("Wird installiert", i, 2);
+            }
+            else
+            {
+                if(p.packIsInstalled(data[0]))
+                {
+                    Tools.DebugHelperPrint(packid+"|exis", true, "iZsetup.enableFinerDebug");
+                    ((DefaultTableModel)tblSelector.getModel()).setValueAt("Bereits installiert", i, 2);
+                }
+                else
+                {
+                    if(!p.packIsInstallable(packid))
+                    {
+                        String depName = ""; 
+                        String depID = p.packDependency(data[0]);
+                        try
+                        {
+                        depName = p.getPackName(depID);
+                        }
+                        catch(Exception e)
+                        {
+                        }
+                        Tools.DebugHelperPrint(packid+"|reqdep:"+depID, true, "iZsetup.enableFinerDebug");
+                        ((DefaultTableModel)tblSelector.getModel()).setValueAt(depName+" benötigt", i, 2);
+                    }
+                    else
+                    {
+                        ((DefaultTableModel)tblSelector.getModel()).setValueAt("Abgewählt", i, 2);
+                    }
+                }
+            }
+        }
+    }
+            
+    
+    /**
+     * @param args the command line arguments
+     */    
+    public static void main(String args[])
+    {
+        /* Set the Nimbus look and feel */
+        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
+        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
+         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
+         */
+        try
+        {
+            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
+            {
+                if ("Nimbus".equals(info.getName()))
+                {
+                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
+                    break;
+                }
+            }
+        }
+        catch (ClassNotFoundException ex)
+        {
+            java.util.logging.Logger.getLogger(PackagerGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        catch (InstantiationException ex)
+        {
+            java.util.logging.Logger.getLogger(PackagerGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        catch (IllegalAccessException ex)
+        {
+            java.util.logging.Logger.getLogger(PackagerGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        catch (javax.swing.UnsupportedLookAndFeelException ex)
+        {
+            java.util.logging.Logger.getLogger(PackagerGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        //</editor-fold>
+
+        /* Create and display the form */
+        java.awt.EventQueue.invokeLater(new Runnable()
+        {
+            public void run()
+            {
+                new PackagerGUI().setVisible(true);
+            }
+        });
+    }
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JButton btnInstall;
+    private javax.swing.JLabel jLabel1;
+    private javax.swing.JScrollPane jScrollPane1;
+    private javax.swing.JScrollPane jScrollPane2;
+    private javax.swing.JSeparator jSeparator1;
+    private javax.swing.JSeparator jSeparator3;
+    private javax.swing.JLabel lblVID;
+    private javax.swing.JTextArea packDesc;
+    private javax.swing.JLabel packStatus;
+    private javax.swing.JLabel packTitle;
+    private javax.swing.JTable tblSelector;
+    // End of variables declaration//GEN-END:variables
+}

+ 35 - 35
IZSetup/src/main/java/de/nplusc/izc/InstallPak/packageMgr/BullshitRequestedException.java

@@ -1,35 +1,35 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.InstallPak.packageMgr;
-
-/**
- * Wird geschmissen wenn man ne ungültige oder doppelt belgte ProgID verwischt...
- * @author LH
- */
-public class BullshitRequestedException extends RuntimeException
-{
-
-    public BullshitRequestedException()
-    {
-    }
-
-    public BullshitRequestedException(String message)
-    {
-        super(message);
-    }
-    
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.InstallPak.packageMgr;
+
+/**
+ * Wird geschmissen wenn man ne ungültige oder doppelt belgte ProgID verwischt...
+ * @author LH
+ */
+public class BullshitRequestedException extends RuntimeException
+{
+
+    public BullshitRequestedException()
+    {
+    }
+
+    public BullshitRequestedException(String message)
+    {
+        super(message);
+    }
+    
+}

+ 135 - 135
IZSetup/src/main/java/de/nplusc/izc/InstallPak/packageMgr/InstallationRegistry.java

@@ -1,135 +1,135 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.InstallPak.packageMgr;
-
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.ResultSet;
-import java.sql.SQLException;
-import java.sql.Statement;
-
-/**
- *
- * @author LH
- */
-public class InstallationRegistry
-{
-    
-    private String dataBasePath;
-    boolean disconnected=false;
-    private Connection dbc;
-     Statement st ;
-    public InstallationRegistry(String databasePath)
-    {
-        try
-        {
-            dbc = DriverManager.getConnection( "jdbc:sqlite:"+databasePath);
-            st = dbc.createStatement();
-            
-            
-            //initialisieren und tabelle erstellen falls nicht vorhanden...
-            st.executeUpdate("CREATE  TABLE  IF NOT EXISTS \"main\".\"Registry\" (\"ProgramID\" VARCHAR PRIMARY KEY  NOT NULL , \"ProgramName\" VARCHAR, \"UpdateURL\" TEXT, \"UninstallScript\" TEXT)");
-            
-            
-            
-            //tableDef = 
-            //rs = st.executeQuery(Query);
-        }
-        catch (SQLException ex)
-        {
-            ex.printStackTrace();
-            System.out.println("Database not found");
-        }
-    }
-    
-    
-    public void disconnectRegistry()
-    {
-        disconnected=true;
-        try
-        {
-            dbc.close();
-        }
-        catch (SQLException ex)
-        {
-            ex.printStackTrace();
-        }
-        
-    }
-    
-    
-    
-    
-    
-    public void registerProgram(Program P)
-    {        
-        if(disconnected)
-            throw new BullshitRequestedException("Database already unloaded!");
-        try
-        {
-            ResultSet rs = st.executeQuery("Select count * from Registry where ProgramID="+P.getProgramID());
-            
-            if(rs.getInt(1)==1);
-            throw new BullshitRequestedException("Program already registered");
-        }
-        catch (SQLException ex)
-        {
-            ex.printStackTrace();
-        }
-        
-        
-    }
-    
-    public void unregisterProgram(String programID)
-    {
-        if(disconnected)
-            throw new BullshitRequestedException("Database already unloaded!");
-        
-        
-        
-    }
-    public String[] getInstalledProgramIDs()
-    {
-        if(disconnected)
-            throw new BullshitRequestedException("Database already unloaded!");
-        
-        
-        
-        return null;
-    }
-    
-    public String getProgramName(String pId)
-    {
-        if(disconnected)
-            throw new BullshitRequestedException("Database already unloaded!");
-        
-        
-        return null;
-    }
-    
-    public Program getProgram()
-    {
-        if(disconnected)
-            throw new BullshitRequestedException("Database already unloaded!");
-        
-        
-        
-        return null;
-    }
-    
-    
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.InstallPak.packageMgr;
+
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.SQLException;
+import java.sql.Statement;
+
+/**
+ *
+ * @author LH
+ */
+public class InstallationRegistry
+{
+    
+    private String dataBasePath;
+    boolean disconnected=false;
+    private Connection dbc;
+     Statement st ;
+    public InstallationRegistry(String databasePath)
+    {
+        try
+        {
+            dbc = DriverManager.getConnection( "jdbc:sqlite:"+databasePath);
+            st = dbc.createStatement();
+            
+            
+            //initialisieren und tabelle erstellen falls nicht vorhanden...
+            st.executeUpdate("CREATE  TABLE  IF NOT EXISTS \"main\".\"Registry\" (\"ProgramID\" VARCHAR PRIMARY KEY  NOT NULL , \"ProgramName\" VARCHAR, \"UpdateURL\" TEXT, \"UninstallScript\" TEXT)");
+            
+            
+            
+            //tableDef = 
+            //rs = st.executeQuery(Query);
+        }
+        catch (SQLException ex)
+        {
+            ex.printStackTrace();
+            System.out.println("Database not found");
+        }
+    }
+    
+    
+    public void disconnectRegistry()
+    {
+        disconnected=true;
+        try
+        {
+            dbc.close();
+        }
+        catch (SQLException ex)
+        {
+            ex.printStackTrace();
+        }
+        
+    }
+    
+    
+    
+    
+    
+    public void registerProgram(Program P)
+    {        
+        if(disconnected)
+            throw new BullshitRequestedException("Database already unloaded!");
+        try
+        {
+            ResultSet rs = st.executeQuery("Select count * from Registry where ProgramID="+P.getProgramID());
+            
+            if(rs.getInt(1)==1);
+            throw new BullshitRequestedException("Program already registered");
+        }
+        catch (SQLException ex)
+        {
+            ex.printStackTrace();
+        }
+        
+        
+    }
+    
+    public void unregisterProgram(String programID)
+    {
+        if(disconnected)
+            throw new BullshitRequestedException("Database already unloaded!");
+        
+        
+        
+    }
+    public String[] getInstalledProgramIDs()
+    {
+        if(disconnected)
+            throw new BullshitRequestedException("Database already unloaded!");
+        
+        
+        
+        return null;
+    }
+    
+    public String getProgramName(String pId)
+    {
+        if(disconnected)
+            throw new BullshitRequestedException("Database already unloaded!");
+        
+        
+        return null;
+    }
+    
+    public Program getProgram()
+    {
+        if(disconnected)
+            throw new BullshitRequestedException("Database already unloaded!");
+        
+        
+        
+        return null;
+    }
+    
+    
+}

+ 75 - 75
IZSetup/src/main/java/de/nplusc/izc/InstallPak/packageMgr/Program.java

@@ -1,75 +1,75 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.InstallPak.packageMgr;
-
-/**
- *
- * @author LH
- */
-public class Program
-{
-    private String programID,name,uninstalLScript,Url;
-
-    public Program(String programID, String name, String uninstalLScript, String Url)
-    {
-        this.programID = programID;
-        this.name = name;
-        this.uninstalLScript = uninstalLScript;
-        this.Url = Url;
-    }
-
-    public String getProgramID()
-    {
-        return programID;
-    }
-
-    public void setProgramID(String programID)
-    {
-        this.programID = programID;
-    }
-
-    public String getName()
-    {
-        return name;
-    }
-
-    public void setName(String name)
-    {
-        this.name = name;
-    }
-
-    public String getUninstalLScript()
-    {
-        return uninstalLScript;
-    }
-
-    public void setUninstalLScript(String uninstalLScript)
-    {
-        this.uninstalLScript = uninstalLScript;
-    }
-
-    public String getUrl()
-    {
-        return Url;
-    }
-
-    public void setUrl(String Url)
-    {
-        this.Url = Url;
-    }
-            
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.InstallPak.packageMgr;
+
+/**
+ *
+ * @author LH
+ */
+public class Program
+{
+    private String programID,name,uninstalLScript,Url;
+
+    public Program(String programID, String name, String uninstalLScript, String Url)
+    {
+        this.programID = programID;
+        this.name = name;
+        this.uninstalLScript = uninstalLScript;
+        this.Url = Url;
+    }
+
+    public String getProgramID()
+    {
+        return programID;
+    }
+
+    public void setProgramID(String programID)
+    {
+        this.programID = programID;
+    }
+
+    public String getName()
+    {
+        return name;
+    }
+
+    public void setName(String name)
+    {
+        this.name = name;
+    }
+
+    public String getUninstalLScript()
+    {
+        return uninstalLScript;
+    }
+
+    public void setUninstalLScript(String uninstalLScript)
+    {
+        this.uninstalLScript = uninstalLScript;
+    }
+
+    public String getUrl()
+    {
+        return Url;
+    }
+
+    public void setUrl(String Url)
+    {
+        this.Url = Url;
+    }
+            
+}

+ 63 - 63
IZSetup/templates/tempalte.izpackage

@@ -1,64 +1,64 @@
-000|izsetup|1.0.0|Version (4 spalte=Kommentar)(posiNbr|type|Value|comment);Leere Felder brauchen ein LEerzeichen!
-000|||Dieser Bereich ist der Header (groupid 000 word vom Preprocessor immer verworfen und kann für Vermerke genutzt werden
-000|||Msg muss vorm exec stehen da sonst falsch gelinkt wird
-000|type|packages|dient nur zur unterscheidung von packagefiles
-000|||packagefiles unterstützen Conds genauso
-000|flag|multidisk|dieses Flag aktivirt den Multidisk-Modus
-CMM|Inline-COmment-funktion
-CMM|Multidisk-Modus=Dateien werden nicht auf Temp kopiert und bei nem WaitDisk
-CMM|kommt ne Aufforderung die nächste Disk einzulegen
-CMM|der dateiname danach sagt auf welche datei geschaut wird
-001|pack|BaseSystem|Name de Packages das in der Anicht auftaucht
-001|detectInstall|File://C:\kernel.etl2
-CMM|File:// benutzt den DateiExistiert-operator
-CMM|Reg:// detektiert unter Win auf Exitenz von Regwert
-001|description|Die minimal nötigen Tools und Komponenten fürs System
-CMM|#basedir# ersetzt Variable durch Pfad dieser datei (ermöglict jar und
-CMM|setup voneinander zu trennen)
-001|packfile|#basedir#\pack001.izsetup
-CMM|msg und exec-lines werden vom PackManager ignoriert und sind für unattendeds nötig
-CMM|dabei werden alle packages nacheinander installiert und ausgeführt
-001|msg|Installiere BasePackage
-001|exec|java -jar izsetup.jar -file pack001.izsetup --silent
-CMM|########################################### 
-CMM|###########################################
-CMM|###########################################
-002|pack|Addons| 
-002|detectInstall|File://%userprofile%\appdata\programname\datei1.dat|
-002|description|Addons und sosntiges was nicht zwingend notwendig ist|
-002|packfile|#basedir#\addons.izsetup| 
-002|req|001|nummer des benötigten packs//kann weitere erfordernwenn
-002|msg|Installiere Addons| 
-002|exec|java -jar izsetup.jar -file addons.izsetup --silent| 
-CMM|########################################### 
-CMM|###########################################
-CMM|###########################################
-003|cond:1|IsWin7| 
-003|pack|Fehlendes Zeugs von XP| 
-003|detectInstall|File://C:\ornder2\datei2.bin
-003|description|Sach das bei XP defult war aber dort fehlt|
-003|packfile|#basedir#\xprecover.izsetup| 
-003|req|001| 
-003|msg|installiere fehlendes nach das bei XP dabei war
-003|exec|java -jar izsetup.jar -file xprevocer.izsetup --silent| 
-003|endcond:1| |
-004|pack|games| 
-004|waitDisk:Message|#basedir#\games.izsetup| 
-004|detectInstall|File://C:\Program Files\ImgBurn\ImgBurn.exexexe
-004|Description|Die Games die nicht fehlen dürfen
-004|packfile|#basedir#\games.izsetup
-004|req|001| 
-004|msg|installiere games| 
-004|exec|java -jar izsetup.jar -file games.izsetup --silent| 
-005|pack|game-Tools| 
-005|waitDisk|#basedir#\gamestls.izsetup| 
-005|detectInstall|File://C:\ornder3\datei3b.bin| 
-005|Description|Tools für die games aus dem Package| 
-005|packfile|#basedir#\gamestls.izsetup
-005|req|004|dependencys gehen über mehrere packs ->auch 001 notwendig 
-005|msg|installiere games-tools| 
-005|exec|java -jar izsetup.jar -file gamestls.izsetup --silent| 
-999|pack|NoExec| dieses Pack ist nur als Wrapper fr die Basta-Messge gedacht und wird nicht ausgeführt
-999|req|000|da 000 kein pack kann dieses nicht ausgewählt werden
-999|msg|Basta|namenlose gruppen werden automatsch ausgeführt
+000|izsetup|1.0.0|Version (4 spalte=Kommentar)(posiNbr|type|Value|comment);Leere Felder brauchen ein LEerzeichen!
+000|||Dieser Bereich ist der Header (groupid 000 word vom Preprocessor immer verworfen und kann für Vermerke genutzt werden
+000|||Msg muss vorm exec stehen da sonst falsch gelinkt wird
+000|type|packages|dient nur zur unterscheidung von packagefiles
+000|||packagefiles unterstützen Conds genauso
+000|flag|multidisk|dieses Flag aktivirt den Multidisk-Modus
+CMM|Inline-COmment-funktion
+CMM|Multidisk-Modus=Dateien werden nicht auf Temp kopiert und bei nem WaitDisk
+CMM|kommt ne Aufforderung die nächste Disk einzulegen
+CMM|der dateiname danach sagt auf welche datei geschaut wird
+001|pack|BaseSystem|Name de Packages das in der Anicht auftaucht
+001|detectInstall|File://C:\kernel.etl2
+CMM|File:// benutzt den DateiExistiert-operator
+CMM|Reg:// detektiert unter Win auf Exitenz von Regwert
+001|description|Die minimal nötigen Tools und Komponenten fürs System
+CMM|#basedir# ersetzt Variable durch Pfad dieser datei (ermöglict jar und
+CMM|setup voneinander zu trennen)
+001|packfile|#basedir#\pack001.izsetup
+CMM|msg und exec-lines werden vom PackManager ignoriert und sind für unattendeds nötig
+CMM|dabei werden alle packages nacheinander installiert und ausgeführt
+001|msg|Installiere BasePackage
+001|exec|java -jar izsetup.jar -file pack001.izsetup --silent
+CMM|########################################### 
+CMM|###########################################
+CMM|###########################################
+002|pack|Addons| 
+002|detectInstall|File://%userprofile%\appdata\programname\datei1.dat|
+002|description|Addons und sosntiges was nicht zwingend notwendig ist|
+002|packfile|#basedir#\addons.izsetup| 
+002|req|001|nummer des benötigten packs//kann weitere erfordernwenn
+002|msg|Installiere Addons| 
+002|exec|java -jar izsetup.jar -file addons.izsetup --silent| 
+CMM|########################################### 
+CMM|###########################################
+CMM|###########################################
+003|cond:1|IsWin7| 
+003|pack|Fehlendes Zeugs von XP| 
+003|detectInstall|File://C:\ornder2\datei2.bin
+003|description|Sach das bei XP defult war aber dort fehlt|
+003|packfile|#basedir#\xprecover.izsetup| 
+003|req|001| 
+003|msg|installiere fehlendes nach das bei XP dabei war
+003|exec|java -jar izsetup.jar -file xprevocer.izsetup --silent| 
+003|endcond:1| |
+004|pack|games| 
+004|waitDisk:Message|#basedir#\games.izsetup| 
+004|detectInstall|File://C:\Program Files\ImgBurn\ImgBurn.exexexe
+004|Description|Die Games die nicht fehlen dürfen
+004|packfile|#basedir#\games.izsetup
+004|req|001| 
+004|msg|installiere games| 
+004|exec|java -jar izsetup.jar -file games.izsetup --silent| 
+005|pack|game-Tools| 
+005|waitDisk|#basedir#\gamestls.izsetup| 
+005|detectInstall|File://C:\ornder3\datei3b.bin| 
+005|Description|Tools für die games aus dem Package| 
+005|packfile|#basedir#\gamestls.izsetup
+005|req|004|dependencys gehen über mehrere packs ->auch 001 notwendig 
+005|msg|installiere games-tools| 
+005|exec|java -jar izsetup.jar -file gamestls.izsetup --silent| 
+999|pack|NoExec| dieses Pack ist nur als Wrapper fr die Basta-Messge gedacht und wird nicht ausgeführt
+999|req|000|da 000 kein pack kann dieses nicht ausgewählt werden
+999|msg|Basta|namenlose gruppen werden automatsch ausgeführt
 999|exec||der installer beendet sich nicht bei wait am schluss

+ 26 - 26
IZSetup/templates/template.izsetup

@@ -1,27 +1,27 @@
-000|izsetup|1.0.0|Version (4 spalte=Kommentar)(posiNbr|type|Value|comment);Leere Felder brauchen ein LEerzeichen!
-000|type|script|dient nur zur unterscheidung von packagefiles
-000|||Dieser Bereich ist der Header (groupid 000 word vom Preprocessor immer verworfen und kann für Vermerke genutzt werden
-000|||Msg muss vorm exec stehen da sonst falsch gelinkt wird
-001|group|Group1|Gruppenname für GUI
-001|cond:1|IsWin8|Geht bis zum nächsten Exec,COnds können aufeinanderfolgen
-001|cond:2|Is64Bit|^
-001|msg|Wird übersprungen|gehört zum darauffolgenden Exec mit gleicher ID
-001|exec| | 
-001|elsecond:2| | 
-001|msg|Installiere was 32-bit spezifisches| 
-001|exec|ping localhost| 
-001|endcond:2| | 
-001|endcond:1| | 
-001|msg|Installing XXX| 
-001|exec|ping localhost| 
-002|rgrp|Runtimes|Beispiel fpr RequireExec-Gruppe
-002|msg|Führe XXX aus| 
-002|requireExec|ping localhost|RequireExec kann nicht ausgewählt werden da immer notwendig. Kann Durch COnds beeinflusst werden
-003|grp|nichtWin8|Testgruppe#3
-003|cond:1|IsWin8| 
-003|elsecond:1| | 
-003|msg|Nur für win7| 
-003|msg|ping localhost| 
-003|endcond:1| | 
-999|msg|Basta|namenlose gruppen werden automatsch ausgeführt
+000|izsetup|1.0.0|Version (4 spalte=Kommentar)(posiNbr|type|Value|comment);Leere Felder brauchen ein LEerzeichen!
+000|type|script|dient nur zur unterscheidung von packagefiles
+000|||Dieser Bereich ist der Header (groupid 000 word vom Preprocessor immer verworfen und kann für Vermerke genutzt werden
+000|||Msg muss vorm exec stehen da sonst falsch gelinkt wird
+001|group|Group1|Gruppenname für GUI
+001|cond:1|IsWin8|Geht bis zum nächsten Exec,COnds können aufeinanderfolgen
+001|cond:2|Is64Bit|^
+001|msg|Wird übersprungen|gehört zum darauffolgenden Exec mit gleicher ID
+001|exec| | 
+001|elsecond:2| | 
+001|msg|Installiere was 32-bit spezifisches| 
+001|exec|ping localhost| 
+001|endcond:2| | 
+001|endcond:1| | 
+001|msg|Installing XXX| 
+001|exec|ping localhost| 
+002|rgrp|Runtimes|Beispiel fpr RequireExec-Gruppe
+002|msg|Führe XXX aus| 
+002|requireExec|ping localhost|RequireExec kann nicht ausgewählt werden da immer notwendig. Kann Durch COnds beeinflusst werden
+003|grp|nichtWin8|Testgruppe#3
+003|cond:1|IsWin8| 
+003|elsecond:1| | 
+003|msg|Nur für win7| 
+003|msg|ping localhost| 
+003|endcond:1| | 
+999|msg|Basta|namenlose gruppen werden automatsch ausgeführt
 999|exec|wait|der installer beendet sich nicht bei wait am schluss

+ 59 - 59
IZSetup/templates/yaml.izpackage

@@ -1,59 +1,59 @@
-000|izsetup|3.0.0|: valides YAML und trotzdem kompatibel
-comment:type: izpackage
-flags:
-- multidisk
-comment:packagebases: |-
-  Namen der IDs der echten Packages die auch in der Liste auftauchen
-  Der Rest ist von diesen referenziert
-packagebases:
-- BaseSystem
-- Addons
-- XPTools
-- Games
-- Game-Tools
-BaseSystem:
-  Name: BaseSystem
-  script: '#basedir#\pack001.izsetup'
-  detectInstall: File://C:\kernel.etl2
-  desc: Die minimal nötigen Tools und Komponenten fürs System
-  defaultEnabled: 'true'
-Addons:
-  Name: AddOns
-  dependsOn: BaseSystem
-  script: '#basedir#\addons.izsetup'
-  detectInstall: File://%userprofile%\appdata\programname\datei1.dat
-  desc: Addons und sosntiges was nicht zwingend notwendig ist
-  defaultEnabled: 'true'
-XPTools:
-  Condition: IsWin7
-  Comment:Condition: Bei Erfüllt das Package aus If enablen, sonst das aus Else verwenden
-  ifnode: XPAddonsIf
-XPAddonsIf:
-  Name: XPAddOns
-  dependsOn: BaseSystem
-  script: '#basedir#\xprevocer.izsetup'
-  detectInstall: File://C:\ornder2\datei2.bin
-  desc: Sach das bei XP defult war aber dort fehlt
-  defaultEnabled: 'true'
-Games:
-  Name: Games
-  comment:waitDisk: |-
-    Prüft ob spezifizierte datei vorhanden ist und fordert zum einlegen der disk auf falls nicht
-     spezifisierte datei sollte nur auf der entsprechenden disk sein
-  waitDisk: '#basedir#\games.izsetup'
-  comment:waitMessage: WaitMessage ist optional, defaulted wenn nur waitDisk
-  waitMessage: Bitte Games-Disk einlegen
-  dependsOn: BaseSystem
-  script: '#basedir#\games.izsetup'
-  detectInstall: File://C:\Program Files\ImgBurn\ImgBurn.exexexe
-  desc: Die Games die nicht fehlen dürfen
-  defaultEnabled: 'true'
-Game-Tools:
-  Name: game-Tools
-  waitDisk: '#basedir#\gamestls.izsetup'
-  comment:dependsOn: Dependency geht zu games und zu den dependencys von games
-  dependsOn: Games
-  script: '#basedir#\gamestls.izsetup'
-  detectInstall: File://C:\Program Files\ImgBurn\ImgBurn.exexexe
-  desc: Tools für die games aus dem Package
-  defaultEnabled: 'true'
+000|izsetup|3.0.0|: valides YAML und trotzdem kompatibel
+comment:type: izpackage
+flags:
+- multidisk
+comment:packagebases: |-
+  Namen der IDs der echten Packages die auch in der Liste auftauchen
+  Der Rest ist von diesen referenziert
+packagebases:
+- BaseSystem
+- Addons
+- XPTools
+- Games
+- Game-Tools
+BaseSystem:
+  Name: BaseSystem
+  script: '#basedir#\pack001.izsetup'
+  detectInstall: File://C:\kernel.etl2
+  desc: Die minimal nötigen Tools und Komponenten fürs System
+  defaultEnabled: 'true'
+Addons:
+  Name: AddOns
+  dependsOn: BaseSystem
+  script: '#basedir#\addons.izsetup'
+  detectInstall: File://%userprofile%\appdata\programname\datei1.dat
+  desc: Addons und sosntiges was nicht zwingend notwendig ist
+  defaultEnabled: 'true'
+XPTools:
+  Condition: IsWin7
+  Comment:Condition: Bei Erfüllt das Package aus If enablen, sonst das aus Else verwenden
+  ifnode: XPAddonsIf
+XPAddonsIf:
+  Name: XPAddOns
+  dependsOn: BaseSystem
+  script: '#basedir#\xprevocer.izsetup'
+  detectInstall: File://C:\ornder2\datei2.bin
+  desc: Sach das bei XP defult war aber dort fehlt
+  defaultEnabled: 'true'
+Games:
+  Name: Games
+  comment:waitDisk: |-
+    Prüft ob spezifizierte datei vorhanden ist und fordert zum einlegen der disk auf falls nicht
+     spezifisierte datei sollte nur auf der entsprechenden disk sein
+  waitDisk: '#basedir#\games.izsetup'
+  comment:waitMessage: WaitMessage ist optional, defaulted wenn nur waitDisk
+  waitMessage: Bitte Games-Disk einlegen
+  dependsOn: BaseSystem
+  script: '#basedir#\games.izsetup'
+  detectInstall: File://C:\Program Files\ImgBurn\ImgBurn.exexexe
+  desc: Die Games die nicht fehlen dürfen
+  defaultEnabled: 'true'
+Game-Tools:
+  Name: game-Tools
+  waitDisk: '#basedir#\gamestls.izsetup'
+  comment:dependsOn: Dependency geht zu games und zu den dependencys von games
+  dependsOn: Games
+  script: '#basedir#\gamestls.izsetup'
+  detectInstall: File://C:\Program Files\ImgBurn\ImgBurn.exexexe
+  desc: Tools für die games aus dem Package
+  defaultEnabled: 'true'

+ 54 - 54
IZSetup/templates/yaml.izsetup

@@ -1,54 +1,54 @@
-000|izsetup|3.0.0|: valides YAML und trotzdem kompatibel
-# ^FIle signature. the number shows which version of the software is required as minimum
-comment:type: izsetup
-Segments:
-- Group1
-- Runtimes
-- nichtWin8
-Group1:
-  Condition:
-  - IsWin8
-  ifnode:
-  - Group1Win8
-  postCond:
-  - Group1Post
-Group1Win8_32:
-  Exec1:
-  - Installiere was 32-bit spezifisches
-  - program
-  - ping
-  - google.de
-  Comment:exec:
-  - Beschreibung
-  - Typ
-  - Parameter1
-  - '...'
-  - parameterN
-Group1Post:
-  Exec1:
-  - Group1Post
-  - program
-  - ping
-  - amazon.de
-Runtimes:
-  Exec1:
-  - Runtime1
-  - program
-  - ping
-  - ccc.de
-  Exec2:
-  - Runtime2
-  - program
-  - ping
-  - microsoft.de
-nichtWin8:
-  Condition:
-  - IsWin8
-  elsenode:
-  - nonwin8Impl
-nonwin8Impl:
-  Exec1:
-  - Nicht für wind00f 8
-  - program
-  - ping
-  - example.com
+000|izsetup|3.0.0|: valides YAML und trotzdem kompatibel
+# ^FIle signature. the number shows which version of the software is required as minimum
+comment:type: izsetup
+Segments:
+- Group1
+- Runtimes
+- nichtWin8
+Group1:
+  Condition:
+  - IsWin8
+  ifnode:
+  - Group1Win8
+  postCond:
+  - Group1Post
+Group1Win8_32:
+  Exec1:
+  - Installiere was 32-bit spezifisches
+  - program
+  - ping
+  - google.de
+  Comment:exec:
+  - Beschreibung
+  - Typ
+  - Parameter1
+  - '...'
+  - parameterN
+Group1Post:
+  Exec1:
+  - Group1Post
+  - program
+  - ping
+  - amazon.de
+Runtimes:
+  Exec1:
+  - Runtime1
+  - program
+  - ping
+  - ccc.de
+  Exec2:
+  - Runtime2
+  - program
+  - ping
+  - microsoft.de
+nichtWin8:
+  Condition:
+  - IsWin8
+  elsenode:
+  - nonwin8Impl
+nonwin8Impl:
+  Exec1:
+  - Nicht für wind00f 8
+  - program
+  - ping
+  - example.com

+ 111 - 111
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/GUI.java

@@ -1,111 +1,111 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame;
-
-/**
- *
- * @author LH
- */
-public class GUI extends javax.swing.JFrame
-{
-
-    /**
-     * Creates new form GUI
-     */
-    public GUI()
-    {
-        initComponents();
-    }
-
-    /**
-     * This method is called from within the constructor to
-     * initialize the form.
-     * WARNING: Do NOT modify this code. The content of this method is
-     * always regenerated by the Form Editor.
-     */
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents()
-    {
-
-        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
-
-        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
-        getContentPane().setLayout(layout);
-        layout.setHorizontalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 400, Short.MAX_VALUE)
-        );
-        layout.setVerticalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 300, Short.MAX_VALUE)
-        );
-
-        pack();
-    }// </editor-fold>//GEN-END:initComponents
-
-    /**
-     * @param args the command line arguments
-     */
-    public static void main(String args[])
-    {
-        /* Set the Nimbus look and feel */
-        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
-        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
-         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
-         */
-        try
-        {
-            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
-            {
-                if ("Nimbus".equals(info.getName()))
-                {
-                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
-                    break;
-                }
-            }
-        }
-        catch (ClassNotFoundException ex)
-        {
-            java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-        catch (InstantiationException ex)
-        {
-            java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-        catch (IllegalAccessException ex)
-        {
-            java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-        catch (javax.swing.UnsupportedLookAndFeelException ex)
-        {
-            java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-        //</editor-fold>
-
-        /* Create and display the form */
-        java.awt.EventQueue.invokeLater(new Runnable()
-        {
-            public void run()
-            {
-                new GUI().setVisible(true);
-            }
-        });
-    }
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    // End of variables declaration//GEN-END:variables
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame;
+
+/**
+ *
+ * @author LH
+ */
+public class GUI extends javax.swing.JFrame
+{
+
+    /**
+     * Creates new form GUI
+     */
+    public GUI()
+    {
+        initComponents();
+    }
+
+    /**
+     * This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents()
+    {
+
+        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
+        getContentPane().setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGap(0, 400, Short.MAX_VALUE)
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGap(0, 300, Short.MAX_VALUE)
+        );
+
+        pack();
+    }// </editor-fold>//GEN-END:initComponents
+
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String args[])
+    {
+        /* Set the Nimbus look and feel */
+        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
+        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
+         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
+         */
+        try
+        {
+            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
+            {
+                if ("Nimbus".equals(info.getName()))
+                {
+                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
+                    break;
+                }
+            }
+        }
+        catch (ClassNotFoundException ex)
+        {
+            java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        catch (InstantiationException ex)
+        {
+            java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        catch (IllegalAccessException ex)
+        {
+            java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        catch (javax.swing.UnsupportedLookAndFeelException ex)
+        {
+            java.util.logging.Logger.getLogger(GUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        //</editor-fold>
+
+        /* Create and display the form */
+        java.awt.EventQueue.invokeLater(new Runnable()
+        {
+            public void run()
+            {
+                new GUI().setVisible(true);
+            }
+        });
+    }
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    // End of variables declaration//GEN-END:variables
+}

+ 188 - 188
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/Level/Builders/LevelGenerations.java

@@ -1,188 +1,188 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame.Level.Builders;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import org.yaml.snakeyaml.Yaml;
-
-/**
- *
- * @author LH
- */
-public abstract class LevelGenerations
-{
-    public static List<LevelGenerations> levels = new ArrayList<>();
-    
-    //HashMap-Patterns für die gängigsten Stiegen und Gänge
-    
-    //eben_standard
-    
-    public static final Yaml d = new Yaml();
-    
-    
-    public static HashMap<Integer,boolean[]> P_EW = new HashMap<>(); // Eingänge und ausgänge
-    public static HashMap<Integer,boolean[]> P_NS = new HashMap<>(); // Eingänge und ausgänge
-    
-    public static HashMap<Integer,boolean[]> P_NE = new HashMap<>(); // Eingänge und ausgänge
-    public static HashMap<Integer,boolean[]> P_SE = new HashMap<>(); // Eingänge und ausgänge
-    public static HashMap<Integer,boolean[]> P_SW = new HashMap<>(); // Eingänge und ausgänge
-    public static HashMap<Integer,boolean[]> P_NW = new HashMap<>(); // Eingänge und ausgänge
-    
-    public static HashMap<Integer,boolean[]> P_NEW = new HashMap<>(); // Eingänge und ausgänge
-    public static HashMap<Integer,boolean[]> P_NSW = new HashMap<>(); // Eingänge und ausgänge
-    public static HashMap<Integer,boolean[]> P_ESW = new HashMap<>(); // Eingänge und ausgänge
-    public static HashMap<Integer,boolean[]> P_NES = new HashMap<>(); // Eingänge und ausgänge
-    
-    public static HashMap<Integer,boolean[]> P_ALL = new HashMap<>(); // Eingänge und ausgänge
-    public static HashMap<Integer,boolean[]> P_NUL = new HashMap<>(); // Eingänge und ausgänge
-    
-    
-        /**
-         * Toters ende nach norden offen
-         */
-    public static HashMap<Integer,boolean[]> DE_N = new HashMap<>(); // Eingänge und ausgänge
-    
-    /**
-     * Totes Ende nach Osten offen
-     */
-    public static HashMap<Integer,boolean[]> DE_E = new HashMap<>(); // Eingänge und ausgänge
-    
-    /**
-     * Totes Ende nach Süden offen
-     */
-    public static HashMap<Integer,boolean[]> DE_S = new HashMap<>(); // Eingänge und ausgänge
-    
-    
-    /**
-     * Totes ende nach Ersten offen
-     */
-    public static HashMap<Integer,boolean[]> DE_W = new HashMap<>(); // Eingänge und ausgänge
-    
-    
-    //Stiegen
-    //gerade
-    public static HashMap<Integer,boolean[]> S_NS = new HashMap<>(); // Eingänge und ausgänge
-    public static HashMap<Integer,boolean[]> S_EW = new HashMap<>(); // Eingänge und ausgänge
-    //anderstrum
-    public static HashMap<Integer,boolean[]> S_SN = new HashMap<>(); // Eingänge und ausgänge
-    public static HashMap<Integer,boolean[]> S_WE = new HashMap<>(); // Eingänge und ausgänge
-    //kurve
-    
-    
-    public static HashMap<Integer,boolean[]> S_NE = new HashMap<>(); // Eingänge und ausgänge
-    public static HashMap<Integer,boolean[]> S_SE = new HashMap<>(); // Eingänge und ausgänge
-    public static HashMap<Integer,boolean[]> S_SW = new HashMap<>(); // Eingänge und ausgänge
-    public static HashMap<Integer,boolean[]> S_NW = new HashMap<>(); // Eingänge und ausgänge
-    //anderstrum
-    public static HashMap<Integer,boolean[]> S_EN = new HashMap<>(); // Eingänge und ausgänge
-    public static HashMap<Integer,boolean[]> S_ES = new HashMap<>(); // Eingänge und ausgänge
-    public static HashMap<Integer,boolean[]> S_WS = new HashMap<>(); // Eingänge und ausgänge
-    public static HashMap<Integer,boolean[]> S_WN = new HashMap<>(); // Eingänge und ausgänge
-
-    
-   
-    
-    
-    static
-    {
-        P_EW.put(0, new boolean[]{false,true,false,true});
-        P_NS.put(0, new boolean[]{true,false,true,false});
-        
-        P_NE.put(0, new boolean[]{true,true,false,false});
-        P_SE.put(0, new boolean[]{false,true,true,false});
-        P_SW.put(0, new boolean[]{false,false,true,true});
-        P_NW.put(0, new boolean[]{true,false,false,true});
-        
-        P_NEW.put(0, new boolean[]{true,true,false,true});
-        P_NSW.put(0, new boolean[]{true,false,true,true});
-        P_ESW.put(0, new boolean[]{false,true,true,true});
-        P_NES.put(0, new boolean[]{true,true,false,false});
-         
-        P_ALL.put(0, new boolean[]{true,true,true,true});
-        P_NUL.put(0, new boolean[]{false,false,false,false});
-        
-        
-        
-
-        DE_N.put(0, new boolean[]{true,false,false,false});
-        DE_E.put(0, new boolean[]{false,true,false,false});
-        DE_S.put(0, new boolean[]{false,false,true,false});
-        DE_W.put(0, new boolean[]{false,false,false,true});
-        
-        //stiegen
-        
-        S_NS.put(0, new boolean[]{true,false,false,false});
-        S_NS.put(1, new boolean[]{false,false,true,false});
-        
-        S_SN.put(1, new boolean[]{true,false,false,false});
-        S_SN.put(0, new boolean[]{false,false,true,false});
-        
-        
-        S_EW.put(0, new boolean[]{false,true,false,false});
-        S_EW.put(1, new boolean[]{false,false,false,true});
-        
-        S_WE.put(1, new boolean[]{false,false,false,true});
-        S_WE.put(0, new boolean[]{false,true,false,false});
-        
-        
-        
-        
-        
-        S_NE.put(0, new boolean[]{true,false,false,false});
-        S_NE.put(1, new boolean[]{false,true,false,false});
-        
-        S_EN.put(0, new boolean[]{false,true,false,false});
-        S_EN.put(1, new boolean[]{true,false,false,false});
-        
-        S_SE.put(0, new boolean[]{false,false,true,false});
-        S_SE.put(1, new boolean[]{false,true,false,false});
-        
-        S_ES.put(0, new boolean[]{false,true,false,false});
-        S_ES.put(1, new boolean[]{false,false,true,false});
-        
-        
-                
-        S_SW.put(0, new boolean[]{false,false,true,false});
-        S_SW.put(1, new boolean[]{false,false,false,true});
-        
-        S_WS.put(0, new boolean[]{false,false,false,true});
-        S_WS.put(1, new boolean[]{false,false,true,false});
-        
-        
-        S_NW.put(0, new boolean[]{true,false,false,false});
-        S_NW.put(1, new boolean[]{false,false,false,true});
-        
-        S_WN.put(0, new boolean[]{false,false,false,true});
-        S_WN.put(1, new boolean[]{true,false,false,false});
-        
-        
-        
-        
-    }
-    
-    
-    
-    /**
-     * Erzeugt die YAML-dateien für die Chunks damit diese vom game selber gelesen werden können;
-     */
-    public abstract void export();
-    
-    
-    
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame.Level.Builders;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import org.yaml.snakeyaml.Yaml;
+
+/**
+ *
+ * @author LH
+ */
+public abstract class LevelGenerations
+{
+    public static List<LevelGenerations> levels = new ArrayList<>();
+    
+    //HashMap-Patterns für die gängigsten Stiegen und Gänge
+    
+    //eben_standard
+    
+    public static final Yaml d = new Yaml();
+    
+    
+    public static HashMap<Integer,boolean[]> P_EW = new HashMap<>(); // Eingänge und ausgänge
+    public static HashMap<Integer,boolean[]> P_NS = new HashMap<>(); // Eingänge und ausgänge
+    
+    public static HashMap<Integer,boolean[]> P_NE = new HashMap<>(); // Eingänge und ausgänge
+    public static HashMap<Integer,boolean[]> P_SE = new HashMap<>(); // Eingänge und ausgänge
+    public static HashMap<Integer,boolean[]> P_SW = new HashMap<>(); // Eingänge und ausgänge
+    public static HashMap<Integer,boolean[]> P_NW = new HashMap<>(); // Eingänge und ausgänge
+    
+    public static HashMap<Integer,boolean[]> P_NEW = new HashMap<>(); // Eingänge und ausgänge
+    public static HashMap<Integer,boolean[]> P_NSW = new HashMap<>(); // Eingänge und ausgänge
+    public static HashMap<Integer,boolean[]> P_ESW = new HashMap<>(); // Eingänge und ausgänge
+    public static HashMap<Integer,boolean[]> P_NES = new HashMap<>(); // Eingänge und ausgänge
+    
+    public static HashMap<Integer,boolean[]> P_ALL = new HashMap<>(); // Eingänge und ausgänge
+    public static HashMap<Integer,boolean[]> P_NUL = new HashMap<>(); // Eingänge und ausgänge
+    
+    
+        /**
+         * Toters ende nach norden offen
+         */
+    public static HashMap<Integer,boolean[]> DE_N = new HashMap<>(); // Eingänge und ausgänge
+    
+    /**
+     * Totes Ende nach Osten offen
+     */
+    public static HashMap<Integer,boolean[]> DE_E = new HashMap<>(); // Eingänge und ausgänge
+    
+    /**
+     * Totes Ende nach Süden offen
+     */
+    public static HashMap<Integer,boolean[]> DE_S = new HashMap<>(); // Eingänge und ausgänge
+    
+    
+    /**
+     * Totes ende nach Ersten offen
+     */
+    public static HashMap<Integer,boolean[]> DE_W = new HashMap<>(); // Eingänge und ausgänge
+    
+    
+    //Stiegen
+    //gerade
+    public static HashMap<Integer,boolean[]> S_NS = new HashMap<>(); // Eingänge und ausgänge
+    public static HashMap<Integer,boolean[]> S_EW = new HashMap<>(); // Eingänge und ausgänge
+    //anderstrum
+    public static HashMap<Integer,boolean[]> S_SN = new HashMap<>(); // Eingänge und ausgänge
+    public static HashMap<Integer,boolean[]> S_WE = new HashMap<>(); // Eingänge und ausgänge
+    //kurve
+    
+    
+    public static HashMap<Integer,boolean[]> S_NE = new HashMap<>(); // Eingänge und ausgänge
+    public static HashMap<Integer,boolean[]> S_SE = new HashMap<>(); // Eingänge und ausgänge
+    public static HashMap<Integer,boolean[]> S_SW = new HashMap<>(); // Eingänge und ausgänge
+    public static HashMap<Integer,boolean[]> S_NW = new HashMap<>(); // Eingänge und ausgänge
+    //anderstrum
+    public static HashMap<Integer,boolean[]> S_EN = new HashMap<>(); // Eingänge und ausgänge
+    public static HashMap<Integer,boolean[]> S_ES = new HashMap<>(); // Eingänge und ausgänge
+    public static HashMap<Integer,boolean[]> S_WS = new HashMap<>(); // Eingänge und ausgänge
+    public static HashMap<Integer,boolean[]> S_WN = new HashMap<>(); // Eingänge und ausgänge
+
+    
+   
+    
+    
+    static
+    {
+        P_EW.put(0, new boolean[]{false,true,false,true});
+        P_NS.put(0, new boolean[]{true,false,true,false});
+        
+        P_NE.put(0, new boolean[]{true,true,false,false});
+        P_SE.put(0, new boolean[]{false,true,true,false});
+        P_SW.put(0, new boolean[]{false,false,true,true});
+        P_NW.put(0, new boolean[]{true,false,false,true});
+        
+        P_NEW.put(0, new boolean[]{true,true,false,true});
+        P_NSW.put(0, new boolean[]{true,false,true,true});
+        P_ESW.put(0, new boolean[]{false,true,true,true});
+        P_NES.put(0, new boolean[]{true,true,false,false});
+         
+        P_ALL.put(0, new boolean[]{true,true,true,true});
+        P_NUL.put(0, new boolean[]{false,false,false,false});
+        
+        
+        
+
+        DE_N.put(0, new boolean[]{true,false,false,false});
+        DE_E.put(0, new boolean[]{false,true,false,false});
+        DE_S.put(0, new boolean[]{false,false,true,false});
+        DE_W.put(0, new boolean[]{false,false,false,true});
+        
+        //stiegen
+        
+        S_NS.put(0, new boolean[]{true,false,false,false});
+        S_NS.put(1, new boolean[]{false,false,true,false});
+        
+        S_SN.put(1, new boolean[]{true,false,false,false});
+        S_SN.put(0, new boolean[]{false,false,true,false});
+        
+        
+        S_EW.put(0, new boolean[]{false,true,false,false});
+        S_EW.put(1, new boolean[]{false,false,false,true});
+        
+        S_WE.put(1, new boolean[]{false,false,false,true});
+        S_WE.put(0, new boolean[]{false,true,false,false});
+        
+        
+        
+        
+        
+        S_NE.put(0, new boolean[]{true,false,false,false});
+        S_NE.put(1, new boolean[]{false,true,false,false});
+        
+        S_EN.put(0, new boolean[]{false,true,false,false});
+        S_EN.put(1, new boolean[]{true,false,false,false});
+        
+        S_SE.put(0, new boolean[]{false,false,true,false});
+        S_SE.put(1, new boolean[]{false,true,false,false});
+        
+        S_ES.put(0, new boolean[]{false,true,false,false});
+        S_ES.put(1, new boolean[]{false,false,true,false});
+        
+        
+                
+        S_SW.put(0, new boolean[]{false,false,true,false});
+        S_SW.put(1, new boolean[]{false,false,false,true});
+        
+        S_WS.put(0, new boolean[]{false,false,false,true});
+        S_WS.put(1, new boolean[]{false,false,true,false});
+        
+        
+        S_NW.put(0, new boolean[]{true,false,false,false});
+        S_NW.put(1, new boolean[]{false,false,false,true});
+        
+        S_WN.put(0, new boolean[]{false,false,false,true});
+        S_WN.put(1, new boolean[]{true,false,false,false});
+        
+        
+        
+        
+    }
+    
+    
+    
+    /**
+     * Erzeugt die YAML-dateien für die Chunks damit diese vom game selber gelesen werden können;
+     */
+    public abstract void export();
+    
+    
+    
+}

+ 415 - 415
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/Level/Builders/StartArea_part1_sheet1F.java

@@ -1,415 +1,415 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame.Level.Builders;
-
-import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.DE_E;
-import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_ESW;
-import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_EW;
-import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_NE;
-import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_NES;
-import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_NEW;
-import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_NS;
-import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_NW;
-import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_SE;
-import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_SW;
-import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.S_WE;
-import de.nplusc.iZc.MazeGame.Level.Chunk;
-import de.nplusc.iZc.MazeGame.Level.StandardChunk;
-import de.nplusc.iZc.MazeGame.cells.BasicCell;
-import de.nplusc.iZc.MazeGame.cells.KeyCell;
-import de.nplusc.iZc.MazeGame.cells.MazeCell;
-import de.nplusc.iZc.MazeGame.cells.NoteCell;
-import de.nplusc.izc.tools.IOtools.FileTK;
-import java.util.HashMap;
-
-/**
- *
- * @author LH
- */
-public class StartArea_part1_sheet1F extends LevelGenerations
-{
-    
-    
-    public void export()
-    {
-        Chunk c = new StandardChunk();
-        MazeCell[][][] mc = c.getChunkField();
-        //42 breit
-        //58 hoch mit unkomplettem karo
-        c.setXsize(Chunk.A4_SHEET_5mm_width);
-        c.setYsize(Chunk.A4_SHEET_5mm_height);
-        mc = new MazeCell[Chunk.A4_SHEET_5mm_width][Chunk.A4_SHEET_5mm_height][150];
-        
-        //starte Cells#
-                int row=0;
-            //reihe 1
-                mc[row][16][0] = new NoteCell();
-                mc[row][17][0] = new NoteCell(); //29739
-                mc[row][29][0] = new NoteCell(); //29739
-                mc[row][30][0] = new NoteCell(); //29739
-                mc[row][31][0] = new NoteCell(); //29739
-                mc[row][32][0] = new NoteCell(); //29739
-                mc[row][33][0] = new NoteCell(); //29739
-                mc[row][34][0] = new NoteCell(); //29739
-                mc[row][35][0] = new NoteCell(); //29739
-                mc[row][36][0] = new NoteCell(); //29739
-                mc[row][37][0] = new NoteCell(); //29739
-                mc[row][38][0] = new NoteCell(); //29739
-                mc[row][39][0] = new NoteCell(); //29739
-                row++;
-            //reihe2
-                mc[row][16][0] = new NoteCell();
-                mc[row][17][0] = new NoteCell(); //29739
-                mc[row][29][0] = new NoteCell(); //29739
-                mc[row][30][0] = new NoteCell(); //29739
-                mc[row][31][0] = new NoteCell(); //29739
-                mc[row][32][0] = new NoteCell(); //29739
-                mc[row][33][0] = new NoteCell(); //29739
-                mc[row][34][0] = new NoteCell(); //29739
-                mc[row][35][0] = new NoteCell(); //29739
-                mc[row][36][0] = new NoteCell(); //29739
-                mc[row][37][0] = new NoteCell(); //29739
-                mc[row][38][0] = new NoteCell(); //29739
-                mc[row][39][0] = new NoteCell(); //29739
-                row++;
-            //reihe3
-                
-                mc[row][0][0] = new NoteCell();
-                mc[row][1][0] = new NoteCell();
-                mc[row][2][0] = new NoteCell();
-                mc[row][3][0] = new NoteCell();
-                mc[row][4][0] = new NoteCell();
-                mc[row][5][0] = new NoteCell();
-                mc[row][6][0] = new NoteCell();
-                mc[row][7][0] = new NoteCell();
-                mc[row][8][0] = new NoteCell();
-                mc[row][9][0] = new NoteCell();
-                mc[row][10][0] = new NoteCell();
-                mc[row][11][0] = new NoteCell();
-                mc[row][12][0] = new NoteCell();
-                mc[row][13][0] = new NoteCell();
-                mc[row][14][0] = new NoteCell();
-                mc[row][15][0] = new NoteCell();
-                mc[row][16][0] = new NoteCell();
-                mc[row][17][0] = new NoteCell(); //29739
-                mc[row][29][0] = new NoteCell(); //29739
-                mc[row][30][0] = new NoteCell(); //29739
-                mc[row][31][0] = new NoteCell(); //29739
-                mc[row][32][0] = new NoteCell(); //29739
-                mc[row][33][0] = new NoteCell(); //29739
-                mc[row][34][0] = new NoteCell(); //29739
-                mc[row][35][0] = new NoteCell(); //29739
-                mc[row][36][0] = new NoteCell(); //29739
-                mc[row][37][0] = new NoteCell(); //29739
-                mc[row][38][0] = new NoteCell(); //29739
-                mc[row][39][0] = new NoteCell(); //29739
-                row++;
-            //reihe4
-                mc[row][0][0] = new NoteCell();
-                mc[row][1][0] = new NoteCell();
-                mc[row][2][0] = new NoteCell();
-                mc[row][3][0] = new NoteCell();
-                mc[row][4][0] = new NoteCell();
-                mc[row][5][0] = new NoteCell();
-                mc[row][6][0] = new NoteCell();
-                mc[row][7][0] = new NoteCell();
-                mc[row][8][0] = new NoteCell();
-                mc[row][9][0] = new NoteCell();
-                mc[row][10][0] = new NoteCell();
-                mc[row][11][0] = new NoteCell();
-                mc[row][12][0] = new NoteCell();
-                mc[row][13][0] = new NoteCell();
-                mc[row][14][0] = new NoteCell();
-                mc[row][15][0] = new NoteCell();
-                mc[row][16][0] = new NoteCell();
-                mc[row][17][0] = new NoteCell(); //29739
-                mc[row][29][0] = new NoteCell(); //29739
-                mc[row][30][0] = new NoteCell(); //29739
-                mc[row][31][0] = new NoteCell(); //29739
-                mc[row][32][0] = new NoteCell(); //29739
-                mc[row][33][0] = new NoteCell(); //29739
-                mc[row][34][0] = new NoteCell(); //29739
-                mc[row][35][0] = new NoteCell(); //29739
-                mc[row][36][0] = new NoteCell(); //29739
-                mc[row][37][0] = new NoteCell(); //29739
-                mc[row][38][0] = new NoteCell(); //29739
-                mc[row][39][0] = new NoteCell(); //29739
-                row++;
-             //reihe5
-                mc[row][0][0] = new NoteCell();
-                mc[row][1][0] = new NoteCell();
-                mc[row][2][0] = new NoteCell();
-                mc[row][3][0] = new NoteCell();
-                mc[row][4][0] = new NoteCell();
-                mc[row][5][0] = new NoteCell();
-                mc[row][6][0] = new NoteCell();
-                mc[row][7][0] = new NoteCell();
-                mc[row][8][0] = new NoteCell();
-                mc[row][9][0] = new NoteCell();
-                mc[row][10][0] = new NoteCell();
-                mc[row][11][0] = new NoteCell();
-                mc[row][12][0] = new NoteCell();
-                mc[row][13][0] = new NoteCell();
-                mc[row][14][0] = new NoteCell();
-                mc[row][15][0] = new NoteCell();
-                mc[row][16][0] = new NoteCell();
-                
-                
-                mc[row][17][50] = new BasicCell(P_SE,P_SE,50,1);
-                mc[row][18][50] = new BasicCell(P_SW,P_SW,50,1);
-                mc[row][19][50] = new BasicCell(P_SE,P_SE,50,1);
-                mc[row][20][50] = new BasicCell(P_SW,P_SW,50,1);
-                mc[row][21][50] = new BasicCell(P_SE,P_SE,50,1);
-                mc[row][22][50] = new BasicCell(P_SW,P_SW,50,1);
-                mc[row][23][50] = new BasicCell(P_SE,P_SE,50,1);
-                mc[row][23][50] = new BasicCell(P_EW,P_EW,50,1);     
-                mc[row][23][50] = new BasicCell(P_EW,P_EW,50,1);
-                mc[row][22][50] = new BasicCell(P_SW,P_SW,50,1);
-                
-                mc[row][29][0] = new NoteCell(); //29739
-                mc[row][30][0] = new NoteCell(); //29739
-                mc[row][31][0] = new NoteCell(); //29739
-                mc[row][32][0] = new NoteCell(); //29739
-                mc[row][33][0] = new NoteCell(); //29739
-                mc[row][34][0] = new NoteCell(); //29739
-                mc[row][35][0] = new NoteCell(); //29739
-                mc[row][36][0] = new NoteCell(); //29739
-                mc[row][37][0] = new NoteCell(); //29739
-                mc[row][38][0] = new NoteCell(); //29739
-                mc[row][39][0] = new NoteCell(); //29739
-                row++;
-            //Reiihe 6
-                
-                mc[row][0][0] = new NoteCell();
-                mc[row][1][0] = new NoteCell();
-                mc[row][2][0] = new NoteCell();
-                mc[row][3][0] = new NoteCell();
-                mc[row][4][0] = new NoteCell();
-                mc[row][5][0] = new NoteCell();
-                mc[row][6][0] = new NoteCell();
-                mc[row][7][0] = new NoteCell();
-                mc[row][8][0] = new NoteCell();
-                mc[row][9][0] = new NoteCell();
-                mc[row][10][0] = new NoteCell();
-                mc[row][11][0] = new NoteCell();
-                mc[row][12][0] = new NoteCell();
-                mc[row][13][0] = new NoteCell();
-                mc[row][14][0] = new NoteCell();
-                mc[row][15][0] = new NoteCell();
-                mc[row][16][0] = new NoteCell();
-                
-                mc[row][17][50] = new BasicCell(P_NS,P_NS,50,1);
-                mc[row][18][50] = new BasicCell(P_NS,P_NS,50,1);
-                mc[row][19][50] = new BasicCell(P_NS,P_NS,50,1);
-                mc[row][20][50] = new BasicCell(P_NS,P_NS,50,1);
-                mc[row][21][50] = new BasicCell(P_NS,P_NS,50,1);
-                mc[row][22][50] = new BasicCell(P_NS,P_NS,50,1);
-                mc[row][23][50] = new BasicCell(P_NS,P_NS,50,1);
-                
-                
-                mc[row][24][50] = new BasicCell(P_SE,P_SE,50,1);     
-                mc[row][25][50] = new BasicCell(P_EW,P_EW,50,1);
-                mc[row][26][50] = new BasicCell(P_NW,P_NW,50,1);
-                
-                mc[row][26][50] = new BasicCell(P_SE,P_SE,50,1);
-                mc[row][26][50] = new BasicCell(P_SW,P_SW,50,1);
-                mc[row][26][50] = new BasicCell(P_SE,P_SE,50,1);
-                mc[row][26][50] = new BasicCell(P_EW,P_EW,50,1);
-                mc[row][26][50] = new BasicCell(P_SW,P_SW,50,1);
-                
-                
-                
-                mc[row][32][0] = new NoteCell(); //29739
-                mc[row][33][0] = new NoteCell(); //29739
-                mc[row][34][0] = new NoteCell(); //29739
-                mc[row][35][0] = new NoteCell(); //29739
-                mc[row][36][0] = new NoteCell(); //29739
-                mc[row][37][0] = new NoteCell(); //29739
-                mc[row][38][0] = new NoteCell(); //29739
-                mc[row][39][0] = new NoteCell(); //29739
-                
-                row++;
-            //reihe 7
-                
-                mc[row][0][0] = new NoteCell();
-                mc[row][1][0] = new NoteCell();
-                mc[row][2][0] = new NoteCell();
-                mc[row][3][0] = new NoteCell();
-                mc[row][4][0] = new NoteCell();
-                mc[row][5][0] = new NoteCell();
-                mc[row][6][0] = new NoteCell();
-                mc[row][7][0] = new NoteCell();
-                mc[row][8][0] = new NoteCell();
-                mc[row][9][0] = new NoteCell();
-                mc[row][10][0] = new NoteCell();
-                mc[row][11][0] = new NoteCell();
-                mc[row][12][0] = new NoteCell();
-                mc[row][13][0] = new NoteCell();
-                mc[row][14][0] = new NoteCell();
-                mc[row][15][0] = new NoteCell();
-                mc[row][16][0] = new NoteCell();
-                
-                mc[row][17][50] = new BasicCell(P_NS,P_NS,50,1);
-                mc[row][18][50] = new BasicCell(P_NE,P_NE,50,1);
-                mc[row][19][50] = new BasicCell(P_NW,P_NW,50,1);
-                mc[row][20][50] = new BasicCell(P_NE,P_NE,50,1);
-                mc[row][21][50] = new BasicCell(P_NW,P_NW,50,1);
-                mc[row][22][50] = new BasicCell(P_NE,P_NE,50,1);
-                mc[row][23][50] = new BasicCell(P_NW,P_NW,50,1);
-                
-                
-                mc[row][24][50] = new BasicCell(P_NE,P_NE,50,1);     
-                mc[row][25][50] = new BasicCell(P_EW,P_EW,50,1);
-                mc[row][26][50] = new BasicCell(P_SW,P_SW,50,1);
-                
-                mc[row][27][50] = new BasicCell(P_NS,P_NS,50,1);
-                mc[row][28][50] = new BasicCell(P_NE,P_NE,50,1);
-                mc[row][29][50] = new BasicCell(P_NW,P_NW,50,1);
-                mc[row][30][50] = new BasicCell(P_SE,P_SE,50,1);
-                mc[row][31][50] = new BasicCell(P_NW,P_NW,50,1);
-                
-                
-                
-                mc[row][32][0] = new NoteCell(); 
-                mc[row][33][0] = new NoteCell(); 
-                mc[row][34][0] = new NoteCell(); 
-                mc[row][35][0] = new NoteCell(); 
-                mc[row][36][0] = new NoteCell(); 
-                mc[row][37][0] = new NoteCell(); 
-                mc[row][38][0] = new NoteCell(); 
-                mc[row][39][0] = new NoteCell(); 
-                row++;
-                
-                
-            //reihe 8 //sollte nen error schmeissen //ersetze negative layers durch die richtigen wenn rausgefunden //gimp hilft da :P ( mit histogramm rechts einrücken karo entfernen; dann farbfüller)
-                mc[row][1][103] =new BasicCell(P_SE,103,1);
-                mc[row][2][103] =new BasicCell(P_EW,103,1);
-                mc[row][3][103] =new BasicCell(P_EW,103,1);
-                mc[row][4][103] =new BasicCell(P_SW,103,1);
-                
-                mc[row][5][50] =new BasicCell(P_SE,DE_E,50,1); //Einbahnstraße von süden kommend
-                mc[row][6][50] =new BasicCell(P_EW,DE_E,50,1);  //Einbahnstraße west>ost
-                mc[row][7][50] =new BasicCell(P_SW,50,1);  
-                mc[row][8][73] =new BasicCell(P_SE,73,1);
-                mc[row][9][73] =new BasicCell(P_EW,73,1);
-                mc[row][10][73] =new BasicCell(P_EW,73,1);
-                mc[row][11][73] =new BasicCell(P_EW,73,1);
-                mc[row][12][73] =new BasicCell(P_EW,73,1);
-                mc[row][13][73] =new BasicCell(P_EW,73,1);
-                mc[row][14][73] =new BasicCell(P_EW,73,1);
-                mc[row][15][73] =new BasicCell(P_EW,73,1);
-                mc[row][16][73] =new BasicCell(P_SW,73,1);
-                mc[row][17][50] =new BasicCell(P_NE,50,1);
-                mc[row][18][50] =new BasicCell(P_SW,50,1);
-                mc[row][19][50] =new BasicCell(P_SE,50,1);
-                mc[row][20][50] =new BasicCell(P_EW,50,1);
-                mc[row][21][50] =new BasicCell(P_EW,50,1);
-                mc[row][22][50] =new BasicCell(P_EW,50,1);
-                mc[row][23][50] =new BasicCell(P_EW,50,1);
-                mc[row][24][50] =new BasicCell(P_EW,50,1);
-                mc[row][25][50] =new BasicCell(P_ESW,50,1);
-                mc[row][26][50] =new BasicCell(P_NSW,50,1);
-                mc[row][27][50] =new BasicCell(P_NE,50,1);
-                
-                //*better icomapred to hardware stuff
-                
-                mc[row][28][50] =new BasicCell(P_EW,50,1);
-                mc[row][29][50] =new BasicCell(P_SW,50,1);
-                mc[row][30][50] =new BasicCell(P_NE,50,1);
-                mc[row][31][50] =new BasicCell(P_ESW,50,1);
-                mc[row][32][50] =new BasicCell(P_EW,50,1);
-                mc[row][33][50] =new BasicCell(P_EW,50,1);
-                mc[row][34][50] =new BasicCell(P_SW,50,1);
-                mc[row][35][50] =new BasicCell(P_SE,50,1);
-                mc[row][36][50] =new BasicCell(P_SW,50,1);
-                
-                row++;
-                
-                //reihe 9
-                
-                mc[row][1][103] =new BasicCell(P_NES,103,1);
-                mc[row][2][103] =new BasicCell(S_WE,103,2);
-                mc[row][3][104] =new KeyCell("K1",DE_E,104);
-                mc[row][4][103] =new BasicCell(P_NS,103,1);
-                mc[row][5][50] =new BasicCell(P_NES,50,1);
-                mc[row][6][50] =new BasicCell(P_SW,50,1);
-                mc[row][7][50] =new BasicCell(P_NS,50,1);
-                mc[row][8][73] =new BasicCell(P_NS,73,1);
-                mc[row][9][73] =new BasicCell(P_SE,73,1);
-                mc[row][10][73] =new BasicCell(P_EW,73,1);
-                
-                mc[row][11][73] =new BasicCell(P_EW,73,1);
-                mc[row][12][73] =new BasicCell(P_EW,73,1);
-                mc[row][13][73] =new BasicCell(P_SW,73,1);
-                mc[row][14][50] =new BasicCell(P_SE,50,1);
-                mc[row][15][50] =new BasicCell(P_EW,50,1);
-                mc[row][16][50] =new BasicCell(P_NW,50,1);
-                mc[row][17][50] =new BasicCell(P_SE,50,1);
-                mc[row][18][50] =new BasicCell(P_NW,50,1);
-                mc[row][19][50] =new BasicCell(P_NS,50,1);
-                mc[row][20][50] =new BasicCell(P_SE,50,1);
-                
-                mc[row][21][50] =new BasicCell(P_EW,50,1);
-                mc[row][22][50] =new BasicCell(P_EW,50,1);
-                mc[row][23][50] =new BasicCell(P_EW,50,1);
-                mc[row][24][50] =new BasicCell(P_ESW,50,1);
-                mc[row][25][50] =new BasicCell(P_NW,50,1);
-                mc[row][26][50] =new BasicCell(P_NES,50,1);
-                mc[row][27][50] =new BasicCell(P_ESW,50,1);
-                mc[row][28][50] =new BasicCell(P_EW,50,1);
-                mc[row][29][50] =new BasicCell(P_NEW,50,1);
-                mc[row][30][50] =new BasicCell(DE_W,50,1);
-                
-                mc[row][31][50] =new BasicCell(P_NE,50,1);
-                mc[row][32][50] =new BasicCell(P_SW,50,1);
-                mc[row][33][50] =new BasicCell(P_SE,50,1);
-                mc[row][34][50] =new BasicCell(P_NW,50,1);
-                mc[row][35][50] =new BasicCell(P_NS,50,1);
-                mc[row][36][50] =new BasicCell(P_NES,50,1);
-                mc[row][37][50] =new BasicCell(P_EW,50,1);
-                mc[row][38][50] =new BasicCell(P_EW,DE_W,50,1);//einbahnstraße Wsst<ost //GO!
-                mc[row][39][50] =new BasicCell(P_EW,50,1);
-                mc[row][40][50] =new BasicCell(P_EW,50,1);//STARTZONE
-                row++;
-                
-                
-                //reihe 10
-                mc[row][1][103] =new BasicCell(P_NES,103,1);
-                mc[row][2][103] =new BasicCell(P_EW,103,1);
-                mc[row][3][103] =new BasicCell(P_EW,103,1);
-                mc[row][4][103] =new BasicCell(P_NW,103,1);
-                mc[row][5][50] =new BasicCell(P_EW,50,1);
-                mc[row][6][50] =new BasicCell(P_NS,DE_S,50,1);//Einbahn Nord>Süd
-                mc[row][7][50] =new BasicCell(P_NS,50,1);
-                mc[row][8][50] =new BasicCell(P_EW,73,1);
-                mc[row][9][50] =new BasicCell(P_EW,73,1);
-                mc[row][10][50] =new BasicCell(P_EW,73,1);
-                
-                mc[row][10][50] =new BasicCell(P_EW,50,1);
-                
-                
-                
-                //export into a file; //change that to a lzmafile later to save bitsnbytes
-                c.setChunkField(mc);
-                String tmp = d.dump(c);
-                
-                FileTK.writeFile(tmp, "D:\\src\\mazeviewer\\dump.yml");
-                // Chunk c2 = (Chunk)d.load(tmp);
-               
-                
-    }
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame.Level.Builders;
+
+import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.DE_E;
+import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_ESW;
+import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_EW;
+import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_NE;
+import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_NES;
+import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_NEW;
+import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_NS;
+import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_NW;
+import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_SE;
+import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.P_SW;
+import static de.nplusc.iZc.MazeGame.Level.Builders.LevelGenerations.S_WE;
+import de.nplusc.iZc.MazeGame.Level.Chunk;
+import de.nplusc.iZc.MazeGame.Level.StandardChunk;
+import de.nplusc.iZc.MazeGame.cells.BasicCell;
+import de.nplusc.iZc.MazeGame.cells.KeyCell;
+import de.nplusc.iZc.MazeGame.cells.MazeCell;
+import de.nplusc.iZc.MazeGame.cells.NoteCell;
+import de.nplusc.izc.tools.IOtools.FileTK;
+import java.util.HashMap;
+
+/**
+ *
+ * @author LH
+ */
+public class StartArea_part1_sheet1F extends LevelGenerations
+{
+    
+    
+    public void export()
+    {
+        Chunk c = new StandardChunk();
+        MazeCell[][][] mc = c.getChunkField();
+        //42 breit
+        //58 hoch mit unkomplettem karo
+        c.setXsize(Chunk.A4_SHEET_5mm_width);
+        c.setYsize(Chunk.A4_SHEET_5mm_height);
+        mc = new MazeCell[Chunk.A4_SHEET_5mm_width][Chunk.A4_SHEET_5mm_height][150];
+        
+        //starte Cells#
+                int row=0;
+            //reihe 1
+                mc[row][16][0] = new NoteCell();
+                mc[row][17][0] = new NoteCell(); //29739
+                mc[row][29][0] = new NoteCell(); //29739
+                mc[row][30][0] = new NoteCell(); //29739
+                mc[row][31][0] = new NoteCell(); //29739
+                mc[row][32][0] = new NoteCell(); //29739
+                mc[row][33][0] = new NoteCell(); //29739
+                mc[row][34][0] = new NoteCell(); //29739
+                mc[row][35][0] = new NoteCell(); //29739
+                mc[row][36][0] = new NoteCell(); //29739
+                mc[row][37][0] = new NoteCell(); //29739
+                mc[row][38][0] = new NoteCell(); //29739
+                mc[row][39][0] = new NoteCell(); //29739
+                row++;
+            //reihe2
+                mc[row][16][0] = new NoteCell();
+                mc[row][17][0] = new NoteCell(); //29739
+                mc[row][29][0] = new NoteCell(); //29739
+                mc[row][30][0] = new NoteCell(); //29739
+                mc[row][31][0] = new NoteCell(); //29739
+                mc[row][32][0] = new NoteCell(); //29739
+                mc[row][33][0] = new NoteCell(); //29739
+                mc[row][34][0] = new NoteCell(); //29739
+                mc[row][35][0] = new NoteCell(); //29739
+                mc[row][36][0] = new NoteCell(); //29739
+                mc[row][37][0] = new NoteCell(); //29739
+                mc[row][38][0] = new NoteCell(); //29739
+                mc[row][39][0] = new NoteCell(); //29739
+                row++;
+            //reihe3
+                
+                mc[row][0][0] = new NoteCell();
+                mc[row][1][0] = new NoteCell();
+                mc[row][2][0] = new NoteCell();
+                mc[row][3][0] = new NoteCell();
+                mc[row][4][0] = new NoteCell();
+                mc[row][5][0] = new NoteCell();
+                mc[row][6][0] = new NoteCell();
+                mc[row][7][0] = new NoteCell();
+                mc[row][8][0] = new NoteCell();
+                mc[row][9][0] = new NoteCell();
+                mc[row][10][0] = new NoteCell();
+                mc[row][11][0] = new NoteCell();
+                mc[row][12][0] = new NoteCell();
+                mc[row][13][0] = new NoteCell();
+                mc[row][14][0] = new NoteCell();
+                mc[row][15][0] = new NoteCell();
+                mc[row][16][0] = new NoteCell();
+                mc[row][17][0] = new NoteCell(); //29739
+                mc[row][29][0] = new NoteCell(); //29739
+                mc[row][30][0] = new NoteCell(); //29739
+                mc[row][31][0] = new NoteCell(); //29739
+                mc[row][32][0] = new NoteCell(); //29739
+                mc[row][33][0] = new NoteCell(); //29739
+                mc[row][34][0] = new NoteCell(); //29739
+                mc[row][35][0] = new NoteCell(); //29739
+                mc[row][36][0] = new NoteCell(); //29739
+                mc[row][37][0] = new NoteCell(); //29739
+                mc[row][38][0] = new NoteCell(); //29739
+                mc[row][39][0] = new NoteCell(); //29739
+                row++;
+            //reihe4
+                mc[row][0][0] = new NoteCell();
+                mc[row][1][0] = new NoteCell();
+                mc[row][2][0] = new NoteCell();
+                mc[row][3][0] = new NoteCell();
+                mc[row][4][0] = new NoteCell();
+                mc[row][5][0] = new NoteCell();
+                mc[row][6][0] = new NoteCell();
+                mc[row][7][0] = new NoteCell();
+                mc[row][8][0] = new NoteCell();
+                mc[row][9][0] = new NoteCell();
+                mc[row][10][0] = new NoteCell();
+                mc[row][11][0] = new NoteCell();
+                mc[row][12][0] = new NoteCell();
+                mc[row][13][0] = new NoteCell();
+                mc[row][14][0] = new NoteCell();
+                mc[row][15][0] = new NoteCell();
+                mc[row][16][0] = new NoteCell();
+                mc[row][17][0] = new NoteCell(); //29739
+                mc[row][29][0] = new NoteCell(); //29739
+                mc[row][30][0] = new NoteCell(); //29739
+                mc[row][31][0] = new NoteCell(); //29739
+                mc[row][32][0] = new NoteCell(); //29739
+                mc[row][33][0] = new NoteCell(); //29739
+                mc[row][34][0] = new NoteCell(); //29739
+                mc[row][35][0] = new NoteCell(); //29739
+                mc[row][36][0] = new NoteCell(); //29739
+                mc[row][37][0] = new NoteCell(); //29739
+                mc[row][38][0] = new NoteCell(); //29739
+                mc[row][39][0] = new NoteCell(); //29739
+                row++;
+             //reihe5
+                mc[row][0][0] = new NoteCell();
+                mc[row][1][0] = new NoteCell();
+                mc[row][2][0] = new NoteCell();
+                mc[row][3][0] = new NoteCell();
+                mc[row][4][0] = new NoteCell();
+                mc[row][5][0] = new NoteCell();
+                mc[row][6][0] = new NoteCell();
+                mc[row][7][0] = new NoteCell();
+                mc[row][8][0] = new NoteCell();
+                mc[row][9][0] = new NoteCell();
+                mc[row][10][0] = new NoteCell();
+                mc[row][11][0] = new NoteCell();
+                mc[row][12][0] = new NoteCell();
+                mc[row][13][0] = new NoteCell();
+                mc[row][14][0] = new NoteCell();
+                mc[row][15][0] = new NoteCell();
+                mc[row][16][0] = new NoteCell();
+                
+                
+                mc[row][17][50] = new BasicCell(P_SE,P_SE,50,1);
+                mc[row][18][50] = new BasicCell(P_SW,P_SW,50,1);
+                mc[row][19][50] = new BasicCell(P_SE,P_SE,50,1);
+                mc[row][20][50] = new BasicCell(P_SW,P_SW,50,1);
+                mc[row][21][50] = new BasicCell(P_SE,P_SE,50,1);
+                mc[row][22][50] = new BasicCell(P_SW,P_SW,50,1);
+                mc[row][23][50] = new BasicCell(P_SE,P_SE,50,1);
+                mc[row][23][50] = new BasicCell(P_EW,P_EW,50,1);     
+                mc[row][23][50] = new BasicCell(P_EW,P_EW,50,1);
+                mc[row][22][50] = new BasicCell(P_SW,P_SW,50,1);
+                
+                mc[row][29][0] = new NoteCell(); //29739
+                mc[row][30][0] = new NoteCell(); //29739
+                mc[row][31][0] = new NoteCell(); //29739
+                mc[row][32][0] = new NoteCell(); //29739
+                mc[row][33][0] = new NoteCell(); //29739
+                mc[row][34][0] = new NoteCell(); //29739
+                mc[row][35][0] = new NoteCell(); //29739
+                mc[row][36][0] = new NoteCell(); //29739
+                mc[row][37][0] = new NoteCell(); //29739
+                mc[row][38][0] = new NoteCell(); //29739
+                mc[row][39][0] = new NoteCell(); //29739
+                row++;
+            //Reiihe 6
+                
+                mc[row][0][0] = new NoteCell();
+                mc[row][1][0] = new NoteCell();
+                mc[row][2][0] = new NoteCell();
+                mc[row][3][0] = new NoteCell();
+                mc[row][4][0] = new NoteCell();
+                mc[row][5][0] = new NoteCell();
+                mc[row][6][0] = new NoteCell();
+                mc[row][7][0] = new NoteCell();
+                mc[row][8][0] = new NoteCell();
+                mc[row][9][0] = new NoteCell();
+                mc[row][10][0] = new NoteCell();
+                mc[row][11][0] = new NoteCell();
+                mc[row][12][0] = new NoteCell();
+                mc[row][13][0] = new NoteCell();
+                mc[row][14][0] = new NoteCell();
+                mc[row][15][0] = new NoteCell();
+                mc[row][16][0] = new NoteCell();
+                
+                mc[row][17][50] = new BasicCell(P_NS,P_NS,50,1);
+                mc[row][18][50] = new BasicCell(P_NS,P_NS,50,1);
+                mc[row][19][50] = new BasicCell(P_NS,P_NS,50,1);
+                mc[row][20][50] = new BasicCell(P_NS,P_NS,50,1);
+                mc[row][21][50] = new BasicCell(P_NS,P_NS,50,1);
+                mc[row][22][50] = new BasicCell(P_NS,P_NS,50,1);
+                mc[row][23][50] = new BasicCell(P_NS,P_NS,50,1);
+                
+                
+                mc[row][24][50] = new BasicCell(P_SE,P_SE,50,1);     
+                mc[row][25][50] = new BasicCell(P_EW,P_EW,50,1);
+                mc[row][26][50] = new BasicCell(P_NW,P_NW,50,1);
+                
+                mc[row][26][50] = new BasicCell(P_SE,P_SE,50,1);
+                mc[row][26][50] = new BasicCell(P_SW,P_SW,50,1);
+                mc[row][26][50] = new BasicCell(P_SE,P_SE,50,1);
+                mc[row][26][50] = new BasicCell(P_EW,P_EW,50,1);
+                mc[row][26][50] = new BasicCell(P_SW,P_SW,50,1);
+                
+                
+                
+                mc[row][32][0] = new NoteCell(); //29739
+                mc[row][33][0] = new NoteCell(); //29739
+                mc[row][34][0] = new NoteCell(); //29739
+                mc[row][35][0] = new NoteCell(); //29739
+                mc[row][36][0] = new NoteCell(); //29739
+                mc[row][37][0] = new NoteCell(); //29739
+                mc[row][38][0] = new NoteCell(); //29739
+                mc[row][39][0] = new NoteCell(); //29739
+                
+                row++;
+            //reihe 7
+                
+                mc[row][0][0] = new NoteCell();
+                mc[row][1][0] = new NoteCell();
+                mc[row][2][0] = new NoteCell();
+                mc[row][3][0] = new NoteCell();
+                mc[row][4][0] = new NoteCell();
+                mc[row][5][0] = new NoteCell();
+                mc[row][6][0] = new NoteCell();
+                mc[row][7][0] = new NoteCell();
+                mc[row][8][0] = new NoteCell();
+                mc[row][9][0] = new NoteCell();
+                mc[row][10][0] = new NoteCell();
+                mc[row][11][0] = new NoteCell();
+                mc[row][12][0] = new NoteCell();
+                mc[row][13][0] = new NoteCell();
+                mc[row][14][0] = new NoteCell();
+                mc[row][15][0] = new NoteCell();
+                mc[row][16][0] = new NoteCell();
+                
+                mc[row][17][50] = new BasicCell(P_NS,P_NS,50,1);
+                mc[row][18][50] = new BasicCell(P_NE,P_NE,50,1);
+                mc[row][19][50] = new BasicCell(P_NW,P_NW,50,1);
+                mc[row][20][50] = new BasicCell(P_NE,P_NE,50,1);
+                mc[row][21][50] = new BasicCell(P_NW,P_NW,50,1);
+                mc[row][22][50] = new BasicCell(P_NE,P_NE,50,1);
+                mc[row][23][50] = new BasicCell(P_NW,P_NW,50,1);
+                
+                
+                mc[row][24][50] = new BasicCell(P_NE,P_NE,50,1);     
+                mc[row][25][50] = new BasicCell(P_EW,P_EW,50,1);
+                mc[row][26][50] = new BasicCell(P_SW,P_SW,50,1);
+                
+                mc[row][27][50] = new BasicCell(P_NS,P_NS,50,1);
+                mc[row][28][50] = new BasicCell(P_NE,P_NE,50,1);
+                mc[row][29][50] = new BasicCell(P_NW,P_NW,50,1);
+                mc[row][30][50] = new BasicCell(P_SE,P_SE,50,1);
+                mc[row][31][50] = new BasicCell(P_NW,P_NW,50,1);
+                
+                
+                
+                mc[row][32][0] = new NoteCell(); 
+                mc[row][33][0] = new NoteCell(); 
+                mc[row][34][0] = new NoteCell(); 
+                mc[row][35][0] = new NoteCell(); 
+                mc[row][36][0] = new NoteCell(); 
+                mc[row][37][0] = new NoteCell(); 
+                mc[row][38][0] = new NoteCell(); 
+                mc[row][39][0] = new NoteCell(); 
+                row++;
+                
+                
+            //reihe 8 //sollte nen error schmeissen //ersetze negative layers durch die richtigen wenn rausgefunden //gimp hilft da :P ( mit histogramm rechts einrücken karo entfernen; dann farbfüller)
+                mc[row][1][103] =new BasicCell(P_SE,103,1);
+                mc[row][2][103] =new BasicCell(P_EW,103,1);
+                mc[row][3][103] =new BasicCell(P_EW,103,1);
+                mc[row][4][103] =new BasicCell(P_SW,103,1);
+                
+                mc[row][5][50] =new BasicCell(P_SE,DE_E,50,1); //Einbahnstraße von süden kommend
+                mc[row][6][50] =new BasicCell(P_EW,DE_E,50,1);  //Einbahnstraße west>ost
+                mc[row][7][50] =new BasicCell(P_SW,50,1);  
+                mc[row][8][73] =new BasicCell(P_SE,73,1);
+                mc[row][9][73] =new BasicCell(P_EW,73,1);
+                mc[row][10][73] =new BasicCell(P_EW,73,1);
+                mc[row][11][73] =new BasicCell(P_EW,73,1);
+                mc[row][12][73] =new BasicCell(P_EW,73,1);
+                mc[row][13][73] =new BasicCell(P_EW,73,1);
+                mc[row][14][73] =new BasicCell(P_EW,73,1);
+                mc[row][15][73] =new BasicCell(P_EW,73,1);
+                mc[row][16][73] =new BasicCell(P_SW,73,1);
+                mc[row][17][50] =new BasicCell(P_NE,50,1);
+                mc[row][18][50] =new BasicCell(P_SW,50,1);
+                mc[row][19][50] =new BasicCell(P_SE,50,1);
+                mc[row][20][50] =new BasicCell(P_EW,50,1);
+                mc[row][21][50] =new BasicCell(P_EW,50,1);
+                mc[row][22][50] =new BasicCell(P_EW,50,1);
+                mc[row][23][50] =new BasicCell(P_EW,50,1);
+                mc[row][24][50] =new BasicCell(P_EW,50,1);
+                mc[row][25][50] =new BasicCell(P_ESW,50,1);
+                mc[row][26][50] =new BasicCell(P_NSW,50,1);
+                mc[row][27][50] =new BasicCell(P_NE,50,1);
+                
+                //*better icomapred to hardware stuff
+                
+                mc[row][28][50] =new BasicCell(P_EW,50,1);
+                mc[row][29][50] =new BasicCell(P_SW,50,1);
+                mc[row][30][50] =new BasicCell(P_NE,50,1);
+                mc[row][31][50] =new BasicCell(P_ESW,50,1);
+                mc[row][32][50] =new BasicCell(P_EW,50,1);
+                mc[row][33][50] =new BasicCell(P_EW,50,1);
+                mc[row][34][50] =new BasicCell(P_SW,50,1);
+                mc[row][35][50] =new BasicCell(P_SE,50,1);
+                mc[row][36][50] =new BasicCell(P_SW,50,1);
+                
+                row++;
+                
+                //reihe 9
+                
+                mc[row][1][103] =new BasicCell(P_NES,103,1);
+                mc[row][2][103] =new BasicCell(S_WE,103,2);
+                mc[row][3][104] =new KeyCell("K1",DE_E,104);
+                mc[row][4][103] =new BasicCell(P_NS,103,1);
+                mc[row][5][50] =new BasicCell(P_NES,50,1);
+                mc[row][6][50] =new BasicCell(P_SW,50,1);
+                mc[row][7][50] =new BasicCell(P_NS,50,1);
+                mc[row][8][73] =new BasicCell(P_NS,73,1);
+                mc[row][9][73] =new BasicCell(P_SE,73,1);
+                mc[row][10][73] =new BasicCell(P_EW,73,1);
+                
+                mc[row][11][73] =new BasicCell(P_EW,73,1);
+                mc[row][12][73] =new BasicCell(P_EW,73,1);
+                mc[row][13][73] =new BasicCell(P_SW,73,1);
+                mc[row][14][50] =new BasicCell(P_SE,50,1);
+                mc[row][15][50] =new BasicCell(P_EW,50,1);
+                mc[row][16][50] =new BasicCell(P_NW,50,1);
+                mc[row][17][50] =new BasicCell(P_SE,50,1);
+                mc[row][18][50] =new BasicCell(P_NW,50,1);
+                mc[row][19][50] =new BasicCell(P_NS,50,1);
+                mc[row][20][50] =new BasicCell(P_SE,50,1);
+                
+                mc[row][21][50] =new BasicCell(P_EW,50,1);
+                mc[row][22][50] =new BasicCell(P_EW,50,1);
+                mc[row][23][50] =new BasicCell(P_EW,50,1);
+                mc[row][24][50] =new BasicCell(P_ESW,50,1);
+                mc[row][25][50] =new BasicCell(P_NW,50,1);
+                mc[row][26][50] =new BasicCell(P_NES,50,1);
+                mc[row][27][50] =new BasicCell(P_ESW,50,1);
+                mc[row][28][50] =new BasicCell(P_EW,50,1);
+                mc[row][29][50] =new BasicCell(P_NEW,50,1);
+                mc[row][30][50] =new BasicCell(DE_W,50,1);
+                
+                mc[row][31][50] =new BasicCell(P_NE,50,1);
+                mc[row][32][50] =new BasicCell(P_SW,50,1);
+                mc[row][33][50] =new BasicCell(P_SE,50,1);
+                mc[row][34][50] =new BasicCell(P_NW,50,1);
+                mc[row][35][50] =new BasicCell(P_NS,50,1);
+                mc[row][36][50] =new BasicCell(P_NES,50,1);
+                mc[row][37][50] =new BasicCell(P_EW,50,1);
+                mc[row][38][50] =new BasicCell(P_EW,DE_W,50,1);//einbahnstraße Wsst<ost //GO!
+                mc[row][39][50] =new BasicCell(P_EW,50,1);
+                mc[row][40][50] =new BasicCell(P_EW,50,1);//STARTZONE
+                row++;
+                
+                
+                //reihe 10
+                mc[row][1][103] =new BasicCell(P_NES,103,1);
+                mc[row][2][103] =new BasicCell(P_EW,103,1);
+                mc[row][3][103] =new BasicCell(P_EW,103,1);
+                mc[row][4][103] =new BasicCell(P_NW,103,1);
+                mc[row][5][50] =new BasicCell(P_EW,50,1);
+                mc[row][6][50] =new BasicCell(P_NS,DE_S,50,1);//Einbahn Nord>Süd
+                mc[row][7][50] =new BasicCell(P_NS,50,1);
+                mc[row][8][50] =new BasicCell(P_EW,73,1);
+                mc[row][9][50] =new BasicCell(P_EW,73,1);
+                mc[row][10][50] =new BasicCell(P_EW,73,1);
+                
+                mc[row][10][50] =new BasicCell(P_EW,50,1);
+                
+                
+                
+                //export into a file; //change that to a lzmafile later to save bitsnbytes
+                c.setChunkField(mc);
+                String tmp = d.dump(c);
+                
+                FileTK.writeFile(tmp, "D:\\src\\mazeviewer\\dump.yml");
+                // Chunk c2 = (Chunk)d.load(tmp);
+               
+                
+    }
+}

+ 139 - 139
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/Level/Chunk.java

@@ -1,139 +1,139 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame.Level;
-
-import de.nplusc.iZc.MazeGame.cells.MazeCell;
-import java.awt.Image;
-
-/**
- *
- * @author LH
- */
-public abstract class Chunk
-{
-    public static final int A4_SHEET_5mm_height = 58;
-    public static final int A4_SHEET_5mm_width = 42;
-    
-    
-    
-    //x,y;layering; 
-    private MazeCell[][][] chunkField;
-    
-    private int xsize,ysize; //müssen nicht identisch sein; globales koordinatensystem regelt das ausrichten
-    
-    private int xpos,ypos; // chunkposition im globalen koordinatengitter; map generiert daraus
-                           //nicht stackbar deshalob nur X und Y; 
-    
-    
-    
-    
-    private int mapX,mapY; // werden zum position auf map finden genutzt
-    private int[][] forceUncoveredChunks; //zum die lücken zwischen areas der Map zu schließen //werden nach ausführen im player gesaved;
-
-    
-    
-    
-    
-    
-    
-    public MazeCell[][][] getChunkField()
-    {
-        return chunkField;
-    }
-
-    public void setChunkField(MazeCell[][][] chunkField)
-    {
-        this.chunkField = chunkField;
-    }
-
-    public int getXsize()
-    {
-        return xsize;
-    }
-
-    public void setXsize(int xsize)
-    {
-        this.xsize = xsize;
-    }
-
-    public int getYsize()
-    {
-        return ysize;
-    }
-
-    public void setYsize(int ysize)
-    {
-        this.ysize = ysize;
-    }
-
-    public int getXpos()
-    {
-        return xpos;
-    }
-
-    public void setXpos(int xpos)
-    {
-        this.xpos = xpos;
-    }
-
-    public int getYpos()
-    {
-        return ypos;
-    }
-
-    public void setYpos(int ypos)
-    {
-        this.ypos = ypos;
-    }
-
-    public int getMapX()
-    {
-        return mapX;
-    }
-
-    public void setMapX(int mapX)
-    {
-        this.mapX = mapX;
-    }
-
-    public int getMapY()
-    {
-        return mapY;
-    }
-
-    public void setMapY(int mapY)
-    {
-        this.mapY = mapY;
-    }
-
-    public int[][] getForceUncoveredChunks()
-    {
-        return forceUncoveredChunks;
-    }
-
-    public void setForceUncoveredChunks(int[][] forceUncoveredChunks)
-    {
-        this.forceUncoveredChunks = forceUncoveredChunks;
-    }
-    
-    
-    
-    
-    public abstract Image getBackground();
-    
-         
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame.Level;
+
+import de.nplusc.iZc.MazeGame.cells.MazeCell;
+import java.awt.Image;
+
+/**
+ *
+ * @author LH
+ */
+public abstract class Chunk
+{
+    public static final int A4_SHEET_5mm_height = 58;
+    public static final int A4_SHEET_5mm_width = 42;
+    
+    
+    
+    //x,y;layering; 
+    private MazeCell[][][] chunkField;
+    
+    private int xsize,ysize; //müssen nicht identisch sein; globales koordinatensystem regelt das ausrichten
+    
+    private int xpos,ypos; // chunkposition im globalen koordinatengitter; map generiert daraus
+                           //nicht stackbar deshalob nur X und Y; 
+    
+    
+    
+    
+    private int mapX,mapY; // werden zum position auf map finden genutzt
+    private int[][] forceUncoveredChunks; //zum die lücken zwischen areas der Map zu schließen //werden nach ausführen im player gesaved;
+
+    
+    
+    
+    
+    
+    
+    public MazeCell[][][] getChunkField()
+    {
+        return chunkField;
+    }
+
+    public void setChunkField(MazeCell[][][] chunkField)
+    {
+        this.chunkField = chunkField;
+    }
+
+    public int getXsize()
+    {
+        return xsize;
+    }
+
+    public void setXsize(int xsize)
+    {
+        this.xsize = xsize;
+    }
+
+    public int getYsize()
+    {
+        return ysize;
+    }
+
+    public void setYsize(int ysize)
+    {
+        this.ysize = ysize;
+    }
+
+    public int getXpos()
+    {
+        return xpos;
+    }
+
+    public void setXpos(int xpos)
+    {
+        this.xpos = xpos;
+    }
+
+    public int getYpos()
+    {
+        return ypos;
+    }
+
+    public void setYpos(int ypos)
+    {
+        this.ypos = ypos;
+    }
+
+    public int getMapX()
+    {
+        return mapX;
+    }
+
+    public void setMapX(int mapX)
+    {
+        this.mapX = mapX;
+    }
+
+    public int getMapY()
+    {
+        return mapY;
+    }
+
+    public void setMapY(int mapY)
+    {
+        this.mapY = mapY;
+    }
+
+    public int[][] getForceUncoveredChunks()
+    {
+        return forceUncoveredChunks;
+    }
+
+    public void setForceUncoveredChunks(int[][] forceUncoveredChunks)
+    {
+        this.forceUncoveredChunks = forceUncoveredChunks;
+    }
+    
+    
+    
+    
+    public abstract Image getBackground();
+    
+         
+}

+ 34 - 34
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/Level/EmptyChunk.java

@@ -1,34 +1,34 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame.Level;
-
-import java.awt.Image;
-
-/**
- *
- * @author LH
- */
-public class EmptyChunk extends Chunk
-{
-
-    @Override
-    public Image getBackground()
-    {
-        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
-    }
-    
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame.Level;
+
+import java.awt.Image;
+
+/**
+ *
+ * @author LH
+ */
+public class EmptyChunk extends Chunk
+{
+
+    @Override
+    public Image getBackground()
+    {
+        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+    }
+    
+}

+ 26 - 26
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/Level/Game.java

@@ -1,26 +1,26 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame.Level;
-
-/**
- *
- * @author LH
- */
-public class Game
-{
-    
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame.Level;
+
+/**
+ *
+ * @author LH
+ */
+public class Game
+{
+    
+}

+ 34 - 34
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/Level/OverviewMap.java

@@ -1,34 +1,34 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame.Level;
-
-import java.awt.Image;
-
-/**
- *
- * @author LH
- */
-public class OverviewMap
-{
-    
-    Image MapBackground;
-    
-    public Image getMapbackground()
-    {
-        return MapBackground;
-    }
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame.Level;
+
+import java.awt.Image;
+
+/**
+ *
+ * @author LH
+ */
+public class OverviewMap
+{
+    
+    Image MapBackground;
+    
+    public Image getMapbackground()
+    {
+        return MapBackground;
+    }
+}

+ 34 - 34
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/Level/StandardChunk.java

@@ -1,34 +1,34 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame.Level;
-
-import java.awt.Image;
-
-/**
- *
- * @author LH
- */
-public class StandardChunk extends Chunk
-{
-
-    @Override
-    public Image getBackground()
-    {
-        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
-    }
-    
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame.Level;
+
+import java.awt.Image;
+
+/**
+ *
+ * @author LH
+ */
+public class StandardChunk extends Chunk
+{
+
+    @Override
+    public Image getBackground()
+    {
+        throw new UnsupportedOperationException("Not supported yet."); //To change body of generated methods, choose Tools | Templates.
+    }
+    
+}

+ 178 - 178
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/Objects/Player.java

@@ -1,178 +1,178 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame.Objects;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- *
- * @author LH
- */
-public class Player
-{
-    private List<String> keys = new ArrayList<>();
-    private List<String> JournalIDs = new ArrayList<>();
-    private List<String> JournalTexta = new ArrayList<>();
-    
-    private Map<String,String[]> mixedAttribs = new HashMap<>();
-    
-    
-        private Map<Integer,
-                Map<Integer,Boolean>
-                > ChunkUncovering = new HashMap<>();
-    
-    
-    
-            //x;y 
-    
-    private Map<Integer,
-                Map<Integer,Boolean>
-                > FOVData = new HashMap<>();
-    
-    
-    
-    private int chunk_x,chunk_y,pos_x,pos_y,pos_z;
-    
-    
-    public List<String> getJournalIDs()
-    {
-        return JournalIDs;
-    }
-
-    public void setJournalIDs(List<String> JournalIDs)
-    {
-        this.JournalIDs = JournalIDs;
-    }
-
-    public List<String> getJournalTexta()
-    {
-        return JournalTexta;
-    }
-
-    public void setJournalTexta(List<String> JournalTexta)
-    {
-        this.JournalTexta = JournalTexta;
-    }
-    
-    public boolean addKey(String keyID)
-    {
-        boolean ret = true;
-        if(!keys.contains(keyID))
-            keys.add(keyID);
-        else
-            ret=false;
-        return ret;
-    }
-    
-    public List<String> getKeys()
-    {
-        return keys;
-    }                           
-    public void telePort(int targetChunkX,int targetChunkY,int x,int y, int z)//made for the portals && the SheetChange-Events
-    {
-        chunk_x = targetChunkX;
-        chunk_y = targetChunkY;
-        pos_x = x; pos_y = y; pos_z = z;
-    }
-
-
-    public int getChunk_x()
-    {
-        return chunk_x;
-    }
-
-    public void setChunk_x(int chunk_x)
-    {
-        this.chunk_x = chunk_x;
-    }
-
-    public int getChunk_y()
-    {
-        return chunk_y;
-    }
-
-    public void setChunk_y(int chunk_y)
-    {
-        this.chunk_y = chunk_y;
-    }
-
-    public int getPos_x()
-    {
-        return pos_x;
-    }
-
-    public void setPos_x(int pos_x)
-    {
-        this.pos_x = pos_x;
-    }
-
-    public int getPos_y()
-    {
-        return pos_y;
-    }
-
-    public void setPos_y(int pos_y)
-    {
-        this.pos_y = pos_y;
-    }
-
-    public int getPos_z()
-    {
-        return pos_z;
-    }
-
-    public void setPos_z(int pos_z)
-    {
-        this.pos_z = pos_z;
-    }
-
-    public Map<String, String[]> getMixedAttribs()
-    {
-        return mixedAttribs;
-    }
-
-    public void setMixedAttribs(Map<String, String[]> mixedAttribs)
-    {
-        this.mixedAttribs = mixedAttribs;
-    }
-
-    public Map<Integer, Map<Integer, Boolean>> getChunkUncovering()
-    {
-        return ChunkUncovering;
-    }
-
-    public void setChunkUncovering(Map<Integer, Map<Integer, Boolean>> ChunkUncovering)
-    {
-        this.ChunkUncovering = ChunkUncovering;
-    }
-
-    public Map<Integer, Map<Integer, Boolean>> getFOVData()
-    {
-        return FOVData;
-    }
-
-    public void setFOVData(Map<Integer, Map<Integer, Boolean>> FOVData)
-    {
-        this.FOVData = FOVData;
-    }
-    
-    
-    
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame.Objects;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ *
+ * @author LH
+ */
+public class Player
+{
+    private List<String> keys = new ArrayList<>();
+    private List<String> JournalIDs = new ArrayList<>();
+    private List<String> JournalTexta = new ArrayList<>();
+    
+    private Map<String,String[]> mixedAttribs = new HashMap<>();
+    
+    
+        private Map<Integer,
+                Map<Integer,Boolean>
+                > ChunkUncovering = new HashMap<>();
+    
+    
+    
+            //x;y 
+    
+    private Map<Integer,
+                Map<Integer,Boolean>
+                > FOVData = new HashMap<>();
+    
+    
+    
+    private int chunk_x,chunk_y,pos_x,pos_y,pos_z;
+    
+    
+    public List<String> getJournalIDs()
+    {
+        return JournalIDs;
+    }
+
+    public void setJournalIDs(List<String> JournalIDs)
+    {
+        this.JournalIDs = JournalIDs;
+    }
+
+    public List<String> getJournalTexta()
+    {
+        return JournalTexta;
+    }
+
+    public void setJournalTexta(List<String> JournalTexta)
+    {
+        this.JournalTexta = JournalTexta;
+    }
+    
+    public boolean addKey(String keyID)
+    {
+        boolean ret = true;
+        if(!keys.contains(keyID))
+            keys.add(keyID);
+        else
+            ret=false;
+        return ret;
+    }
+    
+    public List<String> getKeys()
+    {
+        return keys;
+    }                           
+    public void telePort(int targetChunkX,int targetChunkY,int x,int y, int z)//made for the portals && the SheetChange-Events
+    {
+        chunk_x = targetChunkX;
+        chunk_y = targetChunkY;
+        pos_x = x; pos_y = y; pos_z = z;
+    }
+
+
+    public int getChunk_x()
+    {
+        return chunk_x;
+    }
+
+    public void setChunk_x(int chunk_x)
+    {
+        this.chunk_x = chunk_x;
+    }
+
+    public int getChunk_y()
+    {
+        return chunk_y;
+    }
+
+    public void setChunk_y(int chunk_y)
+    {
+        this.chunk_y = chunk_y;
+    }
+
+    public int getPos_x()
+    {
+        return pos_x;
+    }
+
+    public void setPos_x(int pos_x)
+    {
+        this.pos_x = pos_x;
+    }
+
+    public int getPos_y()
+    {
+        return pos_y;
+    }
+
+    public void setPos_y(int pos_y)
+    {
+        this.pos_y = pos_y;
+    }
+
+    public int getPos_z()
+    {
+        return pos_z;
+    }
+
+    public void setPos_z(int pos_z)
+    {
+        this.pos_z = pos_z;
+    }
+
+    public Map<String, String[]> getMixedAttribs()
+    {
+        return mixedAttribs;
+    }
+
+    public void setMixedAttribs(Map<String, String[]> mixedAttribs)
+    {
+        this.mixedAttribs = mixedAttribs;
+    }
+
+    public Map<Integer, Map<Integer, Boolean>> getChunkUncovering()
+    {
+        return ChunkUncovering;
+    }
+
+    public void setChunkUncovering(Map<Integer, Map<Integer, Boolean>> ChunkUncovering)
+    {
+        this.ChunkUncovering = ChunkUncovering;
+    }
+
+    public Map<Integer, Map<Integer, Boolean>> getFOVData()
+    {
+        return FOVData;
+    }
+
+    public void setFOVData(Map<Integer, Map<Integer, Boolean>> FOVData)
+    {
+        this.FOVData = FOVData;
+    }
+    
+    
+    
+}

+ 50 - 50
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/cells/BasicCell.java

@@ -1,50 +1,50 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame.cells;
-
-import de.nplusc.iZc.MazeGame.Objects.Player;
-import java.util.Map;
-
-/**
- *
- * @author LH
- */
-public class BasicCell extends MazeCell
-{
-
-
-    public BasicCell(Map<Integer, boolean[]> pexits, Map<Integer, boolean[]> pentrances,int bl, int lh)
-    {
-        super(pexits, pentrances,bl,lh);
-    }
-    
-    public BasicCell(Map<Integer, boolean[]> pexits, int bl, int lh)
-    {
-        super(pexits, pexits,bl,lh);
-    }
-    
-    public BasicCell()
-    {
-    }
-    
-    @Override
-    public String onCellEnter(Player p)
-    {
-        return ""; //NixDa; bin bei ner standard-Zelle inaktiv
-    }
-    
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame.cells;
+
+import de.nplusc.iZc.MazeGame.Objects.Player;
+import java.util.Map;
+
+/**
+ *
+ * @author LH
+ */
+public class BasicCell extends MazeCell
+{
+
+
+    public BasicCell(Map<Integer, boolean[]> pexits, Map<Integer, boolean[]> pentrances,int bl, int lh)
+    {
+        super(pexits, pentrances,bl,lh);
+    }
+    
+    public BasicCell(Map<Integer, boolean[]> pexits, int bl, int lh)
+    {
+        super(pexits, pexits,bl,lh);
+    }
+    
+    public BasicCell()
+    {
+    }
+    
+    @Override
+    public String onCellEnter(Player p)
+    {
+        return ""; //NixDa; bin bei ner standard-Zelle inaktiv
+    }
+    
+}

+ 77 - 77
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/cells/DoorCell.java

@@ -1,77 +1,77 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame.cells;
-
-import de.nplusc.iZc.MazeGame.Objects.Player;
-import java.util.List;
-import java.util.Map;
-
-/**
- *
- * @author LH
- */
-public class DoorCell extends MazeCell
-{
-
-    public DoorCell(String[] validKeyIDs, Map<Integer, boolean[]> pexits, Map<Integer, boolean[]> pentrances,int bl)
-    {
-        super(pexits, pentrances,bl,1);
-        this.validKeyIDs = validKeyIDs;
-    }
-
-    public DoorCell(String[] validKeyIDs)
-    {
-        this.validKeyIDs = validKeyIDs;
-    }
-    
-    
-    
-    
-    private String[] validKeyIDs;
-
-    public String[] getValidKeyIDs()
-    {
-        return validKeyIDs;
-    }
-
-    public void setValidKeyIDs(String[] validKeyIDs)
-    {
-        this.validKeyIDs = validKeyIDs;
-    }
-    
-    private boolean hasKey(Player p)
-    {
-        List<String> keyRing = p.getKeys();
-        for (String vkey : validKeyIDs)
-        {
-            if(keyRing.contains(vkey))
-            {
-                return true;
-            }
-        }
-        return false;
-    }
-    
-    public boolean canEnter(int direction,int layer,Player p)
-    {
-        return super.canEnter(direction, layer, p)&& hasKey(p);
-    }
-    public String onCellEnter(Player p)
-    {
-        return "";
-    }
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame.cells;
+
+import de.nplusc.iZc.MazeGame.Objects.Player;
+import java.util.List;
+import java.util.Map;
+
+/**
+ *
+ * @author LH
+ */
+public class DoorCell extends MazeCell
+{
+
+    public DoorCell(String[] validKeyIDs, Map<Integer, boolean[]> pexits, Map<Integer, boolean[]> pentrances,int bl)
+    {
+        super(pexits, pentrances,bl,1);
+        this.validKeyIDs = validKeyIDs;
+    }
+
+    public DoorCell(String[] validKeyIDs)
+    {
+        this.validKeyIDs = validKeyIDs;
+    }
+    
+    
+    
+    
+    private String[] validKeyIDs;
+
+    public String[] getValidKeyIDs()
+    {
+        return validKeyIDs;
+    }
+
+    public void setValidKeyIDs(String[] validKeyIDs)
+    {
+        this.validKeyIDs = validKeyIDs;
+    }
+    
+    private boolean hasKey(Player p)
+    {
+        List<String> keyRing = p.getKeys();
+        for (String vkey : validKeyIDs)
+        {
+            if(keyRing.contains(vkey))
+            {
+                return true;
+            }
+        }
+        return false;
+    }
+    
+    public boolean canEnter(int direction,int layer,Player p)
+    {
+        return super.canEnter(direction, layer, p)&& hasKey(p);
+    }
+    public String onCellEnter(Player p)
+    {
+        return "";
+    }
+}

+ 59 - 59
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/cells/EmptyCell.java

@@ -1,59 +1,59 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame.cells;
-
-import de.nplusc.iZc.MazeGame.Objects.Player;
-import java.util.Map;
-
-/**
- *
- * @author LH
- */
-public class EmptyCell extends MazeCell
-{
-
-    @Override
-    public boolean canEnter(int direction, int layer, Player p)
-    {
-        return false;
-    }
-
-    public EmptyCell(Map<Integer, boolean[]> pexits, Map<Integer, boolean[]> pentrances,int bl)
-    {
-        super(pexits, pentrances,bl,1);
-    }
-
-    public EmptyCell()
-    {
-    }
-
-    @Override
-    public boolean canExit(int direction, int layer, Player p)
-    {
-        return false;
-    }
-    
-    
-    
-    
-    @Override
-    public String onCellEnter(Player p)
-    {
-        return "Ungültiges Manöver; Cheater!!!!";
-    }
-    
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame.cells;
+
+import de.nplusc.iZc.MazeGame.Objects.Player;
+import java.util.Map;
+
+/**
+ *
+ * @author LH
+ */
+public class EmptyCell extends MazeCell
+{
+
+    @Override
+    public boolean canEnter(int direction, int layer, Player p)
+    {
+        return false;
+    }
+
+    public EmptyCell(Map<Integer, boolean[]> pexits, Map<Integer, boolean[]> pentrances,int bl)
+    {
+        super(pexits, pentrances,bl,1);
+    }
+
+    public EmptyCell()
+    {
+    }
+
+    @Override
+    public boolean canExit(int direction, int layer, Player p)
+    {
+        return false;
+    }
+    
+    
+    
+    
+    @Override
+    public String onCellEnter(Player p)
+    {
+        return "Ungültiges Manöver; Cheater!!!!";
+    }
+    
+}

+ 73 - 73
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/cells/KeyCell.java

@@ -1,73 +1,73 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame.cells;
-
-import de.nplusc.iZc.MazeGame.Objects.Player;
-import java.util.Map;
-
-/**
- *
- * @author LH
- */
-public class KeyCell extends MazeCell
-{
-
-    public KeyCell(String keyID, Map<Integer, boolean[]> pexits, Map<Integer, boolean[]> pentrances,int bl)
-    {
-        super(pexits, pentrances,bl,1);
-        this.keyID = keyID;
-    }
-    
-    
-    public KeyCell(String keyID, Map<Integer, boolean[]> pexits, int bl)
-    {
-        super(pexits, pexits,bl,1);
-        this.keyID = keyID;
-    }
-
-    
-    
-    
-    public KeyCell(String keyID)
-    {
-        this.keyID = keyID;
-    }
-    
-    
-    
-    private String keyID;
-
-    public String getKeyID()
-    {
-        return keyID;
-    }
-    
-
-    public void setKeyID(String keyID)
-    {
-        this.keyID = keyID;
-    }
-    
-    
-    public String onCellEnter(Player p)
-    {
-        if(p.addKey(keyID))
-            return "Schlüssel "+keyID+" gefunden!";
-        else
-            return "";
-    }
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame.cells;
+
+import de.nplusc.iZc.MazeGame.Objects.Player;
+import java.util.Map;
+
+/**
+ *
+ * @author LH
+ */
+public class KeyCell extends MazeCell
+{
+
+    public KeyCell(String keyID, Map<Integer, boolean[]> pexits, Map<Integer, boolean[]> pentrances,int bl)
+    {
+        super(pexits, pentrances,bl,1);
+        this.keyID = keyID;
+    }
+    
+    
+    public KeyCell(String keyID, Map<Integer, boolean[]> pexits, int bl)
+    {
+        super(pexits, pexits,bl,1);
+        this.keyID = keyID;
+    }
+
+    
+    
+    
+    public KeyCell(String keyID)
+    {
+        this.keyID = keyID;
+    }
+    
+    
+    
+    private String keyID;
+
+    public String getKeyID()
+    {
+        return keyID;
+    }
+    
+
+    public void setKeyID(String keyID)
+    {
+        this.keyID = keyID;
+    }
+    
+    
+    public String onCellEnter(Player p)
+    {
+        if(p.addKey(keyID))
+            return "Schlüssel "+keyID+" gefunden!";
+        else
+            return "";
+    }
+}

+ 187 - 187
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/cells/MazeCell.java

@@ -1,187 +1,187 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame.cells;
-
-import de.nplusc.iZc.MazeGame.Objects.Player;
-import java.awt.Image;
-import java.io.File;
-import java.io.IOException;
-import java.util.HashMap;
-import java.util.Map;
-import javax.imageio.ImageIO;
-
-/**
- *
- * @author LH
- */
-public abstract class MazeCell
-{
-    public static final int DIRECTION_NORTH=0;
-    public static final int DIRECTION_EAST=1;
-    public static final int DIRECTION_SOUTH=2;
-    public static final int DIRECTION_WEST=3;
-    private Map<Integer,boolean[]> exits = new HashMap<>();//ints for layer and bools for directions
-    private Map<Integer,boolean[]> entrances = new HashMap<>();//ints for layer and bools for directions
-                                   //entrance but no exit ->onewaydoor
-    
-    private String TexturePath = "";
-    private int direction=0;
-    private int baseLayer=0,layerHeight=1; //wichtig bei stacked-tiles wie brücken, tunnels;
-
-    public MazeCell(Map<Integer,boolean[]> pexits, Map<Integer,boolean[]> pentrances,int bl,int lh)
-    {
-        exits = pexits; entrances = pentrances;
-        
-    }
-    
-    public MazeCell(Map<Integer,boolean[]> pexits, Map<Integer,boolean[]> pentrances,int bl)
-    {
-        this(pexits,pentrances,bl,1);
-    }
-    
-    
-    public MazeCell()
-    {
-        
-    }        
-    
-    
-    
-    
-    public boolean canExit(int direction,int layer,Player p)
-    {
-        if(!exits.containsKey(layer-baseLayer))
-        {
-            return false;
-        }
-        return exits.get(layer-baseLayer)[direction];
-    }
-    
-    public boolean canEnter(int direction,int layer,Player p)
-    {
-        if(!entrances.containsKey(layer-baseLayer))
-        {
-            return false;
-        }
-        return entrances.get(layer-baseLayer)[direction];
-    }
-    
-    
-    public int getDirection()  //setter ist serialisierungskram also nach unten verbannt
-    {
-        return direction;
-    }
-    
-    
-    //setTileImage() ->setTexturePath()
-    
-    
-    public Image getTextureTile() 
-    {
-        Image i = null;
-        try 
-        {
-            i = ImageIO.read(new File(TexturePath));
-        }
-        catch (IOException ex)
-        {
-            ex.printStackTrace();
-        }
-        return i;
-   }
-
-    int getExitLayer(int direction) //geht da nur maximal ein exit pro richtung möglich
-    {
-        int ret = Integer.MIN_VALUE; //integer_minimum == kein exit in diese richtung
-        Integer[] layers = exits.keySet().toArray(new Integer[]{0});
-        for (int i = 0; i < layers.length; i++)
-        {
-            int k = layers[i];
-            if(exits.get(k)[direction])
-            {
-                return k;
-            }
-        }
-        return ret; //fallback bei kein exit verfügbar
-    }
-    //Serialisuerungskram#
-    
-    
-    public int getBaseLayer()
-    {
-        return baseLayer;
-    }
-
-    public void setBaseLayer(int baseLayer)
-    {
-        this.baseLayer = baseLayer;
-    }
-
-    public int getLayerHeight()
-    {
-        return layerHeight;
-    }
-
-    public void setLayerHeight(int layerHeight)
-    {
-        this.layerHeight = layerHeight;
-    }
-
-    
-    public void setDirection(int dir)
-    {
-        direction=dir;
-    }
-    public Map<Integer, boolean[]> getExits()
-    {
-        return exits;
-    }
-
-    public void setExits(Map<Integer, boolean[]> exits)
-    {
-        this.exits = exits;
-    }
-
-    public Map<Integer, boolean[]> getEntrances()
-    {
-        return entrances;
-    }
-
-    public void setEntrances(Map<Integer, boolean[]> entrances)
-    {
-        this.entrances = entrances;
-    }
-
-    public String getTexturePath()
-    {
-        return TexturePath;
-    }
-
-    public void setTexturePath(String TexturePath)
-    {
-        this.TexturePath = TexturePath;
-    }
-    
-    
-    public abstract String onCellEnter(Player p); //interface für msgs
-
-    public boolean requiresFOV() // ob aufgedeckt oder nicht wird im player gespeichert
-    {
-        return true;
-    }
-    
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame.cells;
+
+import de.nplusc.iZc.MazeGame.Objects.Player;
+import java.awt.Image;
+import java.io.File;
+import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
+import javax.imageio.ImageIO;
+
+/**
+ *
+ * @author LH
+ */
+public abstract class MazeCell
+{
+    public static final int DIRECTION_NORTH=0;
+    public static final int DIRECTION_EAST=1;
+    public static final int DIRECTION_SOUTH=2;
+    public static final int DIRECTION_WEST=3;
+    private Map<Integer,boolean[]> exits = new HashMap<>();//ints for layer and bools for directions
+    private Map<Integer,boolean[]> entrances = new HashMap<>();//ints for layer and bools for directions
+                                   //entrance but no exit ->onewaydoor
+    
+    private String TexturePath = "";
+    private int direction=0;
+    private int baseLayer=0,layerHeight=1; //wichtig bei stacked-tiles wie brücken, tunnels;
+
+    public MazeCell(Map<Integer,boolean[]> pexits, Map<Integer,boolean[]> pentrances,int bl,int lh)
+    {
+        exits = pexits; entrances = pentrances;
+        
+    }
+    
+    public MazeCell(Map<Integer,boolean[]> pexits, Map<Integer,boolean[]> pentrances,int bl)
+    {
+        this(pexits,pentrances,bl,1);
+    }
+    
+    
+    public MazeCell()
+    {
+        
+    }        
+    
+    
+    
+    
+    public boolean canExit(int direction,int layer,Player p)
+    {
+        if(!exits.containsKey(layer-baseLayer))
+        {
+            return false;
+        }
+        return exits.get(layer-baseLayer)[direction];
+    }
+    
+    public boolean canEnter(int direction,int layer,Player p)
+    {
+        if(!entrances.containsKey(layer-baseLayer))
+        {
+            return false;
+        }
+        return entrances.get(layer-baseLayer)[direction];
+    }
+    
+    
+    public int getDirection()  //setter ist serialisierungskram also nach unten verbannt
+    {
+        return direction;
+    }
+    
+    
+    //setTileImage() ->setTexturePath()
+    
+    
+    public Image getTextureTile() 
+    {
+        Image i = null;
+        try 
+        {
+            i = ImageIO.read(new File(TexturePath));
+        }
+        catch (IOException ex)
+        {
+            ex.printStackTrace();
+        }
+        return i;
+   }
+
+    int getExitLayer(int direction) //geht da nur maximal ein exit pro richtung möglich
+    {
+        int ret = Integer.MIN_VALUE; //integer_minimum == kein exit in diese richtung
+        Integer[] layers = exits.keySet().toArray(new Integer[]{0});
+        for (int i = 0; i < layers.length; i++)
+        {
+            int k = layers[i];
+            if(exits.get(k)[direction])
+            {
+                return k;
+            }
+        }
+        return ret; //fallback bei kein exit verfügbar
+    }
+    //Serialisuerungskram#
+    
+    
+    public int getBaseLayer()
+    {
+        return baseLayer;
+    }
+
+    public void setBaseLayer(int baseLayer)
+    {
+        this.baseLayer = baseLayer;
+    }
+
+    public int getLayerHeight()
+    {
+        return layerHeight;
+    }
+
+    public void setLayerHeight(int layerHeight)
+    {
+        this.layerHeight = layerHeight;
+    }
+
+    
+    public void setDirection(int dir)
+    {
+        direction=dir;
+    }
+    public Map<Integer, boolean[]> getExits()
+    {
+        return exits;
+    }
+
+    public void setExits(Map<Integer, boolean[]> exits)
+    {
+        this.exits = exits;
+    }
+
+    public Map<Integer, boolean[]> getEntrances()
+    {
+        return entrances;
+    }
+
+    public void setEntrances(Map<Integer, boolean[]> entrances)
+    {
+        this.entrances = entrances;
+    }
+
+    public String getTexturePath()
+    {
+        return TexturePath;
+    }
+
+    public void setTexturePath(String TexturePath)
+    {
+        this.TexturePath = TexturePath;
+    }
+    
+    
+    public abstract String onCellEnter(Player p); //interface für msgs
+
+    public boolean requiresFOV() // ob aufgedeckt oder nicht wird im player gespeichert
+    {
+        return true;
+    }
+    
+}

+ 61 - 61
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/cells/MessageCell.java

@@ -1,61 +1,61 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame.cells;
-
-import de.nplusc.iZc.MazeGame.Objects.Player;
-import java.util.Map;
-
-/**
- *
- * @author LH
- */
-public class MessageCell extends MazeCell
-{
-
-    public MessageCell(String Message, String MessageID, int bl,boolean AddToJournal, Map<Integer, boolean[]> pexits, Map<Integer, boolean[]> pentrances)
-    {
-        super(pexits, pentrances,bl,1);
-        this.Message = Message;
-        this.MessageID = MessageID;
-        this.AddToJournal = AddToJournal;
-    }
-
-    public MessageCell(String Message, String MessageID, boolean AddToJournal)
-    {
-        this.Message = Message;
-        this.MessageID = MessageID;
-        this.AddToJournal = AddToJournal;
-    }
-    
-    
-    
-    
-    String Message;
-    String MessageID;
-    boolean AddToJournal;
-    
-    @Override
-    public String onCellEnter(Player p)
-    {
-        if(!p.getJournalIDs().contains(MessageID)&&AddToJournal);
-        {
-            p.getJournalTexta().add(Message);
-        }
-        return Message;
-    }
-    
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame.cells;
+
+import de.nplusc.iZc.MazeGame.Objects.Player;
+import java.util.Map;
+
+/**
+ *
+ * @author LH
+ */
+public class MessageCell extends MazeCell
+{
+
+    public MessageCell(String Message, String MessageID, int bl,boolean AddToJournal, Map<Integer, boolean[]> pexits, Map<Integer, boolean[]> pentrances)
+    {
+        super(pexits, pentrances,bl,1);
+        this.Message = Message;
+        this.MessageID = MessageID;
+        this.AddToJournal = AddToJournal;
+    }
+
+    public MessageCell(String Message, String MessageID, boolean AddToJournal)
+    {
+        this.Message = Message;
+        this.MessageID = MessageID;
+        this.AddToJournal = AddToJournal;
+    }
+    
+    
+    
+    
+    String Message;
+    String MessageID;
+    boolean AddToJournal;
+    
+    @Override
+    public String onCellEnter(Player p)
+    {
+        if(!p.getJournalIDs().contains(MessageID)&&AddToJournal);
+        {
+            p.getJournalTexta().add(Message);
+        }
+        return Message;
+    }
+    
+}

+ 48 - 48
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/cells/NoteCell.java

@@ -1,48 +1,48 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame.cells;
-
-import de.nplusc.iZc.MazeGame.Objects.Player;
-import java.util.Map;
-
-/**
- *
- * @author LH
- */
-public class NoteCell extends EmptyCell
-{
-
-    public NoteCell(Map<Integer, boolean[]> pexits, Map<Integer, boolean[]> pentrances)
-    {
-        super(pexits, pentrances,0);
-    }
-
-    public NoteCell()
-    {
-    }
-
-    @Override
-    public boolean requiresFOV()
-    {
-        return false; //wird für Labyrinthrandnotitzen benutzt um diese immer zu zeigen
-    }
-    @Override
-    public boolean canEnter(int direction,int layer,Player p)
-    {
-        return false; //NoteCells liegen immer ausserhalb des labyrinths; innerhalb sind sie anders realisiert
-    }  
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame.cells;
+
+import de.nplusc.iZc.MazeGame.Objects.Player;
+import java.util.Map;
+
+/**
+ *
+ * @author LH
+ */
+public class NoteCell extends EmptyCell
+{
+
+    public NoteCell(Map<Integer, boolean[]> pexits, Map<Integer, boolean[]> pentrances)
+    {
+        super(pexits, pentrances,0);
+    }
+
+    public NoteCell()
+    {
+    }
+
+    @Override
+    public boolean requiresFOV()
+    {
+        return false; //wird für Labyrinthrandnotitzen benutzt um diese immer zu zeigen
+    }
+    @Override
+    public boolean canEnter(int direction,int layer,Player p)
+    {
+        return false; //NoteCells liegen immer ausserhalb des labyrinths; innerhalb sind sie anders realisiert
+    }  
+}

+ 42 - 42
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/cells/TeleportCell.java

@@ -1,42 +1,42 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame.cells;
-
-import de.nplusc.iZc.MazeGame.Objects.Player;
-
-/**
- *
- * @author LH
- */
-public class TeleportCell extends MazeCell
-{
-    
-    
-    
-    
-    String Message = "";
-    int targetChunkX,targetChunkY,targetX,targetY,targetZ;
-    @Override
-    public String onCellEnter(Player p)
-    {
-        
-        p.telePort(targetChunkX,targetChunkY,targetX, targetY, targetZ);
-        
-        return Message;
-    }
-    
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame.cells;
+
+import de.nplusc.iZc.MazeGame.Objects.Player;
+
+/**
+ *
+ * @author LH
+ */
+public class TeleportCell extends MazeCell
+{
+    
+    
+    
+    
+    String Message = "";
+    int targetChunkX,targetChunkY,targetX,targetY,targetZ;
+    @Override
+    public String onCellEnter(Player p)
+    {
+        
+        p.telePort(targetChunkX,targetChunkY,targetX, targetY, targetZ);
+        
+        return Message;
+    }
+    
+}

+ 31 - 31
MazeViewer/src/main/java/de/nplusc/iZc/MazeGame/utils/LevelLoaderTest.java

@@ -1,31 +1,31 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.iZc.MazeGame.utils;
-
-import de.nplusc.iZc.MazeGame.Level.Builders.StartArea_part1_sheet1F;
-
-/**
- *
- * @author LH
- */
-public class LevelLoaderTest
-{
-    public static void main(String[] args)
-    {
-        new StartArea_part1_sheet1F().export();
-    }
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.iZc.MazeGame.utils;
+
+import de.nplusc.iZc.MazeGame.Level.Builders.StartArea_part1_sheet1F;
+
+/**
+ *
+ * @author LH
+ */
+public class LevelLoaderTest
+{
+    public static void main(String[] args)
+    {
+        new StartArea_part1_sheet1F().export();
+    }
+}

+ 1 - 1
Megatron-Bridge/src/main/java/de/nplusc/izc/MegatronBridge/MegatronService.java

@@ -17,7 +17,7 @@ import java.util.Arrays;
 import java.util.LinkedList;
 import java.util.List;
 
-@Service
+@Serv7ice
 public class MegatronService
 {
     public void setVolume(int volume)

+ 19 - 19
NB-license.txt

@@ -1,20 +1,20 @@
-<#if licenseFirst??>
-${licenseFirst}
-</#if>
-${licensePrefix}Copyright (C) ${date?date?string("yyyy")} ${project.organization!user}
-${licensePrefix?replace(" +$", "", "r")}
-${licensePrefix}This program is free software: you can redistribute it and/or modify
-${licensePrefix}it under the terms of the GNU General Public License as published by
-${licensePrefix}the Free Software Foundation, either version 3 of the License, or
-${licensePrefix}(at your option) any later version.
-${licensePrefix?replace(" +$", "", "r")}
-${licensePrefix}This program is distributed in the hope that it will be useful,
-${licensePrefix}but WITHOUT ANY WARRANTY; without even the implied warranty of
-${licensePrefix}MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-${licensePrefix}GNU General Public License for more details.
-${licensePrefix?replace(" +$", "", "r")}
-${licensePrefix}You should have received a copy of the GNU General Public License
-${licensePrefix}along with this program.  If not, see <http://www.gnu.org/licenses/>.
-<#if licenseLast??>
-${licenseLast}
+<#if licenseFirst??>
+${licenseFirst}
+</#if>
+${licensePrefix}Copyright (C) ${date?date?string("yyyy")} ${project.organization!user}
+${licensePrefix?replace(" +$", "", "r")}
+${licensePrefix}This program is free software: you can redistribute it and/or modify
+${licensePrefix}it under the terms of the GNU General Public License as published by
+${licensePrefix}the Free Software Foundation, either version 3 of the License, or
+${licensePrefix}(at your option) any later version.
+${licensePrefix?replace(" +$", "", "r")}
+${licensePrefix}This program is distributed in the hope that it will be useful,
+${licensePrefix}but WITHOUT ANY WARRANTY; without even the implied warranty of
+${licensePrefix}MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+${licensePrefix}GNU General Public License for more details.
+${licensePrefix?replace(" +$", "", "r")}
+${licensePrefix}You should have received a copy of the GNU General Public License
+${licensePrefix}along with this program.  If not, see <http://www.gnu.org/licenses/>.
+<#if licenseLast??>
+${licenseLast}
 </#if>

+ 99 - 99
QuickStuff/src/main/java/FFBookMarksToPathFile/Converter.java

@@ -1,99 +1,99 @@
-/*
- * To change this license header, choose License Headers in Project Properties.
- * To change this template file, choose Tools | Templates
- * and open the template in the editor.
- */
-package FFBookMarksToPathFile;
-
-import de.nplusc.izc.tools.IOtools.DBWriter;
-import de.nplusc.izc.tools.IOtools.FileTK;
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-
-/**
- *
- * @author iZc <nplusc.de>
- */
-public class Converter
-{
-    static StringBuilder out = new StringBuilder();
-    public static void main(String[] args)
-    {
-        HashMap<String,ArrayList<String>> tree = new LinkedHashMap<>();
-        HashMap<String,String> fnames = new LinkedHashMap<>();
-        HashMap<String,ArrayList<String>> childrenMap = new LinkedHashMap<>();
-        DBWriter dbw = new DBWriter("", args[0], "", "", DBWriter.DBTYPE_SQLite);
-        String[][] bookmarksraw = dbw.queryTable("SELECT id,type,fk,parent,position,title from moz_bookmarks  ORDER BY id");
-        for (String[] bookmarkData : bookmarksraw)
-        {
-            String key = bookmarkData[0];
-            if(bookmarkData[1].equals("2"))//folder
-            {
-                if(!bookmarkData[3].equals("0"))
-                {
-                   String parent = bookmarkData[3];
-                    
-                    if(!childrenMap.containsKey(parent))
-                    {
-                        childrenMap.put(parent, new ArrayList<>());
-                    }
-                    childrenMap.get(parent).add(key);
-                }
-                childrenMap.put(key, new ArrayList<>());
-                if(!tree.containsKey(key))
-                {
-                    tree.put(key, new ArrayList<>());
-                }
-                fnames.put(key,bookmarkData[5]);
-            }
-            else
-            {
-                if(!bookmarkData[1].equals("1"))
-                {
-                    continue;
-                }
-                String parent = bookmarkData[3];
-                String datafield=dbw.querySingleCell("SELECT url FROM moz_places where id = "+bookmarkData[2]);
-                if(!tree.containsKey(parent))
-                {
-                    tree.put(parent, new ArrayList<>());
-                }
-                tree.get(parent).add(bookmarkData[5]+"=>"+datafield);
-            }
-        }
-        System.out.println("");
-        
-        String internalpath = "";
-        //1 = rootbookmark (hardcoded im firefoxxens)
-        recurseBookMarks("1", internalpath, tree, fnames, childrenMap);
-        
-        String res = out.toString();
-        FileTK.writeFile(res, args[1]);
-    }
-    private static void recurseBookMarks(String folder,String pathPrefix,
-            HashMap<String,ArrayList<String>> entries,HashMap<String,String> folders,HashMap<String,ArrayList<String>> childrenFolders)
-    {
-        pathPrefix=pathPrefix+folders.get(folder)+"/";
-        out.append(pathPrefix).append("\n");
-        ArrayList<String> childFolders = childrenFolders.get(folder);
-        if(childFolders!=null)
-        {
-            childFolders.sort((String a,String b)-> folders.get(a).compareTo(folders.get(b)));
-            for (String childFolder : childFolders)
-            {
-                recurseBookMarks(childFolder, pathPrefix, entries, folders, childrenFolders);
-            }
-        }
-        ArrayList<String> etrs = entries.get(folder);
-        if(etrs==null)
-        {
-            return;
-        }
-        etrs.sort((String a,String b)->a.compareTo(b));
-        for (String etr : etrs)
-        {
-            out.append(pathPrefix).append(etr).append("\n");
-        }
-    }
-}
+/*
+ * To change this license header, choose License Headers in Project Properties.
+ * To change this template file, choose Tools | Templates
+ * and open the template in the editor.
+ */
+package FFBookMarksToPathFile;
+
+import de.nplusc.izc.tools.IOtools.DBWriter;
+import de.nplusc.izc.tools.IOtools.FileTK;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+
+/**
+ *
+ * @author iZc <nplusc.de>
+ */
+public class Converter
+{
+    static StringBuilder out = new StringBuilder();
+    public static void main(String[] args)
+    {
+        HashMap<String,ArrayList<String>> tree = new LinkedHashMap<>();
+        HashMap<String,String> fnames = new LinkedHashMap<>();
+        HashMap<String,ArrayList<String>> childrenMap = new LinkedHashMap<>();
+        DBWriter dbw = new DBWriter("", args[0], "", "", DBWriter.DBTYPE_SQLite);
+        String[][] bookmarksraw = dbw.queryTable("SELECT id,type,fk,parent,position,title from moz_bookmarks  ORDER BY id");
+        for (String[] bookmarkData : bookmarksraw)
+        {
+            String key = bookmarkData[0];
+            if(bookmarkData[1].equals("2"))//folder
+            {
+                if(!bookmarkData[3].equals("0"))
+                {
+                   String parent = bookmarkData[3];
+                    
+                    if(!childrenMap.containsKey(parent))
+                    {
+                        childrenMap.put(parent, new ArrayList<>());
+                    }
+                    childrenMap.get(parent).add(key);
+                }
+                childrenMap.put(key, new ArrayList<>());
+                if(!tree.containsKey(key))
+                {
+                    tree.put(key, new ArrayList<>());
+                }
+                fnames.put(key,bookmarkData[5]);
+            }
+            else
+            {
+                if(!bookmarkData[1].equals("1"))
+                {
+                    continue;
+                }
+                String parent = bookmarkData[3];
+                String datafield=dbw.querySingleCell("SELECT url FROM moz_places where id = "+bookmarkData[2]);
+                if(!tree.containsKey(parent))
+                {
+                    tree.put(parent, new ArrayList<>());
+                }
+                tree.get(parent).add(bookmarkData[5]+"=>"+datafield);
+            }
+        }
+        System.out.println("");
+        
+        String internalpath = "";
+        //1 = rootbookmark (hardcoded im firefoxxens)
+        recurseBookMarks("1", internalpath, tree, fnames, childrenMap);
+        
+        String res = out.toString();
+        FileTK.writeFile(res, args[1]);
+    }
+    private static void recurseBookMarks(String folder,String pathPrefix,
+            HashMap<String,ArrayList<String>> entries,HashMap<String,String> folders,HashMap<String,ArrayList<String>> childrenFolders)
+    {
+        pathPrefix=pathPrefix+folders.get(folder)+"/";
+        out.append(pathPrefix).append("\n");
+        ArrayList<String> childFolders = childrenFolders.get(folder);
+        if(childFolders!=null)
+        {
+            childFolders.sort((String a,String b)-> folders.get(a).compareTo(folders.get(b)));
+            for (String childFolder : childFolders)
+            {
+                recurseBookMarks(childFolder, pathPrefix, entries, folders, childrenFolders);
+            }
+        }
+        ArrayList<String> etrs = entries.get(folder);
+        if(etrs==null)
+        {
+            return;
+        }
+        etrs.sort((String a,String b)->a.compareTo(b));
+        for (String etr : etrs)
+        {
+            out.append(pathPrefix).append(etr).append("\n");
+        }
+    }
+}

+ 44 - 0
QuickStuff/src/main/java/QuickVerifyCrap/GECTPatternMassageliege.java

@@ -0,0 +1,44 @@
+package QuickVerifyCrap;
+
+import java.io.RandomAccessFile;
+
+public class GECTPatternMassageliege
+{
+    public static void main(String[] args) throws Exception{
+        RandomAccessFile base = new RandomAccessFile("/mnt/d/LOA/000023/002/CT-GREE.BIN","r");
+
+        RandomAccessFile frq = new RandomAccessFile("/mnt/d/LOA/000023/002/CT-GREE.BIN.freq.unified","rw");
+
+        for(int f=0;f<40;f++)
+        {
+
+            base.seek(0);
+            byte[] freqmap = new byte[256];
+
+            int fcnt = 14;//Integer.reverseBytes(base.readInt());
+
+            base.seek(0x10000);
+            for(int i=0;i<fcnt;i++)
+            {
+                int ignored = base.readInt();
+                int ignored2=base.readInt();
+                int len = Integer.reverseBytes(base.readInt())*40;
+                int ignored3=base.readInt();
+                //base.readShort(); //ignored, constant
+                byte[] content = new byte[len];
+                base.read(content);
+                for(int j=f;j<len;j+=40)
+                {
+                    int freqidx = ((int)content[j])&0xFF;
+                    if(freqmap[freqidx]!=-1)
+                    {
+                        freqmap[freqidx] = (byte) (freqmap[freqidx]+1);
+                    }
+                }
+            }
+
+            frq.write(freqmap);
+        }
+
+    }
+}

+ 97 - 97
Readme.txt

@@ -1,97 +1,97 @@
-Repository if the iZinked Tools-Suite. to compile the code just type gradlew in your command line window
-
-Currently Supported OSes: Windows
-
-
-Contained programs:
-
-iZpl-Android
-    Status: Pre-Alpha
-    Folder IZPL-A
-    Description:Android port of iZplaylist
-    Note: code in the filechooser subfolder is from : https://code.google.com/p/android-file-chooser/
-
-iZplaylist:
-    Status: Alpha
-    Folder: iZpl
-    Description: Playlist-Management with priorities. allows to interlink with VLC via different methods by default.
-    OSes: Windows
-    to compile run gradlew iZpl:dZ in the root folder.
-    Output is in iZpl/build/distributions 
-    SOme components reside in izpl-shared so they can also be reused by izpl-server and other ports in the future
-iZPlaylist-Plugins:
-    Folder: izplplugins
-    Remark: Cntains only submodules
-    Editor:
-        Status: Alpha
-        Folder:Editor
-        Description: Provides the UI to edit Playlists graphically
-        OSes: any supported by iZpl
-    foobar2000_others:
-        Status: NYI Stub
-    GameRadio:
-        Status: Alpha
-        Folder:GameRadio
-        Description: Utility to convert iZpl-ed data to structures understandable by Video games
-        OSes: Windows
-    ITunes:
-        Status: NYI Stub
-    WMP:
-        Status: ALpha
-        Folder: WMP
-        Description: Interface-adapter to use the WMP playback engine for playing music
-        OSes: Windows    
-iZsetup:
-    Status: Unstable-Prealpha
-    Folder: iZsetup
-    Description: Installer-System for the other IZinked-Suite Tools
-iZstreamer
-    Status: Beta
-    Folder: iZstreamer
-    Description: ninimal player for one webradio station
-    OSes: Windows
-iZlaunch:
-    Status: unstable
-    Folder: iZlaunch
-    Description: small utility to allow selfupdate when using the old java -jar launch-way
-    OSes: any java8-supporting one
-iZPaq-SFX:
-    Status: Highly unstable
-    Folder: iZpaqSFX
-    Description: SFX-stub to unpack iZpaq-files
-    OSes: any java8-supporting one
-iZYoutuber
-    Status: Erroring-unstable
-    Folder: iZYT2SF
-    Description: UI for FFmpeg & Youtube-DL
-    OSes: Windoze
-LogBlockHeatMapper
-    Status: unstable
-    Folder: LogBlockHeatMapper
-    Description: Tool to crunch a exported Logblock database into a heatmap
-    OSes: any
-MazeViewer
-    Status: Unfinished-Backburner
-    Folder: MazeViewer
-    Description: Logic and UI for maze-games
-    OSes: Windoze
-ToolKit
-    Status: alpha
-    Folder: ToolKit
-    Description: COmmon utilities/classes of the IZinked-Suite. Not usable by itself
-    OSes: any Java-8 compatible
-TWPUtil
-    Status: Unfinished-Backburner
-    Folder: TWPUtil
-    Description: old code which related to managing of special images
-    OSes: Windoze
-UpidTK
-    Status: Alpha
-    Folder: UpidTK
-    Description: TOol for managing some internal data. Requires some external binaries not yet moved into repository for full function
-    OSes: windows
-WallpaperCacheManager
-    Status: alpha
-    Folder: WPCMGr
-    Description: tool for managing wallpapers in larger collection. Requires installed ImageMagick
-    OSes: windows
+Repository if the iZinked Tools-Suite. to compile the code just type gradlew in your command line window
+
+Currently Supported OSes: Windows
+
+
+Contained programs:
+
+iZpl-Android
+    Status: Pre-Alpha
+    Folder IZPL-A
+    Description:Android port of iZplaylist
+    Note: code in the filechooser subfolder is from : https://code.google.com/p/android-file-chooser/
+
+iZplaylist:
+    Status: Alpha
+    Folder: iZpl
+    Description: Playlist-Management with priorities. allows to interlink with VLC via different methods by default.
+    OSes: Windows
+    to compile run gradlew iZpl:dZ in the root folder.
+    Output is in iZpl/build/distributions 
+    SOme components reside in izpl-shared so they can also be reused by izpl-server and other ports in the future
+iZPlaylist-Plugins:
+    Folder: izplplugins
+    Remark: Cntains only submodules
+    Editor:
+        Status: Alpha
+        Folder:Editor
+        Description: Provides the UI to edit Playlists graphically
+        OSes: any supported by iZpl
+    foobar2000_others:
+        Status: NYI Stub
+    GameRadio:
+        Status: Alpha
+        Folder:GameRadio
+        Description: Utility to convert iZpl-ed data to structures understandable by Video games
+        OSes: Windows
+    ITunes:
+        Status: NYI Stub
+    WMP:
+        Status: ALpha
+        Folder: WMP
+        Description: Interface-adapter to use the WMP playback engine for playing music
+        OSes: Windows    
+iZsetup:
+    Status: Unstable-Prealpha
+    Folder: iZsetup
+    Description: Installer-System for the other IZinked-Suite Tools
+iZstreamer
+    Status: Beta
+    Folder: iZstreamer
+    Description: ninimal player for one webradio station
+    OSes: Windows
+iZlaunch:
+    Status: unstable
+    Folder: iZlaunch
+    Description: small utility to allow selfupdate when using the old java -jar launch-way
+    OSes: any java8-supporting one
+iZPaq-SFX:
+    Status: Highly unstable
+    Folder: iZpaqSFX
+    Description: SFX-stub to unpack iZpaq-files
+    OSes: any java8-supporting one
+iZYoutuber
+    Status: Erroring-unstable
+    Folder: iZYT2SF
+    Description: UI for FFmpeg & Youtube-DL
+    OSes: Windoze
+LogBlockHeatMapper
+    Status: unstable
+    Folder: LogBlockHeatMapper
+    Description: Tool to crunch a exported Logblock database into a heatmap
+    OSes: any
+MazeViewer
+    Status: Unfinished-Backburner
+    Folder: MazeViewer
+    Description: Logic and UI for maze-games
+    OSes: Windoze
+ToolKit
+    Status: alpha
+    Folder: ToolKit
+    Description: COmmon utilities/classes of the IZinked-Suite. Not usable by itself
+    OSes: any Java-8 compatible
+TWPUtil
+    Status: Unfinished-Backburner
+    Folder: TWPUtil
+    Description: old code which related to managing of special images
+    OSes: Windoze
+UpidTK
+    Status: Alpha
+    Folder: UpidTK
+    Description: TOol for managing some internal data. Requires some external binaries not yet moved into repository for full function
+    OSes: windows
+WallpaperCacheManager
+    Status: alpha
+    Folder: WPCMGr
+    Description: tool for managing wallpapers in larger collection. Requires installed ImageMagick
+    OSes: windows

+ 514 - 514
TWPUtil/src/main/java/de/nplusc/izc/TWPUtil/OpenGUI.java

@@ -1,514 +1,514 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.TWPUtil;
-
-import de.nplusc.izc.tools.IOtools.iZformats.IZTile;
-import de.nplusc.izc.tools.UiToolz.UiTools;
-import de.nplusc.izc.tools.baseTools.Tools;
-import java.awt.Graphics;
-import java.awt.Image;
-import java.awt.Graphics2D;
-import java.awt.image.BufferedImage;
-import javax.swing.DefaultListModel;
-
-/**
- *
- * @author LH
- */
-public class OpenGUI extends javax.swing.JFrame
-{
-    TileRegistry r;
-    /**
-     * Creates new form OpenGUI
-     */
-    public OpenGUI()
-    {
-        r=new TileRegistry(Tools.processEnvVarsinLine("%appdata%\\iZTiler\\persistentData\\TileReg"));
-        initComponents();
-        reloadTlist();
-    }
-
-    /**
-     * This method is called from within the constructor to
-     * initialize the form.
-     * WARNING: Do NOT modify this code. The content of this method is
-     * always regenerated by the Form Editor.
-     */
-    @SuppressWarnings("unchecked")
-    boolean SizeFinalized = false;
-    
-    
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents()
-    {
-
-        sbUpDown = new javax.swing.JScrollBar();
-        sbLEftRight = new javax.swing.JScrollBar();
-        pnlViewPort = new javax.swing.JPanel();
-        init = new javax.swing.JButton();
-        jSeparator1 = new javax.swing.JSeparator();
-        jSeparator2 = new javax.swing.JSeparator();
-        txfBreite = new javax.swing.JTextField();
-        txfHoehe = new javax.swing.JTextField();
-        jSeparator3 = new javax.swing.JSeparator();
-        pbarProgress = new javax.swing.JProgressBar();
-        lblStatus = new javax.swing.JLabel();
-        createTiler = new javax.swing.JButton();
-        regTile = new javax.swing.JButton();
-        pnlLSPV = new javax.swing.JPanel();
-        jScrollPane1 = new javax.swing.JScrollPane();
-        lstTilesOfPrj = new javax.swing.JList();
-
-        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
-
-        sbUpDown.addAdjustmentListener(new java.awt.event.AdjustmentListener()
-        {
-            public void adjustmentValueChanged(java.awt.event.AdjustmentEvent evt)
-            {
-                sbUpDownAdjustmentValueChanged(evt);
-            }
-        });
-
-        sbLEftRight.setOrientation(javax.swing.JScrollBar.HORIZONTAL);
-        sbLEftRight.addAdjustmentListener(new java.awt.event.AdjustmentListener()
-        {
-            public void adjustmentValueChanged(java.awt.event.AdjustmentEvent evt)
-            {
-                sbLEftRightAdjustmentValueChanged(evt);
-            }
-        });
-
-        pnlViewPort.addMouseListener(new java.awt.event.MouseAdapter()
-        {
-            public void mousePressed(java.awt.event.MouseEvent evt)
-            {
-                pnlViewPortMousePressed(evt);
-            }
-        });
-
-        javax.swing.GroupLayout pnlViewPortLayout = new javax.swing.GroupLayout(pnlViewPort);
-        pnlViewPort.setLayout(pnlViewPortLayout);
-        pnlViewPortLayout.setHorizontalGroup(
-            pnlViewPortLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 0, Short.MAX_VALUE)
-        );
-        pnlViewPortLayout.setVerticalGroup(
-            pnlViewPortLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 418, Short.MAX_VALUE)
-        );
-
-        init.setText("Initialisieren");
-        init.addActionListener(new java.awt.event.ActionListener()
-        {
-            public void actionPerformed(java.awt.event.ActionEvent evt)
-            {
-                initActionPerformed(evt);
-            }
-        });
-
-        jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);
-
-        txfBreite.setEditable(false);
-        txfBreite.setText("Breite");
-        txfBreite.addMouseListener(new java.awt.event.MouseAdapter()
-        {
-            public void mousePressed(java.awt.event.MouseEvent evt)
-            {
-                txfBreiteMousePressed(evt);
-            }
-        });
-        txfBreite.addActionListener(new java.awt.event.ActionListener()
-        {
-            public void actionPerformed(java.awt.event.ActionEvent evt)
-            {
-                txfBreiteActionPerformed(evt);
-            }
-        });
-
-        txfHoehe.setEditable(false);
-        txfHoehe.setText("Höhe");
-        txfHoehe.addMouseListener(new java.awt.event.MouseAdapter()
-        {
-            public void mousePressed(java.awt.event.MouseEvent evt)
-            {
-                txfHoeheMousePressed(evt);
-            }
-        });
-
-        lblStatus.setText("Status");
-
-        createTiler.setText("Tile erzeugen");
-        createTiler.addActionListener(new java.awt.event.ActionListener()
-        {
-            public void actionPerformed(java.awt.event.ActionEvent evt)
-            {
-                createTilerActionPerformed(evt);
-            }
-        });
-
-        regTile.setText("Tile registrieren+");
-        regTile.addActionListener(new java.awt.event.ActionListener()
-        {
-            public void actionPerformed(java.awt.event.ActionEvent evt)
-            {
-                regTileActionPerformed(evt);
-            }
-        });
-
-        javax.swing.GroupLayout pnlLSPVLayout = new javax.swing.GroupLayout(pnlLSPV);
-        pnlLSPV.setLayout(pnlLSPVLayout);
-        pnlLSPVLayout.setHorizontalGroup(
-            pnlLSPVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 228, Short.MAX_VALUE)
-        );
-        pnlLSPVLayout.setVerticalGroup(
-            pnlLSPVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 262, Short.MAX_VALUE)
-        );
-
-        lstTilesOfPrj.setModel(new javax.swing.DefaultListModel<String>()
-        );
-        lstTilesOfPrj.addMouseListener(new java.awt.event.MouseAdapter()
-        {
-            public void mousePressed(java.awt.event.MouseEvent evt)
-            {
-                lstTilesOfPrjMousePressed(evt);
-            }
-        });
-        jScrollPane1.setViewportView(lstTilesOfPrj);
-
-        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
-        getContentPane().setLayout(layout);
-        layout.setHorizontalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(layout.createSequentialGroup()
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
-                    .addComponent(sbLEftRight, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 677, Short.MAX_VALUE)
-                    .addComponent(pnlViewPort, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(sbUpDown, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addGap(27, 27, 27)
-                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addGap(18, 18, 18)
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(layout.createSequentialGroup()
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addComponent(jSeparator1)
-                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                                .addGap(0, 0, Short.MAX_VALUE)
-                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                                        .addComponent(txfBreite, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
-                                        .addGap(18, 18, 18)
-                                        .addComponent(txfHoehe, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
-                                    .addComponent(init, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)))
-                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                                .addComponent(regTile, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE)
-                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
-                                .addComponent(createTiler, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)))
-                        .addGap(28, 28, 28))
-                    .addGroup(layout.createSequentialGroup()
-                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
-                        .addGap(18, 18, 18)
-                        .addComponent(pnlLSPV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addContainerGap())))
-            .addComponent(pbarProgress, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
-                    .addComponent(lblStatus, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
-                    .addComponent(jSeparator3))
-                .addContainerGap())
-        );
-        layout.setVerticalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(layout.createSequentialGroup()
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(layout.createSequentialGroup()
-                        .addGap(32, 32, 32)
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                            .addComponent(txfBreite, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                            .addComponent(txfHoehe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
-                        .addGap(18, 18, 18)
-                        .addComponent(init)
-                        .addGap(25, 25, 25)
-                        .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
-                            .addComponent(createTiler)
-                            .addComponent(regTile))
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addComponent(pnlLSPV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE)))
-                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
-                        .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 439, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addGroup(layout.createSequentialGroup()
-                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
-                                .addComponent(sbUpDown, javax.swing.GroupLayout.PREFERRED_SIZE, 418, javax.swing.GroupLayout.PREFERRED_SIZE)
-                                .addComponent(pnlViewPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
-                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                            .addComponent(sbLEftRight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)
-                .addComponent(lblStatus)
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                .addComponent(pbarProgress, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
-        );
-
-        pack();
-    }// </editor-fold>//GEN-END:initComponents
-
-    private void txfBreiteMousePressed(java.awt.event.MouseEvent evt)//GEN-FIRST:event_txfBreiteMousePressed
-    {//GEN-HEADEREND:event_txfBreiteMousePressed
-        if(SizeFinalized)
-            return;
-        int s = Tools.numberInputWIndow(4, new int[]{-1});
-        if(s>0)
-        {
-        txfBreite.setText(""+s);
-        }
-    }//GEN-LAST:event_txfBreiteMousePressed
-
-    private void txfBreiteActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_txfBreiteActionPerformed
-    {//GEN-HEADEREND:event_txfBreiteActionPerformed
-
-    }//GEN-LAST:event_txfBreiteActionPerformed
-
-    private void txfHoeheMousePressed(java.awt.event.MouseEvent evt)//GEN-FIRST:event_txfHoeheMousePressed
-    {//GEN-HEADEREND:event_txfHoeheMousePressed
-        if(SizeFinalized)
-        return;
-        int s = Tools.numberInputWIndow(4, new int[]{-1});
-        if(s>0)
-        {
-        txfHoehe.setText(""+s);
-        }
-    }//GEN-LAST:event_txfHoeheMousePressed
-
-    
-    BufferedImage Overlay;
-    TileAttrib[][][] tileWorkArea;
-    private void initActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_initActionPerformed
-    {//GEN-HEADEREND:event_initActionPerformed
-        new Thread(new Runnable()
-        {
-
-            @Override
-            public void run()
-            {
-                IZTile gridUnit = new IZTile("D:\\srcs\\iztt\\GridUnit.iZtile");
-                Image grid = gridUnit.getThumb();
-                int height = Integer.valueOf(txfHoehe.getText());
-                int width = Integer.valueOf(txfBreite.getText());
-                int prg = 0;
-                int Tiles = height*width;
-                pbarProgress.setMinimum(0);
-                pbarProgress.setMaximum(Tiles);
-                lblStatus.setText("Erzeuge Gitternetz");
-                tileWorkArea = new TileAttrib[width][height][];
-                BufferedImage img = new BufferedImage(width*50, height*50, BufferedImage.TYPE_INT_ARGB);
-                Graphics2D painter = img.createGraphics();
-                for (int i = 0; i < width; i++)
-                {
-                    for (int j = 0; j < height; j++)
-                    {
-                        painter.drawImage(grid, i*50, j*50, null);
-                        prg++;
-                        TileAttrib[] layers = new TileAttrib[100];
-                        for (int k = 0; k < 100; k++)
-                        {
-                            layers[i] = new TileAttrib();
-                        }
-                        tileWorkArea[i][j] = layers;
-                        
-                        if(prg%10==0)
-                        {
-                            pbarProgress.setValue(prg);
-                        }
-                    }
-                }
-                Overlay = img;
-                
-                int vpHeight = pnlViewPort.getHeight();
-                int vpWidth = pnlViewPort.getWidth();
-                sbUpDown.setMinimum(0);
-                sbUpDown.setMaximum(height*50-vpHeight);
-                sbLEftRight.setMinimum(0);
-                sbLEftRight.setMaximum(width*50-vpWidth);
-                sbUpDown.setValue(0);
-                sbLEftRight.setValue(0);
-                redraw();
-                lblStatus.setText("Bereit");
-            }
-            
-        }).start();
-    }//GEN-LAST:event_initActionPerformed
-
-    private void redraw()
-    {
-        int vpHeight = pnlViewPort.getHeight();
-        int vpWidth = pnlViewPort.getWidth();
-        int x =  sbLEftRight.getValue();
-        int y = sbUpDown.getValue();
-        Image viewGrid = Overlay.getSubimage(x, y, vpWidth, vpHeight);
-        Graphics2D pa = (Graphics2D) pnlViewPort.getGraphics();
-        pa.clearRect(0, 0, vpWidth, vpHeight);
-        pa.drawImage(viewGrid, 0, 0, null);
-        
-    }
-           
-    
-    
-    
-    private void sbUpDownAdjustmentValueChanged(java.awt.event.AdjustmentEvent evt)//GEN-FIRST:event_sbUpDownAdjustmentValueChanged
-    {//GEN-HEADEREND:event_sbUpDownAdjustmentValueChanged
-        redraw();
-    }//GEN-LAST:event_sbUpDownAdjustmentValueChanged
-
-    private void sbLEftRightAdjustmentValueChanged(java.awt.event.AdjustmentEvent evt)//GEN-FIRST:event_sbLEftRightAdjustmentValueChanged
-    {//GEN-HEADEREND:event_sbLEftRightAdjustmentValueChanged
-        redraw();
-    }//GEN-LAST:event_sbLEftRightAdjustmentValueChanged
-
-    private void createTilerActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_createTilerActionPerformed
-    {//GEN-HEADEREND:event_createTilerActionPerformed
-        new TileImporter(r).setVisible(true);
-    }//GEN-LAST:event_createTilerActionPerformed
-
-    private void regTileActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_regTileActionPerformed
-    {//GEN-HEADEREND:event_regTileActionPerformed
-        String tpath = Tools.FileChooseDlg(this, true, false, new String[]{"iZtile"});
-        r.addTile(tpath, Tools.getInputString("Name"),true);
-        reloadTlist();
-    }//GEN-LAST:event_regTileActionPerformed
-
-    private void lstTilesOfPrjMousePressed(java.awt.event.MouseEvent evt)//GEN-FIRST:event_lstTilesOfPrjMousePressed
-    {//GEN-HEADEREND:event_lstTilesOfPrjMousePressed
-        DefaultListModel<String> lm = (DefaultListModel<String>) lstTilesOfPrj.getModel();
-        String tn = lm.get(lstTilesOfPrj.getSelectedIndex());
-        IZTile t = r.getTile(tn);
-        UiTools.ScaleImageIntoFrame(t.getThumbPath(), (Graphics2D) pnlLSPV.getGraphics(), pnlLSPV.getHeight(), pnlLSPV.getWidth(), true);
-    }//GEN-LAST:event_lstTilesOfPrjMousePressed
-
-    private void pnlViewPortMousePressed(java.awt.event.MouseEvent evt)//GEN-FIRST:event_pnlViewPortMousePressed
-    {//GEN-HEADEREND:event_pnlViewPortMousePressed
-        int w = evt.getX();
-        int h = evt.getY();
-        int offsX = sbLEftRight.getValue();
-        int offsY = sbUpDown.getValue();
-        boolean add = Tools.dlg(true, "Tile Hinzufügen oder bearbeiten?", "", "Hinzufügen", "Bearbeiten");
-        int tX = (w+offsX)&50;
-        int tY = (h+offsY)%50;
-        if(add)
-        {
-            DefaultListModel<String> lm = (DefaultListModel<String>) lstTilesOfPrj.getModel();
-            String tn = lm.get(lstTilesOfPrj.getSelectedIndex());
-            IZTile t = r.getTile(tn);
-            if(tileWorkArea[tX][tY][0].getTopmostOccupier()==-1)
-            {
-                tileWorkArea[tX][tY][0].setHeight(t.getHeightInTiles());
-                tileWorkArea[tX][tY][0].setWidth(t.getWidthInTiles());
-                
-            }
-        }
-    }//GEN-LAST:event_pnlViewPortMousePressed
-
-    
-    
-    private void reloadTlist()
-    {
-        DefaultListModel<String> lm = (DefaultListModel<String>) lstTilesOfPrj.getModel();
-        lm.clear();
-        String[] tiles = r.getNames();
-        for (String tileid : tiles)
-        {
-            lm.addElement(tileid);
-        }
-    }
-    
-    
-    
-    /**
-     * @param args the command line arguments
-     */
-    public static void main(String args[])
-    {
-        /* Set the Nimbus look and feel */
-        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
-        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
-         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
-         */
-        try
-        {
-            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
-            {
-                if ("Nimbus".equals(info.getName()))
-                {
-                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
-                    break;
-                }
-            }
-        }
-        catch (ClassNotFoundException ex)
-        {
-            java.util.logging.Logger.getLogger(OpenGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-        catch (InstantiationException ex)
-        {
-            java.util.logging.Logger.getLogger(OpenGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-        catch (IllegalAccessException ex)
-        {
-            java.util.logging.Logger.getLogger(OpenGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-        catch (javax.swing.UnsupportedLookAndFeelException ex)
-        {
-            java.util.logging.Logger.getLogger(OpenGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
-        }
-        //</editor-fold>
-
-        /* Create and display the form */
-        java.awt.EventQueue.invokeLater(new Runnable()
-        {
-            public void run()
-            {
-                new OpenGUI().setVisible(true);
-            }
-        });
-        
-        
-    }
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JButton createTiler;
-    private javax.swing.JButton init;
-    private javax.swing.JScrollPane jScrollPane1;
-    private javax.swing.JSeparator jSeparator1;
-    private javax.swing.JSeparator jSeparator2;
-    private javax.swing.JSeparator jSeparator3;
-    private javax.swing.JLabel lblStatus;
-    private javax.swing.JList lstTilesOfPrj;
-    private javax.swing.JProgressBar pbarProgress;
-    private javax.swing.JPanel pnlLSPV;
-    private javax.swing.JPanel pnlViewPort;
-    private javax.swing.JButton regTile;
-    private javax.swing.JScrollBar sbLEftRight;
-    private javax.swing.JScrollBar sbUpDown;
-    private javax.swing.JTextField txfBreite;
-    private javax.swing.JTextField txfHoehe;
-    // End of variables declaration//GEN-END:variables
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.TWPUtil;
+
+import de.nplusc.izc.tools.IOtools.iZformats.IZTile;
+import de.nplusc.izc.tools.UiToolz.UiTools;
+import de.nplusc.izc.tools.baseTools.Tools;
+import java.awt.Graphics;
+import java.awt.Image;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import javax.swing.DefaultListModel;
+
+/**
+ *
+ * @author LH
+ */
+public class OpenGUI extends javax.swing.JFrame
+{
+    TileRegistry r;
+    /**
+     * Creates new form OpenGUI
+     */
+    public OpenGUI()
+    {
+        r=new TileRegistry(Tools.processEnvVarsinLine("%appdata%\\iZTiler\\persistentData\\TileReg"));
+        initComponents();
+        reloadTlist();
+    }
+
+    /**
+     * This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    boolean SizeFinalized = false;
+    
+    
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents()
+    {
+
+        sbUpDown = new javax.swing.JScrollBar();
+        sbLEftRight = new javax.swing.JScrollBar();
+        pnlViewPort = new javax.swing.JPanel();
+        init = new javax.swing.JButton();
+        jSeparator1 = new javax.swing.JSeparator();
+        jSeparator2 = new javax.swing.JSeparator();
+        txfBreite = new javax.swing.JTextField();
+        txfHoehe = new javax.swing.JTextField();
+        jSeparator3 = new javax.swing.JSeparator();
+        pbarProgress = new javax.swing.JProgressBar();
+        lblStatus = new javax.swing.JLabel();
+        createTiler = new javax.swing.JButton();
+        regTile = new javax.swing.JButton();
+        pnlLSPV = new javax.swing.JPanel();
+        jScrollPane1 = new javax.swing.JScrollPane();
+        lstTilesOfPrj = new javax.swing.JList();
+
+        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
+
+        sbUpDown.addAdjustmentListener(new java.awt.event.AdjustmentListener()
+        {
+            public void adjustmentValueChanged(java.awt.event.AdjustmentEvent evt)
+            {
+                sbUpDownAdjustmentValueChanged(evt);
+            }
+        });
+
+        sbLEftRight.setOrientation(javax.swing.JScrollBar.HORIZONTAL);
+        sbLEftRight.addAdjustmentListener(new java.awt.event.AdjustmentListener()
+        {
+            public void adjustmentValueChanged(java.awt.event.AdjustmentEvent evt)
+            {
+                sbLEftRightAdjustmentValueChanged(evt);
+            }
+        });
+
+        pnlViewPort.addMouseListener(new java.awt.event.MouseAdapter()
+        {
+            public void mousePressed(java.awt.event.MouseEvent evt)
+            {
+                pnlViewPortMousePressed(evt);
+            }
+        });
+
+        javax.swing.GroupLayout pnlViewPortLayout = new javax.swing.GroupLayout(pnlViewPort);
+        pnlViewPort.setLayout(pnlViewPortLayout);
+        pnlViewPortLayout.setHorizontalGroup(
+            pnlViewPortLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGap(0, 0, Short.MAX_VALUE)
+        );
+        pnlViewPortLayout.setVerticalGroup(
+            pnlViewPortLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGap(0, 418, Short.MAX_VALUE)
+        );
+
+        init.setText("Initialisieren");
+        init.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                initActionPerformed(evt);
+            }
+        });
+
+        jSeparator2.setOrientation(javax.swing.SwingConstants.VERTICAL);
+
+        txfBreite.setEditable(false);
+        txfBreite.setText("Breite");
+        txfBreite.addMouseListener(new java.awt.event.MouseAdapter()
+        {
+            public void mousePressed(java.awt.event.MouseEvent evt)
+            {
+                txfBreiteMousePressed(evt);
+            }
+        });
+        txfBreite.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                txfBreiteActionPerformed(evt);
+            }
+        });
+
+        txfHoehe.setEditable(false);
+        txfHoehe.setText("Höhe");
+        txfHoehe.addMouseListener(new java.awt.event.MouseAdapter()
+        {
+            public void mousePressed(java.awt.event.MouseEvent evt)
+            {
+                txfHoeheMousePressed(evt);
+            }
+        });
+
+        lblStatus.setText("Status");
+
+        createTiler.setText("Tile erzeugen");
+        createTiler.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                createTilerActionPerformed(evt);
+            }
+        });
+
+        regTile.setText("Tile registrieren+");
+        regTile.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                regTileActionPerformed(evt);
+            }
+        });
+
+        javax.swing.GroupLayout pnlLSPVLayout = new javax.swing.GroupLayout(pnlLSPV);
+        pnlLSPV.setLayout(pnlLSPVLayout);
+        pnlLSPVLayout.setHorizontalGroup(
+            pnlLSPVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGap(0, 228, Short.MAX_VALUE)
+        );
+        pnlLSPVLayout.setVerticalGroup(
+            pnlLSPVLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGap(0, 262, Short.MAX_VALUE)
+        );
+
+        lstTilesOfPrj.setModel(new javax.swing.DefaultListModel<String>()
+        );
+        lstTilesOfPrj.addMouseListener(new java.awt.event.MouseAdapter()
+        {
+            public void mousePressed(java.awt.event.MouseEvent evt)
+            {
+                lstTilesOfPrjMousePressed(evt);
+            }
+        });
+        jScrollPane1.setViewportView(lstTilesOfPrj);
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
+        getContentPane().setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
+                    .addComponent(sbLEftRight, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, 677, Short.MAX_VALUE)
+                    .addComponent(pnlViewPort, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(sbUpDown, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addGap(27, 27, 27)
+                .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addGap(18, 18, 18)
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(jSeparator1)
+                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                                .addGap(0, 0, Short.MAX_VALUE)
+                                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                                        .addComponent(txfBreite, javax.swing.GroupLayout.PREFERRED_SIZE, 58, javax.swing.GroupLayout.PREFERRED_SIZE)
+                                        .addGap(18, 18, 18)
+                                        .addComponent(txfHoehe, javax.swing.GroupLayout.PREFERRED_SIZE, 55, javax.swing.GroupLayout.PREFERRED_SIZE))
+                                    .addComponent(init, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 131, javax.swing.GroupLayout.PREFERRED_SIZE)))
+                            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                                .addComponent(regTile, javax.swing.GroupLayout.DEFAULT_SIZE, 212, Short.MAX_VALUE)
+                                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                                .addComponent(createTiler, javax.swing.GroupLayout.PREFERRED_SIZE, 137, javax.swing.GroupLayout.PREFERRED_SIZE)))
+                        .addGap(28, 28, 28))
+                    .addGroup(layout.createSequentialGroup()
+                        .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)
+                        .addGap(18, 18, 18)
+                        .addComponent(pnlLSPV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addContainerGap())))
+            .addComponent(pbarProgress, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+                    .addComponent(lblStatus, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
+                    .addComponent(jSeparator3))
+                .addContainerGap())
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addGap(32, 32, 32)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                            .addComponent(txfBreite, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                            .addComponent(txfHoehe, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                        .addGap(18, 18, 18)
+                        .addComponent(init)
+                        .addGap(25, 25, 25)
+                        .addComponent(jSeparator1, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
+                            .addComponent(createTiler)
+                            .addComponent(regTile))
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(pnlLSPV, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 249, javax.swing.GroupLayout.PREFERRED_SIZE)))
+                    .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+                        .addComponent(jSeparator2, javax.swing.GroupLayout.PREFERRED_SIZE, 439, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addGroup(layout.createSequentialGroup()
+                            .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+                                .addComponent(sbUpDown, javax.swing.GroupLayout.PREFERRED_SIZE, 418, javax.swing.GroupLayout.PREFERRED_SIZE)
+                                .addComponent(pnlViewPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
+                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                            .addComponent(sbLEftRight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(jSeparator3, javax.swing.GroupLayout.PREFERRED_SIZE, 10, javax.swing.GroupLayout.PREFERRED_SIZE)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 28, Short.MAX_VALUE)
+                .addComponent(lblStatus)
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                .addComponent(pbarProgress, javax.swing.GroupLayout.PREFERRED_SIZE, 36, javax.swing.GroupLayout.PREFERRED_SIZE))
+        );
+
+        pack();
+    }// </editor-fold>//GEN-END:initComponents
+
+    private void txfBreiteMousePressed(java.awt.event.MouseEvent evt)//GEN-FIRST:event_txfBreiteMousePressed
+    {//GEN-HEADEREND:event_txfBreiteMousePressed
+        if(SizeFinalized)
+            return;
+        int s = Tools.numberInputWIndow(4, new int[]{-1});
+        if(s>0)
+        {
+        txfBreite.setText(""+s);
+        }
+    }//GEN-LAST:event_txfBreiteMousePressed
+
+    private void txfBreiteActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_txfBreiteActionPerformed
+    {//GEN-HEADEREND:event_txfBreiteActionPerformed
+
+    }//GEN-LAST:event_txfBreiteActionPerformed
+
+    private void txfHoeheMousePressed(java.awt.event.MouseEvent evt)//GEN-FIRST:event_txfHoeheMousePressed
+    {//GEN-HEADEREND:event_txfHoeheMousePressed
+        if(SizeFinalized)
+        return;
+        int s = Tools.numberInputWIndow(4, new int[]{-1});
+        if(s>0)
+        {
+        txfHoehe.setText(""+s);
+        }
+    }//GEN-LAST:event_txfHoeheMousePressed
+
+    
+    BufferedImage Overlay;
+    TileAttrib[][][] tileWorkArea;
+    private void initActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_initActionPerformed
+    {//GEN-HEADEREND:event_initActionPerformed
+        new Thread(new Runnable()
+        {
+
+            @Override
+            public void run()
+            {
+                IZTile gridUnit = new IZTile("D:\\srcs\\iztt\\GridUnit.iZtile");
+                Image grid = gridUnit.getThumb();
+                int height = Integer.valueOf(txfHoehe.getText());
+                int width = Integer.valueOf(txfBreite.getText());
+                int prg = 0;
+                int Tiles = height*width;
+                pbarProgress.setMinimum(0);
+                pbarProgress.setMaximum(Tiles);
+                lblStatus.setText("Erzeuge Gitternetz");
+                tileWorkArea = new TileAttrib[width][height][];
+                BufferedImage img = new BufferedImage(width*50, height*50, BufferedImage.TYPE_INT_ARGB);
+                Graphics2D painter = img.createGraphics();
+                for (int i = 0; i < width; i++)
+                {
+                    for (int j = 0; j < height; j++)
+                    {
+                        painter.drawImage(grid, i*50, j*50, null);
+                        prg++;
+                        TileAttrib[] layers = new TileAttrib[100];
+                        for (int k = 0; k < 100; k++)
+                        {
+                            layers[i] = new TileAttrib();
+                        }
+                        tileWorkArea[i][j] = layers;
+                        
+                        if(prg%10==0)
+                        {
+                            pbarProgress.setValue(prg);
+                        }
+                    }
+                }
+                Overlay = img;
+                
+                int vpHeight = pnlViewPort.getHeight();
+                int vpWidth = pnlViewPort.getWidth();
+                sbUpDown.setMinimum(0);
+                sbUpDown.setMaximum(height*50-vpHeight);
+                sbLEftRight.setMinimum(0);
+                sbLEftRight.setMaximum(width*50-vpWidth);
+                sbUpDown.setValue(0);
+                sbLEftRight.setValue(0);
+                redraw();
+                lblStatus.setText("Bereit");
+            }
+            
+        }).start();
+    }//GEN-LAST:event_initActionPerformed
+
+    private void redraw()
+    {
+        int vpHeight = pnlViewPort.getHeight();
+        int vpWidth = pnlViewPort.getWidth();
+        int x =  sbLEftRight.getValue();
+        int y = sbUpDown.getValue();
+        Image viewGrid = Overlay.getSubimage(x, y, vpWidth, vpHeight);
+        Graphics2D pa = (Graphics2D) pnlViewPort.getGraphics();
+        pa.clearRect(0, 0, vpWidth, vpHeight);
+        pa.drawImage(viewGrid, 0, 0, null);
+        
+    }
+           
+    
+    
+    
+    private void sbUpDownAdjustmentValueChanged(java.awt.event.AdjustmentEvent evt)//GEN-FIRST:event_sbUpDownAdjustmentValueChanged
+    {//GEN-HEADEREND:event_sbUpDownAdjustmentValueChanged
+        redraw();
+    }//GEN-LAST:event_sbUpDownAdjustmentValueChanged
+
+    private void sbLEftRightAdjustmentValueChanged(java.awt.event.AdjustmentEvent evt)//GEN-FIRST:event_sbLEftRightAdjustmentValueChanged
+    {//GEN-HEADEREND:event_sbLEftRightAdjustmentValueChanged
+        redraw();
+    }//GEN-LAST:event_sbLEftRightAdjustmentValueChanged
+
+    private void createTilerActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_createTilerActionPerformed
+    {//GEN-HEADEREND:event_createTilerActionPerformed
+        new TileImporter(r).setVisible(true);
+    }//GEN-LAST:event_createTilerActionPerformed
+
+    private void regTileActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_regTileActionPerformed
+    {//GEN-HEADEREND:event_regTileActionPerformed
+        String tpath = Tools.FileChooseDlg(this, true, false, new String[]{"iZtile"});
+        r.addTile(tpath, Tools.getInputString("Name"),true);
+        reloadTlist();
+    }//GEN-LAST:event_regTileActionPerformed
+
+    private void lstTilesOfPrjMousePressed(java.awt.event.MouseEvent evt)//GEN-FIRST:event_lstTilesOfPrjMousePressed
+    {//GEN-HEADEREND:event_lstTilesOfPrjMousePressed
+        DefaultListModel<String> lm = (DefaultListModel<String>) lstTilesOfPrj.getModel();
+        String tn = lm.get(lstTilesOfPrj.getSelectedIndex());
+        IZTile t = r.getTile(tn);
+        UiTools.ScaleImageIntoFrame(t.getThumbPath(), (Graphics2D) pnlLSPV.getGraphics(), pnlLSPV.getHeight(), pnlLSPV.getWidth(), true);
+    }//GEN-LAST:event_lstTilesOfPrjMousePressed
+
+    private void pnlViewPortMousePressed(java.awt.event.MouseEvent evt)//GEN-FIRST:event_pnlViewPortMousePressed
+    {//GEN-HEADEREND:event_pnlViewPortMousePressed
+        int w = evt.getX();
+        int h = evt.getY();
+        int offsX = sbLEftRight.getValue();
+        int offsY = sbUpDown.getValue();
+        boolean add = Tools.dlg(true, "Tile Hinzufügen oder bearbeiten?", "", "Hinzufügen", "Bearbeiten");
+        int tX = (w+offsX)&50;
+        int tY = (h+offsY)%50;
+        if(add)
+        {
+            DefaultListModel<String> lm = (DefaultListModel<String>) lstTilesOfPrj.getModel();
+            String tn = lm.get(lstTilesOfPrj.getSelectedIndex());
+            IZTile t = r.getTile(tn);
+            if(tileWorkArea[tX][tY][0].getTopmostOccupier()==-1)
+            {
+                tileWorkArea[tX][tY][0].setHeight(t.getHeightInTiles());
+                tileWorkArea[tX][tY][0].setWidth(t.getWidthInTiles());
+                
+            }
+        }
+    }//GEN-LAST:event_pnlViewPortMousePressed
+
+    
+    
+    private void reloadTlist()
+    {
+        DefaultListModel<String> lm = (DefaultListModel<String>) lstTilesOfPrj.getModel();
+        lm.clear();
+        String[] tiles = r.getNames();
+        for (String tileid : tiles)
+        {
+            lm.addElement(tileid);
+        }
+    }
+    
+    
+    
+    /**
+     * @param args the command line arguments
+     */
+    public static void main(String args[])
+    {
+        /* Set the Nimbus look and feel */
+        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
+        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
+         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
+         */
+        try
+        {
+            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels())
+            {
+                if ("Nimbus".equals(info.getName()))
+                {
+                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
+                    break;
+                }
+            }
+        }
+        catch (ClassNotFoundException ex)
+        {
+            java.util.logging.Logger.getLogger(OpenGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        catch (InstantiationException ex)
+        {
+            java.util.logging.Logger.getLogger(OpenGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        catch (IllegalAccessException ex)
+        {
+            java.util.logging.Logger.getLogger(OpenGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        catch (javax.swing.UnsupportedLookAndFeelException ex)
+        {
+            java.util.logging.Logger.getLogger(OpenGUI.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
+        }
+        //</editor-fold>
+
+        /* Create and display the form */
+        java.awt.EventQueue.invokeLater(new Runnable()
+        {
+            public void run()
+            {
+                new OpenGUI().setVisible(true);
+            }
+        });
+        
+        
+    }
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JButton createTiler;
+    private javax.swing.JButton init;
+    private javax.swing.JScrollPane jScrollPane1;
+    private javax.swing.JSeparator jSeparator1;
+    private javax.swing.JSeparator jSeparator2;
+    private javax.swing.JSeparator jSeparator3;
+    private javax.swing.JLabel lblStatus;
+    private javax.swing.JList lstTilesOfPrj;
+    private javax.swing.JProgressBar pbarProgress;
+    private javax.swing.JPanel pnlLSPV;
+    private javax.swing.JPanel pnlViewPort;
+    private javax.swing.JButton regTile;
+    private javax.swing.JScrollBar sbLEftRight;
+    private javax.swing.JScrollBar sbUpDown;
+    private javax.swing.JTextField txfBreite;
+    private javax.swing.JTextField txfHoehe;
+    // End of variables declaration//GEN-END:variables
+}

+ 91 - 91
TWPUtil/src/main/java/de/nplusc/izc/TWPUtil/TileAttrib.java

@@ -1,91 +1,91 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.TWPUtil;
-
-import de.nplusc.izc.tools.IOtools.iZformats.IZTile;
-
-/**
- *
- * @author LH
- */
-public class TileAttrib
-{
-    private int topmostOccupier=-1,Width=0,Height=0;
-    private boolean isLeftMost=true,isTopmost=true;
-    private IZTile occupier=null;
-
-    public int getTopmostOccupier()
-    {
-        return topmostOccupier;
-    }
-
-    public void setTopmostOccupier(int topmostOccupier)
-    {
-        this.topmostOccupier = topmostOccupier;
-    }
-
-    public int getWidth()
-    {
-        return Width;
-    }
-
-    public void setWidth(int Width)
-    {
-        this.Width = Width;
-    }
-
-    public int getHeight()
-    {
-        return Height;
-    }
-
-    public void setHeight(int Height)
-    {
-        this.Height = Height;
-    }
-
-    public boolean isIsLeftMost()
-    {
-        return isLeftMost;
-    }
-
-    public void setIsLeftMost(boolean isLeftMost)
-    {
-        this.isLeftMost = isLeftMost;
-    }
-
-    public boolean isIsTopmost()
-    {
-        return isTopmost;
-    }
-
-    public void setIsTopmost(boolean isTopmost)
-    {
-        this.isTopmost = isTopmost;
-    }
-
-    public IZTile getOccupier()
-    {
-        return occupier;
-    }
-
-    public void setOccupier(IZTile occupier)
-    {
-        this.occupier = occupier;
-    }
-    
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.TWPUtil;
+
+import de.nplusc.izc.tools.IOtools.iZformats.IZTile;
+
+/**
+ *
+ * @author LH
+ */
+public class TileAttrib
+{
+    private int topmostOccupier=-1,Width=0,Height=0;
+    private boolean isLeftMost=true,isTopmost=true;
+    private IZTile occupier=null;
+
+    public int getTopmostOccupier()
+    {
+        return topmostOccupier;
+    }
+
+    public void setTopmostOccupier(int topmostOccupier)
+    {
+        this.topmostOccupier = topmostOccupier;
+    }
+
+    public int getWidth()
+    {
+        return Width;
+    }
+
+    public void setWidth(int Width)
+    {
+        this.Width = Width;
+    }
+
+    public int getHeight()
+    {
+        return Height;
+    }
+
+    public void setHeight(int Height)
+    {
+        this.Height = Height;
+    }
+
+    public boolean isIsLeftMost()
+    {
+        return isLeftMost;
+    }
+
+    public void setIsLeftMost(boolean isLeftMost)
+    {
+        this.isLeftMost = isLeftMost;
+    }
+
+    public boolean isIsTopmost()
+    {
+        return isTopmost;
+    }
+
+    public void setIsTopmost(boolean isTopmost)
+    {
+        this.isTopmost = isTopmost;
+    }
+
+    public IZTile getOccupier()
+    {
+        return occupier;
+    }
+
+    public void setOccupier(IZTile occupier)
+    {
+        this.occupier = occupier;
+    }
+    
+}

+ 255 - 255
TWPUtil/src/main/java/de/nplusc/izc/TWPUtil/TileImporter.java

@@ -1,255 +1,255 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.TWPUtil;
-
-import de.nplusc.izc.tools.IOtools.iZformats.IZTile;
-import de.nplusc.izc.tools.UiToolz.UiTools;
-import de.nplusc.izc.tools.baseTools.Tools;
-import java.awt.Graphics2D;
-import java.awt.image.BufferedImage;
-import java.io.File;
-import java.io.IOException;
-import javax.imageio.ImageIO;
-
-/**
- *
- * @author LH
- */
-public class TileImporter extends javax.swing.JFrame
-{
-    TileRegistry tr;
-    /**
-     * Creates new form TileImporter
-     */
-    public TileImporter(TileRegistry r)
-    {
-        tr=r;
-        initComponents();
-    }
-
-    /**
-     * This method is called from within the constructor to
-     * initialize the form.
-     * WARNING: Do NOT modify this code. The content of this method is
-     * always regenerated by the Form Editor.
-     */
-    @SuppressWarnings("unchecked")
-    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
-    private void initComponents()
-    {
-
-        btnSelectImage = new javax.swing.JButton();
-        txfWidth = new javax.swing.JTextField();
-        txfHEight = new javax.swing.JTextField();
-        cxBG = new javax.swing.JCheckBox();
-        viewPort = new javax.swing.JPanel();
-        btnRegTile = new javax.swing.JButton();
-
-        setTitle("TileLoader");
-
-        btnSelectImage.setText("Bild laden");
-        btnSelectImage.addActionListener(new java.awt.event.ActionListener()
-        {
-            public void actionPerformed(java.awt.event.ActionEvent evt)
-            {
-                btnSelectImageActionPerformed(evt);
-            }
-        });
-
-        txfWidth.setEditable(false);
-        txfWidth.setText("Breite in kacheln");
-        txfWidth.addMouseListener(new java.awt.event.MouseAdapter()
-        {
-            public void mousePressed(java.awt.event.MouseEvent evt)
-            {
-                txfWidthMousePressed(evt);
-            }
-        });
-        txfWidth.addActionListener(new java.awt.event.ActionListener()
-        {
-            public void actionPerformed(java.awt.event.ActionEvent evt)
-            {
-                txfWidthActionPerformed(evt);
-            }
-        });
-
-        txfHEight.setEditable(false);
-        txfHEight.setText("Höhe in Kacheln");
-        txfHEight.addMouseListener(new java.awt.event.MouseAdapter()
-        {
-            public void mousePressed(java.awt.event.MouseEvent evt)
-            {
-                txfHEightMousePressed(evt);
-            }
-        });
-
-        cxBG.setText("Hintergrund?");
-
-        javax.swing.GroupLayout viewPortLayout = new javax.swing.GroupLayout(viewPort);
-        viewPort.setLayout(viewPortLayout);
-        viewPortLayout.setHorizontalGroup(
-            viewPortLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 457, Short.MAX_VALUE)
-        );
-        viewPortLayout.setVerticalGroup(
-            viewPortLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGap(0, 456, Short.MAX_VALUE)
-        );
-
-        btnRegTile.setText("Fertig und Speichern");
-        btnRegTile.addActionListener(new java.awt.event.ActionListener()
-        {
-            public void actionPerformed(java.awt.event.ActionEvent evt)
-            {
-                btnRegTileActionPerformed(evt);
-            }
-        });
-
-        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
-        getContentPane().setLayout(layout);
-        layout.setHorizontalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
-                .addContainerGap()
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
-                    .addComponent(btnRegTile)
-                    .addGroup(layout.createSequentialGroup()
-                        .addComponent(viewPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
-                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                            .addComponent(cxBG)
-                            .addComponent(txfHEight, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)
-                            .addComponent(txfWidth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                            .addComponent(btnSelectImage))))
-                .addGap(49, 49, 49))
-        );
-        layout.setVerticalGroup(
-            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-            .addGroup(layout.createSequentialGroup()
-                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
-                    .addGroup(layout.createSequentialGroup()
-                        .addGap(22, 22, 22)
-                        .addComponent(btnSelectImage)
-                        .addGap(18, 18, 18)
-                        .addComponent(txfWidth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
-                        .addComponent(txfHEight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
-                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
-                        .addComponent(cxBG))
-                    .addGroup(layout.createSequentialGroup()
-                        .addContainerGap()
-                        .addComponent(viewPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
-                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 45, Short.MAX_VALUE)
-                .addComponent(btnRegTile)
-                .addGap(32, 32, 32))
-        );
-
-        pack();
-    }// </editor-fold>//GEN-END:initComponents
-
-    
-    
-    
-    
-    private String spath;
-    private int pwidth=0;
-    private int pheight=0;
-    private void btnSelectImageActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnSelectImageActionPerformed
-    {//GEN-HEADEREND:event_btnSelectImageActionPerformed
-        try            
-        {
-            spath  = Tools.FileChooseDlg(this, true, false, new String[]{"png"});
-            if(spath.isEmpty())
-                return;
-            BufferedImage i =  ImageIO.read(new File(spath));
-            pwidth =i.getWidth();
-            while(i.getHeight()==-1);
-            pheight = i.getHeight();
-            UiTools.ScaleImageIntoFrame(spath, (Graphics2D)viewPort.getGraphics(),viewPort.getHeight(),viewPort.getWidth(),true);
-        }
-        catch (IOException ex)
-        {
-            ex.printStackTrace();
-        }
-    }//GEN-LAST:event_btnSelectImageActionPerformed
-
-    private void btnRegTileActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnRegTileActionPerformed
-    {//GEN-HEADEREND:event_btnRegTileActionPerformed
-        String tpath = Tools.FileChooseDlg(this, true, false, new String[]{"iZtile"});
-        int tw = Integer.valueOf(txfWidth.getText());
-        int pd = 0;
-        try
-        {
-           pd= ImageIO.read(new File(spath)).getWidth()/(tw*10);
-        }
-        catch (IOException ex)
-        {
-            ex.printStackTrace();
-        }
-        IZTile it = new IZTile(tpath, spath,tw,Integer.valueOf(txfHEight.getText()), cxBG.isSelected(),pd);
-        tr.addTile(tpath, Tools.getInputString("Name"),true);
-        this.setVisible(false);
-    }//GEN-LAST:event_btnRegTileActionPerformed
-
-    private void txfWidthMousePressed(java.awt.event.MouseEvent evt)//GEN-FIRST:event_txfWidthMousePressed
-    {//GEN-HEADEREND:event_txfWidthMousePressed
-        int s = Tools.numberInputWIndow(4, new int[]{-1});
-        if(s>0)
-        {
-            double factor = ((double)pwidth)/((double)s);
-            double th = pheight/factor;
-            System.err.println(s+"|"+factor+"|"+th);
-            //System.err.println(th+"|"+(th%1));
-            if(th==(Math.floor(th)))//glozzt ob keine nachkommastellen da
-            {
-            txfWidth.setText(""+s);
-            txfHEight.setText(""+(int)th);
-            }
-        }
-    }//GEN-LAST:event_txfWidthMousePressed
-
-    private void txfHEightMousePressed(java.awt.event.MouseEvent evt)//GEN-FIRST:event_txfHEightMousePressed
-    {//GEN-HEADEREND:event_txfHEightMousePressed
-        int s = Tools.numberInputWIndow(4, new int[]{-1});
-        if(s>0)
-        {
-            double factor = ((double)pheight)/((double)s);
-            double th = pwidth/factor;
-            System.err.println(s+"|"+factor+"|"+th);
-            //System.err.println(th+"|"+(th%1));
-            if(th==(Math.floor(th)))//glozzt ob keine nachkommastellen da
-            {
-            txfHEight.setText(""+s);
-            txfWidth.setText(""+(int)th);
-            }
-        }
-    }//GEN-LAST:event_txfHEightMousePressed
-
-    private void txfWidthActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_txfWidthActionPerformed
-    {//GEN-HEADEREND:event_txfWidthActionPerformed
-        // TODO add your handling code here:
-    }//GEN-LAST:event_txfWidthActionPerformed
-
-    // Variables declaration - do not modify//GEN-BEGIN:variables
-    private javax.swing.JButton btnRegTile;
-    private javax.swing.JButton btnSelectImage;
-    private javax.swing.JCheckBox cxBG;
-    private javax.swing.JTextField txfHEight;
-    private javax.swing.JTextField txfWidth;
-    private javax.swing.JPanel viewPort;
-    // End of variables declaration//GEN-END:variables
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.TWPUtil;
+
+import de.nplusc.izc.tools.IOtools.iZformats.IZTile;
+import de.nplusc.izc.tools.UiToolz.UiTools;
+import de.nplusc.izc.tools.baseTools.Tools;
+import java.awt.Graphics2D;
+import java.awt.image.BufferedImage;
+import java.io.File;
+import java.io.IOException;
+import javax.imageio.ImageIO;
+
+/**
+ *
+ * @author LH
+ */
+public class TileImporter extends javax.swing.JFrame
+{
+    TileRegistry tr;
+    /**
+     * Creates new form TileImporter
+     */
+    public TileImporter(TileRegistry r)
+    {
+        tr=r;
+        initComponents();
+    }
+
+    /**
+     * This method is called from within the constructor to
+     * initialize the form.
+     * WARNING: Do NOT modify this code. The content of this method is
+     * always regenerated by the Form Editor.
+     */
+    @SuppressWarnings("unchecked")
+    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
+    private void initComponents()
+    {
+
+        btnSelectImage = new javax.swing.JButton();
+        txfWidth = new javax.swing.JTextField();
+        txfHEight = new javax.swing.JTextField();
+        cxBG = new javax.swing.JCheckBox();
+        viewPort = new javax.swing.JPanel();
+        btnRegTile = new javax.swing.JButton();
+
+        setTitle("TileLoader");
+
+        btnSelectImage.setText("Bild laden");
+        btnSelectImage.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                btnSelectImageActionPerformed(evt);
+            }
+        });
+
+        txfWidth.setEditable(false);
+        txfWidth.setText("Breite in kacheln");
+        txfWidth.addMouseListener(new java.awt.event.MouseAdapter()
+        {
+            public void mousePressed(java.awt.event.MouseEvent evt)
+            {
+                txfWidthMousePressed(evt);
+            }
+        });
+        txfWidth.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                txfWidthActionPerformed(evt);
+            }
+        });
+
+        txfHEight.setEditable(false);
+        txfHEight.setText("Höhe in Kacheln");
+        txfHEight.addMouseListener(new java.awt.event.MouseAdapter()
+        {
+            public void mousePressed(java.awt.event.MouseEvent evt)
+            {
+                txfHEightMousePressed(evt);
+            }
+        });
+
+        cxBG.setText("Hintergrund?");
+
+        javax.swing.GroupLayout viewPortLayout = new javax.swing.GroupLayout(viewPort);
+        viewPort.setLayout(viewPortLayout);
+        viewPortLayout.setHorizontalGroup(
+            viewPortLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGap(0, 457, Short.MAX_VALUE)
+        );
+        viewPortLayout.setVerticalGroup(
+            viewPortLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGap(0, 456, Short.MAX_VALUE)
+        );
+
+        btnRegTile.setText("Fertig und Speichern");
+        btnRegTile.addActionListener(new java.awt.event.ActionListener()
+        {
+            public void actionPerformed(java.awt.event.ActionEvent evt)
+            {
+                btnRegTileActionPerformed(evt);
+            }
+        });
+
+        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
+        getContentPane().setLayout(layout);
+        layout.setHorizontalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
+                .addContainerGap()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
+                    .addComponent(btnRegTile)
+                    .addGroup(layout.createSequentialGroup()
+                        .addComponent(viewPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
+                        .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                            .addComponent(cxBG)
+                            .addComponent(txfHEight, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)
+                            .addComponent(txfWidth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                            .addComponent(btnSelectImage))))
+                .addGap(49, 49, 49))
+        );
+        layout.setVerticalGroup(
+            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+            .addGroup(layout.createSequentialGroup()
+                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
+                    .addGroup(layout.createSequentialGroup()
+                        .addGap(22, 22, 22)
+                        .addComponent(btnSelectImage)
+                        .addGap(18, 18, 18)
+                        .addComponent(txfWidth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                        .addComponent(txfHEight, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
+                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
+                        .addComponent(cxBG))
+                    .addGroup(layout.createSequentialGroup()
+                        .addContainerGap()
+                        .addComponent(viewPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
+                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 45, Short.MAX_VALUE)
+                .addComponent(btnRegTile)
+                .addGap(32, 32, 32))
+        );
+
+        pack();
+    }// </editor-fold>//GEN-END:initComponents
+
+    
+    
+    
+    
+    private String spath;
+    private int pwidth=0;
+    private int pheight=0;
+    private void btnSelectImageActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnSelectImageActionPerformed
+    {//GEN-HEADEREND:event_btnSelectImageActionPerformed
+        try            
+        {
+            spath  = Tools.FileChooseDlg(this, true, false, new String[]{"png"});
+            if(spath.isEmpty())
+                return;
+            BufferedImage i =  ImageIO.read(new File(spath));
+            pwidth =i.getWidth();
+            while(i.getHeight()==-1);
+            pheight = i.getHeight();
+            UiTools.ScaleImageIntoFrame(spath, (Graphics2D)viewPort.getGraphics(),viewPort.getHeight(),viewPort.getWidth(),true);
+        }
+        catch (IOException ex)
+        {
+            ex.printStackTrace();
+        }
+    }//GEN-LAST:event_btnSelectImageActionPerformed
+
+    private void btnRegTileActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_btnRegTileActionPerformed
+    {//GEN-HEADEREND:event_btnRegTileActionPerformed
+        String tpath = Tools.FileChooseDlg(this, true, false, new String[]{"iZtile"});
+        int tw = Integer.valueOf(txfWidth.getText());
+        int pd = 0;
+        try
+        {
+           pd= ImageIO.read(new File(spath)).getWidth()/(tw*10);
+        }
+        catch (IOException ex)
+        {
+            ex.printStackTrace();
+        }
+        IZTile it = new IZTile(tpath, spath,tw,Integer.valueOf(txfHEight.getText()), cxBG.isSelected(),pd);
+        tr.addTile(tpath, Tools.getInputString("Name"),true);
+        this.setVisible(false);
+    }//GEN-LAST:event_btnRegTileActionPerformed
+
+    private void txfWidthMousePressed(java.awt.event.MouseEvent evt)//GEN-FIRST:event_txfWidthMousePressed
+    {//GEN-HEADEREND:event_txfWidthMousePressed
+        int s = Tools.numberInputWIndow(4, new int[]{-1});
+        if(s>0)
+        {
+            double factor = ((double)pwidth)/((double)s);
+            double th = pheight/factor;
+            System.err.println(s+"|"+factor+"|"+th);
+            //System.err.println(th+"|"+(th%1));
+            if(th==(Math.floor(th)))//glozzt ob keine nachkommastellen da
+            {
+            txfWidth.setText(""+s);
+            txfHEight.setText(""+(int)th);
+            }
+        }
+    }//GEN-LAST:event_txfWidthMousePressed
+
+    private void txfHEightMousePressed(java.awt.event.MouseEvent evt)//GEN-FIRST:event_txfHEightMousePressed
+    {//GEN-HEADEREND:event_txfHEightMousePressed
+        int s = Tools.numberInputWIndow(4, new int[]{-1});
+        if(s>0)
+        {
+            double factor = ((double)pheight)/((double)s);
+            double th = pwidth/factor;
+            System.err.println(s+"|"+factor+"|"+th);
+            //System.err.println(th+"|"+(th%1));
+            if(th==(Math.floor(th)))//glozzt ob keine nachkommastellen da
+            {
+            txfHEight.setText(""+s);
+            txfWidth.setText(""+(int)th);
+            }
+        }
+    }//GEN-LAST:event_txfHEightMousePressed
+
+    private void txfWidthActionPerformed(java.awt.event.ActionEvent evt)//GEN-FIRST:event_txfWidthActionPerformed
+    {//GEN-HEADEREND:event_txfWidthActionPerformed
+        // TODO add your handling code here:
+    }//GEN-LAST:event_txfWidthActionPerformed
+
+    // Variables declaration - do not modify//GEN-BEGIN:variables
+    private javax.swing.JButton btnRegTile;
+    private javax.swing.JButton btnSelectImage;
+    private javax.swing.JCheckBox cxBG;
+    private javax.swing.JTextField txfHEight;
+    private javax.swing.JTextField txfWidth;
+    private javax.swing.JPanel viewPort;
+    // End of variables declaration//GEN-END:variables
+}

+ 130 - 130
TWPUtil/src/main/java/de/nplusc/izc/TWPUtil/TileRegistry.java

@@ -1,130 +1,130 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.TWPUtil;
-
-import de.nplusc.izc.tools.IOtools.FileTK;
-import de.nplusc.izc.tools.IOtools.iZformats.IZTile;
-import java.io.File;
-import java.util.ArrayList;
-import java.util.HashMap;
-
-/**
- *
- * @author LH
- */
-public class TileRegistry
-{
-    private HashMap<String,IZTile>  tileBuffer = new HashMap<>();
-    private HashMap<String,Boolean> Removables = new HashMap<>();
-    private HashMap<String,String>  rmPaths = new HashMap<>();
-    private String location;
-    /**
-     * Create/Load TileRegistry
-     * @param path path of Registryfile and its cahced tiles incase of them on removable Media
-     */
-    public TileRegistry(String path)
-    {
-        location = path;
-        //Zeilenformat name|path|isRemovableMedia (boolean)
-        //FileTK.ensuredirExistence(path);
-        FileTK.ensuredirExistence(path+"\\cache+\\cache.map");
-        if(new File(path+"\\tiles.iZreg").exists()&&(new File(path+"\\tiles.iZreg").length()>3))
-        {
-            String[] reglines = FileTK.fileload(path+"\\tiles.iZreg");
-            for (String line : reglines)
-            {
-                if(line.length()>5)
-                {
-                    String[] linedata = line.split("\\|");
-                    boolean isRM = Boolean.valueOf(linedata[2]);
-                    Removables.put(linedata[0], isRM);
-                    if(isRM)
-                    {
-                        if(new File(linedata[1]).exists())
-                        {
-                            tileBuffer.put(linedata[0],new IZTile(linedata[1]));
-                            FileTK.kopierpaste(new File(linedata[1]), new File(path+"\\cache+\\"+linedata[0]));//cahce aktualisieren
-                        }
-                        else
-                        {
-                            tileBuffer.put(linedata[0],new IZTile(path+"\\cache+\\"+linedata[0]));
-                            rmPaths.put(linedata[0],linedata[1]);//remap um cahceumleitung bein speixxern zu killen
-                        }
-                    }
-                    else
-                    {
-                        tileBuffer.put(linedata[0],new IZTile(linedata[1]));
-                    }
-                }
-                
-            }
-        }
-        else
-        {
-            tileBuffer = new HashMap<>();
-            Removables = new HashMap<>(); 
-        }
-        
-        
-    }       
-    
-    
-    public void addTile(String TilePath,String name,boolean isOnRemovableMedia)
-    {
-        tileBuffer.put(name,new IZTile(TilePath));
-        Removables.put(name, isOnRemovableMedia);
-        if(isOnRemovableMedia)
-        {
-            FileTK.kopierpaste(new File(TilePath), new File(location+"\\cache+\\"+name));//cahce aktualisieren
-            rmPaths.put(name,TilePath);
-                   
-        }
-        saveRegistry();
-    }
-    
-    public void saveRegistry()
-    {
-        String[] names = tileBuffer.keySet().toArray(new String[]{});
-        ArrayList<String> outFiles = new ArrayList<>();
-        for (String tile : names)
-        {
-            String tilePath = tileBuffer.get(tile).getStoragePath();
-            if(rmPaths.containsKey(tile))
-            {
-                tilePath = rmPaths.get(tile);
-            }
-            boolean isRemMed = Removables.get(tile);
-            String line = tile+"|"+tilePath+"|"+isRemMed;
-            outFiles.add(line);
-        }
-        String writedown = "";
-        for (String ln : outFiles)
-        {
-            writedown+=ln+"\n";
-        }
-        FileTK.writeFile(writedown.trim(), location+"\\tiles.iZreg");
-    }
-    
-    public IZTile getTile(String name)
-    {
-        return tileBuffer.get(name);
-    }
-    public String[] getNames()
-    {
-        return tileBuffer.keySet().toArray(new String[]{});
-    }
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.TWPUtil;
+
+import de.nplusc.izc.tools.IOtools.FileTK;
+import de.nplusc.izc.tools.IOtools.iZformats.IZTile;
+import java.io.File;
+import java.util.ArrayList;
+import java.util.HashMap;
+
+/**
+ *
+ * @author LH
+ */
+public class TileRegistry
+{
+    private HashMap<String,IZTile>  tileBuffer = new HashMap<>();
+    private HashMap<String,Boolean> Removables = new HashMap<>();
+    private HashMap<String,String>  rmPaths = new HashMap<>();
+    private String location;
+    /**
+     * Create/Load TileRegistry
+     * @param path path of Registryfile and its cahced tiles incase of them on removable Media
+     */
+    public TileRegistry(String path)
+    {
+        location = path;
+        //Zeilenformat name|path|isRemovableMedia (boolean)
+        //FileTK.ensuredirExistence(path);
+        FileTK.ensuredirExistence(path+"\\cache+\\cache.map");
+        if(new File(path+"\\tiles.iZreg").exists()&&(new File(path+"\\tiles.iZreg").length()>3))
+        {
+            String[] reglines = FileTK.fileload(path+"\\tiles.iZreg");
+            for (String line : reglines)
+            {
+                if(line.length()>5)
+                {
+                    String[] linedata = line.split("\\|");
+                    boolean isRM = Boolean.valueOf(linedata[2]);
+                    Removables.put(linedata[0], isRM);
+                    if(isRM)
+                    {
+                        if(new File(linedata[1]).exists())
+                        {
+                            tileBuffer.put(linedata[0],new IZTile(linedata[1]));
+                            FileTK.kopierpaste(new File(linedata[1]), new File(path+"\\cache+\\"+linedata[0]));//cahce aktualisieren
+                        }
+                        else
+                        {
+                            tileBuffer.put(linedata[0],new IZTile(path+"\\cache+\\"+linedata[0]));
+                            rmPaths.put(linedata[0],linedata[1]);//remap um cahceumleitung bein speixxern zu killen
+                        }
+                    }
+                    else
+                    {
+                        tileBuffer.put(linedata[0],new IZTile(linedata[1]));
+                    }
+                }
+                
+            }
+        }
+        else
+        {
+            tileBuffer = new HashMap<>();
+            Removables = new HashMap<>(); 
+        }
+        
+        
+    }       
+    
+    
+    public void addTile(String TilePath,String name,boolean isOnRemovableMedia)
+    {
+        tileBuffer.put(name,new IZTile(TilePath));
+        Removables.put(name, isOnRemovableMedia);
+        if(isOnRemovableMedia)
+        {
+            FileTK.kopierpaste(new File(TilePath), new File(location+"\\cache+\\"+name));//cahce aktualisieren
+            rmPaths.put(name,TilePath);
+                   
+        }
+        saveRegistry();
+    }
+    
+    public void saveRegistry()
+    {
+        String[] names = tileBuffer.keySet().toArray(new String[]{});
+        ArrayList<String> outFiles = new ArrayList<>();
+        for (String tile : names)
+        {
+            String tilePath = tileBuffer.get(tile).getStoragePath();
+            if(rmPaths.containsKey(tile))
+            {
+                tilePath = rmPaths.get(tile);
+            }
+            boolean isRemMed = Removables.get(tile);
+            String line = tile+"|"+tilePath+"|"+isRemMed;
+            outFiles.add(line);
+        }
+        String writedown = "";
+        for (String ln : outFiles)
+        {
+            writedown+=ln+"\n";
+        }
+        FileTK.writeFile(writedown.trim(), location+"\\tiles.iZreg");
+    }
+    
+    public IZTile getTile(String name)
+    {
+        return tileBuffer.get(name);
+    }
+    public String[] getNames()
+    {
+        return tileBuffer.keySet().toArray(new String[]{});
+    }
+}

+ 352 - 352
ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/AdvancedDBWriter.java

@@ -1,353 +1,353 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package de.nplusc.izc.tools.IOtools;
-
-import de.nplusc.izc.tools.baseTools.Tools;
-import java.sql.Connection;
-import java.sql.DriverManager;
-import java.sql.ResultSet;
-import java.sql.ResultSetMetaData;
-import java.sql.SQLException;
-import java.sql.Statement;
-import java.util.LinkedList;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-public class AdvancedDBWriter
-{
-    private static final Logger l = LogManager.getLogger();
-    Connection cn = null;
-    ResultSet rs = null;
-
-    public AdvancedDBWriter(String host, String db, String user, String pw)
-    {
-        try
-        {
-            Class.forName("com.mysql.jdbc.Driver");
-            this.cn = DriverManager.getConnection("jdbc:mysql://" + host + "/" + db + "", user, pw);
-        }
-        catch (ClassNotFoundException | SQLException e)
-        {
-        }
-    }
-
-    public Object[] querySIngleColumn(String Query)
-    {
-        this.rs = null;
-        LinkedList masterList = new LinkedList();
-
-        l.trace(Query);
-        try
-        {
-            Statement st = this.cn.createStatement();
-            this.rs = st.executeQuery(Query);
-            if (this.rs != null)
-            {
-                while (this.rs.next())
-                {
-                    try
-                    {
-                        masterList.add(this.rs.getObject(1));
-                    }
-                    catch (Exception e)
-                    {
-                        return null;
-                    }
-                }
-                this.rs.close();
-                return masterList.toArray(new Object[0]);
-            }
-
-        }
-        catch (Exception e)
-        {
-            return null;
-        }
-        return null;
-    }
-
-    public Object querySingleCell(String Query)
-    {
-        this.rs = null;
-        l.trace(Query);
-        try
-        {
-            Statement st = this.cn.createStatement();
-            this.rs = st.executeQuery(Query);
-            if (this.rs != null)
-            {
-                if (this.rs.next())
-                {
-                    try
-                    {
-                        return this.rs.getObject(1);
-                    }
-                    catch (Exception e)
-                    {
-                        return null;
-                    }
-                }
-                this.rs.close();
-            }
-        }
-        catch (Exception e)
-        {
-            return null;
-        }
-        return null;
-    }
-
-    public Object[] querySingleRow(String Query)
-    {
-        this.rs = null;
-        try
-        {
-            Statement st = this.cn.createStatement();
-            this.rs = st.executeQuery(Query);
-            return querySingleRow(Query, this.rs.getMetaData().getColumnCount(), true);
-        }
-        catch (SQLException ex)
-        {
-            ex.printStackTrace();
-        }
-        return null;
-    }
-
-    public Object[] querySingleRow(String Query, int cols)
-    {
-        return querySingleRow(Query, cols, false);
-    }
-
-    private Object[] querySingleRow(String Query, int cols, boolean delivRS)
-    {
-        if (!delivRS)
-        {
-            rs = null;
-        }
-        LinkedList masterList = new LinkedList();
-
-        l.trace(Query);
-        try
-        {
-            Statement st = null;
-            if (!delivRS)
-            {
-                st = cn.createStatement();
-                rs = st.executeQuery(Query);
-            }
-            if (rs != null)
-            {
-                while (rs.next())
-                {
-                    try
-                    {
-                        for (int i = 1; i <= cols; i++)
-                        {
-                            masterList.add(rs.getObject(i));
-                        }
-                    }
-                    catch (Exception e)
-                    {
-                        e.printStackTrace();
-                        return null;
-                    }
-                }
-                rs.close();
-                return masterList.toArray(new Object[0]);
-            }
-
-        }
-        catch (Exception e)
-        {
-            e.printStackTrace();
-            return null;
-        }
-        return null;
-    }
-
-    public Object[][] queryTable(String Query)
-    {
-        rs = null;
-        try
-        {
-            Statement st = this.cn.createStatement();
-            this.rs = st.executeQuery(Query);
-            return queryTable(Query, this.rs.getMetaData().getColumnCount(), true);
-        }
-        catch (SQLException ex)
-        {
-            ex.printStackTrace();
-        }
-        return (Object[][]) null;
-    }
-
-    public Object[][] queryTable(String Query, int cols)
-    {
-        return queryTable(Query, cols, false);
-    }
-
-    private Object[][] queryTable(String Query, int cols, boolean delivRS)
-    {
-        if (!delivRS)
-        {
-            this.rs = null;
-        }
-        LinkedList RowList = new LinkedList();
-        LinkedList masterList = new LinkedList();
-
-        l.trace(Query);
-        try
-        {
-            Statement st = null;
-            if (!delivRS)
-            {
-                st = this.cn.createStatement();
-            }
-            this.rs = st.executeQuery(Query);
-            if (this.rs != null)
-            {
-                while (this.rs.next())
-                {
-                    try
-                    {
-                        for (int i = 1; i <= cols; i++)
-                        {
-                            RowList.add(this.rs.getObject(i));
-                        }
-                    }
-                    catch (Exception e)
-                    {
-                        return (String[][]) null;
-                    }
-                }
-                this.rs.close();
-                masterList.add(RowList.toArray(new Object[0]));
-            }
-        }
-        catch (Exception e)
-        {
-            return null;
-        }
-        Object[] retvaltmp = ((Object[][]) masterList.toArray(new String[0][0]))[0];
-        int sizetmp = retvaltmp.length;
-        int sizet = sizetmp / cols;
-        Object[][] retvals = new String[sizet][cols];
-        for (int i = 0; i < sizet; i++)
-        {
-            for (int j = 0; j < cols; j++)
-            {
-                retvals[i][j] = retvaltmp[(i * cols + j)];
-            }
-        }
-
-        return retvals;
-    }
-
-    public boolean write(String query)
-    {
-        try
-        {
-            return write(query, false);
-        }
-        catch (Exception e)
-        {
-        }
-        return false;
-    }
-
-    public boolean write(String query, boolean passthroughException)
-            throws Exception
-    {
-        return write(query, passthroughException, false);
-    }
-
-    public boolean write(String query, boolean passthroughException, boolean erroutwhenzeroedited)
-            throws Exception
-    {
-        boolean ret = true;
-        l.trace(query);
-        try
-        {
-            Statement st = this.cn.createStatement();
-            int rs = st.executeUpdate(query);
-            if (rs == 0)
-            {
-                ret = false;
-            }
-        }
-        catch (Exception e)
-        {
-            e.getMessage();
-            e.printStackTrace();
-
-            l.trace("FF");
-            ret = false;
-        }
-        if ((passthroughException) && (!ret))
-        {
-            throw new Exception();
-        }
-
-        return ret;
-    }
-
-    public void closeConn()
-    {
-        try
-        {
-            this.cn.close();
-        }
-        catch (SQLException ex)
-        {
-            l.warn("DB.close()->fail");
-        }
-    }
-
-    public int getColCount()
-    {
-        try
-        {
-            ResultSetMetaData md = this.rs.getMetaData();
-            return md.getColumnCount();
-        }
-        catch (SQLException ex)
-        {
-        }
-        return -1;
-    }
-
-    public String[] getHeadlines()
-    {
-        try
-        {
-            ResultSetMetaData md = this.rs.getMetaData();
-            int mc = md.getColumnCount();
-            String[] ret = new String[mc];
-            for (int i = 0; i < mc; i++)
-            {
-                ret[i] = md.getColumnName(i);
-            }
-            return ret;
-        }
-        catch (SQLException ex)
-        {
-            l.info("Fikk");
-        }
-        return null;
-    }
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package de.nplusc.izc.tools.IOtools;
+
+import de.nplusc.izc.tools.baseTools.Tools;
+import java.sql.Connection;
+import java.sql.DriverManager;
+import java.sql.ResultSet;
+import java.sql.ResultSetMetaData;
+import java.sql.SQLException;
+import java.sql.Statement;
+import java.util.LinkedList;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+public class AdvancedDBWriter
+{
+    private static final Logger l = LogManager.getLogger();
+    Connection cn = null;
+    ResultSet rs = null;
+
+    public AdvancedDBWriter(String host, String db, String user, String pw)
+    {
+        try
+        {
+            Class.forName("com.mysql.jdbc.Driver");
+            this.cn = DriverManager.getConnection("jdbc:mysql://" + host + "/" + db + "", user, pw);
+        }
+        catch (ClassNotFoundException | SQLException e)
+        {
+        }
+    }
+
+    public Object[] querySIngleColumn(String Query)
+    {
+        this.rs = null;
+        LinkedList masterList = new LinkedList();
+
+        l.trace(Query);
+        try
+        {
+            Statement st = this.cn.createStatement();
+            this.rs = st.executeQuery(Query);
+            if (this.rs != null)
+            {
+                while (this.rs.next())
+                {
+                    try
+                    {
+                        masterList.add(this.rs.getObject(1));
+                    }
+                    catch (Exception e)
+                    {
+                        return null;
+                    }
+                }
+                this.rs.close();
+                return masterList.toArray(new Object[0]);
+            }
+
+        }
+        catch (Exception e)
+        {
+            return null;
+        }
+        return null;
+    }
+
+    public Object querySingleCell(String Query)
+    {
+        this.rs = null;
+        l.trace(Query);
+        try
+        {
+            Statement st = this.cn.createStatement();
+            this.rs = st.executeQuery(Query);
+            if (this.rs != null)
+            {
+                if (this.rs.next())
+                {
+                    try
+                    {
+                        return this.rs.getObject(1);
+                    }
+                    catch (Exception e)
+                    {
+                        return null;
+                    }
+                }
+                this.rs.close();
+            }
+        }
+        catch (Exception e)
+        {
+            return null;
+        }
+        return null;
+    }
+
+    public Object[] querySingleRow(String Query)
+    {
+        this.rs = null;
+        try
+        {
+            Statement st = this.cn.createStatement();
+            this.rs = st.executeQuery(Query);
+            return querySingleRow(Query, this.rs.getMetaData().getColumnCount(), true);
+        }
+        catch (SQLException ex)
+        {
+            ex.printStackTrace();
+        }
+        return null;
+    }
+
+    public Object[] querySingleRow(String Query, int cols)
+    {
+        return querySingleRow(Query, cols, false);
+    }
+
+    private Object[] querySingleRow(String Query, int cols, boolean delivRS)
+    {
+        if (!delivRS)
+        {
+            rs = null;
+        }
+        LinkedList masterList = new LinkedList();
+
+        l.trace(Query);
+        try
+        {
+            Statement st = null;
+            if (!delivRS)
+            {
+                st = cn.createStatement();
+                rs = st.executeQuery(Query);
+            }
+            if (rs != null)
+            {
+                while (rs.next())
+                {
+                    try
+                    {
+                        for (int i = 1; i <= cols; i++)
+                        {
+                            masterList.add(rs.getObject(i));
+                        }
+                    }
+                    catch (Exception e)
+                    {
+                        e.printStackTrace();
+                        return null;
+                    }
+                }
+                rs.close();
+                return masterList.toArray(new Object[0]);
+            }
+
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+            return null;
+        }
+        return null;
+    }
+
+    public Object[][] queryTable(String Query)
+    {
+        rs = null;
+        try
+        {
+            Statement st = this.cn.createStatement();
+            this.rs = st.executeQuery(Query);
+            return queryTable(Query, this.rs.getMetaData().getColumnCount(), true);
+        }
+        catch (SQLException ex)
+        {
+            ex.printStackTrace();
+        }
+        return (Object[][]) null;
+    }
+
+    public Object[][] queryTable(String Query, int cols)
+    {
+        return queryTable(Query, cols, false);
+    }
+
+    private Object[][] queryTable(String Query, int cols, boolean delivRS)
+    {
+        if (!delivRS)
+        {
+            this.rs = null;
+        }
+        LinkedList RowList = new LinkedList();
+        LinkedList masterList = new LinkedList();
+
+        l.trace(Query);
+        try
+        {
+            Statement st = null;
+            if (!delivRS)
+            {
+                st = this.cn.createStatement();
+            }
+            this.rs = st.executeQuery(Query);
+            if (this.rs != null)
+            {
+                while (this.rs.next())
+                {
+                    try
+                    {
+                        for (int i = 1; i <= cols; i++)
+                        {
+                            RowList.add(this.rs.getObject(i));
+                        }
+                    }
+                    catch (Exception e)
+                    {
+                        return (String[][]) null;
+                    }
+                }
+                this.rs.close();
+                masterList.add(RowList.toArray(new Object[0]));
+            }
+        }
+        catch (Exception e)
+        {
+            return null;
+        }
+        Object[] retvaltmp = ((Object[][]) masterList.toArray(new String[0][0]))[0];
+        int sizetmp = retvaltmp.length;
+        int sizet = sizetmp / cols;
+        Object[][] retvals = new String[sizet][cols];
+        for (int i = 0; i < sizet; i++)
+        {
+            for (int j = 0; j < cols; j++)
+            {
+                retvals[i][j] = retvaltmp[(i * cols + j)];
+            }
+        }
+
+        return retvals;
+    }
+
+    public boolean write(String query)
+    {
+        try
+        {
+            return write(query, false);
+        }
+        catch (Exception e)
+        {
+        }
+        return false;
+    }
+
+    public boolean write(String query, boolean passthroughException)
+            throws Exception
+    {
+        return write(query, passthroughException, false);
+    }
+
+    public boolean write(String query, boolean passthroughException, boolean erroutwhenzeroedited)
+            throws Exception
+    {
+        boolean ret = true;
+        l.trace(query);
+        try
+        {
+            Statement st = this.cn.createStatement();
+            int rs = st.executeUpdate(query);
+            if (rs == 0)
+            {
+                ret = false;
+            }
+        }
+        catch (Exception e)
+        {
+            e.getMessage();
+            e.printStackTrace();
+
+            l.trace("FF");
+            ret = false;
+        }
+        if ((passthroughException) && (!ret))
+        {
+            throw new Exception();
+        }
+
+        return ret;
+    }
+
+    public void closeConn()
+    {
+        try
+        {
+            this.cn.close();
+        }
+        catch (SQLException ex)
+        {
+            l.warn("DB.close()->fail");
+        }
+    }
+
+    public int getColCount()
+    {
+        try
+        {
+            ResultSetMetaData md = this.rs.getMetaData();
+            return md.getColumnCount();
+        }
+        catch (SQLException ex)
+        {
+        }
+        return -1;
+    }
+
+    public String[] getHeadlines()
+    {
+        try
+        {
+            ResultSetMetaData md = this.rs.getMetaData();
+            int mc = md.getColumnCount();
+            String[] ret = new String[mc];
+            for (int i = 0; i < mc; i++)
+            {
+                ret[i] = md.getColumnName(i);
+            }
+            return ret;
+        }
+        catch (SQLException ex)
+        {
+            l.info("Fikk");
+        }
+        return null;
+    }
 }

+ 34 - 34
ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/DBObject.java

@@ -1,34 +1,34 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.tools.IOtools;
-
-/**
- *
- * @author LH
- */
-public class DBObject
-{
-    public DBObject(String table, String primaryKeyName,String primaryKey,String ... columns)
-    {
-        String sC = "";
-        for (String tn : columns)
-        {
-            sC += tn+" ";
-        }
-        String query = "Select * from "+table+" where "+primaryKeyName+" = "+primaryKey;
-    }
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.tools.IOtools;
+
+/**
+ *
+ * @author LH
+ */
+public class DBObject
+{
+    public DBObject(String table, String primaryKeyName,String primaryKey,String ... columns)
+    {
+        String sC = "";
+        for (String tn : columns)
+        {
+            sC += tn+" ";
+        }
+        String query = "Select * from "+table+" where "+primaryKeyName+" = "+primaryKey;
+    }
+}

+ 468 - 468
ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/DBWriter.java

@@ -1,468 +1,468 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package de.nplusc.izc.tools.IOtools;
-
-
-import de.nplusc.izc.tools.baseTools.Tools;
-import java.sql.*;
-import java.util.LinkedList;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-/*
- * To change this template, choose Tools | Templates
- * and open the template in the editor.
- */
-
-/**
- *
- * @author LH
- */
-public class DBWriter
-{
-    private static final Logger l = LogManager.getLogger();
-Connection cn = null;
-ResultSet rs=null;
-
-    public static final int DBTYPE_MYSQL = 0;
-    public static final int DBTYPE_SQLite = 1;
-
-    /**
-     * Datenbankverbindung aufbauen
-     * @param host Server der DB mit port(standard=3306
-     * @param db Datenbnak auf server
-     * @param user Username
-     * @param pw Passy
-     */
-    public DBWriter(String host,String db,String user,String pw)
-    {
-        
-        this(host, db, user, pw, DBTYPE_MYSQL);
-    }
-    
-    public DBWriter(String host,String db,String user,String pw,int dbtype)
-    {
-        if(dbtype==DBTYPE_MYSQL)
-            try 
-            {
-            // Select fitting database driver and connect:
-            Class.forName("com.mysql.jdbc.Driver");
-            cn = DriverManager.getConnection( "jdbc:mysql://"+host+"/"+db+"",user,pw);
-            }
-            catch(ClassNotFoundException | SQLException e)
-            {
-                e.printStackTrace();
-            }
-        if(dbtype==DBTYPE_SQLite)
-        {
-            try 
-            {
-            // Select fitting database driver and connect:
-            Class.forName("org.sqlite.JDBC"); 
-            cn = DriverManager.getConnection( "jdbc:sqlite:"+db);
-            }
-            catch(ClassNotFoundException | SQLException e)
-            {
-                e.printStackTrace();
-            }
-        }
-    }
-    
-    
-    
-    /**
-     * Führt Spaltenweise Abfrage aus
-     * @param Query
-     * @return Array des Ergebnisses (eine zeile pro feld)
-     */
-    public String[] querySIngleColumn(String Query)
-    {
-        rs=null;
-        LinkedList<String> masterList = new LinkedList<>();
-       // masterList.
-        l.trace(Query);
-        try{
-        Statement st = cn.createStatement();
-        rs = st.executeQuery(Query);
-        if(rs!=null)
-        {
-            while(rs.next())
-            {
-                try
-                {
-                masterList.add(rs.getString(1));
-            
-                }
-                catch(Exception e)
-                {
-                    return null;
-                }
-            }
-            rs.close();
-            return masterList.toArray(new String[0]);
-            
-        }
-        }
-        catch (Exception e)
-        {
-            e.printStackTrace();
-            return null;
-        }
-        return null;
-    }
-    
-    
-    /**
-     * Führt einzelwertabfrage aus
-     * @param Query Abfrage
-     * @return der Wert
-     */
-    public String querySingleCell(String Query)
-    {
-        rs=null;
-        l.trace(Query);
-        try{
-        Statement st = cn.createStatement();
-        rs = st.executeQuery(Query);
-        if(rs!=null)
-        {
-            while(rs.next())
-            {
-                try
-                {
-                return rs.getString(1);
-            
-                }
-                catch(Exception e)
-                {
-                    return null;
-                }
-            }
-            rs.close();
-        }
-        }
-        catch (Exception e)
-        {
-            e.printStackTrace();
-            return null;
-        }
-        return null;
-    }
-    
-     
-    /**
-     * Führt Zeilenweise Abfrage aus
-     * @param Query
-     * @return Array des Ergebnisses (eine Spalte pro feld)
-     */
-    public String[] querySingleRow(String Query)
-    {
-        rs=null;
-        try
-        {
-            
-            Statement st = cn.createStatement();
-            rs = st.executeQuery(Query);
-            return querySingleRow(Query, rs.getMetaData().getColumnCount(), true);
-        }
-        catch (SQLException ex)
-        {
-            ex.printStackTrace();
-            return null;
-        }
-        
-        
-    }
-    
-    /**
-     * Abfrage auf eine reihe mit erwarteter SPaltenzahl
-     * @param Query Abfrage
-     * @param cols Spaltenzahl
-     * @return Eregebnis
-     */
-    
-    public String[] querySingleRow(String Query,int cols)
-    {
-        return querySingleRow(Query, cols, false);
-    }
-    
-    
-    
-    private String[] querySingleRow(String Query,int cols,boolean delivRS)
-    {
-        if(delivRS=false)
-            rs=null;
-        LinkedList<String> masterList = new LinkedList<>();
-       // masterList.
-        l.trace(Query);
-        try
-        {
-            Statement st =null;
-            if(!delivRS)
-                st = cn.createStatement();
-                rs = st.executeQuery(Query);
-            if(rs!=null)
-            {
-                while(rs.next())
-                {
-                    try
-                    {
-                        for (int i = 1; i <= cols; i++)
-                        {
-                            masterList.add(rs.getString(i));
-                        }
-                    }
-                    catch(Exception e)
-                    {
-                        return null;
-                    }
-                }
-                rs.close();
-                return masterList.toArray(new String[0]);
-
-            }
-        }
-        catch (Exception e)
-        {
-            e.printStackTrace();
-            return null;
-        }
-        return null;
-    }
-    
-    
-    
-       /**
-     * Abfrage auf tabelle
-     * @param Query Abfrage
-     * @return Eregebnis ZEile,dann spalte in arrray
-     */
-    public String[][] queryTable(String Query)
-    {
-        rs=null;
-        try
-        {
-            
-            Statement st = cn.createStatement();
-            rs = st.executeQuery(Query);
-            return queryTable(Query, rs.getMetaData().getColumnCount(), true);
-        }
-        catch (SQLException ex)
-        {
-            ex.printStackTrace();
-            return null;
-        }
-        
-        
-    }
-    
-       /**
-     * Abfrage auf Tabelle mit aerwarteter Spaltenzahl
-     * @param Query Abfrage
-     * @param cols Spaltenzahl
-     * @return Eregebnis ZEile,dann spalte in arrray
-     */
-    public String[][] queryTable(String Query,int cols)
-    {
-        return queryTable(Query, cols, false);
-    }
-    
-    
-    
-    
-    
-    private String[][] queryTable(String Query,int cols,boolean delivRS)
-    {
-        if(delivRS=false)
-            rs=null;
-        LinkedList<String> RowList = new LinkedList<>();
-        LinkedList<String[]> masterList = new LinkedList<>();
-       // masterList.
-        l.trace(Query);
-        try
-        {
-            Statement st =null;
-            if(!delivRS)
-                st = cn.createStatement();
-                rs = st.executeQuery(Query);
-            if(rs!=null)
-            {
-                while(rs.next())
-                {
-                    try
-                    {
-                        for (int i = 1; i <= cols; i++)
-                        {
-                            RowList.add(rs.getString(i));
-                        }
-                    }
-                    catch(Exception e)
-                    {
-                        return null;
-                    }
-                }
-                rs.close();
-                masterList.add(RowList.toArray(new String[0]));
-            }
-        }
-        catch (Exception e)
-        {
-            e.printStackTrace();
-            return null;
-        }
-        String[] retvaltmp =  masterList.toArray(new String[0][0])[0];//hatmit nem ekligen Bug zu tun
-        int sizetmp = retvaltmp.length;
-        int sizet = sizetmp/cols;
-        String[][]retvals = new String[sizet][cols];
-        for (int i = 0; i < sizet; i++)
-        {
-            for (int j = 0; j < cols; j++)
-            {
-                retvals[i][j] = retvaltmp[i*cols+j];
-                
-            }
-        }
-        return retvals;
-        
-    }
-    
-    
-    /**
-     * Schreibende abfrage (unterdrückt exception
-     * @param query Abfrage
-     * @return erfolgsstatus
-     */
-    
-    public boolean write(String query)
-    {
-        try{
-        return write(query,false);
-        }
-        catch(Exception e)
-        {
-            return false;
-        }
-    }
-    /**
-     * Schreibt in DB
-     * @param query abfrage
-     * @param passthroughException ob exception unterdrückt werden soll
-     * @return Erfolgsfall
-     * @throws Exception bei Error in Query
-     */
-    
-    public boolean write(String query,boolean passthroughException) throws Exception
-    {
-        return write(query,passthroughException,false);
-    }
-    
-        /**
-     * Schreibt in DB
-     * @param query abfrage
-     * @param passthroughException ob exception unterdrückt werden soll
-     * @param erroutwhenzeroedited ob except wenn kein datensatz bearbeitet
-     * @return Erfolgsfall
-     * @throws Exception bei Error in Query
-     */
-    
-    @SuppressWarnings("CallToThreadDumpStack")
-    public boolean write(String query,boolean passthroughException,boolean erroutwhenzeroedited) throws Exception
-    {
-        boolean ret = true;
-        l.trace(query);
-        try 
-        {
-            Statement st = cn.createStatement();
-            int rs = st.executeUpdate(query);
-            if(rs==0)
-                ret=false;
-      
-        }
-        catch(Exception e)
-        {
-            e.getMessage();
-            e.printStackTrace();
-            l.trace("FF");
-            ret= false;
-        }
-        if(passthroughException && !ret)
-        {
-            //Integer.valueOf()
-            throw new Exception();
-        }
-        
-        return ret;
-
-    }
-    /**
-     * schließt connex
-     */
-    public void closeConn()
-    {
-        try
-        {
-            cn.close();
-        }
-        catch (SQLException ex)
-        {
-            l.warn("DB.close()->fail");
-        }
-    }
-    
-    
-    /**
-     * rückt spaltenzahl letzter abfrage raus
-     * @return spaltenzahl
-     */
-    public int getColCount()
-    {
-        try
-        {
-            ResultSetMetaData md = rs.getMetaData();
-            return md.getColumnCount();
-        }
-        catch (SQLException ex)
-        {
-            return -1;
-        }
-    }
-    
-    /**
-     * rückt kopfzeile letzter abfrage raus
-     * @return kopfzeile
-     */
-    public String[] getHeadlines()
-    {
-        try
-        {
-            ResultSetMetaData md = rs.getMetaData();
-            int mc = md.getColumnCount();
-            String[] ret = new String[mc];
-            for (int i=0;i<mc;i++)
-            {
-                ret[i] = md.getColumnName(i);
-            }
-            return ret;
-        }
-        catch (SQLException ex)
-        {
-            l.info("Fikk");
-            return null;
-        }
-    }
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package de.nplusc.izc.tools.IOtools;
+
+
+import de.nplusc.izc.tools.baseTools.Tools;
+import java.sql.*;
+import java.util.LinkedList;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+/*
+ * To change this template, choose Tools | Templates
+ * and open the template in the editor.
+ */
+
+/**
+ *
+ * @author LH
+ */
+public class DBWriter
+{
+    private static final Logger l = LogManager.getLogger();
+Connection cn = null;
+ResultSet rs=null;
+
+    public static final int DBTYPE_MYSQL = 0;
+    public static final int DBTYPE_SQLite = 1;
+
+    /**
+     * Datenbankverbindung aufbauen
+     * @param host Server der DB mit port(standard=3306
+     * @param db Datenbnak auf server
+     * @param user Username
+     * @param pw Passy
+     */
+    public DBWriter(String host,String db,String user,String pw)
+    {
+        
+        this(host, db, user, pw, DBTYPE_MYSQL);
+    }
+    
+    public DBWriter(String host,String db,String user,String pw,int dbtype)
+    {
+        if(dbtype==DBTYPE_MYSQL)
+            try 
+            {
+            // Select fitting database driver and connect:
+            Class.forName("com.mysql.jdbc.Driver");
+            cn = DriverManager.getConnection( "jdbc:mysql://"+host+"/"+db+"",user,pw);
+            }
+            catch(ClassNotFoundException | SQLException e)
+            {
+                e.printStackTrace();
+            }
+        if(dbtype==DBTYPE_SQLite)
+        {
+            try 
+            {
+            // Select fitting database driver and connect:
+            Class.forName("org.sqlite.JDBC"); 
+            cn = DriverManager.getConnection( "jdbc:sqlite:"+db);
+            }
+            catch(ClassNotFoundException | SQLException e)
+            {
+                e.printStackTrace();
+            }
+        }
+    }
+    
+    
+    
+    /**
+     * Führt Spaltenweise Abfrage aus
+     * @param Query
+     * @return Array des Ergebnisses (eine zeile pro feld)
+     */
+    public String[] querySIngleColumn(String Query)
+    {
+        rs=null;
+        LinkedList<String> masterList = new LinkedList<>();
+       // masterList.
+        l.trace(Query);
+        try{
+        Statement st = cn.createStatement();
+        rs = st.executeQuery(Query);
+        if(rs!=null)
+        {
+            while(rs.next())
+            {
+                try
+                {
+                masterList.add(rs.getString(1));
+            
+                }
+                catch(Exception e)
+                {
+                    return null;
+                }
+            }
+            rs.close();
+            return masterList.toArray(new String[0]);
+            
+        }
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+            return null;
+        }
+        return null;
+    }
+    
+    
+    /**
+     * Führt einzelwertabfrage aus
+     * @param Query Abfrage
+     * @return der Wert
+     */
+    public String querySingleCell(String Query)
+    {
+        rs=null;
+        l.trace(Query);
+        try{
+        Statement st = cn.createStatement();
+        rs = st.executeQuery(Query);
+        if(rs!=null)
+        {
+            while(rs.next())
+            {
+                try
+                {
+                return rs.getString(1);
+            
+                }
+                catch(Exception e)
+                {
+                    return null;
+                }
+            }
+            rs.close();
+        }
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+            return null;
+        }
+        return null;
+    }
+    
+     
+    /**
+     * Führt Zeilenweise Abfrage aus
+     * @param Query
+     * @return Array des Ergebnisses (eine Spalte pro feld)
+     */
+    public String[] querySingleRow(String Query)
+    {
+        rs=null;
+        try
+        {
+            
+            Statement st = cn.createStatement();
+            rs = st.executeQuery(Query);
+            return querySingleRow(Query, rs.getMetaData().getColumnCount(), true);
+        }
+        catch (SQLException ex)
+        {
+            ex.printStackTrace();
+            return null;
+        }
+        
+        
+    }
+    
+    /**
+     * Abfrage auf eine reihe mit erwarteter SPaltenzahl
+     * @param Query Abfrage
+     * @param cols Spaltenzahl
+     * @return Eregebnis
+     */
+    
+    public String[] querySingleRow(String Query,int cols)
+    {
+        return querySingleRow(Query, cols, false);
+    }
+    
+    
+    
+    private String[] querySingleRow(String Query,int cols,boolean delivRS)
+    {
+        if(delivRS=false)
+            rs=null;
+        LinkedList<String> masterList = new LinkedList<>();
+       // masterList.
+        l.trace(Query);
+        try
+        {
+            Statement st =null;
+            if(!delivRS)
+                st = cn.createStatement();
+                rs = st.executeQuery(Query);
+            if(rs!=null)
+            {
+                while(rs.next())
+                {
+                    try
+                    {
+                        for (int i = 1; i <= cols; i++)
+                        {
+                            masterList.add(rs.getString(i));
+                        }
+                    }
+                    catch(Exception e)
+                    {
+                        return null;
+                    }
+                }
+                rs.close();
+                return masterList.toArray(new String[0]);
+
+            }
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+            return null;
+        }
+        return null;
+    }
+    
+    
+    
+       /**
+     * Abfrage auf tabelle
+     * @param Query Abfrage
+     * @return Eregebnis ZEile,dann spalte in arrray
+     */
+    public String[][] queryTable(String Query)
+    {
+        rs=null;
+        try
+        {
+            
+            Statement st = cn.createStatement();
+            rs = st.executeQuery(Query);
+            return queryTable(Query, rs.getMetaData().getColumnCount(), true);
+        }
+        catch (SQLException ex)
+        {
+            ex.printStackTrace();
+            return null;
+        }
+        
+        
+    }
+    
+       /**
+     * Abfrage auf Tabelle mit aerwarteter Spaltenzahl
+     * @param Query Abfrage
+     * @param cols Spaltenzahl
+     * @return Eregebnis ZEile,dann spalte in arrray
+     */
+    public String[][] queryTable(String Query,int cols)
+    {
+        return queryTable(Query, cols, false);
+    }
+    
+    
+    
+    
+    
+    private String[][] queryTable(String Query,int cols,boolean delivRS)
+    {
+        if(delivRS=false)
+            rs=null;
+        LinkedList<String> RowList = new LinkedList<>();
+        LinkedList<String[]> masterList = new LinkedList<>();
+       // masterList.
+        l.trace(Query);
+        try
+        {
+            Statement st =null;
+            if(!delivRS)
+                st = cn.createStatement();
+                rs = st.executeQuery(Query);
+            if(rs!=null)
+            {
+                while(rs.next())
+                {
+                    try
+                    {
+                        for (int i = 1; i <= cols; i++)
+                        {
+                            RowList.add(rs.getString(i));
+                        }
+                    }
+                    catch(Exception e)
+                    {
+                        return null;
+                    }
+                }
+                rs.close();
+                masterList.add(RowList.toArray(new String[0]));
+            }
+        }
+        catch (Exception e)
+        {
+            e.printStackTrace();
+            return null;
+        }
+        String[] retvaltmp =  masterList.toArray(new String[0][0])[0];//hatmit nem ekligen Bug zu tun
+        int sizetmp = retvaltmp.length;
+        int sizet = sizetmp/cols;
+        String[][]retvals = new String[sizet][cols];
+        for (int i = 0; i < sizet; i++)
+        {
+            for (int j = 0; j < cols; j++)
+            {
+                retvals[i][j] = retvaltmp[i*cols+j];
+                
+            }
+        }
+        return retvals;
+        
+    }
+    
+    
+    /**
+     * Schreibende abfrage (unterdrückt exception
+     * @param query Abfrage
+     * @return erfolgsstatus
+     */
+    
+    public boolean write(String query)
+    {
+        try{
+        return write(query,false);
+        }
+        catch(Exception e)
+        {
+            return false;
+        }
+    }
+    /**
+     * Schreibt in DB
+     * @param query abfrage
+     * @param passthroughException ob exception unterdrückt werden soll
+     * @return Erfolgsfall
+     * @throws Exception bei Error in Query
+     */
+    
+    public boolean write(String query,boolean passthroughException) throws Exception
+    {
+        return write(query,passthroughException,false);
+    }
+    
+        /**
+     * Schreibt in DB
+     * @param query abfrage
+     * @param passthroughException ob exception unterdrückt werden soll
+     * @param erroutwhenzeroedited ob except wenn kein datensatz bearbeitet
+     * @return Erfolgsfall
+     * @throws Exception bei Error in Query
+     */
+    
+    @SuppressWarnings("CallToThreadDumpStack")
+    public boolean write(String query,boolean passthroughException,boolean erroutwhenzeroedited) throws Exception
+    {
+        boolean ret = true;
+        l.trace(query);
+        try 
+        {
+            Statement st = cn.createStatement();
+            int rs = st.executeUpdate(query);
+            if(rs==0)
+                ret=false;
+      
+        }
+        catch(Exception e)
+        {
+            e.getMessage();
+            e.printStackTrace();
+            l.trace("FF");
+            ret= false;
+        }
+        if(passthroughException && !ret)
+        {
+            //Integer.valueOf()
+            throw new Exception();
+        }
+        
+        return ret;
+
+    }
+    /**
+     * schließt connex
+     */
+    public void closeConn()
+    {
+        try
+        {
+            cn.close();
+        }
+        catch (SQLException ex)
+        {
+            l.warn("DB.close()->fail");
+        }
+    }
+    
+    
+    /**
+     * rückt spaltenzahl letzter abfrage raus
+     * @return spaltenzahl
+     */
+    public int getColCount()
+    {
+        try
+        {
+            ResultSetMetaData md = rs.getMetaData();
+            return md.getColumnCount();
+        }
+        catch (SQLException ex)
+        {
+            return -1;
+        }
+    }
+    
+    /**
+     * rückt kopfzeile letzter abfrage raus
+     * @return kopfzeile
+     */
+    public String[] getHeadlines()
+    {
+        try
+        {
+            ResultSetMetaData md = rs.getMetaData();
+            int mc = md.getColumnCount();
+            String[] ret = new String[mc];
+            for (int i=0;i<mc;i++)
+            {
+                ret[i] = md.getColumnName(i);
+            }
+            return ret;
+        }
+        catch (SQLException ex)
+        {
+            l.info("Fikk");
+            return null;
+        }
+    }
+}

+ 114 - 114
ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/DebuggingObjectOutputStream.java

@@ -1,115 +1,115 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-
-package de.nplusc.izc.tools.IOtools;
-
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.NotSerializableException;
-import java.io.ObjectOutputStream;
-import java.io.Serializable;
-import java.lang.reflect.Field;
-import java.lang.reflect.Modifier;
-import java.util.HashSet;
-import java.util.LinkedList;
- 
-public class DebuggingObjectOutputStream extends ObjectOutputStream{
- 
-  private static final long serialVersionUID = 1L;
- 
-  private LinkedList stack = new LinkedList();
-  private HashSet set = new HashSet();
- 
-  public DebuggingObjectOutputStream(FileOutputStream fos) throws IOException {}
- 
-  @Override
-  protected final void writeObjectOverride(Object obj) throws IOException {
-    // Check for circular reference.
-    if (set.contains(obj)) {
-      return;
-    }
-    if (stack.isEmpty()) {
-      stack.add("Class " + obj.getClass().getName());
-    }
-    set.add(obj);
-    Field[] fields = obj.getClass().getFields();
-    for (int i = 0; i < fields.length; i++) {
-      StringBuffer buffer = new StringBuffer();
-      Field f = fields[i];
-      int m = f.getModifiers();
-      if (fields[i].getType().isPrimitive() || Modifier.isTransient(m) ||
-          Modifier.isStatic(m)) {
-        continue;
-      }
- 
-      if (Modifier.isPrivate(m)) {
-        buffer.append("private ");
-      }
-      if (Modifier.isProtected(m)) {
-        buffer.append("protected ");
-      }
-      if (Modifier.isPublic(m)) {
-        buffer.append("public ");
-      }
-      if (Modifier.isFinal(m)) {
-        buffer.append("final ");
-      }
-      if (Modifier.isVolatile(m)) {
-        buffer.append("volatile ");
-      }
-      buffer.append(f.getType().getName()).append("");
-      buffer.append(" ").append(f.getName());
-      stack.add(buffer.toString());
-      if (Serializable.class.isAssignableFrom(fields[i].getType())) {
-        try {
-          writeObjectOverride(fields[i].get(obj));
-        }
-        catch (IllegalAccessException e) {
-          throw new RuntimeException(
-              getPrettyPrintedStack(fields[i].getType().getName()), e);
-        }
-      }
- 
-      else {
-        throw new RuntimeException(
-            getPrettyPrintedStack(fields[i].getType().getName()).toString(),
-            new NotSerializableException(fields[i].getType().getName())
-        );
-      }
-      stack.removeLast();
-    }
-    if (stack.size() == 1) {
-      set.clear();
-      stack.removeLast();
-    }
-  }
- 
-  private String getPrettyPrintedStack(String type) {
-    set.clear();
-    StringBuffer result = new StringBuffer();
-    StringBuffer spaces = new StringBuffer();
-    result.append("Unable to serialize class: ");
-    result.append(type);
-    result.append("\nField hierarchy is:");
-    while (!stack.isEmpty()) {
-      spaces.append("  ");
-      result.append("\n").append(spaces).append(stack.removeFirst());
-    }
-    result.append(" <----- field that is not serializable");
-    return result.toString();
-  }
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+
+package de.nplusc.izc.tools.IOtools;
+
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.NotSerializableException;
+import java.io.ObjectOutputStream;
+import java.io.Serializable;
+import java.lang.reflect.Field;
+import java.lang.reflect.Modifier;
+import java.util.HashSet;
+import java.util.LinkedList;
+ 
+public class DebuggingObjectOutputStream extends ObjectOutputStream{
+ 
+  private static final long serialVersionUID = 1L;
+ 
+  private LinkedList stack = new LinkedList();
+  private HashSet set = new HashSet();
+ 
+  public DebuggingObjectOutputStream(FileOutputStream fos) throws IOException {}
+ 
+  @Override
+  protected final void writeObjectOverride(Object obj) throws IOException {
+    // Check for circular reference.
+    if (set.contains(obj)) {
+      return;
+    }
+    if (stack.isEmpty()) {
+      stack.add("Class " + obj.getClass().getName());
+    }
+    set.add(obj);
+    Field[] fields = obj.getClass().getFields();
+    for (int i = 0; i < fields.length; i++) {
+      StringBuffer buffer = new StringBuffer();
+      Field f = fields[i];
+      int m = f.getModifiers();
+      if (fields[i].getType().isPrimitive() || Modifier.isTransient(m) ||
+          Modifier.isStatic(m)) {
+        continue;
+      }
+ 
+      if (Modifier.isPrivate(m)) {
+        buffer.append("private ");
+      }
+      if (Modifier.isProtected(m)) {
+        buffer.append("protected ");
+      }
+      if (Modifier.isPublic(m)) {
+        buffer.append("public ");
+      }
+      if (Modifier.isFinal(m)) {
+        buffer.append("final ");
+      }
+      if (Modifier.isVolatile(m)) {
+        buffer.append("volatile ");
+      }
+      buffer.append(f.getType().getName()).append("");
+      buffer.append(" ").append(f.getName());
+      stack.add(buffer.toString());
+      if (Serializable.class.isAssignableFrom(fields[i].getType())) {
+        try {
+          writeObjectOverride(fields[i].get(obj));
+        }
+        catch (IllegalAccessException e) {
+          throw new RuntimeException(
+              getPrettyPrintedStack(fields[i].getType().getName()), e);
+        }
+      }
+ 
+      else {
+        throw new RuntimeException(
+            getPrettyPrintedStack(fields[i].getType().getName()).toString(),
+            new NotSerializableException(fields[i].getType().getName())
+        );
+      }
+      stack.removeLast();
+    }
+    if (stack.size() == 1) {
+      set.clear();
+      stack.removeLast();
+    }
+  }
+ 
+  private String getPrettyPrintedStack(String type) {
+    set.clear();
+    StringBuffer result = new StringBuffer();
+    StringBuffer spaces = new StringBuffer();
+    result.append("Unable to serialize class: ");
+    result.append(type);
+    result.append("\nField hierarchy is:");
+    while (!stack.isEmpty()) {
+      spaces.append("  ");
+      result.append("\n").append(spaces).append(stack.removeFirst());
+    }
+    result.append(" <----- field that is not serializable");
+    return result.toString();
+  }
 }

+ 195 - 195
ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/DirectoryDB.java

@@ -1,195 +1,195 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.tools.IOtools;
-
-import de.nplusc.izc.tools.UiToolz.DirectoryTree;
-import java.util.ArrayList;
-import javax.swing.SwingUtilities;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-/**
- *
- * @author LH
- */
-public class DirectoryDB extends DirectoryTree
-{
-    private static final Logger l = LogManager.getLogger();
-    DBWriter dbc;
-    public DirectoryDB(DBWriter dbcr,String dirlisttable,String filelisttable)
-    {                                                                                                         //ignore müssen nullable sein da sie nicht verarbeitet werden
-        //schema des structparameters: type:name|type:name (avail basetypes: id,parent,name,descript,realpath,ignore
-        this(dbcr,dirlisttable,"id:ID|name:name|parent:parent",filelisttable,"id:ID|parent:Mountpoint|name:name|descript:Description|realpath:RealPath");
-    }
-    //private DirectoryTreeNode root;
-    private String dirRowParentID="",dirRowID="",DirRowName="";
-    private String dirTable;
-                                                             //optional. kann bei nichtnotwendigkeit ersetzt werden
-    private String fileRowParentID="",FileRowID="",FileRowName="",FileRowDesc="",FileRowRealPath="";
-    private String fileTable;
-    
-    
-    
-    
-    
-    public DirectoryDB(DBWriter dbcr,String dirlisttable,String dirtableStruct,String filelisttable,String filetableStruct)
-    {
-        dbc = dbcr;
-        dirTable = dirlisttable;
-        fileTable = filelisttable;
-        for (String fdata : dirtableStruct.split("\\|"))
-        {
-            String[] fdatas = fdata.split(":");
-            switch(fdatas[0])
-            {
-                case "id":
-                    dirRowID = fdatas[1];
-                break;
-                case "parent":
-                    dirRowParentID = fdatas[1];
-                break;
-                case "name":
-                    DirRowName = fdatas[1];
-                break;
-            }
-            
-
-            
-        }
-        for (String fdata : filetableStruct.split("\\|"))
-        {
-            String[] fdatas = fdata.split(":");
-            switch(fdatas[0])
-            {
-                case "id":
-                    FileRowID = fdatas[1];
-                break;
-                case "parent":
-                    fileRowParentID = fdatas[1];
-                break;
-                case "name":
-                    FileRowName = fdatas[1];
-                break;
-                case "descript":
-                    FileRowDesc =  fdatas[1];
-                break;
-                case "realpath":
-                    FileRowRealPath =  fdatas[1];
-                break;
-            }
-        }
-        rebuildDatabase();
-    }
-    
-    @Override
-    public String getRootPathValue()
-    {
-        return "root";
-    }
-           
-    
-    @Override
-    protected void rebuildDatabase()
-    {
-        directoryTree = new ArrayList<>();//reset
-        String[][] directoryTable = dbc.queryTable("Select "+dirRowID+","+dirRowParentID+","+DirRowName+" from "+dirTable);
-        String[][] filetable = dbc.queryTable("Select "+FileRowID+","+fileRowParentID+","+FileRowName+","+FileRowRealPath+","+FileRowDesc+" from "+fileTable);  
-        //files haben IDs mit F davor. wird von Scripterl benötigt um DUpeIDs zu verhindern.....
-        for (String[] lines : directoryTable)
-        {
-            directoryTree.add(new DirectoryTreeNode(lines[0], lines[1],lines[2], true));
-        }
-        for (String[] lines : filetable)
-        {//ID,ParentID;Name,Mountpoint,Description
-            DirectoryTreeNode dtn = new DirectoryTreeNode("F"+lines[0], lines[1],lines[2], false);
-            dtn.addAdditionalData(0, lines[3]);
-            dtn.addAdditionalData(1, lines[4]);
-            directoryTree.add(dtn);
-        }
-
-    }
-    
-    private DirectoryTreeNode ut;
-    @Override
-    public void insertDirectory(DirectoryTreeNode node)
-    {
-        String targetID = node.getParentID();
-                    //insert into table (key1,key2,...) values(value1,value2,...)
-        String inserterQuery = "Insert into "+dirTable+ " ("+
-                               dirRowID+","+dirRowParentID+","+DirRowName+") VALUES(null,"+targetID+",'"+node.toString()+"')";
-        l.trace(inserterQuery);
-        dbc.write(inserterQuery);
-        rebuildDatabase();
-        ut = null;
-        for (DirectoryTreeNode directoryTreeNode : directoryTree)
-        {
-            if(directoryTreeNode.getNodeID().equals(node.getNodeID()))
-            {
-                ut=directoryTreeNode;
-                l.trace(ut+"|updateTrg");
-            }
-        }
-        SwingUtilities.invokeLater(new Runnable()
-        {
-            @Override
-            public void run()
-            {
-                updateTreeTo(ut);
-                
-            }
-        });
-    }
-    
-
-    
-    
-    @Override
-    public void insertFile(DirectoryTreeNode node)
-    {
-        String targetID = node.getParentID();
-                    //insert into table (key1,key2,...) values(value1,value2,...)
-        node.addAdditionalData(0, node.getAdditionalData(0).replaceAll("\\\\", "\\\\\\\\"));
-        String inserterQuery = "Insert into "+fileTable+ " ("+
-                               FileRowID+","+fileRowParentID+","+FileRowName+","+FileRowRealPath+","+
-                                FileRowDesc+") VALUES(null,"+targetID+",'"+node.toString()+"','"
-                                    +node.getAdditionalData(0) +"','"+node.getAdditionalData(1) +"')";
-        
-        l.trace(inserterQuery);
-        dbc.write(inserterQuery);
-        rebuildDatabase();
-        ut = null;
-        for (DirectoryTreeNode directoryTreeNode : directoryTree)
-        {
-            if(directoryTreeNode.getNodeID().equals(node.getNodeID()))
-            {
-                ut=directoryTreeNode;
-                l.trace(ut+"|updateTrg");
-            }
-        }
-        SwingUtilities.invokeLater(new Runnable()
-        {
-            @Override
-            public void run()
-            {
-                updateTreeTo(ut);
-            }
-        });
-        //TODO insert nir bestimmte Werte......(die 3
-                                                        //erforderlichen und sonst nix  
-    }
-}
-
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.tools.IOtools;
+
+import de.nplusc.izc.tools.UiToolz.DirectoryTree;
+import java.util.ArrayList;
+import javax.swing.SwingUtilities;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+/**
+ *
+ * @author LH
+ */
+public class DirectoryDB extends DirectoryTree
+{
+    private static final Logger l = LogManager.getLogger();
+    DBWriter dbc;
+    public DirectoryDB(DBWriter dbcr,String dirlisttable,String filelisttable)
+    {                                                                                                         //ignore müssen nullable sein da sie nicht verarbeitet werden
+        //schema des structparameters: type:name|type:name (avail basetypes: id,parent,name,descript,realpath,ignore
+        this(dbcr,dirlisttable,"id:ID|name:name|parent:parent",filelisttable,"id:ID|parent:Mountpoint|name:name|descript:Description|realpath:RealPath");
+    }
+    //private DirectoryTreeNode root;
+    private String dirRowParentID="",dirRowID="",DirRowName="";
+    private String dirTable;
+                                                             //optional. kann bei nichtnotwendigkeit ersetzt werden
+    private String fileRowParentID="",FileRowID="",FileRowName="",FileRowDesc="",FileRowRealPath="";
+    private String fileTable;
+    
+    
+    
+    
+    
+    public DirectoryDB(DBWriter dbcr,String dirlisttable,String dirtableStruct,String filelisttable,String filetableStruct)
+    {
+        dbc = dbcr;
+        dirTable = dirlisttable;
+        fileTable = filelisttable;
+        for (String fdata : dirtableStruct.split("\\|"))
+        {
+            String[] fdatas = fdata.split(":");
+            switch(fdatas[0])
+            {
+                case "id":
+                    dirRowID = fdatas[1];
+                break;
+                case "parent":
+                    dirRowParentID = fdatas[1];
+                break;
+                case "name":
+                    DirRowName = fdatas[1];
+                break;
+            }
+            
+
+            
+        }
+        for (String fdata : filetableStruct.split("\\|"))
+        {
+            String[] fdatas = fdata.split(":");
+            switch(fdatas[0])
+            {
+                case "id":
+                    FileRowID = fdatas[1];
+                break;
+                case "parent":
+                    fileRowParentID = fdatas[1];
+                break;
+                case "name":
+                    FileRowName = fdatas[1];
+                break;
+                case "descript":
+                    FileRowDesc =  fdatas[1];
+                break;
+                case "realpath":
+                    FileRowRealPath =  fdatas[1];
+                break;
+            }
+        }
+        rebuildDatabase();
+    }
+    
+    @Override
+    public String getRootPathValue()
+    {
+        return "root";
+    }
+           
+    
+    @Override
+    protected void rebuildDatabase()
+    {
+        directoryTree = new ArrayList<>();//reset
+        String[][] directoryTable = dbc.queryTable("Select "+dirRowID+","+dirRowParentID+","+DirRowName+" from "+dirTable);
+        String[][] filetable = dbc.queryTable("Select "+FileRowID+","+fileRowParentID+","+FileRowName+","+FileRowRealPath+","+FileRowDesc+" from "+fileTable);  
+        //files haben IDs mit F davor. wird von Scripterl benötigt um DUpeIDs zu verhindern.....
+        for (String[] lines : directoryTable)
+        {
+            directoryTree.add(new DirectoryTreeNode(lines[0], lines[1],lines[2], true));
+        }
+        for (String[] lines : filetable)
+        {//ID,ParentID;Name,Mountpoint,Description
+            DirectoryTreeNode dtn = new DirectoryTreeNode("F"+lines[0], lines[1],lines[2], false);
+            dtn.addAdditionalData(0, lines[3]);
+            dtn.addAdditionalData(1, lines[4]);
+            directoryTree.add(dtn);
+        }
+
+    }
+    
+    private DirectoryTreeNode ut;
+    @Override
+    public void insertDirectory(DirectoryTreeNode node)
+    {
+        String targetID = node.getParentID();
+                    //insert into table (key1,key2,...) values(value1,value2,...)
+        String inserterQuery = "Insert into "+dirTable+ " ("+
+                               dirRowID+","+dirRowParentID+","+DirRowName+") VALUES(null,"+targetID+",'"+node.toString()+"')";
+        l.trace(inserterQuery);
+        dbc.write(inserterQuery);
+        rebuildDatabase();
+        ut = null;
+        for (DirectoryTreeNode directoryTreeNode : directoryTree)
+        {
+            if(directoryTreeNode.getNodeID().equals(node.getNodeID()))
+            {
+                ut=directoryTreeNode;
+                l.trace(ut+"|updateTrg");
+            }
+        }
+        SwingUtilities.invokeLater(new Runnable()
+        {
+            @Override
+            public void run()
+            {
+                updateTreeTo(ut);
+                
+            }
+        });
+    }
+    
+
+    
+    
+    @Override
+    public void insertFile(DirectoryTreeNode node)
+    {
+        String targetID = node.getParentID();
+                    //insert into table (key1,key2,...) values(value1,value2,...)
+        node.addAdditionalData(0, node.getAdditionalData(0).replaceAll("\\\\", "\\\\\\\\"));
+        String inserterQuery = "Insert into "+fileTable+ " ("+
+                               FileRowID+","+fileRowParentID+","+FileRowName+","+FileRowRealPath+","+
+                                FileRowDesc+") VALUES(null,"+targetID+",'"+node.toString()+"','"
+                                    +node.getAdditionalData(0) +"','"+node.getAdditionalData(1) +"')";
+        
+        l.trace(inserterQuery);
+        dbc.write(inserterQuery);
+        rebuildDatabase();
+        ut = null;
+        for (DirectoryTreeNode directoryTreeNode : directoryTree)
+        {
+            if(directoryTreeNode.getNodeID().equals(node.getNodeID()))
+            {
+                ut=directoryTreeNode;
+                l.trace(ut+"|updateTrg");
+            }
+        }
+        SwingUtilities.invokeLater(new Runnable()
+        {
+            @Override
+            public void run()
+            {
+                updateTreeTo(ut);
+            }
+        });
+        //TODO insert nir bestimmte Werte......(die 3
+                                                        //erforderlichen und sonst nix  
+    }
+}
+

+ 91 - 91
ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/DirectoryTreeNode.java

@@ -1,91 +1,91 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.tools.IOtools;
-
-import java.util.ArrayList;
-
-/**
- *
- * @author LH
- */
-public class DirectoryTreeNode
-{
-    private String parentNodeID,nodeID;//datenbankid oder Pfad
-    private String Name;
-    private boolean isDirectory;
-    private ArrayList<String> additionalData;
-    private Object attachedObject;
-
-    public DirectoryTreeNode(String lnodeID,String parentnodeID,String Name,boolean isDirectory)
-    {
-        this(lnodeID, parentnodeID, Name, isDirectory, false);
-    }           
-                
-    public DirectoryTreeNode(String lnodeID,String parentnodeID,String Name,boolean isDirectory,boolean autopopulateID)
-    {
-        parentNodeID=parentnodeID;
-        nodeID=lnodeID;
-        if(autopopulateID)
-        {
-            nodeID=hashCode()+"";
-        }
-        this.Name=Name;
-        this.isDirectory=isDirectory;
-        additionalData = new ArrayList<>();
-        for (int i = 0; i < 10; i++)
-        {
-            additionalData.add("");//Buffer um genügend platz zu haben
-        }
-    }
-    
-    
-    public String getParentID()
-    {
-        return parentNodeID;
-    }
-    public String getNodeID()
-    {
-        return nodeID;
-    }
-    public boolean isDirectory()
-    {
-        return isDirectory;
-    }
-    @Override
-    public String toString()
-    {        
-        return Name;
-    }
-    public void addAdditionalData(int idx,String cnt)
-    {
-        additionalData.set(idx,cnt);
-    }
-    public String getAdditionalData(int idx)
-    {
-        return additionalData.get(idx);
-    }
-    
-    public Object getAttachedObject()
-    {
-        return attachedObject;
-    }
-
-    public void setAttachedObject(Object attachedObject)
-    {
-        this.attachedObject = attachedObject;
-    }
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.tools.IOtools;
+
+import java.util.ArrayList;
+
+/**
+ *
+ * @author LH
+ */
+public class DirectoryTreeNode
+{
+    private String parentNodeID,nodeID;//datenbankid oder Pfad
+    private String Name;
+    private boolean isDirectory;
+    private ArrayList<String> additionalData;
+    private Object attachedObject;
+
+    public DirectoryTreeNode(String lnodeID,String parentnodeID,String Name,boolean isDirectory)
+    {
+        this(lnodeID, parentnodeID, Name, isDirectory, false);
+    }           
+                
+    public DirectoryTreeNode(String lnodeID,String parentnodeID,String Name,boolean isDirectory,boolean autopopulateID)
+    {
+        parentNodeID=parentnodeID;
+        nodeID=lnodeID;
+        if(autopopulateID)
+        {
+            nodeID=hashCode()+"";
+        }
+        this.Name=Name;
+        this.isDirectory=isDirectory;
+        additionalData = new ArrayList<>();
+        for (int i = 0; i < 10; i++)
+        {
+            additionalData.add("");//Buffer um genügend platz zu haben
+        }
+    }
+    
+    
+    public String getParentID()
+    {
+        return parentNodeID;
+    }
+    public String getNodeID()
+    {
+        return nodeID;
+    }
+    public boolean isDirectory()
+    {
+        return isDirectory;
+    }
+    @Override
+    public String toString()
+    {        
+        return Name;
+    }
+    public void addAdditionalData(int idx,String cnt)
+    {
+        additionalData.set(idx,cnt);
+    }
+    public String getAdditionalData(int idx)
+    {
+        return additionalData.get(idx);
+    }
+    
+    public Object getAttachedObject()
+    {
+        return attachedObject;
+    }
+
+    public void setAttachedObject(Object attachedObject)
+    {
+        this.attachedObject = attachedObject;
+    }
+}

+ 95 - 95
ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/ExplorerTree.java

@@ -1,96 +1,96 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.tools.IOtools;
-
-import de.nplusc.izc.tools.UiToolz.DirectoryTree;
-import de.nplusc.izc.tools.baseTools.Tools;
-import java.io.File;
-import java.util.HashMap;
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-
-/**
- *
- * @author LH
- */
-public class ExplorerTree extends DirectoryTree
-{
-    private static final Logger l = LogManager.getLogger();
-    String basePath;
-    public ExplorerTree(String basepath)
-    {
-        basePath=basepath;
-        rebuildDatabase();
-    }
-    @Override
-    protected void rebuildDatabase()
-    {
-        l.info("Scanning directory.... please wait");
-        String[] dirlist = FileTK.walkDirectoryRecursively(basePath);
-        HashMap<String,String>Path2ID=new HashMap<>();
-        DirectoryTreeNode temp = null;
-        l.info("scanning{}",basePath);
-        temp = new DirectoryTreeNode("0", "0", (basePath), true);
-        Path2ID.put(basePath.substring(0,basePath.length()-1), "0");
-        directoryTree.add(temp);
-        String fs = Tools.getFormatStrforThisAsMax(dirlist.length);
-        l.info("Creating  TreeStructure........");
-        for (int i = 1; i < dirlist.length; i++)
-        {
-
-            String path = dirlist[i];   
-            if(path==null)
-                continue;
-            l.trace(i+"|"+path+"||");
-            String parpath = FileTK.getFilePath(path);
-            String parentID= Path2ID.get(parpath);
-            l.trace(i+"|"+path+"|"+parentID+"|"+parpath);
-            String filename = FileTK.getFileName(path);
-            temp = new DirectoryTreeNode(i+"", parentID, filename, FileTK.isDir(path));
-            directoryTree.add(temp);
-            if(new File(path).isDirectory())
-            {
-                Path2ID.put(path, i+"");
-            }
-            if(i%1000==0)
-            {
-                String op = String.format(fs, i);
-                //TODO somehow get logging to allow changes!!!
-                System.out.print(op+"processed");
-            }
-        }
-        System.out.println(dirlist.length+" processed");
-    }
-    private DirectoryTreeNode ut;
-    @Override
-    public void insertDirectory(DirectoryTreeNode node)
-    {
-        //TODO later
-    }
-    
-    @Override
-    public String getRootPathValue()
-    {
-        return getRoot()+"";
-    }
-    
-    @Override
-    public void insertFile(DirectoryTreeNode node)
-    {
-       //NOP
-    }
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.tools.IOtools;
+
+import de.nplusc.izc.tools.UiToolz.DirectoryTree;
+import de.nplusc.izc.tools.baseTools.Tools;
+import java.io.File;
+import java.util.HashMap;
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+
+/**
+ *
+ * @author LH
+ */
+public class ExplorerTree extends DirectoryTree
+{
+    private static final Logger l = LogManager.getLogger();
+    String basePath;
+    public ExplorerTree(String basepath)
+    {
+        basePath=basepath;
+        rebuildDatabase();
+    }
+    @Override
+    protected void rebuildDatabase()
+    {
+        l.info("Scanning directory.... please wait");
+        String[] dirlist = FileTK.walkDirectoryRecursively(basePath);
+        HashMap<String,String>Path2ID=new HashMap<>();
+        DirectoryTreeNode temp = null;
+        l.info("scanning{}",basePath);
+        temp = new DirectoryTreeNode("0", "0", (basePath), true);
+        Path2ID.put(basePath.substring(0,basePath.length()-1), "0");
+        directoryTree.add(temp);
+        String fs = Tools.getFormatStrforThisAsMax(dirlist.length);
+        l.info("Creating  TreeStructure........");
+        for (int i = 1; i < dirlist.length; i++)
+        {
+
+            String path = dirlist[i];   
+            if(path==null)
+                continue;
+            l.trace(i+"|"+path+"||");
+            String parpath = FileTK.getFilePath(path);
+            String parentID= Path2ID.get(parpath);
+            l.trace(i+"|"+path+"|"+parentID+"|"+parpath);
+            String filename = FileTK.getFileName(path);
+            temp = new DirectoryTreeNode(i+"", parentID, filename, FileTK.isDir(path));
+            directoryTree.add(temp);
+            if(new File(path).isDirectory())
+            {
+                Path2ID.put(path, i+"");
+            }
+            if(i%1000==0)
+            {
+                String op = String.format(fs, i);
+                //TODO somehow get logging to allow changes!!!
+                System.out.print(op+"processed");
+            }
+        }
+        System.out.println(dirlist.length+" processed");
+    }
+    private DirectoryTreeNode ut;
+    @Override
+    public void insertDirectory(DirectoryTreeNode node)
+    {
+        //TODO later
+    }
+    
+    @Override
+    public String getRootPathValue()
+    {
+        return getRoot()+"";
+    }
+    
+    @Override
+    public void insertFile(DirectoryTreeNode node)
+    {
+       //NOP
+    }
 }

+ 65 - 65
ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/IniIface.java

@@ -1,65 +1,65 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.tools.IOtools;
-
-import java.io.File;
-import java.io.IOException;
-import org.ini4j.Ini;
-
-/**
- *
- * @author LH
- */
-public class IniIface
-{
-    private Ini ifile;
-    private File f;
-    public IniIface(String path)
-    {
-        try
-        {
-            f = new File(path);
-            f.createNewFile();
-            ifile = new Ini(f);
-        }
-        catch (IOException ex)
-        {
-            ex.printStackTrace();
-        }
-    }
-    
-    public void writeEntry(String section,String key, String value)
-    {
-        ifile.add(section, key, value);
-    }
-    public void flush()
-    {
-        try
-        {
-            ifile.store();
-        }
-        catch (IOException ex)
-        {
-            ex.printStackTrace();
-        }
-    }
-    
-    public String readEntry(String Section,String key)
-    {
-        return ifile.get(Section, key)+"";
-    }
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.tools.IOtools;
+
+import java.io.File;
+import java.io.IOException;
+import org.ini4j.Ini;
+
+/**
+ *
+ * @author LH
+ */
+public class IniIface
+{
+    private Ini ifile;
+    private File f;
+    public IniIface(String path)
+    {
+        try
+        {
+            f = new File(path);
+            f.createNewFile();
+            ifile = new Ini(f);
+        }
+        catch (IOException ex)
+        {
+            ex.printStackTrace();
+        }
+    }
+    
+    public void writeEntry(String section,String key, String value)
+    {
+        ifile.add(section, key, value);
+    }
+    public void flush()
+    {
+        try
+        {
+            ifile.store();
+        }
+        catch (IOException ex)
+        {
+            ex.printStackTrace();
+        }
+    }
+    
+    public String readEntry(String Section,String key)
+    {
+        return ifile.get(Section, key)+"";
+    }
+}

+ 124 - 124
ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/LogStream.java

@@ -1,124 +1,124 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.tools.IOtools;
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.OutputStream;
-import java.io.PrintStream;
-import java.io.UnsupportedEncodingException;
-import java.util.Date;
-
-/**
- *
- * @author LH
- */
-public class LogStream extends PrintStream
-{
-
-    public LogStream(File file) throws FileNotFoundException
-    {
-        super(file);
-    }
-    
-    PrintStream mirror = null;
-    public LogStream(File f,PrintStream mirror) throws FileNotFoundException
-    {
-        super(f);
-        this.mirror=mirror;
-    }
-
-    public LogStream(OutputStream out)
-    {
-        super(out);
-    }
-
-    
-    public LogStream(OutputStream out,PrintStream mirror)
-    {
-        super(out);
-        this.mirror=mirror;
-    }
-    public LogStream(String fileName) throws FileNotFoundException
-    {
-        super(fileName);
-    }
-
-    public LogStream(File file, String csn) throws FileNotFoundException, UnsupportedEncodingException
-    {
-        super(file, csn);
-    }
-
-    public LogStream(OutputStream out, boolean autoFlush)
-    {
-        super(out, autoFlush);
-    }
-    
-        public LogStream(File file, String csn,PrintStream mirror) throws FileNotFoundException, UnsupportedEncodingException
-    {
-        super(file, csn);
-        this.mirror=mirror;
-    }
-
-    public LogStream(OutputStream out, boolean autoFlush,PrintStream mirror)
-    {
-        super(out, autoFlush);
-        this.mirror=mirror;
-    }
-
-    public LogStream(String fileName, String csn) throws FileNotFoundException, UnsupportedEncodingException
-    {
-        super(fileName, csn);
-    }
-
-    public LogStream(OutputStream out, boolean autoFlush, String encoding) throws UnsupportedEncodingException
-    {
-        super(out, autoFlush, encoding);
-    }
-
-    @Override
-    public void println(String x)
-    {
-        super.println("["+new Date(System.currentTimeMillis()).toString()+"]"+x); //To change body of generated methods, choose Tools | Templates.
-        if(mirror!=null)
-        {
-            mirror.println(x);
-        }
-    }
-
-    @Override
-    public void println(Object x)
-    {
-        println(""+x);//timestamps
-        if(mirror!=null)
-        {
-            mirror.println(x);
-        }
-    }
-
-    @Override
-    public void println(int x)
-    {
-        println(""+x);//timestamps
-        if(mirror!=null)
-        {
-            mirror.println(x);
-        }
-    }
-    
-    
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.tools.IOtools;
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.OutputStream;
+import java.io.PrintStream;
+import java.io.UnsupportedEncodingException;
+import java.util.Date;
+
+/**
+ *
+ * @author LH
+ */
+public class LogStream extends PrintStream
+{
+
+    public LogStream(File file) throws FileNotFoundException
+    {
+        super(file);
+    }
+    
+    PrintStream mirror = null;
+    public LogStream(File f,PrintStream mirror) throws FileNotFoundException
+    {
+        super(f);
+        this.mirror=mirror;
+    }
+
+    public LogStream(OutputStream out)
+    {
+        super(out);
+    }
+
+    
+    public LogStream(OutputStream out,PrintStream mirror)
+    {
+        super(out);
+        this.mirror=mirror;
+    }
+    public LogStream(String fileName) throws FileNotFoundException
+    {
+        super(fileName);
+    }
+
+    public LogStream(File file, String csn) throws FileNotFoundException, UnsupportedEncodingException
+    {
+        super(file, csn);
+    }
+
+    public LogStream(OutputStream out, boolean autoFlush)
+    {
+        super(out, autoFlush);
+    }
+    
+        public LogStream(File file, String csn,PrintStream mirror) throws FileNotFoundException, UnsupportedEncodingException
+    {
+        super(file, csn);
+        this.mirror=mirror;
+    }
+
+    public LogStream(OutputStream out, boolean autoFlush,PrintStream mirror)
+    {
+        super(out, autoFlush);
+        this.mirror=mirror;
+    }
+
+    public LogStream(String fileName, String csn) throws FileNotFoundException, UnsupportedEncodingException
+    {
+        super(fileName, csn);
+    }
+
+    public LogStream(OutputStream out, boolean autoFlush, String encoding) throws UnsupportedEncodingException
+    {
+        super(out, autoFlush, encoding);
+    }
+
+    @Override
+    public void println(String x)
+    {
+        super.println("["+new Date(System.currentTimeMillis()).toString()+"]"+x); //To change body of generated methods, choose Tools | Templates.
+        if(mirror!=null)
+        {
+            mirror.println(x);
+        }
+    }
+
+    @Override
+    public void println(Object x)
+    {
+        println(""+x);//timestamps
+        if(mirror!=null)
+        {
+            mirror.println(x);
+        }
+    }
+
+    @Override
+    public void println(int x)
+    {
+        println(""+x);//timestamps
+        if(mirror!=null)
+        {
+            mirror.println(x);
+        }
+    }
+    
+    
+}

+ 93 - 93
ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/NativeUtils.java

@@ -1,94 +1,94 @@
-package de.nplusc.izc.tools.IOtools;
-
-
-import java.io.File;
-import java.io.FileNotFoundException;
-import java.io.FileOutputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.io.OutputStream;
- 
-/**
- * Simple library class for working with JNI (Java Native Interface)
- * 
- * @see http://adamheinrich.com/2012/how-to-load-native-jni-library-from-jar
- *
- * @author Adam Heirnich &lt;adam@adamh.cz&gt;, http://www.adamh.cz
- */
-public class NativeUtils {
- 
-    /**
-     * Private constructor - this class will never be instanced
-     */
-    private NativeUtils() {
-    }
- 
-    /**
-     * Loads library from current JAR archive
-     * 
-     * The file from JAR is copied into system temporary directory and then loaded. The temporary file is deleted after exiting.
-     * Method uses String as filename because the pathname is "abstract", not system-dependent.
-     * 
-     * @param path The filename inside JAR as absolute path (beginning with '/'), e.g. /package/File.ext
-     * @throws IOException If temporary file creation or read/write operation fails
-     * @throws IllegalArgumentException If source file (param path) does not exist
-     * @throws IllegalArgumentException If the path is not absolute or if the filename is shorter than three characters (restriction of {@see File#createTempFile(java.lang.String, java.lang.String)}).
-     */
-    public static void loadLibraryFromJar(String path) throws IOException {
- 
-        if (!path.startsWith("/")) {
-            throw new IllegalArgumentException("The path has to be absolute (start with '/').");
-        }
- 
-        // Obtain filename from path
-        String[] parts = path.split("/");
-        String filename = (parts.length > 1) ? parts[parts.length - 1] : null;
- 
-        // Split filename to prexif and suffix (extension)
-        String prefix = "";
-        String suffix = null;
-        if (filename != null) {
-            parts = filename.split("\\.", 2);
-            prefix = parts[0];
-            suffix = (parts.length > 1) ? "."+parts[parts.length - 1] : null; // Thanks, davs! :-)
-        }
- 
-        // Check if the filename is okay
-        if (filename == null || prefix.length() < 3) {
-            throw new IllegalArgumentException("The filename has to be at least 3 characters long.");
-        }
- 
-        // Prepare temporary file
-        File temp = File.createTempFile(prefix, suffix);
-        temp.deleteOnExit();
- 
-        if (!temp.exists()) {
-            throw new FileNotFoundException("File " + temp.getAbsolutePath() + " does not exist.");
-        }
- 
-        // Prepare buffer for data copying
-        byte[] buffer = new byte[1024];
-        int readBytes;
- 
-        // Open and check input stream
-        InputStream is = NativeUtils.class.getResourceAsStream(path);
-        if (is == null) {
-            throw new FileNotFoundException("File " + path + " was not found inside JAR.");
-        }
- 
-        // Open output stream and copy data between source file in JAR and the temporary file
-        OutputStream os = new FileOutputStream(temp);
-        try {
-            while ((readBytes = is.read(buffer)) != -1) {
-                os.write(buffer, 0, readBytes);
-            }
-        } finally {
-            // If read/write fails, close streams safely before throwing an exception
-            os.close();
-            is.close();
-        }
- 
-        // Finally, load the library
-        System.load(temp.getAbsolutePath());
-    }
+package de.nplusc.izc.tools.IOtools;
+
+
+import java.io.File;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+ 
+/**
+ * Simple library class for working with JNI (Java Native Interface)
+ * 
+ * @see http://adamheinrich.com/2012/how-to-load-native-jni-library-from-jar
+ *
+ * @author Adam Heirnich &lt;adam@adamh.cz&gt;, http://www.adamh.cz
+ */
+public class NativeUtils {
+ 
+    /**
+     * Private constructor - this class will never be instanced
+     */
+    private NativeUtils() {
+    }
+ 
+    /**
+     * Loads library from current JAR archive
+     * 
+     * The file from JAR is copied into system temporary directory and then loaded. The temporary file is deleted after exiting.
+     * Method uses String as filename because the pathname is "abstract", not system-dependent.
+     * 
+     * @param path The filename inside JAR as absolute path (beginning with '/'), e.g. /package/File.ext
+     * @throws IOException If temporary file creation or read/write operation fails
+     * @throws IllegalArgumentException If source file (param path) does not exist
+     * @throws IllegalArgumentException If the path is not absolute or if the filename is shorter than three characters (restriction of {@see File#createTempFile(java.lang.String, java.lang.String)}).
+     */
+    public static void loadLibraryFromJar(String path) throws IOException {
+ 
+        if (!path.startsWith("/")) {
+            throw new IllegalArgumentException("The path has to be absolute (start with '/').");
+        }
+ 
+        // Obtain filename from path
+        String[] parts = path.split("/");
+        String filename = (parts.length > 1) ? parts[parts.length - 1] : null;
+ 
+        // Split filename to prexif and suffix (extension)
+        String prefix = "";
+        String suffix = null;
+        if (filename != null) {
+            parts = filename.split("\\.", 2);
+            prefix = parts[0];
+            suffix = (parts.length > 1) ? "."+parts[parts.length - 1] : null; // Thanks, davs! :-)
+        }
+ 
+        // Check if the filename is okay
+        if (filename == null || prefix.length() < 3) {
+            throw new IllegalArgumentException("The filename has to be at least 3 characters long.");
+        }
+ 
+        // Prepare temporary file
+        File temp = File.createTempFile(prefix, suffix);
+        temp.deleteOnExit();
+ 
+        if (!temp.exists()) {
+            throw new FileNotFoundException("File " + temp.getAbsolutePath() + " does not exist.");
+        }
+ 
+        // Prepare buffer for data copying
+        byte[] buffer = new byte[1024];
+        int readBytes;
+ 
+        // Open and check input stream
+        InputStream is = NativeUtils.class.getResourceAsStream(path);
+        if (is == null) {
+            throw new FileNotFoundException("File " + path + " was not found inside JAR.");
+        }
+ 
+        // Open output stream and copy data between source file in JAR and the temporary file
+        OutputStream os = new FileOutputStream(temp);
+        try {
+            while ((readBytes = is.read(buffer)) != -1) {
+                os.write(buffer, 0, readBytes);
+            }
+        } finally {
+            // If read/write fails, close streams safely before throwing an exception
+            os.close();
+            is.close();
+        }
+ 
+        // Finally, load the library
+        System.load(temp.getAbsolutePath());
+    }
 }

+ 245 - 245
ToolKit/src/main/java/de/nplusc/izc/tools/IOtools/PrintStreamCapturer.java

@@ -1,245 +1,245 @@
-/*
- * Copyright (C) 2015 iZc
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package de.nplusc.izc.tools.IOtools;
-
-import java.io.PrintStream;
-import javax.swing.JTextArea;
-
-/**
- *
- * @author iZc <nplusc.de>
- */
-public class PrintStreamCapturer extends PrintStream {
-
-    private JTextArea text;
-    private boolean atLineStart;
-    private String indent;
-
-    public PrintStreamCapturer(JTextArea textArea, PrintStream capturedStream, String indent) {
-        super(capturedStream);
-        this.text = textArea;
-        this.indent = indent;
-        this.atLineStart = true;
-    }
-
-    public PrintStreamCapturer(JTextArea textArea, PrintStream capturedStream) {
-        this(textArea, capturedStream, "");
-    }
-
-    private void writeToTextArea(String str) {
-        if (text != null) {
-            synchronized (text) {
-                text.setCaretPosition(text.getDocument().getLength());
-                text.append(str);
-            }
-        }
-    }
-
-    private void write(String str) {
-        String[] s = str.split("\n", -1);
-        if (s.length == 0)
-            return;
-        for (int i = 0; i < s.length - 1; i++) {
-            writeWithPotentialIndent(s[i]);
-            writeWithPotentialIndent("\n");
-            atLineStart = true;
-        }
-        String last = s[s.length - 1];
-        if (!last.equals("")) {
-            writeWithPotentialIndent(last);
-        }
-    }
-
-    private void writeWithPotentialIndent(String s) {
-        if (atLineStart) {
-            writeToTextArea(indent + s);
-            atLineStart = false;
-        } else {
-            writeToTextArea(s);
-        }
-    }
-
-    private void newLine() {
-        write("\n");
-    }
-
-    @Override
-    public void print(boolean b) {
-        synchronized (this) {
-            super.print(b);
-            write(String.valueOf(b));
-        }
-    }
-
-    @Override
-    public void print(char c) {
-        synchronized (this) {
-            super.print(c);
-            write(String.valueOf(c));
-        }
-    }
-
-    @Override
-    public void print(char[] s) {
-        synchronized (this) {
-            super.print(s);
-            write(String.valueOf(s));
-        }
-    }
-
-    @Override
-    public void print(double d) {
-        synchronized (this) {
-            super.print(d);
-            write(String.valueOf(d));
-        }
-    }
-
-    @Override
-    public void print(float f) {
-        synchronized (this) {
-            super.print(f);
-            write(String.valueOf(f));
-        }
-    }
-
-    @Override
-    public void print(int i) {
-        synchronized (this) {
-            super.print(i);
-            write(String.valueOf(i));
-        }
-    }
-
-    @Override
-    public void print(long l) {
-        synchronized (this) {
-            super.print(l);
-            write(String.valueOf(l));
-        }
-    }
-
-    @Override
-    public void print(Object o) {
-        synchronized (this) {
-            super.print(o);
-            write(String.valueOf(o));
-        }
-    }
-
-    @Override
-    public void print(String s) {
-        synchronized (this) {
-            super.print(s);
-            if (s == null) {
-                write("null");
-            } else {
-                write(s);
-            }
-        }
-    }
-
-    @Override
-    public void println() {
-        synchronized (this) {
-            newLine();
-            super.println();
-        }
-    }
-
-    @Override
-    public void println(boolean x) {
-        synchronized (this) {
-            print(x);
-            newLine();
-            super.println();
-        }
-    }
-
-    @Override
-    public void println(char x) {
-        synchronized (this) {
-            print(x);
-            newLine();
-            super.println();
-        }
-    }
-
-    @Override
-    public void println(int x) {
-        synchronized (this) {
-            print(x);
-            newLine();
-            super.println();
-        }
-    }
-
-    @Override
-    public void println(long x) {
-        synchronized (this) {
-            print(x);
-            newLine();
-            super.println();
-        }
-    }
-
-    @Override
-    public void println(float x) {
-        synchronized (this) {
-            print(x);
-            newLine();
-            super.println();
-        }
-    }
-
-    @Override
-    public void println(double x) {
-        synchronized (this) {
-            print(x);
-            newLine();
-            super.println();
-        }
-    }
-
-    @Override
-    public void println(char x[]) {
-        synchronized (this) {
-            print(x);
-            newLine();
-            super.println();
-        }
-    }
-
-    @Override
-    public void println(String x) {
-        synchronized (this) {
-            print(x);
-            newLine();
-            super.println();
-        }
-    }
-
-    @Override
-    public void println(Object x) {
-        String s = String.valueOf(x);
-        synchronized (this) {
-            print(s);
-            newLine();
-            super.println();
-        }
-    }
-}
+/*
+ * Copyright (C) 2015 iZc
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package de.nplusc.izc.tools.IOtools;
+
+import java.io.PrintStream;
+import javax.swing.JTextArea;
+
+/**
+ *
+ * @author iZc <nplusc.de>
+ */
+public class PrintStreamCapturer extends PrintStream {
+
+    private JTextArea text;
+    private boolean atLineStart;
+    private String indent;
+
+    public PrintStreamCapturer(JTextArea textArea, PrintStream capturedStream, String indent) {
+        super(capturedStream);
+        this.text = textArea;
+        this.indent = indent;
+        this.atLineStart = true;
+    }
+
+    public PrintStreamCapturer(JTextArea textArea, PrintStream capturedStream) {
+        this(textArea, capturedStream, "");
+    }
+
+    private void writeToTextArea(String str) {
+        if (text != null) {
+            synchronized (text) {
+                text.setCaretPosition(text.getDocument().getLength());
+                text.append(str);
+            }
+        }
+    }
+
+    private void write(String str) {
+        String[] s = str.split("\n", -1);
+        if (s.length == 0)
+            return;
+        for (int i = 0; i < s.length - 1; i++) {
+            writeWithPotentialIndent(s[i]);
+            writeWithPotentialIndent("\n");
+            atLineStart = true;
+        }
+        String last = s[s.length - 1];
+        if (!last.equals("")) {
+            writeWithPotentialIndent(last);
+        }
+    }
+
+    private void writeWithPotentialIndent(String s) {
+        if (atLineStart) {
+            writeToTextArea(indent + s);
+            atLineStart = false;
+        } else {
+            writeToTextArea(s);
+        }
+    }
+
+    private void newLine() {
+        write("\n");
+    }
+
+    @Override
+    public void print(boolean b) {
+        synchronized (this) {
+            super.print(b);
+            write(String.valueOf(b));
+        }
+    }
+
+    @Override
+    public void print(char c) {
+        synchronized (this) {
+            super.print(c);
+            write(String.valueOf(c));
+        }
+    }
+
+    @Override
+    public void print(char[] s) {
+        synchronized (this) {
+            super.print(s);
+            write(String.valueOf(s));
+        }
+    }
+
+    @Override
+    public void print(double d) {
+        synchronized (this) {
+            super.print(d);
+            write(String.valueOf(d));
+        }
+    }
+
+    @Override
+    public void print(float f) {
+        synchronized (this) {
+            super.print(f);
+            write(String.valueOf(f));
+        }
+    }
+
+    @Override
+    public void print(int i) {
+        synchronized (this) {
+            super.print(i);
+            write(String.valueOf(i));
+        }
+    }
+
+    @Override
+    public void print(long l) {
+        synchronized (this) {
+            super.print(l);
+            write(String.valueOf(l));
+        }
+    }
+
+    @Override
+    public void print(Object o) {
+        synchronized (this) {
+            super.print(o);
+            write(String.valueOf(o));
+        }
+    }
+
+    @Override
+    public void print(String s) {
+        synchronized (this) {
+            super.print(s);
+            if (s == null) {
+                write("null");
+            } else {
+                write(s);
+            }
+        }
+    }
+
+    @Override
+    public void println() {
+        synchronized (this) {
+            newLine();
+            super.println();
+        }
+    }
+
+    @Override
+    public void println(boolean x) {
+        synchronized (this) {
+            print(x);
+            newLine();
+            super.println();
+        }
+    }
+
+    @Override
+    public void println(char x) {
+        synchronized (this) {
+            print(x);
+            newLine();
+            super.println();
+        }
+    }
+
+    @Override
+    public void println(int x) {
+        synchronized (this) {
+            print(x);
+            newLine();
+            super.println();
+        }
+    }
+
+    @Override
+    public void println(long x) {
+        synchronized (this) {
+            print(x);
+            newLine();
+            super.println();
+        }
+    }
+
+    @Override
+    public void println(float x) {
+        synchronized (this) {
+            print(x);
+            newLine();
+            super.println();
+        }
+    }
+
+    @Override
+    public void println(double x) {
+        synchronized (this) {
+            print(x);
+            newLine();
+            super.println();
+        }
+    }
+
+    @Override
+    public void println(char x[]) {
+        synchronized (this) {
+            print(x);
+            newLine();
+            super.println();
+        }
+    }
+
+    @Override
+    public void println(String x) {
+        synchronized (this) {
+            print(x);
+            newLine();
+            super.println();
+        }
+    }
+
+    @Override
+    public void println(Object x) {
+        String s = String.valueOf(x);
+        synchronized (this) {
+            print(s);
+            newLine();
+            super.println();
+        }
+    }
+}

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است