취소
다음에 대한 결과 표시 
다음에 대한 검색 
다음을 의미합니까? 

How can I add .html file to my installer?

해결 완료!
솔루션으로 이동

I am creating an installer to put my compiled executable on a customer's computer.  The application also does web publishing, so I must include the following files:

 

niwebserver.conf

WebPub.ini

WebPub.alias

 

etc.....   No problem there as the installer selects and includes those files.

 

I must also include the file "C:\Program Files\National Instruments\LabVIEW 8.6\www\WebPub.html" and then have it installed into the directory "C:\Program Files\National Instruments\LabVIEW 8.6\www" on the customer's system as this is where the webserver is pointed.

 

 

I want this all transparent as trying to get the customer to grab the file out of one directory and figure out how to put it in the correct directory would not go well.... 🙂

 

Hints??

0 포인트
1/8 메시지
7,885 조회수

Don't they always say using fixed paths is not good practice?

 

Your customers PC has the development environment installed?  If the folder path already exists on the clients PC then why would you need to add the .html file?  Wouldn't it already be there?

 

Include the .html file as a Support file with the installer.  Use the current application path vi in LabVIEW and build a relative path to the .html file included with your installer.

 

Within your application.  Check whether the .html is already at location "C:\Program Files\National Instruments\LabVIEW 8.6\www".  If it isn't then copy it from the support folder into the www folder.

 

Oh BTW, if you are ever deploying to Vista machines you will never be able to programmatically move files into the Program Files folder without administrator privaleges.

 

BTW who is to say that your customer has installed LabVIEW at this location.

0 포인트
2/8 메시지
7,874 조회수

Nno, the .html file is not already there (it is custom for each LV exe that you create).  I don't know if that path is there or not either as the development system is not on their computer.

 

How about I rephrase the question after thinking about it.

 

 

I have a LV exe built and it uses web publishing.  I want to install it on a computer that does not have the LV developnment system on it.  What directory do use to publish the .html file and how do I get it there?

 

I could use the directory for that the application resides in, but what if there is more than one application attempting to publish a web page? They would have to use the same directory so as to not confuse the LV web server.

0 포인트
3/8 메시지
7,863 조회수

I have always added non-LabVIEW files to the installer.

Add the file(s) to your project, then in the installer properties "Source Files" view, add those files under the executable. The files will be installed in the same location as the executable program. I do this for operator manuals and such.

0 포인트
4/8 메시지
7,857 조회수
I think I misread your question. There is a seperate runtime engine for web server. Is that added to your installer build? Are you getting an error from your installed program? 
0 포인트
5/8 메시지
7,852 조회수

 

No errors.

 

 

Ok..... simplest way to ask the question (I promise I am getting closer 윙크 이모티콘 )

 

 

What directory should I use for publishing web pages on a computer that does not have the LV development system installed?

0 포인트
6/8 메시지
7,848 조회수
솔루션
주제 작성자 dbtestcon이(가) 승인함

Hi!

 

I'm not sure you can get rid of the physical path problem in 8.6.  In 9.0 NI added a variable $LVSERVER_ROOT to their web config file.

 

The path turns out to be:

 

[Program Files]\National Instruments\Shared\LabVIEW Run-Time\www

 

The best you can do is the path [Program Files] for the installer.  See my post here: http://forums.ni.com/ni/board/message?board.id=170&message.id=439052#M439052

 

I write a step-by-step on how to do what you want in LabVIEW 2009.  Might work for 8.6 too, but I seem to remember some tweaking was required.

 

source file for html.jpg

0 포인트
7/8 메시지
7,843 조회수

 

Nickerbocker - Perfect, just what I was looking for.

0 포인트
8/8 메시지
7,838 조회수