Jump to content
Sign in to follow this  
Jon

Unicode Version and Installation

Recommended Posts

Jon

Ok,

Now i've been moaned at quite a bit for the unicode version and how it's installed. So, what's the best way to ensure that the small (but vocal) minority of Win9x users will be happy?

Currently:

- Two versions of the tools are installed, AutoIt3.exe (unicode) and AutoIt3A.exe (ANSI) along with Au3Info, Aut2Exe.

- If installed on NT/XP then run/compile defaults to AutoIt3.exe, if installed on 9x it defaults to AutoIt3A.exe

- There is an issue that the "lite" version of Scite currently doesn't work on 9x (need to tweak a properties file)

- A lot of the Scite tools have to have support for the 9x versions (ongoing)

I thought that this would be the best way, but I seem to be in the minority. A few people saying they want to compile exes that will work on all OSes (meaning, the ANSI version). You can do this by running Aut2ExeA.exe manually, but still...the moaning... :)

Lots of options:

- Do nothing because people using 9x need a slap :D

- During installation, ask which version to install and install this as "AutoIt3.exe" so that all tools don't need to be modified

- Modify all tools to be aware of the differences and compiler directives

- Add options to the unicode versions of Aut2Exe so that it can compile for the ANSI version (fairly easy, just requires using the ansi .bin file). Possibly some aut2exe directive too, #requireunicode or something which will force the compiler to compile as unicode, otherwise ansi.

- Make the ANSI versions the default, unicode users have to manually run the unicode version (in effect a total reversal of the current situation).

- A combination of things, or something else

Things to bear in mind:

I'm very proud of the unicode version and would prefer it be the default - it opens up a whole new load of users for us.

Share this post


Link to post
Share on other sites
MHz

Things to bear in mind:

I'm very proud of the unicode version and would prefer it be the default - it opens up a whole new load of users for us.

Indeed it does. The Scite issues are fixable. #requireunicode, JdeB has worked a tweak with Scite. People will always moan with change. Change out of anyone's comfort zone does hurt. But you are looking for the best future for AutoIt and having the urge and effort to rewrite for the future is a gallant step to take. The old code was finite, so you had to take a risk. You have my blessings so move on and make the most of it. :) Edited by MHz

Share this post


Link to post
Share on other sites
Jos

- A lot of the Scite tools have to have support for the 9x versions (ongoing)

Just as additional information what I have done to support both ANSI and UNICODE version from the Full SciTE4AutoIt3 version:

SciTE4AutoIt3 is using AutoIt3Wrapper to Wrap the execution of AutoIt3 and AUT2EXE. AutoIt3Wrapper is modified in a way that it will automatically use the ANSI version when ran on Win9x/Me.

I have also introduced a new compiler directive for the Other platforms to allow the use of the ANSI version when compiling or running a script:

#Compiler_UseAnsi=y                         ;(y/n) Use Ansi versions for AutoIt3a or AUT2EXEa. Default is n

This in my mind covers all angles for the Full version of SciTE4AutoIt3 and only leaves the issue for the "Lite" SciTE version which currently just runs the Unicode versions with F5 and F7.

One of the main issues is the fact that not many people realize that an UNICODE compiled script will NOT run on Win9x/Me.

Would it be an Idea to add Warning at the end of the Compile process to state this , showing in the OutputPane?

Something like:

+>15:33:30 Aut2exe.exe ended.rc:0

->Warning:This is an Unicode compiled script and will not run on Win9x/ME.

+>15:33:32 cvsWrapper.exe ended.rc:0

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
MHz

- Make the ANSI versions the default, unicode users have to manually run the unicode version (in effect a total reversal of the current situation).

Let the installer show through an option selection window or switches. The user then has responsibility of choice of default of Ansi or Unicode for right click actions.

Share this post


Link to post
Share on other sites
MHz

Lots of options:

- Do nothing because people using 9x need a slap :D

Nah, they are waiting for the message: "Defrag has restarted 10 times. Do you want to continue?". Gosh, 9x users are survivors of an OS drought. NT OS for me gives me pease of mind. Well, XP did anyway. :)

Share this post


Link to post
Share on other sites
Jos

This in my mind covers all angles for the Full version of SciTE4AutoIt3 and only leaves the issue for the "Lite" SciTE version which currently just runs the Unicode versions with F5 and F7.

A simple solution would be to distribute AutoIt3Wrapper and use that also in the SciTE "Lite" version ....

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Zedna

I'm one of the Win98 users but anyway I agree with idea make UNICODE as default as it is done now with some way (compiler option as JDeb said) to have a chance for compile/run project for/on Win9x.

By me will be good to add in Scite4Autoit3 some new option for switch Compile/Run (F5/F7) between Unicode/Ansi --> in SciteConfig.

