forked from jponge/izpack
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix to solve problem 'reduce' is not defined Traceback (most recent call last): File "izpack2app\izpack2app.py", line 53, in <module> main() File "izpack2app\izpack2app.py", line 43, in main plist_content = reduce(reducer, plist.readlines(), '').replace('__JAR__', jar_name) NameError: name 'reduce' is not defined * Update izpack2app.py * sudo panel refactoring for real use case usage. Password now can be exported for external scritpts as variable. Sudo panel localization using current langpacks Added linux .run format creation and example for ant usage Minor fix for python 3 print function error * IZPACK-1688: Sudo panel refactoring for real use case usage. Cleanup PR 704. Co-authored-by: Paolo Ucchino <ucchino@gmail.com>
- Loading branch information
Showing
8 changed files
with
199 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 3 additions & 2 deletions
5
izpack-test-common/src/main/java/com/izforge/izpack/test/util/ClassUtils.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
64 changes: 64 additions & 0 deletions
64
izpack-wrapper/src/main/java/utils/wrappers/izpack2run/Merge2In1.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
/* | ||
* Copyright 2019 gucchino. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
package utils.wrappers.izpack2run; | ||
|
||
/** | ||
* | ||
* @author gucchino | ||
*/ | ||
import java.io.File; | ||
import java.io.FileInputStream; | ||
import java.io.FileOutputStream; | ||
import java.io.IOException; | ||
import static java.lang.System.exit; | ||
|
||
public class Merge2In1 { | ||
|
||
public static void Merge2In1(File file1, File file2, File outputFile) throws IOException { | ||
|
||
FileInputStream fis1 = new FileInputStream(file1); | ||
FileInputStream fis2 = new FileInputStream(file2); | ||
FileOutputStream fos = new FileOutputStream(outputFile); | ||
|
||
int len = 0; | ||
|
||
byte[] buf = new byte[1024 * 1024]; // 1MB buffer | ||
|
||
while ((len = fis1.read(buf)) != -1) { | ||
fos.write(buf, 0, len); | ||
} | ||
|
||
while ((len = fis2.read(buf)) != -1) { | ||
fos.write(buf, 0, len); | ||
} | ||
|
||
fos.close(); | ||
} | ||
|
||
public static void main(String[] argv) throws IOException { | ||
|
||
if(argv.length != 3) { | ||
System.out.println("3 parameters required: file-input1, file-input2, file-output3"); | ||
exit(0); | ||
} | ||
|
||
File f1 = new File(argv[0]); | ||
File f2 = new File(argv[1]); | ||
File f3 = new File(argv[2]); | ||
|
||
Merge2In1(f1,f2,f3); | ||
} | ||
} |
Oops, something went wrong.