Jump to content

Unicode Version and Installation


Jon
 Share

Recommended Posts

  • Developers

AutoIt3Wrapper is ready with the following changes:

- Always run AUT2EXE(a) without UPX

- Run ResHacker against the produced EXE

- Run UPX when requested

- Support the New Directive including to old for backward compatibility.

I prefer at this moment to keep the AUT2EXE and AUT2EXEa files so we don't break the current way AutoIt3Wrapper works and add the /Ansi switch to AUT2EXE as an alternative (when this is your future plan). We then can remove AUT2EXEa from the distribution when I have AutoIt3Wrapper changed for /Ansi switch support.

Related New Question

The question on my mind now is the following:

All tools in SciTE4AutoIt3 are compiled with the ANSI version of AutoIt3 and Tidy/Obfuscator are also only supporting ANSI encoded Source input files.

The same counts for AU3Check.

What should the plan forward be for these ?

Should we start thinking about changing the lot to support UniCode Script files?

Changing them all to support Unicode input files will be quite a project on it own .....

:)

Edited by JdeB

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

Link to comment
Share on other sites

  • Administrators

I prefer at this moment to keep the AUT2EXE and AUT2EXEa files so we don't break the current way AutoIt3Wrapper works and add the /Ansi switch to AUT2EXE as an alternative (when this is your future plan). We then can remove AUT2EXEa from the distribution when I have AutoIt3Wrapper changed for /Ansi switch support.

Aut2ExeA will be staying, other wise ANSI users won't be able to compile. Will just be adding the switch to the unicode version.

Related New Question

The question on my mind now is the following:

All tools in SciTE4AutoIt3 are compiled with the ANSI version of AutoIt3 and Tidy/Obfuscator are also only supporting ANSI encoded Source input files.

The same counts for AU3Check.

What should the plan forward be for these ?

Should we start thinking about changing the lot to support UniCode Script files?

Changing them all to support Unicode input files will be quite a project on it own .....

Well, after going through the pain myself I won't be making any demands about making these tools support unicode. But yeah, I imagine that the requests will start once more unicode users come onto the scene. If you decide to add support I can help out if you like - depending how you coded them it will either be trivial or a nightmare - there is no middle ground :)
Link to comment
Share on other sites

  • Developers

Well, after going through the pain myself I won't be making any demands about making these tools support unicode. But yeah, I imagine that the requests will start once more unicode users come onto the scene. If you decide to add support I can help out if you like - depending how you coded them it will either be trivial or a nightmare - there is no middle ground :)

Understand, but that means we probably will have to make 2 versions too if we want to keep supporting win98/me.

I am kinda reluctant to start doing everything double just to keep supporting Win98/me as development platform.

What about just dropping Win9x/me that all together as development platform?

As far as AU3Check: Thats something Tylo will have to figure out since it is his baby. :)

Edited by JdeB

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

Link to comment
Share on other sites

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...

Here is such simple Ansi/Unicode switcher (based on UpdateDefs.au3):

#NoTrayIcon
#include <GUIConstants.au3>

; C:\Program Files\Autoit3\Scite\Autoit3Wrapper\Autoit3Wrapper.ini
; Autoit3Wrapper.ini must in the same directory
$useansi = IniRead(@ScriptDir & "\Autoit3Wrapper.ini", "Autoit", "UseAnsi", "no")

GUICreate("Ansi / Unicode switcher", 350, 150)
GUISetFont(10, 600)
GUICtrlCreateLabel("Select which version you want to use for: Scite,Autoit3Wrapper.", 10, 10, 340, 40)
GUISetFont(9, 400)
$I_Ansi = GUICtrlCreateRadio("Ansi", 40, 50, 270, 20)
$I_Unicode = GUICtrlCreateRadio("Unicode", 40, 75, 270, 20)
$I_OK = GUICtrlCreateButton("&Update", 40, 110, 120, 25)
$I_CANCEL = GUICtrlCreateButton("&Cancel", 170, 110, 120, 25)

If $useansi = 'yes' Then
    GUICtrlSetState($I_Ansi, $GUI_CHECKED)
Else
    GUICtrlSetState($I_Unicode, $GUI_CHECKED)
