Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.0.0 RC Setup doesn't remove an existing 0.5.3 installation #320

Closed
HTPCSourcer opened this issue Aug 24, 2016 · 36 comments
Closed

1.0.0 RC Setup doesn't remove an existing 0.5.3 installation #320

HTPCSourcer opened this issue Aug 24, 2016 · 36 comments

Comments

@HTPCSourcer
Copy link

Hello,

When exceuting the 1.0.0 setup routine DokanY is correctly installed, however, an existing 0.5.3 is not removed. Any chance to provide a setup that replaces the older version?

Thanks,
HTPCSourcer

@Liryna
Copy link
Member

Liryna commented Aug 24, 2016

@HTPCSourcer Hi,

Unfortunately this is made in purpose, both dokan version can work side by side so there is not reason to have such option.

But otherwise, dokan 1.0.0 will detect if another 1.0.0 is already installed and will ask to remove it.

You will probably need to create a script here to remove automatically the 0.5.3

@HTPCSourcer
Copy link
Author

Thanks Liryna,

We are using Dokan as part of the MediaPortal 2 package and now work on an improved installer. I simply wanted to ask first before adding a script to do something, which might also be addressed by the DokanY packages.

Am I correct to assume that the same concept will apply in the future in case of new Dokan versions? In other words, we would need to also manually remove an existing 1.0.0 version when installing say a potential 1.2?

@Rondom
Copy link
Contributor

Rondom commented Aug 24, 2016

Dokan 1.x.x-versions cannot be installed side-by-side (the install will fail and ask you to uninstall the previously installed version and reboot to start the installation again).
So is it theoretically possible to unload the driver (provided that no volumes are mounted) to avoid the need to reboot?

@Liryna
Copy link
Member

Liryna commented Aug 24, 2016

@HTPCSourcer , like @Rondom said, you will need to remove 1.0.0 to install 1.2.0.

Dokan driver cannot be unload and remove without a reboot. The driver is flagged as removed but still running the time of the reboot.

This can be fixed if Dokan add support to PnP.

I use this ticket to keep in mind to describe the system version of Dokan in the wiki.

@HTPCSourcer
Copy link
Author

Ah, that's making things difficult.

We were hoping to be able to provide a fool-proof installer to MediaPortal users but now need to either have users manually uninstall and reboot or build a reboot cycle into the installer.

@Liryna
Copy link
Member

Liryna commented Aug 24, 2016

For information, if the 1.x.x is already installed and MediaPortal 2 embedded dokan1.dll (he should), it gonna work.
I mean that installing a new version of Dokan is only required if you requiere changes in the dokan driver but the communication of dokan1.dll will always work with dokan driver 1 (of the same MAJOR version).

