New Release D3D9Client Development

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,135
Reaction score
409
Points
123
Location
Rome
Website
www.tuttovola.org
Ok, if this is not a problem for a subsequent OrbiterSound installation, that's fine!
BTW, next OrbiterSound version won't need these links, Dansteph says.

Having said that, me thinks it's kind of a pointless and misleading message if, as you have just said, the link is created anyway "for future use"...

Here's the screenshot:

NwjXm.jpg
 
Last edited:

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
508
Points
113
Ok, if this is not a problem for a subsequent OrbiterSound installation, that's fine!
BTW, next OrbiterSound version won't need these links, Dansteph says.
Yeah, that's too bad... All the work for nothing ;)

Having said that, me thinks it's kind of a pointless and misleading message if, as you have just said, the link is created anyway "for future use"...

Here's the screenshot:

NwjXm.jpg
Thanks for the screenshot. I wanted to be sure whether this message was produced by the D3D9Client or the OS. It is created by the D3D9Client! But I can not really explain why :embarrassed:.
You don't have a regular folder "Modules\Server\Sound" or a file named "Sound" in the "Modules\Server" directory, right?

I think I'll have to dig out my old XP machine and check what's goin' on there in more detail.

Nevertheless, thanks a lot for the testing and reports.
/Kuddel
 

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,135
Reaction score
409
Points
123
Location
Rome
Website
www.tuttovola.org
I think both clients (9 and 11) should now include another button "remove symlinks", or something, just in case things go wrong and the user needs to start from scratch. Not everybody knows how to run a command in a DOS window to run, say
C:\>junction -d modules\server\sound.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
508
Points
113
I think both clients (9 and 11) should now include another button "remove symlinks", or something, just in case things go wrong and the user needs to start from scratch. Not everybody knows how to run a command in a DOS window to run, say
C:\>junction -d modules\server\sound.
Yes and no ;)

  1. The "remove symlinks" is a nice convenience button, but should only remove junction points, not folders that are copies of "Sound" resp. "Config".
  2. No-one needs to use that command line you've given (although it is correct ;) ). To remove the link(s), just delete the symbolic link(s) via the explorer (via [DEL] key e.g.) like any other file/directory. No special magic needed.
  3. Another option would be to just 'automatically' add the junction points at startup and remove 'em on close/shutdown. This option might leave the junction points when the sim crashes, but that's not a problem at all*.

/Kuddel

*) HDD-usage per Link is: 28 bytes + (length of absolute path x 2)
 

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,135
Reaction score
409
Points
123
Location
Rome
Website
www.tuttovola.org
Yes and no ;)

The "remove symlinks" is a nice convenience button, but should only remove junction points, not folders that are copies of "Sound" resp. "Config".
I don't know how you or Jarmo will implement it, but I manually copied config and sound folder, then issued the commands

C:\>junction -d modules\server\sound
C:\>junction -d modules\server\config

and junction is unable to remove the folders, it says they're not empty.
So apparently it looks it's safe.

mpwWg.png



No-one needs to use that command line you've given (although it is correct ;) ). To remove the link(s), just delete the symbolic link(s) via the explorer (via [DEL] key e.g.) like any other file/directory. No special magic needed.
Ok, good.
I was "afraid" to do it because I noticed that the mirroring of "junctioned" folders is two-way, and I thought the main folder could be deleted as well.
If you create or delete a file in the "junctioned" folder, the same happens to the main folder.


Another option would be to just 'automatically' add the junction points at startup and remove 'em on close/shutdown. This option might leave the junction points when the sim crashes, but that's not a problem at all*.
Yes, that could be the "final" way to do it. If one wants to use a graphics client he >needs< these links anyway, and they could be transparently created.


*) HDD-usage per Link is: 28 bytes + (length of absolute path x 2)
The idea was not "space-saving" driven. I got it after reading this post
http://www.orbiter-forum.com/showthread.php?p=383955&postcount=5
 
