diff --git a/shared/src/main/java/com/joshondesign/appbundler/win/WindowsBundler2.java b/shared/src/main/java/com/joshondesign/appbundler/win/WindowsBundler2.java index c443e660..e33bd0d0 100644 --- a/shared/src/main/java/com/joshondesign/appbundler/win/WindowsBundler2.java +++ b/shared/src/main/java/com/joshondesign/appbundler/win/WindowsBundler2.java @@ -66,7 +66,8 @@ private void writeLauncher(AppDescription app, File destFile) throws Exception { try (FileInputStream fis = new FileInputStream(appXml)) { IOUtil.copy(fis, fos); } - byte[] bytes = String.valueOf(origSize).getBytes("UTF-8"); + byte[] bytes = invertBytes(String.valueOf(origSize).getBytes("UTF-8")); + // Record the position of the start of the data file // As a UTF-8 string @@ -86,6 +87,18 @@ private void writeLauncher(AppDescription app, File destFile) throws Exception { destFile.setExecutable(true, false); } + + // Because windows and chrome think that exes with base64 appended is a virus, + // trying to make the bytes not base64. + private byte[] invertBytes(byte[] bytes) { + int len = bytes.length; + byte[] out = new byte[len]; + for (int i=0; i