SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-10-2008, 03:11 PM
cncb cncb is offline
Sage Icon
 
Join Date: Jul 2006
Posts: 1,271
Good/Reliable Way to Determine Sage Install/Execution Directory

I don't see any API functions or properties that give me this. Is there a way to discover this directory without going to the registry (Windows only) or navigating from the current STV (which seems like it could easily become unreliable)?
__________________
-Craig
Reply With Quote
  #2  
Old 07-10-2008, 03:27 PM
Morgan111's Avatar
Morgan111 Morgan111 is offline
Sage Fanatic
 
Join Date: Nov 2003
Location: Oak Ridge, Tennessee
Posts: 762
Try GetWorkingDirectory()
Reply With Quote
  #3  
Old 07-10-2008, 04:25 PM
cncb cncb is offline
Sage Icon
 
Join Date: Jul 2006
Posts: 1,271
Quote:
Originally Posted by Morgan111 View Post
I know from past Windows programming that the working directory frequently changed due to opening a file from a specific location or other operations. Is that not the case with this API function? Thanks.
__________________
-Craig
Reply With Quote
  #4  
Old 07-10-2008, 04:55 PM
Fonceur's Avatar
Fonceur Fonceur is offline
Sage Icon
 
Join Date: Jan 2008
Location: DDO, QC
Posts: 1,915
What about the SageTV version? I see GetRemoteClientVersion(), but what about the server itself?
Reply With Quote
  #5  
Old 07-10-2008, 05:30 PM
bastafidli bastafidli is offline
Sage Expert
 
Join Date: Dec 2007
Location: Charlottesville, VA
Posts: 728
I don't use Studio, but I know Sage under Linux has a problem with this. E.g. I am installing Sage into directories like this
/opt/sagetc/server_v1
/opt/sagetc/server_v2
/opt/sagetc/server_v3
then I create symlink to whichever verion I want to run l
/opt/sagetc/server -> /opt/sagetc/server_vx
and then I run
/opt/sagetc/server/start...

The problem is that Sage writes to property files and other places /opt/sagetc/server_vx rather than /opt/sagetc/server. I then have to go and manually change it.
Reply With Quote
  #6  
Old 07-10-2008, 06:55 PM
JREkiwi's Avatar
JREkiwi JREkiwi is offline
Sage Icon
 
Join Date: Jan 2005
Location: Auckland, New Zealand
Posts: 2,132
java_lang_System_getProperty("user.dir")

John
Reply With Quote
  #7  
Old 07-11-2008, 12:45 PM
cncb cncb is offline
Sage Icon
 
Join Date: Jul 2006
Posts: 1,271
GetWorkingDirectory() does seem to work consistently on Windows at least. Thanks for the suggestions.
__________________
-Craig
Reply With Quote
  #8  
Old 07-12-2008, 08:23 AM
GKusnick's Avatar
GKusnick GKusnick is offline
SageTVaholic
 
Join Date: Dec 2005
Posts: 5,083
There's a new API in the recent betas for GetDefaultSTVFile(). You should be able to derive the install path from that.
__________________
-- Greg
Reply With Quote
  #9  
Old 07-26-2008, 01:41 PM
cncb cncb is offline
Sage Icon
 
Join Date: Jul 2006
Posts: 1,271
Well, it turns out that GetWorkingDirectory() returns the working directory on the server even when it's used on a local software Client??

Is java_lang_System_getProperty("user.dir") the Java equivalent that would work on the local client?

I hesitate to navigate from the Default STV file location because it seems that this could easily change. Also, this might return the server default STV location too?
__________________
-Craig
Reply With Quote
  #10  
Old 07-26-2008, 01:55 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
Quote:
Originally Posted by cncb View Post
Well, it turns out that GetWorkingDirectory() returns the working directory on the server even when it's used on a local software Client??
This is known & has already been fixed for the next release.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #11  
Old 07-26-2008, 03:12 PM
cncb cncb is offline
Sage Icon
 
Join Date: Jul 2006
Posts: 1,271
Quote:
Originally Posted by Opus4 View Post
This is known & has already been fixed for the next release.
Excellent. Thanks.
__________________
-Craig
Reply With Quote
  #12  
Old 01-13-2009, 12:58 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
I figured I should post an update about this, since it changed again...


Quote:
Originally Posted by cncb View Post
Well, it turns out that GetWorkingDirectory() returns the working directory on the server even when it's used on a local software Client??
The next version (v6.5.7) will revert to having GetWorkingDirectory() return the working dir on the SageTV server. We decided it was a mistake to have changed that because clients need to be able to get the server's working dir.

Quote:
Is java_lang_System_getProperty("user.dir") the Java equivalent that would work on the local client?
Yes, you should use java_lang_System_getProperty("user.dir") to get the working dir on the local client.

The next default STV will contain this change.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Successful BTV to Sage Conversion deipert SageTV Software 7 01-19-2008 09:15 PM
Another BTV to Sage TV Conversion deipert SageTV Software 6 01-15-2008 03:55 PM
Sage has experienced a critical error and must close chadman SageTV Beta Test Software 3 11-11-2006 02:02 PM
Sage DVD Player vs. Zoom/TT Players Jesse SageTV Software 47 02-17-2006 02:34 PM
Sage DVD Player mg99 SageTV Software 6 01-12-2005 09:41 PM


All times are GMT -6. The time now is 09:51 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.