Last edited:

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
508
Points
113
I don't know how you or Jarmo will implement it, but I manually copied config and sound folder, then issued the commands

C:\>junction -d modules\server\sound
C:\>junction -d modules\server\config

and junction is unable to remove the folders, it says they're not empty.

Hi Ripley,

it seems to me that you missunderstood the concept of junction points.


  1. Whatever you do below that junction-point is of course done like it would have been done in the source-directory.
    so when you have a junction-point named c:\link, pointing to c:\windows, you can savely remove the junction-point
    > rmdir c:\link
    But, whatever you do below that link is done to the source as well!
    So you should definitely avoid doin' something like this:
    > del c:\link\* <-- don't try this at home!!!
  2. When creating a junction-point, you should not copy the folder before. that would be a copy, not a junction-point ;)
  3. A classic example for a junction-point on german XP machines was the link from "c:\Programm files" to "C:\Programme" (wich is the default program directory on a german Windows system). So here one creates a link named "Program files", that points to "Programme". Just by issuing the following:
    > junction "c:\Program files" C:\Programme
    Note that there is no copy at all!
  4. A junction-point can only point to a directory! Not to a file (those are named different and that's another topic)

In summary: Do not copy anything. Just create the link (junction-point)

I was "afraid" to do it because I noticed that the mirroring of "junctioned" folders is two-way, and I thought the main folder could be deleted as well.
If you create or delete a file in the "junctioned" folder, the same happens to the main folder.
Whatever you do below that junction-point is done in the source-folder actually. But the junction-point itself can be deleted without anything happening at the source folder. Ift you are familiar with the concept of pointers in C/C++ you can think of a junction-point as a pointer.


Yes, that could be the "final" way to do it. If one wants to use a graphics client he >needs< these links anyway, and they could be transparently created.
Actually "we" (the graphics client) do not need these junction-points, it's some other plugins (spacecraft3.dll, OrbiterSound35) that like to have 'em ;)

/Kuddel
 
Last edited:

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,135
Reaction score
409
Points
123
Location
Rome
Website
www.tuttovola.org
Hi Ripley,

it seems to me that you missunderstood the concept of junction points.
Maybe, a little, but not that much.
I manually copied the folders to test what you had just written, to test if a "junction -d" command would remove (or not) these folders. And it doesn't.

I refer to this paragraph you wrote:
The "remove symlinks" is a nice convenience button, but should only remove junction points, not folders that are copies of "Sound" resp. "Config".

...Whatever you do below that junction-point is done in the source-folder actually. But the junction-point itself can be deleted without anything happening at the source folder. Ift you are familiar with the concept of pointers in C/C++ you can think of a junction-point as a pointer.
Ok, got it.
So it's not a "2-way mirroring", as I erroneously wrote before, but it is in fact a "view" of the exact source folder, just in another sort-of "virtual" position.
If I create a new file in the "junctioned" folder, I'm actually creating it in the source.

...Actually "we" (the graphics client) do not need these junction-points, it's some other plugins (spacecraft3.dll, OrbiterSound35) that like to have 'em ;)

/Kuddel
Yes of course :thumbup:
 
Last edited:

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
508
Points
113
Maybe, a little, but not that much.
I manually copied the folders to test what you had just written, to test if a "junction -d" command would remove (or not) these folders.
Ah O.K! Sorry for having underestimated your knowledge ;)
...but maybe someone else gets enlightenment from my post.

So it's not a "2-way mirroring", as I erroneously wrote before, but it is in fact a "view" of the exact source folder, just in another sort-of "virtual" position.
If I create a new file in the "junctioned" folder, I'm actually creating it in the source.
Exact! It's just another name for the same place. Or another path to the same place.