EndIf
GUISetState(@SW_SHOW)

While 1
    $msg = GuiGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            ExitLoop
    
        Case $msg = $I_OK
            If IsChecked($I_Ansi) Then 
                $useansi = 'yes'
            Else
                $useansi = 'no'
            EndIf
            IniWrite(@ScriptDir & "\Autoit3Wrapper.ini", "Autoit", "UseAnsi", $useansi)
            ExitLoop
            
        Case $msg = $I_CANCEL
            ExitLoop
    EndSelect
WEnd

Func IsChecked($control)
    Return BitAnd(GUICtrlRead($control),$GUI_CHECKED) = $GUI_CHECKED
EndFunc
Link to comment
Share on other sites

  • Developers

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...

Here is such simple Ansi/Unicode switcher (based on UpdateDefs.au3):

This is true as long as there is no Compiler directive in the Program itself since that overrides the defaults found in AutoIt3Wrapper.ini and..

Your program is stored in the AutoIt3Wrapper directory ...

:)

Edited by JdeB

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

Link to comment
Share on other sites

This is true as long as there is no Compiler directive in the Program itself since that overrides the defaults found in AutoIt3Wrapper.ini and..

Your program is stored in the AutoIt3Wrapper directory ...

:)

With compiler directive in AU3 script it's OK - it always override defaults. This Ansi/Unicode switcher only set up defaults.

For simplicify I did it based on presumption that it will be in the same directory as AutoIt3Wrapper.ini - it's in script comment

Link to comment
Share on other sites

  • Developers

I've added a /ansi switch for the upcoming release to force the compiler to use ansi mode. This is also a saved option on the GUI interface

Does this mean that aut2exe.exe will default to ansi when people use the GUI and change this option in the GUI ? (Like UPX)

If so .. what keyname do you use, because AutoIt3Wrapper will have to update it when directive "#AutoIt3Wrapper_UseAnsi=n" is used.

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

Link to comment
Share on other sites

  • Administrators

Does this mean that aut2exe.exe will default to ansi when people use the GUI and change this option in the GUI ? (Like UPX)

If so .. what keyname do you use, because AutoIt3Wrapper will have to update it when directive "#AutoIt3Wrapper_UseAnsi=n" is used.

Yes, it will use the default set in the GUI. But I've just added a /unicode switch too so you can control it without messing about with the registry.

Edit: For reference keyname is "UseANSI"

Link to comment
Share on other sites

  • Developers

Yes, it will use the default set in the GUI. But I've just added a /unicode switch too so you can control it without messing about with the registry.

Either way, I have to modify it since AutoIt3Wrapper currently uses aut2exe for Unicode and aut2exea for Ansi and isn't using any switches.

Will add these for the next release .....

Edited by JdeB

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

Link to comment
Share on other sites

  • Administrators

Either way, I have to modify it since AutoIt3Wrapper currently uses aut2exe for Unicode and aut2exea for Ansi and isn't using any switches.

Will add these for the next release .....

Or you can just continue to use aut2exea.exe - that ignores the switches/options and always compiles ansi.
Link to comment
Share on other sites

  • Developers

Or you can just continue to use aut2exea.exe - that ignores the switches/options and always compiles ansi.

Isn't going to work because when somebody uses the AUT2EXE GUI one time and selects the ANSI, it will be the default onwards (which isn't the case now).

So the next normal compile using aut2exe without any switch, the output would be ANSI in stead of Unicode as expected...

Anyways, its not a big deal to change in AutoIt3Wrapper so just go ahead and make this change and I will change AutoIt3Wrapper . :)

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

Link to comment
Share on other sites

  • Administrators

Isn't going to work because when somebody uses the AUT2EXE GUI one time and selects the ANSI, it will be the default onwards (which isn't the case now).

So the next normal compile using aut2exe without any switch, the output would be ANSI in stead of Unicode as expected...

Anyways, its not a big deal to change in AutoIt3Wrapper so just go ahead and make this change and I will change AutoIt3Wrapper . :)

No, running the ansi version, the option is never saved so it doesn't screw up the unicode version (it's actually greyed out in the ANSI gui too). Forward thinking and all that :)
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...