viciousviper / DokanCloudFS

A virtual filesystem for various publicly accessible Cloud storage services on the Microsoft Windows platform.
MIT License
312 stars 54 forks source link

Compiling #11

Closed DarylOliver closed 8 years ago

DarylOliver commented 8 years ago

Hello there having difficulty actually compiling I downloaded cloud fs ran its solution in visual studio express 2015 got an error about an exe then I copied everything from gateway tests in clouds to liberties in dokancloudfs and built the solution looked in dokancloudfs mounter directory and no gateway directory is in there.

What am I doing wrong? Any help provided would be amazing since this program would be very useful.

viciousviper commented 8 years ago

Hi DarylOliver,

thanks for your feedback - I'm certainly interested to learn of any problems in building my solutions.

0, Please be aware that you will need to retrieve and apply your own app registration keys for any cloud services if you choose to self-compile the CloudFS assemblies instead of using the precompiled NuGet package.

  1. You should definitely be able to compile the CloudFS solution in VS 2015 Express. Could you please report the exact "error about an exe" that you're getting?
  2. Once you compile CloudFS you'll then be able to copy all contents of the CloudFS\CloudFS.GatewayTests\bin\Release\Gateways directory into DokanCloudFS\Library. You should have 38 files in the Gateways directory at this point, most notably all the IgorSoft.CloudFS.Gateways.*.dll assemblies. If this is not the case please check if all NuGet dependencies were retrieved correctly - Newtonsoft.Json.dll is a prominent example.
  3. You'll then want to configure the App.config in DokanFS.Mounter according to your desired cloud service setups
  4. Compile the DokanCloudFS solution, and you're good to go - at least this is what I'm hoping for.

Please note: The bottommost bullet point in the "Local compilation" paragraph ("Check that the Gateways directory in the build output of DokanCloudFS.Mounter contains all desired gateway assemblies and their dependencies (e.g. Newtonsoft.JSON.dll)") is a leftover from an earlier version of DokanCloudFS and is in fact obsolete. While the build step will still copy assemblies from ./Libraries to ./DokanCloudFS/bin/Debug/Gateways, the actual position used for gateway composition via MEF is now determind by the libPath= attribute on the <mount>-tag in the config file. Sorry for this oversight. However, you can still use the presence of a Gateways subdir to check if your compilation went well. Did you use a build configuration other than "Debug/AnyCPU" by chance?

DarylOliver commented 8 years ago

yes I did and I will redownload and recompile I would ask that u update the instructions including the paths you have said thank you I will include images if I get the error again

DarylOliver commented 8 years ago

also thank you for the quick reply I will inform you if I compile successfully

DarylOliver commented 8 years ago

cloudfs error

https://drive.google.com/file/d/0B5EnIT0g6tRLSEZxNWQ5c3VzbE0/view?usp=sharing yeha thats the error I got when compiling cloud fs using settings release anycpu.

DarylOliver commented 8 years ago

also there is no gateways folder in CloudFS\CloudFS.GatewayTests\bin\Release\

viciousviper commented 8 years ago

Right, so the error you're seeing is due to the fact that the CloudFS solution does not contain an executable, but only produces class library .dlls. Could you instead build the solution by right-clicking on the node "Solution 'CloudFS' (13 projects)" in the solution explorer and choosing Build solution or Rebuild solution.

viciousviper commented 8 years ago

If you examine the project build order you'll see that CloudFS.Authentication is the first project being built. If you try (unsuccessfully) to run this class library .dll the overall build process will stop right at this point, which is why you don't see build results in CloudFS.GatewayTests.

DarylOliver commented 8 years ago

successfully built under debug option but erroring under release but i don't believe that will matter now I'll build dokancloudfs and copy the gateway files if u want the errors to help others i have a google doc with them in

DarylOliver commented 8 years ago

all succeeded also I want to use my gdrive does the user format require google email I assume also thank you for the assistance

viciousviper commented 8 years ago

Yeah, just use the debug dlls, won't make much of a difference. Concerning GDrive: You can use whatever user name you like in DokanCloudFS.Mounter.exe.config - the sample name "GDriveUser" works perfectly for me. This name is only used for DokanCloudFS's internal bookkeeping and will be displayed as part of the mounted volume name in Windows Explorer. Once you startup DokanCloudFS.Mounter with a configured GDrive drive you'll be greeted with a browser window asking you to login with your GDrive account. This is where you create the actual link to your GDrive account.

DarylOliver commented 8 years ago

thank you but when i click or cd into the release directory and run the mounter exe I get a window about the box and since I don't have a username for them and only wanna use my one drive and g drive it a tad annoying

viciousviper commented 8 years ago

