pn ini settings

Discussion Forums discussion pn ini settings

This topic contains 0 voices and has 16 replies.

Viewing 15 posts - 1 through 15 (of 17 total)
Author Posts
Author Posts
February 18, 2006 at 12:35 pm #27

p347_m055
Member

Hi. I’m new here, and I’m really sorry if this has been asked before, but in this page, under the heading:

Development build of Ella (2.0.5.28)

The nineteenth item on the “what’s new” list reads:

Options can now be saved to a .ini file instead of the registry.

but I can not find any references to this in the current help file, readme, release notes, or the forum.

I am using pnotepad2 from a usb drive on computers at school. All of the lab’s computers load a fresh image on boot, so any installed files or registry entries are lost.

If anyone could direct me to an example of the ini file, or some documentation on how to create one, I would be much obliged.

Thank You

February 20, 2006 at 10:56 am #14851

Sam
Member

I would be interested in how that can be done as well. I use SciTE on a portable drive, but would prefer to use PN2.

February 24, 2006 at 12:47 pm #14852

simon
Key Master

This does work, and just needs a config file in the PN directory. I’m away on business right now so don’t have the stuff to hand to look it up. I’ll post how to do it when I’m back in the UK.

February 25, 2006 at 11:01 am #14853

p347_m055
Member

Thank you, Simon!

Peter

February 27, 2006 at 11:19 am #14854

Sam
Member

OK I’ve figured it out (partially – it seems both the registry and the ini file are used). Close PN2 first.

Create a ‘settings’ folder in you PN2 directory

Also create a config.xml file in the PN2 directory containing the following:

<config><userSettings path="settings/" /><storeType value="I" /></config>

Copy the files in %APPDATA%Echo SoftwarePN2 to it.

February 27, 2006 at 1:27 pm #14855

simon
Key Master

You’re pretty much spot on there Sam – well figured out!

the storeType element value attribute was designed to be “Ini” rather than just “I” but as you’ve seen from the code I will currently work.

There are still a few bits and pieces stored in the registry (things that don’t matter so much, and the window layout). This will get fixed over the next release or so. The important options are all stored in the Ini.

I’m pleased the relative path thing works, I hadn’t had a chance to try that out. My one concern is that if the current directory was different when PN starts would it still find the correct place. I’ll look into it.

February 27, 2006 at 3:27 pm #14856

Sam
Member

One way to know what registry keys are used is by using Regmon.

Then set filter (Ctrl+L) to include only

HKCUSoftwareEcho SoftwarePN2

Starting PN after this results in quite a few requests – hopefully the screen will be empty once the ini support is completed.

February 27, 2006 at 4:24 pm #14857

Sam
Member

Re: Relative path

It works if you navigate to the folder PN2 is installed to and open pn.exe, but does not work when invoked via a shortcut (unless you set ‘Start in’ to your PN2 directory).

Edit:

Syntax highlighting has a problem – open a file using ‘recent files’ works, but when you go ‘file > open’ to open another file it stops working on all new files you open/create (even through recent files).

May 11, 2006 at 9:28 pm #14858

xerpher
Member

How is the progress on making all the settings stored this way?

I was thinking of setting up this program on a usb drive to take with me but noticed some things get stored locally.

May 27, 2006 at 11:04 pm #14859

simon
Key Master

I have just checked in a whole bunch of changes that fix this behaviour properly. I *think* I now catch all of the settings stored in the registry previously and I also cope with relative paths for the user settings directory.

There should be a new testing release out in the next few days.

October 9, 2006 at 3:53 pm #14860

maubarra
Member

Hi, first of all: Great Program!! A came across it while I was looking at the development kit for NDS.

I also want to run it from my USB drive so I can take it everywhere with al the settings and without leaving “stuff” on the computers I use.

I wonder if all the settings can now be stored in the config file and how can be done or if it still in progress.

October 9, 2006 at 4:24 pm #14861

simon
Key Master

Please try the current development build on the web site and follow Sam’s instructions above for creating a config.xml file. Let me know if it works!

October 9, 2006 at 7:55 pm #14862

maubarra
Member

Thanks for the quick response. I’ll do that, but since I’m currently in a location where the download of .exe’s is restricted (or .zip’s or .rar’s you name it) I’ll have to wait until I get home.

October 12, 2006 at 4:43 pm #14863

maubarra
Member

Ok, I tested it. It seems to run fine. Almost all the settings are being saved con the .ini file. In the registry still remain some entries. These are the ones I found but I didn’t try ALL the options in the program:

-HKCUSoftwareEcho SoftwarePN2

-HKCUSoftwareEcho SoftwarePN2AutoComplete

-HKCUSoftwareEcho SoftwarePN2AutoCompleteFind

-HKCUSoftwareEcho SoftwarePN2AutoCompleteFindToolbar

-HKCUSoftwareEcho SoftwarePN2AutoCompleteFindReplace

with some entries inside them. Correct me if I’m wrong but they are words that the user search using the “Find” menu.

Well I hope this is helpful. I think the program is “portable enough” to me but would be nice if it were “100% Portable”.

Keep up the excellent work!!

October 26, 2006 at 10:07 am #14864

zennehoy
Member

Is there some way to make the path for the settings folder dependant on the location of the pn executable? If i use just use <userSettings path="settings/" /> a settings directory is created in whatever directory the file I opened was in. I can’t use an absolute path because the drive letter may change (running pn off a usb stick), and using an environment variable within the xml doesn’t seem to work either (no surprise there really).

Thanks,

Zen

Viewing 15 posts - 1 through 15 (of 17 total)

You must be logged in to reply to this topic.