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

ov50 - Data Download is broken for Windows. #65

Closed
rgleason opened this issue Apr 6, 2019 · 18 comments
Closed

ov50 - Data Download is broken for Windows. #65

rgleason opened this issue Apr 6, 2019 · 18 comments

Comments

@rgleason
Copy link
Contributor

rgleason commented Apr 6, 2019

See this previous Issue #52

Currently we are including the binary data files in the plugin for Windows. Slow internet and intermittant internet connections do not work and Sean has trouble maintaining the github account this way.

Therefore we need to get the Windows Binary Data Download of 6mb working properly.
This has been an ongoing issue.

@nohal
Copy link
Contributor

nohal commented Apr 6, 2019

The data is now added as a git submodule and all you need is to git submodule update --init and create the installer.

@rgleason
Copy link
Contributor Author

rgleason commented Apr 6, 2019

Thanks Pavel and Sean. Sorry, I see Sean has been working 4 hours ago.
Is this the right order?

  • git checkout master
  • git merge upstream master
  • git submodule update --init
  • then
  • cd build
  • cmake -T v141_xp ..
  • cmake --build . --config release
  • cpack

I can close this now if this is correct, I think.
With Sean's changes to libzip 'static" module will the Windows automatic downloads work now or should I always include the submodule for windows? - Maybe I should just try it?
IE: I should change the apppeveyor file accordingly.

@seandepagnier
Copy link
Owner

seandepagnier commented Apr 6, 2019 via email

@rgleason
Copy link
Contributor Author

rgleason commented Apr 6, 2019

Sean, I tried your recent appveyor build and renamed the data directory data.old1 in plugin\climatology\ in program files (x86) folder.

It works beautifully now without including the 6mb of data! You've fixed the lib using 'static' I guess.
Bravo.

What do you think about how I should package the windows plugin?
Should I include the data or not now that the download is fixed?

Thanks so much Pavel and Sean!

@nohal
Copy link
Contributor

nohal commented Apr 6, 2019

You should include the data so that the user can take everything to the boat where there is no internet connection available.

@seandepagnier
Copy link
Owner

seandepagnier commented Apr 7, 2019 via email

@rgleason
Copy link
Contributor Author

rgleason commented Apr 7, 2019

I will include the data in the plugin.

Just out of curiosity, how hard would it be to support https in the OCPN_Download?

Should this be added to feature requests for OpenCPN, since it might help Android?

@rgleason
Copy link
Contributor Author

rgleason commented Apr 7, 2019

I found that the command "git submodule update --init can be run from the prompt.

C:\Users\Frederick\Documents\GitHub\climatology_pi>git checkout master
Switched to branch 'master'
Your branch is up to date with 'upstream/master'.

C:\Users\Frederick\Documents\GitHub\climatology_pi>git submodule update --init
Submodule 'data' (https://github.com/seandepagnier/climatology_pi_data) registered for path 'data'
Cloning into 'C:/Users/Frederick/Documents/GitHub/climatology_pi/data'...
Submodule path 'data': checked out 'b2f26b6935712665eefd1652e4a70384a645b526'

I'll try it in the appveyor.yml but not sure if it will work.

@rgleason
Copy link
Contributor Author

rgleason commented Apr 7, 2019

I don't believe git commands will work in appveyor the way I have it set up.
Result:

git submodule update --init
fatal: not a git repository (or any of the parent directories): .git

I think this command can be run just once from the command line to download the files into a new git repository and that is all that is needed or required.

@rgleason
Copy link
Contributor Author

rgleason commented Apr 7, 2019

Now trying to checkout a different branch 'ov50' and I get these errors after being told these files will be lost. I think the .svg files should be in a separate directory really, that is not part of the submodule otherwise they will always get in the way this way.

C:\Users\Frederick\Documents\GitHub\climatology_pi>git add data/climatology_pi.svg
fatal: Pathspec 'data/climatology_pi.svg' is in submodule 'data'

C:\Users\Frederick\Documents\GitHub\climatology_pi>git add data/climatology_pi.svg
fatal: Pathspec 'data/climatology_pi.svg' is in submodule 'data'

C:\Users\Frederick\Documents\GitHub\climatology_pi>git add data\climatology.svg
fatal: Pathspec 'data\climatology.svg' is in submodule 'data'

@rgleason
Copy link
Contributor Author

rgleason commented Apr 7, 2019

Alternatively the 3 svg files should be included in the submodule. How do I get them included?
Somehow they were not added to the submodule initially and now they are untracked.

@rgleason
Copy link
Contributor Author

rgleason commented Apr 7, 2019

Also after
git submodule update --init

C:\Users\Frederick\Documents\GitHub\climatology_pi>git status
On branch master
Your branch is up to date with 'upstream/master'.
nothing to commit, working tree clean

So none of the data files show up as being needed to be added.
plus the .svg files can't be added either as they are not a part of the submodule.

I need some suggestions here about what should be done.

@seandepagnier
Copy link
Owner

seandepagnier commented Apr 7, 2019 via email

@seandepagnier
Copy link
Owner

seandepagnier commented Apr 7, 2019 via email

@rgleason
Copy link
Contributor Author

rgleason commented Apr 7, 2019

Don't believe I was in the wrong directory.. please explain further.

If you have submodule error above, it is because you are in the wrong directory most likely.

After Pavel's PR for #67 and your Merge It is working nicely. uninstalled climatology checked data and it was gone, reinstalled using the appveyor version.

Why is --recursive needed in appveyor when it is not needed in a command prompt window?`

git submodule update --initialize --recursive `

BTW I still get this problem! See below.


C:\Users\Frederick\Documents\GitHub\climatology_pi>git pull upstream master
remote: Enumerating objects: 4, done.
remote: Counting objects: 100% (4/4), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 4 (delta 1), reused 2 (delta 1), pack-reused 0
Unpacking objects: 100% (4/4), done.
From https://github.com/seandepagnier/climatology_pi
 * branch            master     -> FETCH_HEAD
   077a46a..5c8e992  master     -> upstream/master
Updating 077a46a..5c8e992
Fast-forward
 appveyor.yml | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
C:\Users\Frederick\Documents\GitHub\climatology_pi>git push origin master
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 4 threads
Compressing objects: 100% (4/4), done.
Writing objects: 100% (4/4), 993 bytes | 198.00 KiB/s, done.
Total 4 (delta 2), reused 0 (delta 0)
remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
To https://github.com/rgleason/climatology_pi.git
   077a46a..5c8e992  master -> master

C:\Users\Frederick\Documents\GitHub\climatology_pi>git checkout ov50
error: The following untracked working tree files would be overwritten by checkout:
        data/climatology_pi.svg
        data/climatology_pi_rollover.svg
        data/climatology_pi_toggled.svg
Please move or remove them before you switch branches.
Aborting

C:\Users\Frederick\Documents\GitHub\climatology_pi>

@rgleason
Copy link
Contributor Author

rgleason commented Apr 8, 2019

With addition of this command to appveyor

git submodule update --initialize --recursive
is there any need for my fork to have the submodule data stored in the "data" directory?

(Note that I have not created a git hub repository "climatology _pi_data" as Sean has done.)

@seandepagnier
Copy link
Owner

seandepagnier commented Apr 8, 2019 via email

@rgleason
Copy link
Contributor Author

rgleason commented Apr 8, 2019

Thanks Sean.

This issue was closed.
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

3 participants