So I'm trying to deal with 3 XML settings files in JStock Portable that require a path. Here's the important stuff from all of them:
...\module\project.xml (the whole file)
<org.yccheok.jstock.gui.IndicatorProjectManager> <preferredOperatorIndicatorType>ModuleIndicator</preferredOperatorIndicatorType> <projects/> <directory>[%USERPROFILE%\.jstock\1.0.6\module should be written here]</directory> </org.yccheok.jstock.gui.IndicatorProjectManager>
...\indicator\project.xml (the whole file)
<org.yccheok.jstock.gui.IndicatorProjectManager> <preferredOperatorIndicatorType>AlertIndicator</preferredOperatorIndicatorType> <projects/> <directory>[%USERPROFILE%\.jstock\1.0.6\indicator should be written here]</directory> </org.yccheok.jstock.gui.IndicatorProjectManager>
...\config\options.xml
<org.yccheok.jstock.gui.JStockOptions> <!--...--> <lastFileIODirectory>[%PAL:DataDir%\saves should be written here]</lastFileIODirectory> <!--...--> </org.yccheok.jstock.gui.JStockOptions>
(It took an incredible amount of time for that to show up correctly.)
I thought it'd be pretty easy, but the manual's examples don't apply to this particular case, nor am I familiar enough with XML to try to figure it out myself.
So is it possible or should I just write a virus that the launcher runs instead and infects the world wide web and destroys our lifestyles as we know it? I don't want to feel compelled to go with the latter, but if that's what it takes...
Yeah, Xpaths are tricky to get the hang of. Here's what they should look like (based on what you've given)
...\module\project.xml
...\indicator\project.xml
...\config\options.xml
None of them seem to be working. In the indicator/project.xml one, I think you forgot to replace "module" with "indicator" in the FileWrite for that part, and I fixed it but it was to no avail. While there's a slim chance the module/project.xml might be working the last two are definitely not.
I just noticed an empty tag in the first two files. Try inserting project between the Xpath sections.
[EDIT] options.XML: can you post the full file?
http://pastebin.com/5gg7dhap
...\module\project.xml
...\indicator\project.xml
...\config\options.xml
Note that config\options hasn't changed from what i posted earlier.
None of them worked.
Here's a zip of JStock Portable in case your curious about what I'm doing.
The Data folder is where the files are at (it's about 40 MB of data to load, so it's going to take a bit for the app to start.)
Seeing all the issues you are having I took the liberty to ask the developer of JStock a question in regards to what you are trying to do. Will let you know if I get an answer
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss
I think you meant the .jstock folder, though (you said file :P)
He seems quite active, in fact I downloaded the zip file while we were talking, the second time I launched it I got a new version available because of security issues....time will though
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss
Apparently he saying you can not change the location of the folder.
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss
a probably stupid question? (BTW not waiting for answer to that going to ask anyway).
Why? Why are you trying to re-write the XML? I just grabbed your zip folder and put it on my drive. Then went to another computer with it and ran ran it. It appeared to work as expected. It saved the information as well as updated the xml on its own. Mind you I went from 7 to xp with it, it did it all correctly...appears in looking deeper it has to do with the automatic detection it uses from the gui part of java.
So unless I am missing something why re-create something already there?
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss
I honestly have no idea. It just looks important, so I wanted to play is safe.
I don't know what the deal with it was, but I couldn't use JStock to it's full potential because it doesn't work behind a proxy that requires authorization, so I couldn't ever tell whether JStock updates the files by itself or if it relied on them to do something, or what.
I mean, why write data that's completely useless?
I do suppose I could push a dev test out and see if people run into problems.
Halo, I am the project admin of JStock. It's so great to see there is effort of making JStock workable under PortableApps.
If you need any information, let me know. I am glad to help.
Good luck!
You can follow this thread:
https://portableapps.com/node/31437
Regarding this issue, I was wondering if you could create an option to select where the .jstock folder data could be located instead of %USERPROFILE% so that I could point the JStock data to the JStockPortable\Data folder instead (to avoid the issue I mentioned).
I get the similar request from here, just wondering whether *he* is *you*?
http://sourceforge.net/projects/jstock/forums/forum/723855/topic/3848818
What my proposed solution is, I will modify jstock, so that you can launch jstock in the way
will store data in c:\my_own_dir
================================
jstock.exe -userdir=c:\my_own_dir
will store data in default location
===================================
jstock.exe
Just wondering, will this solve your problem in making JStock into portableapp? If it is yes, I will go ahead and implement my proposed solution.
Thanks.
as the he Pyromaniac is not him it is me I asked your forum as to maybe try to help Pyromaniac figure out a way to make it work without having to do major xml editing
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss
All I had to do was set -Duser.home to the directory I specified and it worked as intended.
Thanks, though.
trying to cya with my last statement Pyro, I think my original intentions to try to help may have messed things up, so want it clear to the developer that you and I are not one in the same
“Be who you are and say what you feel because those who mind don't matter and those who matter don't mind.” Dr. Seuss