Skip to content

Commit

Permalink
Fix #44: Synchronisation between TeXlipse editor and viewer
Browse files Browse the repository at this point in the history
* Change bundle shape so that texlipse.jar is exposed
* Update Windows DLLs to use new o.e.texlipse namespace
* Include Windows DLLs in source code (shoud not change)
* Describe build procedure for Windows DLLs

Task-Url: #44
  • Loading branch information
turesheim committed Nov 1, 2017
1 parent 83defb0 commit 945f69d
Show file tree
Hide file tree
Showing 13 changed files with 52 additions and 34 deletions.
14 changes: 0 additions & 14 deletions EclipseTexlipse.setup
Original file line number Diff line number Diff line change
Expand Up @@ -178,20 +178,6 @@
targetURL="${git.clone.texlipse.location|uri}/org.eclipse.texlipse/jazzy-core.jar">
<description>Import dependency</description>
</setupTask>
<setupTask
xsi:type="setup:ResourceCopyTask"
excludedTriggers="BOOTSTRAP"
sourceURL="https://resheim.net/texlipse/ddeclient-x86_64.dll"
targetURL="${git.clone.texlipse.location|uri}/org.eclipse.texlipse/ddeclient-x86_64.dll">
<description>Import prebuilt binary</description>
</setupTask>
<setupTask
xsi:type="setup:ResourceCopyTask"
excludedTriggers="BOOTSTRAP"
sourceURL="https://resheim.net/texlipse/ddeclient-x86.dll"
targetURL="${git.clone.texlipse.location|uri}/org.eclipse.texlipse/ddeclient-x86.dll">
<description>Import prebuilt binary</description>
</setupTask>
</setupTask>
<setupTask
xsi:type="setup:CompoundTask"
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.texlipse-site/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<relativePath>../pom.xml</relativePath>
<artifactId>org.eclipse.texlipse-parent</artifactId>
<groupId>org.eclipse.texlipse</groupId>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.1-SNAPSHOT</version>
</parent>

<artifactId>org.eclipse.texlipse-site</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.texlipse.main/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<feature
id="org.eclipse.texlipse.main"
label="%featureName"
version="2.0.0.qualifier"
version="2.0.1.qualifier"
provider-name="%providerName"
plugin="org.eclipse.texlipse"
license-feature="org.eclipse.license"
Expand Down
4 changes: 2 additions & 2 deletions org.eclipse.texlipse.main/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
<artifactId>org.eclipse.texlipse-parent</artifactId>
<relativePath>../pom.xml</relativePath>
<groupId>org.eclipse.texlipse</groupId>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.1-SNAPSHOT</version>
</parent>

<artifactId>org.eclipse.texlipse.main</artifactId>
<name>Eclipse TeXlipse Main Feature</name>
<packaging>eclipse-feature</packaging>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.1-SNAPSHOT</version>

</project>
2 changes: 0 additions & 2 deletions org.eclipse.texlipse/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
/ddeclient-x86.dll
/ddeclient-x86_64.dll
/jazzy-core.jar
/texlipse.jar
4 changes: 3 additions & 1 deletion org.eclipse.texlipse/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ Bundle-ManifestVersion: 2
Bundle-Vendor: Eclipse Science
Bundle-Name: Eclipse TeXlipse
Bundle-SymbolicName: org.eclipse.texlipse;singleton:=true
Bundle-Version: 2.0.0.qualifier
Bundle-Version: 2.0.1.qualifier
Bundle-Activator: org.eclipse.texlipse.TexlipsePlugin
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
Bundle-NativeCode: ddeclient-x86_64.dll osname=win32;processor=x86,ddeclient-x86.dll;osname=win32;processor=x86_64,*
Eclipse-BundleShape: dir
Bundle-ClassPath: texlipse.jar,
jazzy-core.jar
Bundle-ActivationPolicy: lazy
Expand Down
33 changes: 33 additions & 0 deletions org.eclipse.texlipse/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# Building the Windows binaries

The Windows DDE client is used to synchronize the editor within Eclipse and
the preview opened in an external viewer.

