This translation is community contributed and may not be up to date. We only maintain the English version of the documentation. Read this manual in English

Windows 开发

为Windows平台开发开发Defold应用是一件轻车熟路的事.

项目设置

Windows 相关设置位于game.project 文件的 Windows部分 .

应用图标

Windows游戏的图标要使用 .ico 格式. 你可以拿一个 .png 文件, 使用ICOConvert 或者 AConvert 之类的在线工具生成 .ico 图标. 上传图片最小使用这些尺寸: 16x16, 24x24, 32x32, 48x48, 256x256.

原文: Microsoft - Windows 应用图标建设

使用 ImageMagick 系列工具在本地生成 .ico 图标.

例如在 Linux 上:

  1. 安装 ImageMagick:
    sudo apt install imagemagick
    
  2. 准备好你的 PNG 图标.
  3. 使用 convert 工具从 PNG 转换到 ICO:
    convert icon_256x256px.png -compress None -define icon:auto-resize=256,128,96,64,48,32,24,16 favicon.ico
    

问答

Q: 为什么编辑器中无纹理的 GUI box 节点透明显示, 但是构建运行后能正常显示?

A: 这个错误发生在 使用 AMD Radeon GPU 的机器 上. 注意更新显卡驱动.

Q: 打开图集或者场景视图时报错 ‘com.sun.jna.Native.open.class java.lang.Error: Access is denied’?

A: 试试以管理员身份打开 Defold. 右键点击 Defold 可执行程序选择 “以管理员身份运行”.

Q: 爲什麽在 Windows 上使用 Intel UHD 集成 GPU 渲染不正常 (但是 HTML5 版本正常)?

A: 確保你的驅動版本大於等於 27.20.100.8280. 參見 Intel Driver Support Asistant. 更多信息請見 這個帖子.

Q: Defold 编辑器崩溃, 日志显示 AWTError: Assistive Technology not found

如果编辑器崩溃, 日志提示 Caused by: java.awt.AWTError: Assistive Technology not found: com.sun.java.accessibility.AccessBridge 请参考如下步骤:

  • 打开 C:\Users\<username>
  • 使用标准文本编辑器 (Notepad is fine) 打开名为 .accessibility.properties 的文件
  • 在 config 下找到如下几行:
assistive_technologies=com.sun.java.accessibility.AccessBridge
screen_magnifier_present=true
  • 在这几行的行首加入井号 (#`)
  • 保存文件重启 Defold