You'll want to edit DokanCloudFS.Mounter.exe.config - or the App.config file in DokanCloudFS.Mounter before you build the solution - and comment out or delete all drives except OneDrive and/or GDrive.

Your result should look like

<mount libPath="......\Library" threads="5"> <drives> <drive schema="gdrive" userName="GDriveUser" root="S:" encryptionKey="MyGDriveSecret&I" timeout="300" /> <drive schema="onedrive" userName="OneDriveUser" root="W:" encryptionKey="MyOneDriveSecret&I" timeout="300" /> </drives> </mount>

assuming you want to have both of OneDrive (mounted as W:\) and GDrive (mounted as S:\).

DarylOliver commented 8 years ago

it crashed this what i done

<?xml version="1.0" encoding="utf-8"?>

"" "" "" "" "" "" ""

do i need hashtags instead coz i know commenting like that in some config files on ubuntu systems works anyway should i use hash tags (also currently using windows 7 just to avoid confusion)

DarylOliver commented 8 years ago

image

heres what i did the app config file is the same

viciousviper commented 8 years ago

Please read up on how to comment out xml content. Hint: There is one line in the screenshot you provided that is correctly commented out. Otherwise just delete the lines with gateways you don't want to use.

DarylOliver commented 8 years ago

succeed in compiling it although it now gives a 401 error after opening a google page

  1. That’s an error.

Error: invalid_client

The OAuth client was not found.

Request Details access_type=offline scope=https://www.googleapis.com/auth/drive response_type=code redirect_uri=http://localhost:2948/authorize/ client_id= That’s all we know.

viciousviper commented 8 years ago

What version of the GDrive-CloudFS-gateway are you using - NuGet or locally built? If locally built - did you specify a ClientID and ClientSecret in https://github.com/viciousviper/CloudFS/blob/master/CloudFS.Gateways.GDrive/Secrets.cs#L31 and https://github.com/viciousviper/CloudFS/blob/master/CloudFS.Gateways.GDrive/Secrets.cs#L33?

DarylOliver commented 8 years ago

Locally built clouds don't know where client would be is it in g drive in cloudfs

viciousviper commented 8 years ago

Please rephrase your comment. As much as I understand you did not retrieve an API key for Google Drive - you will need to refer to https://github.com/viciousviper/CloudFS/blob/master/README.md#local-compilation.

DarylOliver commented 8 years ago

I don't have a key as far as I am aware does local compiling of cloud fs or dokan cloudfs give access to any keys itself?

I have download a client id from the drive api on the google developer console site it is a json file what would I do with this?

viciousviper commented 8 years ago

The NuGet Packages come with preinstalled API keys. As for the json file - maybe it contains fields named client_id and client_secret? Or otherwise look for two fields named likewise in the developer console.

DarylOliver commented 8 years ago

yeah the json file does I got two one called secret one called client id also I get this error Each package is licensed to you by its owner. NuGet is not responsible for, nor does it grant any licenses to, third-party packages. Some packages may include dependencies which are governed by additional licenses. Follow the package source (feed) URL to determine any dependencies.

Package Manager Console Host Version 3.4.0.798

Type 'get-help NuGet' to see all available NuGet commands.

PM> Install-Package CloudFS-Signed -Pre Install-Package : The current environment doesn't have a solution open.At line:1 char:1

PM> get-help NuGet Do you want to run Update-Help? The Update-Help cmdlet downloads the most current Help files for Windows PowerShell modules, and installs them on your computer. For more information about the Update-Help cmdlet, see http://go.microsoft.com/fwlink/?LinkId=210614. [Y] Yes [N] No [S] Suspend [?] Help (default is "Y"):Y TOPIC about_NuGet

SHORT DESCRIPTION Provides information about NuGet Package Manager commands.

LONG DESCRIPTION This topic describes the NuGet Package Manager commands. NuGet is an integrated package management tool for adding libraries and tools to .NET projects.

The following NuGet cmdlets are included.

    Cmdlet                  Description
    ------------------      ----------------------------------------------
    Find-Package            Get the set of packages available from the package source, 
                            based on the package Id/keyword. This is a new command that
                            will replace Get-Package -ListAvailable.

    Get-Package             Gets the set of installed packages. With -Updates switch, 
                            gets the set of package updates available from the package source.

    Install-Package         Installs a package and its dependencies into the project.

    Uninstall-Package       Uninstalls a package. If other packages depend on this package, 
                            the command will fail unless the –Force option is specified.

    Update-Package          Updates a package and its dependencies to a newer version.

    Sync-Package            Get the version of installed package from specified/default project
                            and sync the version to the rest of projects in the solution.

    Add-BindingRedirect     Examines all assemblies within the output path for a project
                            and adds binding redirects to the application (or web) 
                            configuration file where necessary.

    Get-Project             Returns a reference to the DTE (Development Tools Environment) 
                            for the specified project. If none is specifed, returns the 
                            default project selected in the Package Manager Console.

    Open-PackagePage        Open the browser pointing to ProjectUrl, LicenseUrl or 
                            ReportAbuseUrl of the specified package.

    Register-TabExpansion   Registers a tab expansion for the parameters of a command.

