| View previous topic :: View next topic |
| Author |
Message |
dandy
Joined: 09 May 2007 Posts: 45
|
Posted: Wed Feb 27, 2008 11:03 am Post subject: |
|
|
nevermind, i had to choose self contained in the compiler options . |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 4473 Location: Qld, Australia
|
Posted: Thu Mar 27, 2008 7:55 am Post subject: |
|
|
For the last couple of AutoHotkey releases, I have used a script to automate the changes to the project file necessary to compile in Visual C++ Express Edition 2005:
AutoHotkeyProjUpgrade.ahk
Requires xpath (in your function library).
Notes:
- It will prompt for the location of the folder containing AutoHotkey.vcproj, though currently it only modifies the vcproj itself.
- It will prompt you to open the project file to run the (VC++ Express) conversion wizard if the project file version is < 8.0.
- It optionally creates a back-up.
- The changes it makes may be slightly different to corrupt's original instructions.
- If upx.exe exists in the parent directory of the project directory, it updates the post-build event to use that.
Edit:
I get an error trying to start a script compiled with an "SC (minimum size)" bin file. It seems to need something in its embedded manifest; does anyone know what? |
|
| Back to top |
|
 |
SuperBadMan Guest
|
Posted: Thu Dec 25, 2008 10:57 am Post subject: XP style was gone |
|
|
I followed all the steps and successfully compiled the prj and get the AutoHotkey.exe, however, when I run it I found that the XP style of GUI was lost. Why this happend and how to solved it?
Best regards! |
|
| Back to top |
|
 |
deleyd
Joined: 08 Mar 2008 Posts: 50 Location: Santa Barbara
|
Posted: Wed Feb 18, 2009 8:11 am Post subject: |
|
|
I tried compiling AutoHotKey on my Vista Home Premium SP1 using:- Microsoft Visual C++ 2008 Express Edition, 9.0.21022.8 RTM, Microsoft .NET Framework 3.5 SP1
- MSDN Library for Visual Studio 2008
First try was to create a Debug version, but I just got a bunch of | Quote: | | c1xx : fatal error C1083: Cannot open compiler intermediate file: 'Debug\AutoHotkey.pch': Permission denied | So switched to building a Release version, this time I got a bunch of | Quote: | | script_registry.obj : error LNK2019: unresolved external symbol _isxdigit referenced in function "bool __cdecl IsHex(char *)" (?IsHex@@YA_NPAD@Z) | The two logs are here:
http://www.autohotkey.net/~deleyd/forum/buildlog01.htm
http://www.autohotkey.net/~deleyd/forum/buildlog02.htm
I tried earlier to install Microsoft ® Windows Server® 2003 SDK % .NET 3.5, as per instructions, but the install hung. Did system restore. Not sure if I need this. I'm not a server.
(I know just enough to get myself into trouble, but not enough to get myself out of trouble.) |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 4473 Location: Qld, Australia
|
Posted: Wed Feb 18, 2009 9:30 am Post subject: |
|
|
You need a version of the Windows SDK installed which covers at least the versions of Windows you want to develop applications for.
| Quote: | Source: MSDN: Windows SDK: Download Windows Server 2008 SDK and More | MSDN
Microsoft Windows Server 2003 R2 Platform SDK
Released March 2006, this Platform SDK provides documentation, samples, header files, libraries, and tools to develop applications for Windows 2000, Windows XP and Windows Server 2003 R2.
Microsoft Windows SDK for Windows Server 2008 and .NET Framework 3.5
Released February 2008, this SDK provides documentation, samples, header files, libraries, and tools (including VS 2008 C++ compilers) to develop applications for Windows XP, Windows Server 2003, Windows Vista, Windows Server 2008, and .NET Framework versions 2.0, 3.0 and 3.5.
| These SDK packages also cover older versions of Windows. Typically any version of the SDK should be sufficient, but older versions of the SDK won't cover functions or changes specific to newer versions of Windows. |
|
| Back to top |
|
 |
fincs
Joined: 05 May 2007 Posts: 474 Location: Seville, Spain
|
Posted: Wed Feb 18, 2009 3:47 pm Post subject: |
|
|
I can sucessfully compile AutoHotkey with a fresh Microsoft Visual C++ Express 2008 SP1 install, after following the steps in the main post (without installing the SDK). Maybe there's something that I am missing? _________________ fincs
SciTE4AutoHotkey v2 script editor
[AutoHotkeyCE] [AutoHotkey_L] |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 4473 Location: Qld, Australia
|
Posted: Wed Feb 18, 2009 10:48 pm Post subject: |
|
|
Ah,
| Quote: | Source: Microsoft Windows SDK Blog : Using Visual C++ 2008 Express with the Windows SDK (detailed version)
With the Visual Studio 2008 Express versions you can also build Win32 applications right out of the box. You no longer have to manually integrate the Windows SDK content with VC++ Express.
...
The Visual Studio 2008 editions are seamlessly integrated with the Windows SDK. VS2008 editions have the same Vista RTM headers and libraries that shipped in the Microsoft Windows Software Development Kit Update for Windows Vista released in March, 2007. The SDK tools that ship with VS2008 editions are more recent than those that ship in the Vista Update SDK.
| Did you follow Titan's instructions? |
|
| Back to top |
|
 |
