guide-me / GuideMe

an interactive story viewer
MIT License
4 stars 8 forks source link

Linux support x86_64 (patch attached) #44

Open ghost opened 6 years ago

ghost commented 6 years ago

Hi I recently came across this project and noticed that the maven file only had provisioned support for Linux.i386. See the attached patch to make it work on more recent 64-bit versions.

Tested Ubuntu 16.04, Java version "1.8.0_171"

One minor issue that maybe unrelated to this is that the default volume will have to be adjusted prior any usage. It appeared to be set at 400, whilst the range for Pulse seems to be 0-200, with 100 being without extra amplification.

After applying the patch use the maven Linux.x86_64 profile. I still had failing tests, but -DskipTests gave me a build that appeared to be working reasonably well.

linux_x86_64.patch

diff --git a/defaultCSS.TXT b/defaultCSS.TXT
deleted file mode 100644
index a68e667..0000000
--- a/defaultCSS.TXT
+++ /dev/null
@@ -1,21 +0,0 @@
-body { 
-   color: white; 
-   background-color: black; 
-   font-family: Tahoma; 
-   font-size:MintHtmlFontSizepx;
-   overflow-y: auto; 
-   } 
-html, body, #wrapper { 
-   height:100%; 
-   width: 100%; 
-   margin: 0; 
-   padding: 0; 
-   border: 0; 
-   } 
-#wrapper td { 
-   vertical-align: middle; 
-   text-align: center; 
-   }
-html {
-   overflow: auto;
-     }
diff --git a/defaultCSS.txt b/defaultCSS.txt
new file mode 100644
index 0000000..a68e667
--- /dev/null
+++ b/defaultCSS.txt
@@ -0,0 +1,21 @@
+body { 
+   color: white; 
+   background-color: black; 
+   font-family: Tahoma; 
+   font-size:MintHtmlFontSizepx;
+   overflow-y: auto; 
+   } 
+html, body, #wrapper { 
+   height:100%; 
+   width: 100%; 
+   margin: 0; 
+   padding: 0; 
+   border: 0; 
+   } 
+#wrapper td { 
+   vertical-align: middle; 
+   text-align: center; 
+   }
+html {
+   overflow: auto;
+     }
diff --git a/pom.xml b/pom.xml
index a39802e..d10d63a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -114,6 +114,18 @@
            </properties>
        </profile>
        <profile>
+           <id>Linux.x86_64</id>
+           <activation>
+               <os>
+                   <family>Linux</family>
+                   <arch>x86_64</arch>
+               </os>
+           </activation>
+           <properties>
+               <swt.artifactId>org.eclipse.swt.gtk.linux.x86_64</swt.artifactId>
+           </properties>
+       </profile>
+       <profile>
            <id>mac.x86_64</id>
            <activation>
                <os>
@@ -188,8 +200,8 @@
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
-                   <source>1.7</source>
-                   <target>1.7</target>
+                   <source>1.8</source>
+                   <target>1.8</target>
                </configuration>
            </plugin>
            <plugin>
diff --git a/start_linux.sh b/start_linux.sh
new file mode 100755
index 0000000..3b38c2d
--- /dev/null
+++ b/start_linux.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+BASEDIR=`dirname $0`
+exec java  \
+   -cp target/guideme-0.0.1-SNAPSHOT.jar:$(echo target/lib/*.jar | tr ' ' ':') \
+    org.guideme.guideme.App
philormand commented 6 years ago

Thank you. Have added the pom.xml change. Volume should be set to 100 (the distributed version has that) The latest version is in the Philo branch