The Windows binaries _ddeclient-x86_64.dll_ and _ddeclient-x86.dll_ can be
built on a Windows 10 host using the Linux subsystem and MinGW. Note that
Java 8 must be installed on Windows.

See https://msdn.microsoft.com/en-us/commandline/wsl/install-win10 for details
on how to install the Linux subsystem for Windows.

Then execute the following sequence to install MinGW

sudo apt-get install mingw-w64

Follow up by cloning this repository

git clone https://github.com/eclipse/texlipse.git

Now the 32-bit and 64-bit clients can be built. Make sure that each of
these lines are combined into one as they cannot be copy-pasted into the
Windows Bash shell. The path to the JDK may also have to be adjusted.

i686-w64-mingw32-gcc -shared -o./texlipse/org.eclipse.texlipse/ddeclient-x86.dll \
-I"/mnt/c/Program Files/Java/jdk1.8.0_151/include/" \
-I"/mnt/c/Program Files/Java/jdk1.8.0_151/include/win32/" \
./texlipse/org.eclipse.texlipse/cppsource/ddeclient.cpp

x86_64-w64-mingw32-gcc -shared -o./texlipse/org.eclipse.texlipse/ddeclient-x86_64.dll \
-I"/mnt/c/Program Files/Java/jdk1.8.0_151/include/" \
-I"/mnt/c/Program Files/Java/jdk1.8.0_151/include/win32/" \
./texlipse/org.eclipse.texlipse/cppsource/ddeclient.cpp
Binary file added org.eclipse.texlipse/ddeclient-x86.dll
Binary file not shown.
Binary file added org.eclipse.texlipse/ddeclient-x86_64.dll
Binary file not shown.
5 changes: 0 additions & 5 deletions org.eclipse.texlipse/download-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,3 @@
# to download it from somewhere. See https://github.com/reckart/jazzy for the
# source code.
curl -O https://resheim.net/texlipse/jazzy-core.jar

# These binaries needs to be built by a Windows machine. The source code can
# be found in the "cppsource" folder.
curl -O https://resheim.net/texlipse/ddeclient-x86_64.dll
curl -O https://resheim.net/texlipse/ddeclient-x86.dll
4 changes: 2 additions & 2 deletions org.eclipse.texlipse/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@
<relativePath>../pom.xml</relativePath>
<artifactId>org.eclipse.texlipse-parent</artifactId>
<groupId>org.eclipse.texlipse</groupId>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.1-SNAPSHOT</version>
</parent>

<artifactId>org.eclipse.texlipse</artifactId>
<name>Eclipse TeXlipse Main Plugin</name>
<packaging>eclipse-plugin</packaging>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.1-SNAPSHOT</version>

<build>
<plugins>
Expand Down
12 changes: 8 additions & 4 deletions org.eclipse.texlipse/source/org/eclipse/texlipse/DDEClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@

package org.eclipse.texlipse;

import org.eclipse.core.runtime.Platform;

/**
* Small wrapper for Win32 DDE execute commands
*
Expand All @@ -23,10 +25,12 @@ public static native int execute(String server, String topic,
String command);

static {
if (System.getProperty("os.arch").contains("64")) {
System.loadLibrary("ddeclient-x86_64");
} else {
System.loadLibrary("ddeclient-x86");
if (Platform.getOS().equals(Platform.OS_WIN32)) {
if (Platform.getOSArch().equals(Platform.ARCH_X86_64)) {
System.loadLibrary("ddeclient-x86_64");
} else {
System.loadLibrary("ddeclient-x86");
}
}
}

Expand Down
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<artifactId>org.eclipse.texlipse-parent</artifactId>
<groupId>org.eclipse.texlipse</groupId>
<packaging>pom</packaging>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.1-SNAPSHOT</version>

<properties>
<tycho.version>1.0.0</tycho.version>
Expand Down Expand Up @@ -59,7 +59,7 @@
<artifact>
<groupId>org.eclipse.texlipse</groupId>
<artifactId>org.eclipse.texlipse-parent</artifactId>
<version>2.0.0-SNAPSHOT</version>
<version>2.0.1-SNAPSHOT</version>
<classifier>default</classifier>
</artifact>
</target>
Expand Down

0 comments on commit 945f69d

Please sign in to comment.