SEE ALSO Online documentation: http://go.microsoft.com/fwlink/?LinkID=206619 Find-Package Get-Package Install-Package Uninstall-Package Update-Package Sync-Package Add-BindingRedirect Get-Project Open-PackagePage Register-TabExpansion PM> Install-Package CloudFS-Signed -Pre Install-Package : The current environment doesn't have a solution open.At line:1 char:1

PM> Install-Package CloudFS-Signed -Pre Attempting to gather dependency information for package 'CloudFS-Signed.1.0.5-alpha' with respect to project 'CloudFS.Authentication', targeting '.NETFramework,Version=v4.6.1' Attempting to resolve dependencies for package 'CloudFS-Signed.1.0.5-alpha' with DependencyBehavior 'Lowest' Install-Package : Unable to find a version of 'Newtonsoft.Json' that is compatible with 'Box.V2 2.7.0 constraint: Newtonsoft.Json (>= 6.0.2)', 'CloudFS-Signed 1.0.5-alpha constraint: Newtonsoft.Json (>= 8.0.3)', 'Google.Apis.Core 1.13.0 constraint: Newtonsoft.Json (>= 7.0.1)', 'MegaApiClient 1.2.2 constraint: Newtonsoft.Json (>= 6.0.8)'.At line:1 char:1

PM>

viciousviper commented 8 years ago

Oops, you're right - something broke after 1.0.2-alpha. I'll put up a fixed version tonight.

DarylOliver commented 8 years ago

ok thank you hopefully I'll be able to use the newget client id and secret key

viciousviper commented 8 years ago

Version 1.0.6-alpha is up. This one should not cause problems with faulty package references.

DarylOliver commented 8 years ago

I have the authenitcation from the nuget version of cloudfs where do i put them in dokancloudfs

DarylOliver commented 8 years ago

or doesn't it matter?

viciousviper commented 8 years ago

It doesn't matter. Just use the NuGet assemblies of CloudFS. BTW did you read any of the documentation accompanying CloudFS and DokanCloudFS? If so I'd be grateful for comments because it appears to be unexpectedly difficult to get DokanCloudFS up and running.

DarylOliver commented 8 years ago

I did read there documentation also I have the nuget packages in cloudfs but don't know where to put the Gdrive folder in dokanvloudfs since of I run the Nugent package manager on dokcloudfs and install cloud fs with the install command it simply crashes the mounter program

DarylOliver commented 8 years ago

hi yeah the instructions seem to be lacking somewhat i installed cloud fs in dokancloudfs with this command Install-Package CloudFS -Pre but still get the same authentication 401 error with gdrive

DarylOliver commented 8 years ago

which is odd due to the cloudfs readme which says the keys should be preinstalled and ready to use

viciousviper commented 8 years ago

Continued in #15 - closed here

DarylOliver commented 8 years ago

yeah it understandable It did work for most part however i edited the the config to the point where only google was in and it didn't mount but one drive did so am pleased about that also one package was skipped at the end of the build process in visual studio so will delete folder and recompile from the zip folder also hopefully me and others who use the software can be of assistance in pointing out issues because I really would like to see this project be in beta or further also I was unaware it was an alpha.

If I encounter more issues I will point them out and thank you for creating this project

viciousviper commented 8 years ago

Thanks for your comment - I'll try my best to make things easier for you and others.

Speaking of easier: You would make it easier for me to understand your messages if you used any kind of interpunctuation or linebreaks especially if you are writing five lines in a row like in your previous posting it has taken me about three minutes to figure out what you where getting at because i kept reading over line ends and had to backtrack several times i think you get the idea.

DarylOliver commented 8 years ago

ah yeah sorry usually i do short paragrahps not to mention theres a lot of irony in what you just said since I recently did an english gcse.

so yeah it odd for me to do massive blocks of text. also slight side not when I try to compile a release signed or otherwise of the dokancloudfs develop it gives a load of warnings in visula studio.

also the debug builds skip 1 package don't know which though

viciousviper commented 8 years ago

The debug builds of DokanCloudFS are meant to skip 1 or 2 packages - you can't have signed and unsigned libraries imported at the same time. Look at the build config settings and you'll see what's going on there.