fioan89 / sourcesync

A powerful plugin for performing one-way file synchronization for Intellij Idea and Pycharm projects
Other
89 stars 36 forks source link

Windows support #1

Closed BourneLoser closed 10 years ago

BourneLoser commented 10 years ago

Am I the first to use this on Windows?

PatternSyntaxException Illegal/unsupported escape sequence near index 3 C:\Users\bourneloser\Documents\ws\cgss1 ^: Illegal/unsupported escape sequence near index 3 C:\Users\bourneloser\Documents\ws\cgss1 ^

fioan89 commented 10 years ago

Seems like you are! This was only tested on Linux! I'll do my best to get a working copy of windows and test it there!

fioan89 commented 10 years ago

@BourneLoser can you please check again with the latest commits. I've refactored a few things around and also did some tests (but only with sftp)? Thanks!

BourneLoser commented 10 years ago

Thanks! I'm excited to try this out. I downloaded the 1.1 sourcesync-master.zip file. Am I supposed to compile the classes into the jar? Sorry, I'm new to IntelliJ.

fioan89 commented 10 years ago

Ahhmm, I think downloading the source and then loading them as an Intellij Plugin will work (although, you have to go to Project Structure->Sdk, create a new Sdk that points to the Intellij install path, and then in modules select the newly created sdk instead of jdk.)

BourneLoser commented 10 years ago

Okay so here's what I understood. You said, "go to Project Structure->Sdk, create a new Sdk that points to the Intellij install path" (basically the "Configuring IntelliJ IDEA SDK" section of http://confluence.jetbrains.com/display/IDEADEV/Getting+Started+with+Plugin+Development#GettingStartedwithPluginDevelopment-anchor2). Which I did, so no problems up to that point.

Then you said, "in modules select the newly created sdk instead of jdk" which I felt was a little light on details. I had no other option but to think you meant:

  • Create New Project > Empty Project
    • Give name. Let's say "plugin-dev"
    • Cancel the resulting Project Structure popup
  • Unzip sourcesync-master.zip downloaded from github to the new plugin-dev directory
  • File > Import Module
    • Point it to the newly unzipped "sourcesync" folder under the plugin-dev directory
    • Import Module dialog
    • Create module from existing sources, Next, Next, Next, Reuse sourcesync.iml, Finish
  • File > Project Structure > Project Settings: Modules > Dependencies tab
    • Module SDK: IDEA-IC
  • Build > Make Module sourcesync
  • Build > Prepare Plugin Module sourcesync For Deployment
  • Hack for installation
    • Copy the plugin-dev/sourcesync directory to somewhere and modify the following
    • Move the newly built sourcesync.jar to the lib directory
    • Delete everything but the lib directory and its contents
    • Zip the sourcesync directory
    • sourcesync.zip
      • sourcesync/
      • lib/
        • *.jar
  • Install
    • File > Settings > IDE Settings > Plugins > Install plugin from disk
    • Point it to the new zipped sourcesync.zip file

There was probably a much easier & quicker way and that was what you meant but I didn't want to keep bothering you with noob questions. Besides that, I'm 100% positive the procedure I outlined above isn't the correct way to accomplish it but it worked.

The first several attempts at it I spent an embarrassing amount of time trying to overcome the following error: PluginException: class with name "org.wavescale.sourcesync.action.ActionLocalFileToRemote" not found I was horrified when discovered it was because I named the lib directory "libs" not "lib" :( This page eventually brought me to the realization: http://confluence.jetbrains.com/display/IDEADEV/IntelliJ+IDEA+Plugin+Structure

Also, super minor, but I got the following error: Sync warning: com.jcraft.jsch.JSchException: java.net.UnknownHostException: scp://192.168.1.5 The error cleared up when I specified just the "192.168.1.5" in the host field in the SourceSyncConfig window.

But after that everything worked as expected. I'm happy to get it working, sad it required so much effort. This early adopter never learns his lesson :confused: Anyways, thanks for adding Windows support!

fioan89 commented 10 years ago

Thanks for the feedback. I'm sorry for the painful experience, the zip will be soon uploaded to the jetbrains repository. Until then, I need to fix a few more issues.

About the install problem: it would have bean easily to unzip the archive somewhere and then just go to Intellij->File->Open and point to the unzip directory. It would automatically create a project from the source. Next step would be to configure the sdk. And I think that would have been all (just push run/debug and a intellij instance with the plugin installed should've start).

BourneLoser commented 10 years ago

Good to know. Thanks