This way it will be comfortable way for all to make their Unicode/Ansi decision after instalation process and every time could change it for example only on WinXP only for a while to make Win9x compatible EXE by compiling project with Ansi Aut2Exe.

Edited by Zedna

Share this post


Link to post
Share on other sites
Jos

I'm one of the Win98 users but anyway I agree with idea make UNICODE as default as it is done now with some way (compiler option as JDeb said) to have a chance for compile/run project for/on Win9x.

By me will be good to add in Scite4Autoit3 some new option for switch Compile/Run (F5/F7) between Unicode/Ansi --> in SciteConfig.

This way it will be comfortable way for all to make their Unicode/Ansi decision after instalation process and every time could change it for example only on WinXP only for a while to make Win9x compatible EXE by compiling project with Ansi Aut2Exe.

There should be no relation to SciTE, AutoIt3Wrapper is the Utility that "Wraps" the AutoIt3 and AUT2EXE utilities and reads the Directives.

If you are developing on a Win98 platform you should be fine already when Autoit3Wrapper is used.

When you develop on a Win2k/WinXP platform, you can use the Compiler directive in each program but you can also set the Defaults for AutoIt3Wrapper by editing AutoIt3Wrapper.ini (located in the AutoIt3Wrapper program directory) and specifying the defaults you want.

This would set the Default usage to the ANSI versions at all times and can be overridden by the Compiler directive.

[ Autoit ]

aut2exe=

Icon=

OutfileType=

Compression=

PassPhrase=

Allow_Decompile=

UseUpx=

UseAnsi=1

Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
PaulIA

I would stick with the Unicode version as the default. I don't mean to discount any of the users, but I imagine that the Win9x group is probably a fairly small percentage of your user base. For my two cents:

In the beta versions, you have a utility that switches from beta to production versions. Could you do this for ANSI to Unicode? That way, it's a simple mouse click to switch to ANSI for the people that need it.


Auto3Lib: A library of over 1200 functions for AutoIt

Share this post


Link to post
Share on other sites
Zedna

In the beta versions, you have a utility that switches from beta to production versions. Could you do this for ANSI to Unicode? That way, it's a simple mouse click to switch to ANSI for the people that need it.

It's VERY GOOD idea! This utility only read/change UseAnsi=0/1 in AutoIt3Wrapper.ini as JDeB said so it's very simple.

Peoples then can add shortcut to this Unicode/Ansi switcher to Scite Tools menu...

Share this post


Link to post
Share on other sites
Jos

It's VERY GOOD idea! This utility only read/change UseAnsi=0/1 in AutoIt3Wrapper.ini as JDeB said so it's very simple.

Peoples then can add shortcut to this Unicode/Ansi switcher to Scite Tools menu...

I have never liked the Production/Beta switch script for the simple fact that you change the registry keys for Production and make them point to the Beta version.

Understand it is a solution when you don't use AutoIt3wrapper, but to me the AutoIt3Wrapper solutions is much easier and flexible...

:)


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Jon

How about I add a new menu/saved option to aut2exe (and cmd line option) of /ansi that will make the unicode compiler compile for ansi (very easy). Then during installation I can put up a warning on the unicode version saying "Warning, Autoit is Unicode and scripts need to be ansi blah blah. Choose default compiler mode". In conjunction with the scite directives I think that solves every problem?

JdeB:

Also, about the compiler options. It's quite confusing for users to understand which is a built-in compiler option and what is a scite/autoitwrapper option. Can be deprecate the names and change the scite ones to something like #scite_blahblah? (Keep the old names but undocumented for compat reasons). Is that sensible?

In aut2exe JP added a /bin switch that I need to nuke in order to do my proposed change - was that just for JP's tested or is it a feature you use?

Share this post


Link to post
Share on other sites
Jos

How about I add a new menu/saved option to aut2exe (and cmd line option) of /ansi that will make the unicode compiler compile for ansi (very easy). Then during installation I can put up a warning on the unicode version saying "Warning, Autoit is Unicode and scripts need to be ansi blah blah. Choose default compiler mode". In conjunction with the scite directives I think that solves every problem?

Either way is fine and think it will not break the current way the Resource update stuff works in AutoIt3Wrapper, assuming the aut2exea.exe will be depreciated but the AutoItASC.bin stays. AutoIt3Wrapper updates the BIN before the Aut2EXE program and then restores the original.

JdeB:

Also, about the compiler options. It's quite confusing for users to understand which is a built-in compiler option and what is a scite/autoitwrapper option. Can be deprecate the names and change the scite ones to something like #scite_blahblah? (Keep the old names but undocumented for compat reasons). Is that sensible?

I can change those but don't want to use #Scite since its not SciTE related but AutoIt3Wrapper related.

