默认exe文件图标更改

发布于 2024-12-27 16:08:50 字数 417 浏览 0 评论 0原文

我读过我必须将这些行添加到我的 .au3 文件中:

#Region
#AutoIt3Wrapper_Icon=C:\myicon.ico
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Fileversion=1.0
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
#AutoIt3Wrapper_Run_Obfuscator=y
#EndRegion

我已将 myicon.ico 放入 C:\ 目录中。

然后我右键单击我的.au3文件并单击Compile,一切都很好,但默认图标仍然是AutoIT图标。

I've read I have to add these lines into my .au3 file:

#Region
#AutoIt3Wrapper_Icon=C:\myicon.ico
#AutoIt3Wrapper_Compression=4
#AutoIt3Wrapper_Res_Fileversion=1.0
#AutoIt3Wrapper_Res_Fileversion_AutoIncrement=y
#AutoIt3Wrapper_Run_Obfuscator=y
#EndRegion

I've put myicon.ico into the C:\ directory.

Then I right click on my .au3 file and click Compile, everything is fine, but the default icon is still the AutoIT icon.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

烂柯人 2025-01-03 16:08:50

这是编译过程中困扰我很长一段时间的事情之一。如果右键单击文件并“编译”,它将不起作用。

您必须通过“开始”菜单> > AutoIt v3 >将脚本编译为.exe。选择脚本后,您将看到您的设置已加载到 GUI 中。

输入图片此处描述

This is one of the things that has bothered me about the compile process for quite a while. It doesn't work if you right click your file and 'Compile'.

You have to go via the Start menu > AutoIt v3 > Compile Script to .exe. Once you select your script, you will see your settings loaded into the GUI.

enter image description here

权谋诡计 2025-01-03 16:08:50

您可以创建一个批处理脚本来执行 AutoIt 的编译。

例如:

@echo off

set FOLDER_CURRENT=%cd%    

set VERSION=v0.x.x.x
set STATUS=prod
set NAME_PROJECT=nameProject_%VERSION%_%STATUS%
set EXE_OUT=%NAME_PROJECT%.exe

set FOLDER_SRC=%FOLDER_CURRENT%\..\src\
set FOLDER_OUT=%FOLDER_CURRENT%\%VERSION%\%NAME_PROJECT%
set ICON_PATH=%FOLDER_SRC%\images\icon.ico
set AUT2EXE_ARGS=/in "%FOLDER_SRC%\main_script.au3" /out "%FOLDER_OUT%\%EXE_OUT%" /icon "%ICON_PATH%"

echo ----[Compilation with aut2exe]----
aut2exe %AUT2EXE_ARGS%
echo -----------------------------------

在此批处理脚本中,您可以执行更多操作,例如:

  • 创建输出目录
  • 复制所有必要的目录和文件资源(图像、图标等)
  • 创建另一个文件文本
  • 压缩输出文件夹以便于部署
  • 推送在 git 服务器上发布

You can create a batch script to execute AutoIt's compilation.

For example:

@echo off

set FOLDER_CURRENT=%cd%    

set VERSION=v0.x.x.x
set STATUS=prod
set NAME_PROJECT=nameProject_%VERSION%_%STATUS%
set EXE_OUT=%NAME_PROJECT%.exe

set FOLDER_SRC=%FOLDER_CURRENT%\..\src\
set FOLDER_OUT=%FOLDER_CURRENT%\%VERSION%\%NAME_PROJECT%
set ICON_PATH=%FOLDER_SRC%\images\icon.ico
set AUT2EXE_ARGS=/in "%FOLDER_SRC%\main_script.au3" /out "%FOLDER_OUT%\%EXE_OUT%" /icon "%ICON_PATH%"

echo ----[Compilation with aut2exe]----
aut2exe %AUT2EXE_ARGS%
echo -----------------------------------

In this batch script, you can do more things like:

  • Create output directory
  • Copy all necessary directories and files ressources (images, icon, ...)
  • Create another file text
  • Zip the output folder in order to make deployement easy
  • Push the release on git server
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文