The reboot cycle will be an obligation unfortunately :( for driver update.

@HTPCSourcer
Copy link
Author

HTPCSourcer commented Aug 24, 2016

The current version used in the wildplace is 0.5.3. We plan to replace this by 1.0.0, but would like to do this automatically.

Reading the above, it will be necessary to

  1. Uninstall 0.5.3
  2. Reboot
  3. Install another major version

By the way: Why would one want to have two different major versions installed in parallel?

@Rondom
Copy link
Contributor

Rondom commented Aug 24, 2016

No. 0.5.3 and 1.x.x. can be installed in parallel.
Removing 0.5.3 might even be harmful because there might be other software relying on it.

@Liryna
Copy link
Member

Liryna commented Aug 24, 2016

You dont need to force the update for 0.5.3 to 1.0.0.
0.5.3 will be automatically removed at the next reboot by himself.
Also 1.0.0 will not request to reboot and wil work directly.

Reboot only happen if you want to update an 1.x.x to another 1.x.x

By the way: Why would one want to have two different major versions installed in parallel?

There can be another software than MediaPortal 2 that probably need the 0.5.3 version 😉
Being able to install two different major api give the possibility for two different softwares using two different major api, be able to run on the same system.

@Rondom
Copy link
Contributor

Rondom commented Aug 24, 2016

So to summarise:
You are fine to install 1.x.x when you upgrade from 0.5.3 and possibly leave 0.5.3 installed in case other software relies on it (and maybe tell users to uninstall it manually).
You will only run into the need to reboot once you want to upgrade 1.x.x. to 1.y.y.

Major version upgrades, i.e. 1.x.x to 2.z.z (or 0.5.3 to 1.0.0) require no rebooting. Uninstalling the previous version can be done as well, but maybe dangerous if there are other problems relying on it.
Minor version upgrades require and uninstall, reboot, install cycle.

@HTPCSourcer
Copy link
Author

Well, I just installed 1.0.0.103 (Redist) in parallel to the existing 0.5.3 with the result that MP2 no longer sees remote media information and therefore is not functioning correctly anymore.

@Liryna
Copy link
Member

Liryna commented Aug 24, 2016

Does the mirror.exe in dokan folder 1.0.0 work ?

@HTPCSourcer
Copy link
Author

HTPCSourcer commented Aug 24, 2016

I uninstalled the bundle and rebooted: This restores the MP2 functionalities.

I then reinstalled 1.0.0 (this time 1.0.0.400 bundle): there is no mirror.exe in the Dokan folder...

@Liryna
Copy link
Member

Liryna commented Aug 24, 2016

During the installation there is an option to add install developpement files, mirror is part of it.

does 0.5.3 has a mirror for testing also ? I no longer have the installer of it, do you have a link for it ?

@HTPCSourcer
Copy link
Author

Ticked the "development option" - still no mirror.exe...

@HTPCSourcer
Copy link
Author

Ah, wait a minute: It's under "sample" - not quite the place where you would expect it.

@HTPCSourcer
Copy link
Author

What is mirror.exe supposed to do?

@Liryna
Copy link
Member

Liryna commented Aug 24, 2016

Mirror is sample of how dokan api work
https://github.com/dokan-dev/dokany/wiki/Use%20Mirror%20example

@HTPCSourcer
Copy link
Author

I am getting "Can't assign a drive letter"

@Liryna
Copy link
Member

Liryna commented Aug 24, 2016

what is the output of dokanctl /i d of the dokan 1.0.0 install folder ?

@HTPCSourcer
Copy link
Author

Driver path: 'C:\Windows\system32\drivers\dokan1.sys'
Installing driver...
DokanServiceInstall: Service (Dokan1) is already installed
Driver install failed

@Liryna
Copy link
Member

Liryna commented Aug 24, 2016

Can you provide a link to the 0.5.3 installer, I will also make a test on my side

@HTPCSourcer
Copy link
Author

@Liryna
Copy link
Member

Liryna commented Aug 24, 2016

Dokan 1.0.0 seems to override something of dokan 0.5.3 during driver install that make it fail.
I am looking at it.

@Rondom
Copy link
Contributor

Rondom commented Aug 24, 2016

@HTPCSourcer I created two enhancement requests to track and discuss how the major upgrade ( #322) and minor update (#321) experience could be improved. While I am not a main developer of the Dokan I would say that contributions are welcome ;-)

@Liryna
Copy link
Member

Liryna commented Aug 24, 2016

OK I found the issue in here.
Windows dokan obj global device are named like this:

\Device\Dokan (dokan 0.5.3)
\Device\Dokan1 (dokan 1.0.0)

When dokan mount a first new device a new obj is created:

\Device\Dokan0 (dokan 0.5.3)
\Device\Volume{guid} (dokan 1.0.0)

When dokan mount a second new device a new obj is created:

\Device\Dokan1 (dokan 0.5.3)
\Device\Volume{guid} (dokan 1.0.0)

But if you remember \Device\Dokan1 is already used by dokan 1.0.0 so the mount fail since it already exist.....we should therefore rename \Device\Dokan1 to something else :'(
@marinkobabic I know that you had some argument when I changed dokan device name last time, do you think \Device\Dokan_1 can be used ?

@Liryna
Copy link
Member

Liryna commented Aug 24, 2016

Patch fixing the issue
0001-Rename-dokan-global-device-name.txt

@Liryna
Copy link
Member

Liryna commented Aug 24, 2016

I have added versioning and dokan application documentation to the wiki https://github.com/dokan-dev/dokany/wiki/How-to-package-your-application-with-Dokan

If you see any changes or point that should be more clear <3

@marinkobabic
Copy link
Contributor

@Liryna
Please send me the reference of the code where you have found this behavior. Generally the Global Disk Device exists only once per Driver. So the name is not dependent on the count of devices you have.

@Liryna
Copy link
Member

Liryna commented Aug 24, 2016

@marinkobabic I agree with you but I am talking about dokan 0.5.3 that does behave like that.
I dont have the source of it but I seen the device creation with Winobj.

(we only have 0.6.0 source here)

@Liryna
Copy link
Member

Liryna commented Aug 24, 2016

@marinkobabic Just tested again, this behavior does not happen in dokan 0.6.0
See has probably been changed between 0.5.3 and 0.6.0.

See global devices name with 3 mirror of dokan 0.5.3
(it start at dokan0 but I mounted two mirror before taking the screen)
dokan053

So yes we can say that the fix will only be useful if dokan <= 0.5.3 is installed on the computer.
Should we patch it ? 💭

@marinkobabic
Copy link
Contributor

Then you have no other option except to change the device name.

@HTPCSourcer
Copy link
Author

I don't believe that it would be meaningful to patch 0.5.3.

Keep in mind that it is getting installed by MediaPortal 2 users. The probability that any of them would be using such an old version for other purposes is IMHO close to zero. Also we are planning to port MP2 to DokanY 1.0, hence the issue is coming down to the removal of 0.5.3 as part of the installation procedure.

A patched 0.5.3 would allow the parallel installation but still require some kind of user interaction to install the patched version. Yes, we could include it into our own installer but that requires additional development work, testing, etc. From what I've seen in our Wix package the current installer is testing the filesize of dokan1.sys to decide if 0.5.3 is already installed.

A lot of effort to just to replace a one-time activity to manually uninstall 0.5.3 and then reboot.

@Liryna
Copy link
Member

Liryna commented Aug 25, 2016

@HTPCSourcer It is a patch for dokan 1.0.0, not 0.5.3. The purpose of it, is to fix conflict between dokan 1.0.0 and dokan 0.5.3.
0.5.3 is very old and we dont event have the source of it.

I have apply the patch 08a746a
This will be fixed in the next release.

Thank you @HTPCSourcer for your report !

@Liryna Liryna closed this as completed Aug 25, 2016
@Rondom
Copy link
Contributor

Rondom commented Aug 25, 2016

Does this patch break binary compatibility? If so, how?

@Liryna
Copy link
Member

Liryna commented Aug 25, 2016

Yes, it does 😢 older 1.0.0-RC Library will not be compatible with the futur stable that is going to be released.
We are lucky to have found that before making the stable, otherwise we would have to create a Dokan 2.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants