AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Compile AutoHotkey using Visual C++ 2005 Express Edition
Goto page Previous  1, 2, 3, 4, 5  Next
 
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions
View previous topic :: View next topic  
Author Message
dandy



Joined: 09 May 2007
Posts: 45

PostPosted: Wed Feb 27, 2008 11:03 am    Post subject: Reply with quote

nevermind, i had to choose self contained in the compiler options Smile.
Back to top
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 4473
Location: Qld, Australia

PostPosted: Thu Mar 27, 2008 7:55 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
SuperBadMan
Guest





PostPosted: Thu Dec 25, 2008 10:57 am    Post subject: XP style was gone Reply with quote

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

PostPosted: Wed Feb 18, 2009 8:11 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
Lexikos



Joined: 17 Oct 2006
Posts: 4473
Location: Qld, Australia

PostPosted: Wed Feb 18, 2009 9:30 am    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
fincs



Joined: 05 May 2007
Posts: 474
Location: Seville, Spain

PostPosted: Wed Feb 18, 2009 3:47 pm    Post subject: Reply with quote

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
View user's profile Send private message
Lexikos



Joined: 17 Oct 2006
Posts: 4473
Location: Qld, Australia

PostPosted: Wed Feb 18, 2009 10:48 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
newcomer



Joined: 03 Mar 2009
Posts: 6

PostPosted: Tue Mar 03, 2009 6:24 pm    Post subject: Reply with quote

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? Shocked

In terms of security or decompilation?
Question
Thanks. Very Happy
Back to top
View user's profile Send private message
fincs



Joined: 05 May 2007
Posts: 474
Location: Seville, Spain

PostPosted: Tue Mar 03, 2009 6:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
newcomer



Joined: 03 Mar 2009
Posts: 6

PostPosted: Tue Mar 03, 2009 6:49 pm    Post subject: Reply with quote

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? Question

Its confusing for me coz english not my first language. Sorry. Sad

If it means cannot decompile, that means its good news for me. Very Happy
(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? Question

And also in terms of unicode support since Im my script contain some unicodes(non english charaters eg chinese or japanese)? Question

Hope you could answer my curiosity. Thanks. Very Happy

Please Note the compiled exe will mostly used on windows xp/vista/2003 system.
Back to top
View user's profile Send private message
fincs



Joined: 05 May 2007
Posts: 474
Location: Seville, Spain

PostPosted: Tue Mar 03, 2009 7:01 pm    Post subject: Reply with quote

/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
View user's profile Send private message
newcomer



Joined: 03 Mar 2009
Posts: 6

PostPosted: Tue Mar 03, 2009 7:46 pm    Post subject: Reply with quote

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. Wink
Back to top
View user's profile Send private message
zhenggc
Guest





PostPosted: Thu Mar 12, 2009 11:13 am    Post subject: help !!!!!!! Reply with quote

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

PostPosted: Thu Mar 12, 2009 12:20 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
HotKeyIt



Joined: 18 Jun 2008
Posts: 2198
Location: GERMANY

PostPosted: Sat Apr 04, 2009 6:29 pm    Post subject: Reply with quote

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) Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    AutoHotkey Community Forum Index -> Scripts & Functions All times are GMT
Goto page Previous  1, 2, 3, 4, 5  Next
Page 4 of 5

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group