如何在Inno Setup for NetBeans中使用自定义.iss文件 [英] How to use a custom .iss file with Inno Setup for NetBeans

查看:117
本文介绍了如何在Inno Setup for NetBeans中使用自定义.iss文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将Inno Setup 5与NetBeans 8结合使用,并且已经能够创建一个将应用程序安装在C:\users\username\local\appname.

I am using Inno Setup 5 with NetBeans 8 and I have been able to create an installer which installs the app in C:\users\username\local\appname.

但是我希望将此安装在C:\Programfiles

I however want this installed in C:\Programfiles

如何在NetBeans中实现这一目标?

How can I achieve this in NetBeans?

推荐答案

使用Inno Setup的NetBeans打包机制存在的问题是-AFAIK-您不能将自己的.iss文件提供给构建机制. NetBeans创建自己的安装脚本文件,几乎没有外部影响.

The problem with the NetBeans packaging mechanism using Inno Setup is that - AFAIK - you can't give your own .iss file to the build mechanism. NetBeans creates an own installation script file with little to no external influence.

我最大的问题是C:\Users\<user>\AppData\Local中已经安装了该软件包(至少对于Windows是这样).到底谁将首先去那里找回申请???不知道他们为什么要做出这个决定.

The biggest problem that also I have is that the package is installed (at least for Windows) in C:\Users\<user>\AppData\Local. Who on earth is going to look over there in the first place to find back an application??? Don't know why they've taken that decision.

每当您单击NetBeans生成的可执行文件时,您都无法控制位置,快捷方式……这太糟糕了……

Whenever you click the executable generated by NetBeans, you don't have any control whatsoever over location, shortcuts,... And that's too bad...

您可以通过使用build.xml中的<fx:preferences>标签来进行一些有限的更改.只有几项可以修改,例如创建快捷方式,添加到应用程序菜单以及是否使用用户级安装程序.

You have some limited changes you can do by playing around with the <fx:preferences> tag in the build.xml. There's only a couple of items that can be modified like creating a shortcut, adding to the application menu and using a user-level installer or not.

由于我确实想使用Inno Setup方法,并且想使用自己的.iss脚本,因此我做了以下操作来克服这一点:

Since I really wanted to use the Inno Setup approach and I wanted to use my own .iss script, I did the following to overcome this:

  • 允许NetBeans进行工作并创建可执行安装程序
  • 创建安装程序后,运行安装程序,并使其在Windows安装中所有位置中最奇怪的位置安装应用程序
  • 使用由原始NetBeans生成的安装可执行文件创建的所有文件和子目录,打开Inno Setup Compiler并创建自己的安装脚本.
  • 使用上述方法生成我自己的安装可执行文件
  • 运行自行创建的安装程序:自您自己创建安装可执行文件以来,您现在拥有所需的所有选项(更改安装目录,默认安装目录,默认安装目录名称,是否使用桌面快捷方式,允许全部使用的选项)用户或仅当前用户,...)

我知道这是一种解决方法,它是一种双向过程,但那是我当时唯一需要的方法.

I know this is a workaround and a 2-way process but that was at the time I needed it the only(?) / best(?) way I could find.

同时,我找到了另一种方法来在此页面,您可以在其中创建自己的.iss文件,因此可以更好地控制即将发生的事情.

In the mean time, I found an alternative way to create an installer executable on this page where you can create your own .iss file and as such, have much more control over what is going to happen.

我还没有尝试过,但是我认为它有很多机会.

I didn't try it out myself yet, but I think it has quite some opportunities.

这篇关于如何在Inno Setup for NetBeans中使用自定义.iss文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