newcomer
Joined: 03 Mar 2009 Posts: 6
|
Posted: Tue Mar 03, 2009 6:24 pm Post subject: |
|
|
Is there any different between the exe file compiled by the latest version of ahk and the exe file compiled using the ahk compiler made by visual C++ 2005 or 2008?
In terms of security or decompilation?
Thanks.  |
|
| Back to top |
|
 |
fincs
Joined: 05 May 2007 Posts: 474 Location: Seville, Spain
|
Posted: Tue Mar 03, 2009 6:31 pm Post subject: |
|
|
The EXE created by VC++ 2005/2008 is NOT compatible with Windows 9x/ME while the EXE distributed by Chris (VC++ 2003) is compatible with those systems.
Also, the public source for AutoHotkey doesn't have support for /NoDecompile. _________________ fincs
SciTE4AutoHotkey v2 script editor
[AutoHotkeyCE] [AutoHotkey_L] |
|
| Back to top |
|
 |
newcomer
Joined: 03 Mar 2009 Posts: 6
|
Posted: Tue Mar 03, 2009 6:49 pm Post subject: |
|
|
| fincs wrote: | The EXE created by VC++ 2005/2008 is NOT compatible with Windows 9x/ME while the EXE distributed by Chris (VC++ 2003) is compatible with those systems.
Also, the public source for AutoHotkey doesn't have support for /NoDecompile. |
The word /nodecompile means cant decompile or can decompile?
Its confusing for me coz english not my first language. Sorry.
If it means cannot decompile, that means its good news for me.
(yeah, Im going to put some username and password in my script).
So in terms of compiled exe, which exe is more secure?
The one compiled using the standard AHK distributed by Chris or the one compiled using VC++ 2005/2008 compiled AHK?
And also in terms of unicode support since Im my script contain some unicodes(non english charaters eg chinese or japanese)?
Hope you could answer my curiosity. Thanks.
Please Note the compiled exe will mostly used on windows xp/vista/2003 system. |
|
| Back to top |
|
 |
fincs
Joined: 05 May 2007 Posts: 474 Location: Seville, Spain
|
Posted: Tue Mar 03, 2009 7:01 pm Post subject: |
|
|
/NoDecompile prevents the decompiling.
So if /NoDecompile is not supported, the final EXE could be decompiled.
The most secure EXE is the one that Chris distributes.
And for Unicode, it doesn't matter.
HTH _________________ fincs
SciTE4AutoHotkey v2 script editor
[AutoHotkeyCE] [AutoHotkey_L] |
|
| Back to top |
|
 |
newcomer
Joined: 03 Mar 2009 Posts: 6
|
Posted: Tue Mar 03, 2009 7:46 pm Post subject: |
|
|
| fincs wrote: | /NoDecompile prevents the decompiling.
So if /NoDecompile is not supported, the final EXE could be decompiled.
The most secure EXE is the one that Chris distributes.
And for Unicode, it doesn't matter.
HTH |
Thank you very much.
Its time to start learning ahk script.  |
|
| Back to top |
|
 |
zhenggc Guest
|
Posted: Thu Mar 12, 2009 11:13 am Post subject: help !!!!!!! |
|
|
if (fgets(buf, 4, fp)) // Success (the fourth character is the terminator).
{
if (strcmp(buf, "锘?)) // UTF-8 BOM marker is NOT present.
rewind(fp); // Go back to the beginning so that the first three bytes aren't omitted during loading.
// The code size of rewind() has been checked and it seems very tiny.
}
what this "if (strcmp(buf, "锘?)) ????
with script.cpp |
|
| Back to top |
|
 |
Lexikos
Joined: 17 Oct 2006 Posts: 4473 Location: Qld, Australia
|
Posted: Thu Mar 12, 2009 12:20 pm Post subject: |
|
|
It checks for (and excludes) the UTF-8 byte order mark, which indicates the file is encoded with UTF-8. The intent appears to be to support files beginning with the byte order mark, by ignoring it.
Btw, your question is off-topic. |
|
| Back to top |
|
 |
HotKeyIt
Joined: 18 Jun 2008 Posts: 2198 Location: GERMANY
|
Posted: Sat Apr 04, 2009 6:29 pm Post subject: |
|
|
Corrupt, thank you very much for this explanation, I can finally compile AutoHotkey.exe.
However there is a problem using width in ListView.
When I specify a width for ListView, it is not applied and LV_ModifyCol() does not do what it shoud as well.
Can anyone try execute following script using your compiled AutoHotkey.exe and check if Column is set to w200 or resized to fit its contents?
| Code: | Gui, Add, ListView,w200 vTEST,TEST
LV_Add("","This is some text")
;Lv_ModifyCOL() ;resized to fit its contents
Gui, Show
Return
GuiClose:
ExitApp
|
_________________ AutoHotFile - ToolTip(n,text,title,options) |
|
| Back to top |
|
 |
|