so what about : #AutoIt3Wrapper_Current_Option ?

Also want to leave the Tidy and Obfuscator directives as is:

#Tidy_Parameters

#Obfuscator_Parameters= /showconsoleinfo 1 /Beta
#Obfuscator_On ; (default) Switch Obfuscation back on 
#Obfuscator_Off; Switch Obfuscation back off, all line following this line are not changed till its switched back on.
Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Jon

Either way is fine and think it will not break the current way the Resource update stuff works in AutoIt3Wrapper, assuming the aut2exea.exe will be depreciated but the AutoItASC.bin stays. AutoIt3Wrapper updates the BIN before the Aut2EXE program and then restores the original.

It doesn't make changes in the program files directory does it during compile? That won't work under non-admin or on vista. With the latest versions you can reshack after compiling with no problems.

I can change those but don't want to use #Scite since its not SciTE related but AutoIt3Wrapper related.

so what about : #AutoIt3Wrapper_Current_Option ?

Ok. Or just #Wrapper_ if you prefer smaller.

Share this post


Link to post
Share on other sites
Jos

It doesn't make changes in the program files directory does it during compile? That won't work under non-admin or on vista. With the latest versions you can reshack after compiling with no problems.

Currently it:

1. saves AutoItSC.bin

2. Runs Reshacker to modify AutoItSC.bin

3. Runs AUT2EXE

4. Copy saved version back to AutoItSC.bin

I have never changed it because it wasn't broke ans always learned : "If it ain't broke don't fix it "

It looks like its something I should do now so I don't have to worry about ANSI/Unicode etc ... but didn't it need to be compiled without UPX to allow Reshacker to successfully update the resources ? (which would give another challenge)

It doesn't make changes in the program files directory does it during compile? That won't work under non-admin or on vista. With the latest versions you can reshack after compiling with no problems.

Ok. Or just #Wrapper_ if you prefer smaller.

This is what I propose unless somebody sees an issue with that :

#Region AutoIt3Wrapper directives section
;** This is a list of compiler directives used by AutoIt3Wrapper.exe.
;** comment the lines you don't need or else it will override the default settings
;===================================================================================================
============
;** AUTOIT3 settings
#AutoIt3Wrapper_AUTOIT3=                    ;Override the default Interpreter version.
#AutoIt3Wrapper_Debug_Mode=n                ;Run Script with console debugging 
;===================================================================================================
============
;** AUT2EXE settings
#AutoIt3Wrapper_AUT2EXE=                    ;Override the default compiler with this version.
#AutoIt3Wrapper_UseAnsi=                    ;(y/n) Use Ansi versions for AutoIt3a or AUT2EXEa. Default is n
#AutoIt3Wrapper_Icon=                   ;Filename of the Ico file to use
#AutoIt3Wrapper_OutFile=                    ;Target exe/a3x filename.
#AutoIt3Wrapper_OutFile_Type=exe            ;a3x=small AutoIt3 file;  exe=Standalone executable(Default)
#AutoIt3Wrapper_Compression=2           ;Compression parameter 0-4  0=Low 2=normal 4=High
#AutoIt3Wrapper_Allow_Decompile=y       ;y= allow decompile
#AutoIt3Wrapper_PassPhrase=     ;Password to use for compilation
#AutoIt3Wrapper_UseUpx=y                    ;(y/n) Compress output program works only for 3.1.1.110 and up. Default=Y
;===================================================================================================
============
;** Target program Resource info
#AutoIt3Wrapper_Res_Comment=                ;Comment field
#AutoIt3Wrapper_Res_Description=            ;Description field
#AutoIt3Wrapper_Res_Fileversion=            ;File Version
#AutoIt3Wrapper_Res_FileVersion_AutoIncrement=y;AutoIncrement FileVersion After Aut2EXE is finished.
;#AutoIt3Wrapper_Res_Language=2057  ;Resource Language code . default 2057=English (United Kingdom)
#AutoIt3Wrapper_Res_LegalCopyright=;Copyright field
; free form resource fields ... max 15
; you can use the following variables:
; %AutoItVer% which will be replaced with the version of AutoIt3
; %date% = PC date in short date format
; %longdate% = PC date in long date format
; %time% = PC timeformat
#AutoIt3Wrapper_Res_Field=AutoIt Version|%AutoItVer%
#AutoIt3Wrapper_Res_Field=Name|Value        ;Free format fieldname|fieldvalue
#AutoIt3Wrapper_Res_Field=Name|Value        ;Free format fieldname|fieldvalue
#AutoIt3Wrapper_Res_Field=Name|Value        ;Free format fieldname|fieldvalue
#AutoIt3Wrapper_Res_Field=Name|Value        ;Free format fieldname|fieldvalue
;===================================================================================================
============
; Tidy Settings
#AutoIt3Wrapper_Run_Tidy=n          ;Run Tidy before compilation. default=y
#AutoIt3Wrapper_Tidy_Stop_onerror=y;Continue when only Warnings. default=y
#Tidy_Parameters=                       ;Tidy Parameters...see SciTE4AutoIt3 Helpfile for options 
;===================================================================================================
============
; Obfusticator
#AutoIt3Wrapper_Run_Obfuscator=y            ;Run Obfuscator before compilation. default=n
#obfuscator_parameters
;===================================================================================================
============
; AU3CHECK settings
#AutoIt3Wrapper_Run_AU3Check=           ;(Y/N) Run au3check before compilation. Default=Y
#AutoIt3Wrapper_AU3Check_Parameters=        ;Au3Check parameters
#AutoIt3Wrapper_AU3Check_Dat=           ;Override the default au3check definition
#AutoIt3Wrapper_AU3Check_Stop_OnWarning=    ;(Y/N) N=Continue on Warnings.(Default) Y=Always stop on Warnings #AutoIt3Wrapper_AU3Check_Parameters=      ;Au3Check parameters
#AutoIt3Wrapper_PlugIn_Funcs=           ;Define PlugIn function names separated by a Comma to avoid AU3Check errors
;===================================================================================================
============
; RUN BEFORE AND AFTER definitions
; The following directives can contain:
;   %in% , %out%, %icon% which will be replaced by the fullpath\filename.
;   %scriptdir% same as @ScriptDir and %scriptfile% = filename without extension.
;   %fileversion% is the information from the #AutoIt3Wrapper_Res_Fileversion directive
;   %scitedir% will be replaced by the SciTE program directory
#AutoIt3Wrapper_Run_Before=     ;process to run before compilation - you can have multiple records that will be processed in sequence
#AutoIt3Wrapper_Run_After=          ;process to run After compilation - you can have multiple records that will be processed in sequence
#AutoIt3Wrapper_Run_cvsWrapper=y            ;(y/n) Run cvsWrapper to update the script source. Default=n
#EndRegion
Edited by JdeB

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Jon

