InnoSetup module for Observer

Here you can discuss about your favorite plug-in.
Ariman
Posts: 1254
Joined: Fri 30 Nov, 2007 15:32
Location: Крым
Has thanked: 12 times
Been thanked: 28 times
Contact:

InnoSetup module for Observer

Post by Ariman » Tue 01 Jan, 2019 18:18

Latest post of the previous page:

Files are fine. Problem is with BOM prefix. Compare first 3 bytes of script file extracted by innounp and by your module in hex view. Version from innounp contains UTF BOM sequence in first 3 bytes. They help editors to correctly identify file encoding. If you open script file in Far's File Viewer it will automatically switch to 65001 codepage (utf-8). Script file extracted by module contains some other 3 bytes at the beginning and Viewer can not understand what codepage should be used.

pepak
Posts: 444
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 9 times
Been thanked: 25 times

InnoSetup module for Observer

Post by pepak » Tue 01 Jan, 2019 18:21

I believe my module works correctly - it extracts the file with the BOM, then FAR automatically detects this BOM, switches to the 65001 codepage and hides the BOM. Manually switch to an 8-bit codepage such as 1252, then you will see the BOM.

pepak
Posts: 444
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 9 times
Been thanked: 25 times

InnoSetup module for Observer

Post by pepak » Tue 01 Jan, 2019 18:34

Made an additional check, comparing files from my module to the files from the official InnoUnp (not my InnoUnp). The reconstructed script and most of the files are the same, but there is a difference in some of the .isl files. I will research those. Also, license.txt got converted to UTF16, but I think that's an acceptable change. Other than that, the files seem to be the same.

Ariman
Posts: 1254
Joined: Fri 30 Nov, 2007 15:32
Location: Крым
Has thanked: 12 times
Been thanked: 28 times
Contact:

InnoSetup module for Observer

Post by Ariman » Tue 01 Jan, 2019 18:42