But back to the original issue: Does the message still appear when you don't have any junction-points / directories at "Modules/Server" and then push the button?
 

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,135
Reaction score
409
Points
123
Location
Rome
Website
www.tuttovola.org
In these tests Junction Points have only been created by D3D9 client functionality.
I use a batch file, but only to remove the junctions.

If you want me to make other tests, just ask.
:cheers:

-----------------------------------------

TEST 1: no junctions active - both config and sound folders present

SzOyu.png


Standard expected outcome.

-----------------------------------------

TEST 2: no junctions active - config folder present - no sound folder (renamed exisisting Sound folder to OLDSound)

NwjXm.jpg


NOTE: Sound junction folder is created anyway (empty). When I rename back Sound folder, the junction Sound folder remains empty.

When I run my batch file to delete junctions, it does not find the junction for Sound folder!

ahSZj.png



Maybe the bold text is not true...

Hey Ripley,

yes, the links will also be created if the target does not exist.
This should only be valid for the "Sound" folder as the "Config" folder is definitely present.
....
Again, the link from "Modules\Server\Sound" points to "..\..\Sound" even if that (target) folder does not exist! It just gets you nowhere then, but when OrbiterSound is not installed, it doesn't matter anyway. Another advantage is that, ass soon as you install OrbiterSound later on, the link is already in place.

Regards,
Kuddel

-----------------------------------------

TEST 3: no junctions active - NO config folder present (I know, extreme!) - no sound folder (renamed exisisting Sound folder to OLDSound)

iZpvA.png


NOTE: Config junction folder is created anyway (empty). When I rename back Config folder, the junction Config folder remains empty. NO Sound junction folder is created whatsoever.

When I run my batch file to delete junctions, it does not find any junction at all!

4ggCI.png


-----------------------------------------

TEST 4: no junctions active - both folders manually copied

iZpvA.png


-----------------------------------------



This is the cmd I wrote, to create/delete junctions on the fly:

Code:
@echo off

:START
cls
IF NOT EXIST junction.exe goto NOJUNCTION
junction -s
echo.
echo.
echo            ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
echo            ³                                                   ³
echo            ³                Choose an option                   ³
echo            ³                                                   ³
echo            ³          1. CREATE Junction                       ³
echo            ³          2. DELETE Junction                       ³
echo            ³          3. Quit                                  ³
echo            ³                                                   ³
echo            ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
goto CHOOSE

:CHOOSE
set choice=
set /p choice=Digita la tua scelta:

rem rimuove tutti i caratteri dalla variabile, tranne il primo. Se la scelta non e' valida, torna all'inizio

IF NOT '%choice%'=='' SET choice=%choice:~0,1%
IF '%choice%'=='1' GOTO CHOICE1
IF '%choice%'=='2' GOTO CHOICE2
IF '%choice%'=='3' GOTO END
goto CHOOSE

:CHOICE1
cls
junction Modules\Server\Config Config
junction Modules\Server\Sound Sound
echo.
pause
goto END

:CHOICE2
cls
junction -d Modules\Server\Config
junction -d Modules\Server\Sound
echo.
pause
goto END

:NOJUNCTION
echo.
echo.
echo            ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿
echo            ³                                                   ³
echo            ³            NO JUNCTION.EXE FOUND                  ³
echo            ³                                                   ³
echo            ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ
pause

:END
 

asmi

Addon Developer
Addon Developer
Joined
Jan 9, 2012
Messages
350
Reaction score
0
Points
0
Location
Ontario
I think you're trying to solve non-existent problem :) Why are you so obsessed with these symlinks/junctions?
 

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,135
Reaction score
409
Points
123
Location
Rome
Website
www.tuttovola.org
I'm not "obsessed", I'm just trying to test if there was a bug or not...Kuddel asked if a certain message was still appearing.
Besides, I'm curious, I didn't know these junctions and such before, and since I have to explain what they are and what they do to various Italian Orbiteers, I wanted to be sure of what I knew...
 

asmi