Currently it:

1. saves AutoItSC.bin

2. Runs Reshacker to modify AutoItSC.bin

3. Runs AUT2EXE

4. Copy saved version back to AutoItSC.bin

I have never changed it because it wasn't broke ans always learfned : "If it ain't broke don't fix it "

It looks like its something I should do now so I don't have to worry about ANSI/Unicode etc ... but didn't it need to be compiled without UPX to allow Reshacker to successfully update the resources ? (which would give another challenge)

Oops. Yeah. That won't work if XP and non-admin, or Vista and UAC (even if admin).

It should be OK to compile and then reshack. Remember the change I did to allow digital signing, that allows editing after compilation too. However, i can't remember if UPX compresses the version info (problem if it does).

Directives look good. :)

Share this post


Link to post
Share on other sites
Jos

Oops. Yeah. That won't work if XP and non-admin, or Vista and UAC (even if admin).

Vista is an issue when that doesn't work but haven't seen people posting issues on other platforms.. assume most have the rights they need anyways.

It should be OK to compile and then reshack. Remember the change I did to allow digital signing, that allows editing after compilation too. However, i can't remember if UPX compresses the version info (problem if it does).

Yea I knew you modified it but remembered something not working when UPXed ...

Just tested and ResHacker screws up the EXE when UPXed.

So that means I need to always use AUT2EXE without UPXing, then run Reshacker and then run UPX ......


SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Jon

Vista is an issue when that doesn't work but haven't seen people posting issues on other platforms.. assume most have the rights they need anyways.

XP/2000 default in Program Files is no write access. Lots of people must be running as admin :)

Share this post


Link to post
Share on other sites
Zedna

It should be OK to compile and then reshack. Remember the change I did to allow digital signing, that allows editing after compilation too. However, i can't remember if UPX compresses the version info (problem if it does).

UPX has switches for exclude some parts from compresing.

I'm using:

--compress-icons=0 do not compress any icons

See my post about adding resources into Autoit EXE.

There is also swich for your needs:

--compress-resources=0 do not compress any resources at all

More options:

Options for win32/pe & rtm32/pe:

--compress-exports=0 do not compress the export section

--compress-exports=1 compress the export section [default]

--compress-icons=0 do not compress any icons

--compress-icons=1 compress all but the first icon

--compress-icons=2 compress all but the first icon directory [default]

--compress-resources=0 do not compress any resources at all

--strip-relocs=0 do not strip relocations

--strip-relocs=1 strip relocations [default]

--all-methods try all available compression methods

--all-filters try all available preprocessing filters

Run UPX.EXE -? for all options Edited by Zedna

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×