Ok. To simplify the explanation here is the screenshot.
script-bom.png
File with _exe suffix is one from official innounp and file with _mod suffix is from the module. First 3 bytes are different.
Correct UTF BOM is 0xEF,0xBB,0xBF (https://en.wikipedia.org/wiki/Byte_order_mark). File from module does not have correct bytes.

pepak
Posts: 444
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 9 times
Been thanked: 25 times

InnoSetup module for Observer

Post by pepak » Tue 01 Jan, 2019 18:49

The problem is, that correct BOM is exactly what I am getting from the module!

I will need to check the work with non-ASCII characters, due to that difference in .isl files. Perhaps it is somehow related to your incorrect BOM, too. Or not. It will be difficult for me to verify because I am getting the correct values.

Ariman
Posts: 1254
Joined: Fri 30 Nov, 2007 15:32
Location: Крым
Has thanked: 12 times
Been thanked: 28 times
Contact:

InnoSetup module for Observer

Post by Ariman » Tue 01 Jan, 2019 19:37

Strange. Out of curiosity I tried both x86 and x64 versions of Far3 and got invalid BOM in both cases. Not sure why we could have different results for the same file.

pepak
Posts: 444
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 9 times
Been thanked: 25 times

InnoSetup module for Observer

Post by pepak » Tue 01 Jan, 2019 19:53

Given the differences in .isl files, my guess is some uninitialized variable in UTF8 encode. Strange that there is no warning in Delphi, though, and more strange that there were no such reports in older Delphi versions - it could also be a bug in Delphi 10.3 Rio. We shall see.

Ariman
Posts: 1254
Joined: Fri 30 Nov, 2007 15:32
Location: Крым
Has thanked: 12 times
Been thanked: 28 times
Contact:

InnoSetup module for Observer

Post by Ariman » Tue 01 Jan, 2019 20:26

Ah, I get it now. I've checked your sources and I think that in your version script text goes through unicode->ansi conversion.
I use Delphi7 where String == AnsiString, you use 10.3 where String == UnicodeString. TBigString class uses String type. In your version it is Unicode string and script text does double conversion: ansi->unicode in TBigString and uncode->ansi inside RebuildScript. In my version there is no such thing because both string types are AnsiString. And on different locales (I guess we have different ones) unicode-ansi convertion produces different results. That is why we see different output.
I suggest to fix TBigString to use AnsiString type explicitly. Since .isl files created with TBigString too I guess they have same issue.

pepak
Posts: 444
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 9 times
Been thanked: 25 times

InnoSetup module for Observer

Post by pepak » Wed 02 Jan, 2019 19:14

Hmm. I may end up doing just that, but only as a last resort. I would much prefer to convert the strings during read so that the "native" version reflects the Delphi used for the compilation. Then I could convert the native version back to whatever the user requires.

skipik
Posts: 153
Joined: Wed 03 Jun, 2015 15:24
Has thanked: 18 times
Been thanked: 15 times

InnoSetup module for Observer

Post by skipik » Fri 15 Feb, 2019 22:06

pepak, hello, Ariman is working on a new version atm, it's Observer 1.12 and your innounp.so doesn't work there. Could you fix it please? You can get the latest binaries here: viewtopic.php?p=152643#p152643 and source code is here: https://github.com/lazyhamster/Observer

pepak
Posts: 444
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 9 times
Been thanked: 25 times

InnoSetup module for Observer

Post by pepak » Sat 16 Feb, 2019 07:00

At a glance, the modification seems simple enough. However, I am reluctant to do that until the new version of Observer is released, for fear of confusing the users.

Yegor
Posts: 1035
Joined: Mon 04 Apr, 2005 13:41
Location: San Ramon, CA / Kharkov, UA
Has thanked: 8 times
Been thanked: 20 times

InnoSetup module for Observer

Post by Yegor » Sat 16 Feb, 2019 20:59

pepak wrote:
Sat 16 Feb, 2019 07:00
I am reluctant to do that until the new version of Observer is released, for fear of confusing the users.
I, personally, agree.
Мы не можем ждать милостей от Фара, взять их у него — наша задача! (C) Мичурин

pepak
Posts: 444
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 9 times
Been thanked: 25 times

InnoSetup module for Observer

Post by pepak » Sat 06 Apr, 2019 07:57

InnoUnp 0.48.0 mod released

Changes:
  • Synchronized with InnoUnp v0.48.
  • Fixed incorrect Unicode<->ANSI conversions in various versions of Delphi. Now the generated files should be the same regardless of the Delphi version and should always contain proper data. To achieve this, the file format for .iss and .isl files was changed to always use UTF8, unlike the original InnoUnp.
Download (source + binaries)

skipik
Posts: 153
Joined: Wed 03 Jun, 2015 15:24
Has thanked: 18 times
Been thanked: 15 times

InnoSetup module for Observer

Post by skipik » Sat 06 Apr, 2019 09:56

pepak, looks like you have built both x64 modules (.exe and .so) for I386. They don't work with Far x64.


pepak
Posts: 444
Joined: Sun 13 Jul, 2008 11:18
Has thanked: 9 times
Been thanked: 25 times

InnoSetup module for Observer

Post by pepak » Sat 06 Apr, 2019 10:09

Damn. I was wondering why the filesize is so small. Fixed, redownload the file please.

User avatar
Taciturn
Posts: 390
Joined: Thu 26 May, 2005 17:14
Location: Санкт-Петербург
Has thanked: 23 times
Been thanked: 8 times
Contact:

InnoSetup module for Observer

Post by Taciturn » Fri 12 Apr, 2019 11:36

innounp.x64.exe 0.48 do not work. Tested on FurMark_1.20.5.0_Setup.exe.

Code: Select all

S:\>innounp.x86.exe FurMark_1.20.5.0_Setup.exe
; Version detected: 5507
Compression used: lzma
Files: 22 ; Bytes: 15169990

S:\>innounp.x64.exe FurMark_1.20.5.0_Setup.exe
; Version detected: 5507
Critical error: The setup files are corrupted. Please obtain a new copy of the program.

skipik
Posts: 153
Joined: Wed 03 Jun, 2015 15:24
Has thanked: 18 times
Been thanked: 15 times

InnoSetup module for Observer

Post by skipik » Fri 12 Apr, 2019 15:59

Yeah, I also can't get in to this exe for example: https://github.com/telegramdesktop/tdes ... 6.beta.exe
The official 0.48 works fine though.

Post Reply

Return to “General Plug-In Discussions”