Skip to content

Commit

Permalink
Better handle multi-file arguments on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
bwiernik committed Dec 13, 2019
1 parent 28b413e commit 4972856
Show file tree
Hide file tree
Showing 9 changed files with 20 additions and 45 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
builds
builds
github.token
6 changes: 1 addition & 5 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
#!/bin/bash

"C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools\MSBuild\Current\Bin\Roslyn\csc.exe" /target:winexe /out:./chrome/content/Bridge.exe "./chrome/content/Bridge.cs"
zip -r builds/zoteroquicklook.zoteroplugin chrome defaults install.rdf chrome.manifest -x .*
mv install.rdf install-base.rdf
mv install-altwindows.rdf install.rdf
zip -r builds/zoteroquicklook-altwindows.zoteroplugin chrome defaults install.rdf chrome.manifest -x .*
mv install.rdf install-altwindows.rdf
mv install-base.rdf install.rdf
4 changes: 2 additions & 2 deletions chrome/content/Bridge.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ internal static class Program
{
private static void Main(string[] args)
{
if (args.Length != 1)
if (args.Length == 0)
{
MessageBox.Show("Usage: Bridge.exe \"<path of a file/folder>\"");
return;
Expand Down Expand Up @@ -42,7 +42,7 @@ private static void SendMessage(string pipeMessage, string path = null)
}
catch (Exception e)
{
MessageBox.Show("QuickLook not found. Please install QuickLook (http://pooi.moe/QuickLook/) or specify a custom view command instead.");
MessageBox.Show("QuickLook cannot be reached. Please run/install QuickLook (http://pooi.moe/QuickLook/) or specify a custom view command instead.");
}
}
}
Expand Down
Binary file modified chrome/content/Bridge.exe
Binary file not shown.
10 changes: 8 additions & 2 deletions chrome/content/zoteroquicklook.js
Original file line number Diff line number Diff line change
Expand Up @@ -453,10 +453,16 @@ Checks the attachment file or writes a content of a note to a file and then push

// A boolean indicating if we have notes this far.
var notesFound=false;

var filesFound=false;

//Combine all filenames into an array
if (!Zotero.isWin || this.customviewcommand !== "") {

} else {

}

// Combine all filenames into an array
// Note that for default Windows behavior, only the first time will be displayed

for (item in items){

Expand Down
28 changes: 0 additions & 28 deletions install-altwindows.rdf

This file was deleted.

2 changes: 1 addition & 1 deletion install.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<em:id>zoteroquicklook@gmail.com</em:id>
<em:type>2</em:type> <!-- type=extension -->
<em:name>ZoteroQuickLook</em:name>
<em:version>1.4.1</em:version>
<em:version>1.4.2</em:version>
<em:creator>Mikko Ronkko</em:creator>
<em:contributor>Brenton M. Wiernik</em:contributor>
<em:description>Quick Look Utility for Zotero.</em:description>
Expand Down
6 changes: 3 additions & 3 deletions update-altwindows.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
<rdf:Seq>
<rdf:li>
<rdf:Description>
<em:version>1.4.1</em:version>
<em:version>1.4.2</em:version>
<em:targetApplication>
<rdf:Description>
<em:id>zotero@chnm.gmu.edu</em:id>
<em:minVersion>4.0</em:minVersion>
<em:maxVersion>5.*</em:maxVersion>
<em:updateLink>https://github.com/mronkko/ZoteroQuickLook/releases/download/1.4.1/zoteroquicklook-altwindows.zoteroplugin</em:updateLink>
<em:updateLink>https://github.com/mronkko/ZoteroQuickLook/releases/download/1.4.2/zoteroquicklook.zoteroplugin</em:updateLink>
</rdf:Description>
</em:targetApplication>
<em:targetApplication>
<rdf:Description>
<em:id>juris-m@juris-m.github.io</em:id>
<em:minVersion>4.0</em:minVersion>
<em:maxVersion>5.*</em:maxVersion>
<em:updateLink>https://github.com/mronkko/ZoteroQuickLook/releases/download/1.4.1/zoteroquicklook-altwindows.zoteroplugin</em:updateLink>
<em:updateLink>https://github.com/mronkko/ZoteroQuickLook/releases/download/1.4.2/zoteroquicklook.zoteroplugin</em:updateLink>
</rdf:Description>
</em:targetApplication>
</rdf:Description>
Expand Down
6 changes: 3 additions & 3 deletions update.rdf
Original file line number Diff line number Diff line change
Expand Up @@ -5,21 +5,21 @@
<rdf:Seq>
<rdf:li>
<rdf:Description>
<em:version>1.4.1</em:version>
<em:version>1.4.2</em:version>
<em:targetApplication>
<rdf:Description>
<em:id>zotero@chnm.gmu.edu</em:id>
<em:minVersion>4.0</em:minVersion>
<em:maxVersion>5.*</em:maxVersion>
<em:updateLink>https://github.com/mronkko/ZoteroQuickLook/releases/download/1.4.1/zoteroquicklook.zoteroplugin</em:updateLink>
<em:updateLink>https://github.com/mronkko/ZoteroQuickLook/releases/download/1.4.2/zoteroquicklook.zoteroplugin</em:updateLink>
</rdf:Description>
</em:targetApplication>
<em:targetApplication>
<rdf:Description>
<em:id>juris-m@juris-m.github.io</em:id>
<em:minVersion>4.0</em:minVersion>
<em:maxVersion>5.*</em:maxVersion>
<em:updateLink>https://github.com/mronkko/ZoteroQuickLook/releases/download/1.4.1/zoteroquicklook.zoteroplugin</em:updateLink>
<em:updateLink>https://github.com/mronkko/ZoteroQuickLook/releases/download/1.4.2/zoteroquicklook.zoteroplugin</em:updateLink>
</rdf:Description>
</em:targetApplication>
</rdf:Description>
Expand Down

0 comments on commit 4972856

Please sign in to comment.