Addon Developer
Addon Developer
Joined
Jan 9, 2012
Messages
350
Reaction score
0
Points
0
Location
Ontario
I'm not "obsessed", I'm just trying to test if there was a bug or not...Kuddel asked if a certain message was still appearing.
Besides, I'm curious, I didn't know these junctions and such before, and since I have to explain what they are and what they do to various Italian Orbiteers, I wanted to be sure of what I knew...
I see. Well in D3D11Client I check at startup if symlinks are there, and if they are, I disable the create button, otherwise I leave it on. If "Sound" dir does not present, creation will probably display an error, but it doesn't really matter since absence of "sound" folder means absence of OS plugin, so there will be no sound anyways.
But since Dan has already fixed that bug in OS (and I can confirm that it's indeed fixed since I participared in alpha test), as soon as he makes a public release this problem will go away for good. Which leaves only SC3 but config folder is ALWAYS present, so symlink creation will succeed no matter what.
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
508
Points
113
Hey Ripley,

first of all thanks for your efforts!

Maybe the bold text is not true...
You're right "ass" is definitely the wrong term :lol:. "as" is much more correct there.
Apart from that, the statement is correct (at least on a Windows 7 System).

Regarding all your other tests, I have to take a closer look into your setup.

After I dusted off my old XP machine I'll look what all the things look like in XP, 'cause I think Win7 might handle "links to not existing targets" different.
But that's just a guess by now.

Stand by...
Kuddel

---------- Post added at 21:36 ---------- Previous post was at 20:53 ----------

Hi again Ripley,

I did some tests on my XP machine and found the following:

Links to non-existing targets work in Windows 7 but do not work in Windows XP!

I will change the D3D9Client code to take that new knowledge into account.
Links should be created only to targets that do exist!

Thanks again for your test-efforts!

Until then, any user of D3D9Client (R5c) can ignore that error-message.

/Kuddel
 

kuddel

Donator
Donator
Joined
Apr 1, 2008
Messages
2,064
Reaction score
508
Points
113
Hi jarmonik,

attached you'll find the changes I've made to fix the problem with "links to non-existing targets on XP systems".

Regards,
Kuddel
 

Attachments

  • D3D9ClientR5c++.zip
    8.9 KB · Views: 7

Ripley

Tutorial translator
Donator
Joined
Sep 12, 2010
Messages
3,135
Reaction score
409
Points
123
Location
Rome
Website
www.tuttovola.org
I think you're trying to solve non-existent problem :) Why are you so obsessed with these symlinks/junctions?
Uh-oh, looks like there was a problem...
:thumbup:

Hi jarmonik,

attached you'll find the changes I've made to fix the problem with "links to non-existing targets on XP systems".

Regards,
Kuddel
I would call it a positive test-day!!
:cheers:

---------- Post added 02-10-12 at 15:01 ---------- Previous post was 01-10-12 at 23:18 ----------

...Yes, I am aware of the great framerate drop caused by the new Map MFD. However, I am a bit puzzled about the difference between windowed and fullscreen mode.
Hi Jarmo.
Any idea in the works for future solutions to this massive fps drop?
 

Phoenix

New member
Joined
Nov 17, 2009
Messages
72
Reaction score
0
Points
0
Runway Lighting

Runway lighting in the D3D9 client is excellent but would it be possible, in a future iteration, to be able to specifiy a different distance at each end for the green threshold lights and PAPI lights? Runways can have different sized displaced thresholds at each end, and only being able to specify the same distance for each end is a problem.

Yesterday I uploaded a configurable runway addon, which enables the specification of various runway markings, such as displaced thresholds, and these thresholds can be a different length at each end, just like a real runway. Getting the runway lighting to reflect this is not possible, if the displaced threshold length is different at each end.

No rush. Thanks.
 

Attachments

  • OrbiterHangerImage.jpg
    OrbiterHangerImage.jpg
    340 KB · Views: 59

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,668
Reaction score
796
Points
128
I suppose the easiest solution would be adding an optional parameter in the runway lights that would make it a single-ended. In that case you would need two runway lights sections, one for each direction. Would this work ?

[FONT=&quot]RUNWAYLIGHTS[/FONT]
[FONT=&quot] SINGLEENDED[/FONT]
[FONT=&quot] END1 -8220 -3 -600[/FONT]
[FONT=&quot] END2 -12670 -12 -3155[/FONT]
[FONT=&quot] WIDTH 100[/FONT]
[FONT=&quot] PAPI 5.0 3.0 257 3 [/FONT]
[FONT=&quot] PAPI 20.0 3.0 -2000 0 [/FONT]
[FONT=&quot] VASI 1.5 152 671[/FONT]
[FONT=&quot] TD_DISP 257[/FONT]
[FONT=&quot] TD_LENGTH 600 [/FONT]
[FONT=&quot] DECISION_DIST 257[/FONT]
[FONT=&quot] APPROACH_START 900[/FONT]
[FONT=&quot]END[/FONT]

[FONT=&quot][/FONT]
[FONT=&quot]RUNWAYLIGHTS[/FONT]
[FONT=&quot] SINGLEENDED [/FONT]
[FONT=&quot] END2 -8220 -3 -600 // Note: END1 and END2 are swapped[/FONT]
[FONT=&quot] END1 -12670 -12 -3155[/FONT]
[FONT=&quot] WIDTH 100[/FONT]
[FONT=&quot] PAPI 5.0 3.0 257 3 [/FONT]
[FONT=&quot] PAPI 20.0 3.0 -2000 0 [/FONT]
[FONT=&quot] VASI 1.5 152 671[/FONT]
[FONT=&quot] TD_DISP 257[/FONT]
[FONT=&quot] TD_LENGTH 600 [/FONT]
[FONT=&quot] DECISION_DIST 257[/FONT]
[FONT=&quot] APPROACH_START 900[/FONT]
[FONT=&quot]END[/FONT]
 

asmi

Addon Developer
Addon Developer
Joined
Jan 9, 2012
Messages
350
Reaction score
0
Points
0
Location
Ontario
I suppose the easiest solution would be adding an optional parameter in the runway lights that would make it a single-ended. In that case you would need two runway lights sections, one for each direction. Would this work ?

No need - just check if TD_DISP parameter has two numbers, if that's the case - these are different displacements. If there is just one number, it will work exactly like it does now - so it's 100% backward-compatible. I'll implement it in D3D11Client as well once I'll be done with shadows.
 

jarmonik

Well-known member
Orbiter Contributor
Addon Developer
Beta Tester
Joined
Mar 28, 2008
Messages
2,668
Reaction score
796
Points
128
Hi Jarmo.
Any idea in the works for future solutions to this massive fps drop?

Yes, Record the coast lines in a static vertex buffer for playback. Unfortunately, not do-able from my end. I don't know why is there such a great difference between windowed and fullscreen mode. It would take quite lot of time to investigate it. It doesn't effect so much in the frame rate on my computer but there is a peak impact when the MFD is updated. You can see the execution times in the statistics panel [Shift+Ctrl+C] if I recall.

---------- Post added at 22:21 ---------- Previous post was at 22:19 ----------

No need - just check if TD_DISP parameter has two numbers, if that's the case - these are different displacements. If there is just one number, it will work exactly like it does now - so it's 100% backward-compatible. I'll implement it in D3D11Client as well once I'll be done with shadows.

What about different PAPI and VASI configurations for each end of the runway. The solution above would include that.
 

asmi

Addon Developer
Addon Developer
Joined
Jan 9, 2012
Messages
350
Reaction score
0
Points
0
Location
Ontario
What about different PAPI and VASI configurations for each end of the runway. The solution above would include that.

Agreed - I've just never heard of asymmetric runways...
 
Last edited:
Top