OSDN Git Service

- Add bulid packages, update install.txt, and re-commit BrowserWindow & TableViewHeah...
authorRandy Baumgarte <randy@fbn.cx>
Thu, 23 Sep 2010 22:33:46 +0000 (18:33 -0400)
committerRandy Baumgarte <randy@fbn.cx>
Thu, 23 Sep 2010 22:33:46 +0000 (18:33 -0400)
13 files changed:
install.sh [new file with mode: 0755]
install.txt
lib/h2-1.2.136.jar [changed mode: 0755->0644]
license.html [new file with mode: 0644]
nevernote.desktop [new file with mode: 0644]
package_scripts/clean.sh [new file with mode: 0755]
package_scripts/deb/amd64/control [new file with mode: 0644]
package_scripts/deb/build.sh [new file with mode: 0755]
package_scripts/deb/i386/control [new file with mode: 0644]
package_scripts/tar/build.sh [new file with mode: 0755]
src/cx/fbn/nevernote/gui/BrowserWindow.java
src/cx/fbn/nevernote/gui/TableViewHeader.java
uninstall.sh [new file with mode: 0755]

diff --git a/install.sh b/install.sh
new file mode 100755 (executable)
index 0000000..c50793e
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+package_dir=$(cd `dirname $0` && pwd)
+
+if [ "$(id -u)" != "0" ]; then
+   echo "This script must be run as root" 1>&2
+   exit 1
+fi
+
+cp $package_dir/usr/share/applications/nevernote.desktop /usr/share/applications/nevernote.desktop
+mkdir /usr/share/nevernote
+cp -r $package_dir/usr/share/nevernote/* /usr/share/nevernote/
+
+echo "Install complete"
index be0fe6b..ba8343c 100644 (file)
@@ -2,121 +2,118 @@ Welcome to NeverNote.
 
 This is a very basic clone of Evernote designed to run on Linux.
 It is written in Java so it will also run on other platforms as well but the primary focus has been to try 
-and get a usable environment for Linux.
+and get a usable environment for Linux (although I use it on Windows with no problems).
 
 See release.txt for details of what works and what doesn't work.
 
 --- Requirement ---
 
-Before trying, please be sure you have Java 1.6 and QT Jambi 4.5 and later versions installed.
+Before trying, please be sure you have Java 1.6 installed.  Depending upon your distribution this may be installed via a package manager or just installing NeverNote may cause Java to be downloaded & installed. This product is tested on Oracle/Sun Java
 
- - Java
-   Java will probably be installed via a package manager. This product is tested on Oracle/Sun Java
-   1.6 and OpenJDK 6.
  
- - QtJambi
-   Jambi is a implementation of Qt GUI library on Java environment.
-   You'll probably need to download QT Jambi from  http://qtjambi.sourceforge.net/
-   or http://qt.qualtech.com/download
-   This product is tested agains qtjambi 4.5.2_01 now.
+=================================
+=================================
+==  LINUX INSTALL INSTRUCTIONS ==
+=================================
+=================================
 
-The only thing you need to do with Jambi is to have the files untarred to a directory. 
-You'll need to edit the install scripts to point to this directory (the instructions are below).  
-People have used this with both 64 & 32 bit versions of Linux as well as OpenJDK & Sun's Java 
-and (so far) have not encountered any problems with these different environments.
+* NOTE:
+Only i386 & amd64 are currently supported.  This is due to the fact that Qt Jambi only has prebuilt i386 & amd64 versions.  If you wish to use this on another platform, then you'll need to build Jambi for yourself.  If you do, please post a message on the user forums & I'll distribute it with later builds.  I don't have access to other platforms or I'd probably do it myself.
 
 
---- To Install --- 
+*********************************************************
+*** Debian or Debian based systems (including Ubuntu) ***
+*********************************************************
+1.) Download the appropriate version (i386 or amd64).
+2.) Issue dpkg -i <package> 
 
-1.) Extract binary distribution package on a directory.
-     If you use Linux/Unix OS,  you may prefer to extract it in ~/NeverNote
-     If you use MS-Windows, you may extract it in D:/NeverNote
 
-    Some archive managers do not untar all subdirectories properly because some of the subdirectories
-    are initially empty.  After untarring, you should see a lib, res, images, db, qss, and logs directories 
-    directly under the nevernote directory.
-    Some of these will be empty until you begin running the program.
+************************
+*** RPM ased systems ***
+************************
+--NOTE: I used Alien to create these, so I'm not too sure how usable they are.
+1.) Download the appropriate version (i386 or amd64).
+2.) Issue rpm -ivf <package> 
 
-2.) Edit nevernote.sh (for Linux) or nevernote.bat (for Windows) in this directory. 
-     At the top of the file there will be 4 variables.
-2-1.) Edit the NEVERNOTE variable to point to the full path of where you installed NeverNote.
-2-2.) Edit the JAMBI_LOCATION variable to point to the full path of where QT Jambi was installed.
-2-3) Edit the JABBI_VERSION variable to indicate the proper QT Jambi version you have installed.
-     I've tested with 4.5 only.  I don't think older versions will work.
-2-4.) Edit the JAMBI_PLATFORM variable to indicate the Linux/Windows platform you are running.  
 
-3.)  Launch nevernote.sh (for Linux) or nevernote.bat (for Windows) to start
 
-4.)  Enjoy!
+************************
+*** Manual install   ***
+************************
+1.) Download the appropriate binary file (i386 or amd64).
+2.) As root, run the installation program.  It should walk you through the rest.
 
 
 
---- Configuration ---
+************************
+*** Manual install   ***
+************************
+1.) Download the appropriate version (i386 or amd64).
+2.) Unzip the files to a local directory.
+3.) As root, issue ./install.sh
 
-There are additional options if you wish to run multiple copies under the same userid. 
-These settings are optional and, depending upon your needs, you probably don't need to touch them. 
 
-Thera are also additional options to tune a performance of Java Virtual Machine. If you do not aware,
-don't touch it. If you use recent multi-core and high performance CPU, its change may improve 
-a performance.
 
-Please see either nevernote.sh or nevernote.bat for details.  
+===========================
+===========================
+==  WINDOWS INSTRUCTIONS ==
+===========================
+===========================
+1.) Download the Windows installer.  It doesn't matter if you are running 64 or 32 bit since the install program has the needed packages for both.
+2.) Run the install.  You shouldn't need administrator access.
 
 
---- Run ---
 
-If you've read this far and have done everything described above then you're done.  You should be
-able to run the nevernote.sh (or nevernote.bat for Windows) script and start things up.
-The initial synchronize will take a while depending upon the amount of data.  
 
-This prgram has the ability to synchronize against production servers as well as sandbox servers 
-or to use multiple accounts under the same Linux/Windows ID.  
-Please see the startup script for details if you wish to run multiple copies under the same Linux or 
-Windows userid.   
+=============================
+=============================
+== MAC OS-X   INSTRUCTIONS ==
+=============================
+=============================
+-- NOTE: I don't have OS-X so I can't verify the stability or usability of this under OS-X
+1.) Download the Mac install version.
+2.) Run the install program.
+3.) Run nevernote.sh from the installation directory.
 
-DO NOT MIX PRODUCTION & SANDBOX DATA IN THE SAME DATABASE OR HAVE
-MULTIPLE USER ACCOUNTS IN THE SAME DATABASE!
 
-Using the same database to store both production & sandbox data or multiple Evernote accounts 
-will cause problems.      If you wish to run multiple copies of NeverNote you must have separate 
-installation directories for each and you MUST edit the startup scripts and give any one 
-after the first a separate name.  By default, it will try to use the sandbox servers.
-If you wish to use production data you can change this under the Edit/Preferences directory option.  
 
-You must change this BEFORE your first synchronization with Evernote. 
 
---- Build from source ---
+=====================
+==  Configuration  ==
+=====================
+There are additional options if you wish to run multiple copies under the same userid and options which impact how Java works.  These settings are optional and, depending upon your needs, you probably don't need to touch them. 
 
-1. Directories and pre-requisite
+To run under multiple IDs, you need to pass a parameter NN_NAME="<name>" to the nevernote.sh shell script where <name> is whatever name you want to identify this instance as.  For example, ./nevernote.sh NN_NAME="test" will create a separate database called "test".  Anything you put in there will be separate from the default NeverNote database, so the username can also be different.
 
-Source package contains several directories.
 
- src/    java soruce files
- lib/    dependent Java libraries 
- qss/    GUI design definitions
- images/ icons and logos
- xml/    a protocol definition in XML
- translations/   localized message catalogs
 
+
+==========================
+== To Build From Source ==
+==========================
 To build from source package, you need several additional  utilities and developers kit.
 
   JDK:
        Java standard developers distribution.  you can download it from http://www.java.com/
        or as Linux  package
 
-  lupdate, lrelease: 
+  lupdate, lrelease (not needed if you use Eclipse & don't want to wory about non-English translations)
        translation helper  ulitilites
        These tools is bundled with qtjambi distribution where bin/ directory of qtjambi 
 
-2. Build on Eclipse Integrated Development Environment
 
-<TBD>
+
+***************************
+** To Build With Eclipse **
+***************************
 
 There are sample project files and classpath definitions
-in the source tree.
+in the source tree, but basically you need to import the source, add all the jar files to your path, & build.  The Jambi jar files you need to run it under eclipse will depend upon the platform (32 or 64 bit) you are using.  
 
 
-3. Build by command line 
+**************************
+* Build by command line  * 
+**************************
 
 To build without Eclipse IDE, you need to prepare 'ant' utility.
  
@@ -139,13 +136,3 @@ To build without Eclipse IDE, you need to prepare 'ant' utility.
     please see translations/README
 
 
---- Caution!!! ----
-
-Please remember this is beta software.  As such, you can expect to encounter problems. 
-Also please note that until I get to version 1.0 I do not guarantee clean upgrades.  
-This means I may ask you to delete everything & start over when upgrading.  This can cause you 
-to lose any unsynchronized data.  I really hope to not need to do this and will try to provide upgrades 
-if possible, but it is a matter of time versus effort.  Since only a few people are using it I don't want to
-put in an enormous amount of time to do clean upgrades.  If this causes a lot of heartache 
-please let me know and I'll try to provide something better.
-       
old mode 100755 (executable)
new mode 100644 (file)
diff --git a/license.html b/license.html
new file mode 100644 (file)
index 0000000..7f360bc
--- /dev/null
@@ -0,0 +1,15 @@
+<html><head></head>
+
+<body>
+NeverNote Version 0.90
+<p>
+NeverNote is licensed under the Gnu Public License (GPL) version 2.
+<p>
+Evernote is Copyright © 2000-2010 Evernote Corporation.All rights reserved.
+<p>
+SQLite database engine is in the public domain.
+<p>
+Qt and Jambi the licensed property of Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
+<p>
+All other trademarks are property of their respective owners.
+</body>
diff --git a/nevernote.desktop b/nevernote.desktop
new file mode 100644 (file)
index 0000000..f0f1ccd
--- /dev/null
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=NeverNote
+Comment=Use with Evernote to remember everything
+GenericName=Evernote-clone
+Exec=/usr/share/nevernote/nevernote.sh
+Icon=/usr/share/nevernote/nevernote.png
+StartupNotify=true
+Terminal=false
+Type=Application
+Categories=Network;
diff --git a/package_scripts/clean.sh b/package_scripts/clean.sh
new file mode 100755 (executable)
index 0000000..16a2d4e
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+
+package_dir=$(cd `dirname $0` && pwd)
+
+destination="$package_dir/nevernote/usr/share/nevernote"
+
+if [ "$(id -u)" != "0" ]; then
+   echo "This script must be run as root" 1>&2
+   exit 1
+fi
+
+rm  $package_dir/tar/*.gz
+rm  $package_dir/deb/*.rpm
+rm  $package_dir/deb/*.deb
diff --git a/package_scripts/deb/amd64/control b/package_scripts/deb/amd64/control
new file mode 100644 (file)
index 0000000..c5bd6a5
--- /dev/null
@@ -0,0 +1,9 @@
+Package: nevernote
+Version: 0.90
+Section: x11 
+Priority: optional
+Architecture: amd64 
+Essential: no
+Depends: java6-runtime | default-jre
+Maintainer: Randy Baumgarte <randy@fbn.cx>
+Description: An open source clone designed to interact with Evernote.
diff --git a/package_scripts/deb/build.sh b/package_scripts/deb/build.sh
new file mode 100755 (executable)
index 0000000..2762d25
--- /dev/null
@@ -0,0 +1,94 @@
+#!/bin/sh
+
+version="0.90"
+arch="i386"
+qtversion="4.5.2_01" 
+
+
+package_dir=$(cd `dirname $0` && pwd)
+
+destination="$package_dir/contents/usr/share/nevernote"
+source_dir="../.."
+qtlibs="../../../bitrock/lib"
+qtarch="32"
+
+if [ "$(id -u)" != "0" ]; then
+   echo "This script must be run as root" 1>&2
+   exit 1
+fi
+
+
+#Do any parameter overrides
+while [ -n "$*" ]
+do
+   eval $1
+   shift
+done
+
+
+if [ "$arch" = "amd64" ]; then
+  qtarch="64"
+fi
+
+
+# Cleanup any old stuff
+
+if [ -e "$package_dir/nevernote-${version}_${arch}.deb" ] 
+then
+   rm $package_dir/nevernote-${version}_${arch}.deb
+fi
+
+if [ -e "$package_dir/nevernote-${version}_${arch}.rpm" ] 
+then
+   rm $package_dir/nevernote-${version}_${arch}.rpm
+fi
+
+############################
+# Copy the things we need  #
+############################
+
+# Create directories
+mkdir $package_dir/contents
+mkdir $package_dir/contents/usr/
+mkdir $package_dir/contents/usr/share
+mkdir $package_dir/contents/usr/share/applications
+mkdir $package_dir/contents/usr/share/nevernote
+
+# Copy startup script & images
+cp $source_dir/nevernote.sh $package_dir/contents/usr/share/nevernote/
+cp $source_dir/*.txt $package_dir/contents/usr/share/nevernote/
+cp $source_dir/*.html $package_dir/contents/usr/share/nevernote/
+cp $source_dir/*.png $package_dir/contents/usr/share/nevernote/
+cp $source_dir/nevernote.desktop $package_dir/contents/usr/share/applications
+
+# Copy subdirectories
+cp -r $source_dir/images $package_dir/contents/usr/share/nevernote/
+cp -r $source_dir/lib $package_dir/contents/usr/share/nevernote/
+cp -r $source_dir/qss $package_dir/contents/usr/share/nevernote/
+cp -r $source_dir/spell $package_dir/contents/usr/share/nevernote/
+cp -r $source_dir/translations $package_dir/contents/usr/share/nevernote/
+cp -r $source_dir/xml $package_dir/contents/usr/share/nevernote/
+
+
+# Copy QT libraries.
+cp $qtlibs/qtjambi-linux$qtarch-$qtversion.jar $package_dir/contents/usr/share/nevernote/lib/
+cp $qtlibs/qtjambi-linux$qtarch-gcc-$qtversion.jar $package_dir/contents/usr/share/nevernote/lib/
+
+# Copy NeverNote itself
+cp $qtlibs/../nevernote.jar $package_dir/contents/usr/share/nevernote/
+
+# Reset user permissions
+chown -R root:root $package_dir/contents/
+
+
+# Copy control file for the package
+mkdir $package_dir/contents/DEBIAN
+cp $package_dir/$arch/control ./contents/DEBIAN/
+
+
+dpkg -b $package_dir/contents $package_dir/nevernote-${version}_${arch}.deb
+alien -r $package_dir/nevernote-${version}_${arch}.deb
+
+# Cleanup
+rm -rf $package_dir/contents
+
diff --git a/package_scripts/deb/i386/control b/package_scripts/deb/i386/control
new file mode 100644 (file)
index 0000000..0770259
--- /dev/null
@@ -0,0 +1,9 @@
+Package: nevernote
+Version: 0.90
+Section: x11 
+Priority: optional
+Architecture: i386
+Essential: no
+Depends: java6-runtime | default-jre
+Maintainer: Randy Baumgarte <randy@fbn.cx>
+Description: An open source clone designed to interact with Evernote.
diff --git a/package_scripts/tar/build.sh b/package_scripts/tar/build.sh
new file mode 100755 (executable)
index 0000000..21af12d
--- /dev/null
@@ -0,0 +1,83 @@
+#!/bin/sh
+
+version="0.90"
+arch="i386"
+qtversion="4.5.2_01" 
+
+
+package_dir=$(cd `dirname $0` && pwd)
+
+destination="$package_dir/nevernote/usr/share/nevernote"
+source_dir="../.."
+qtlibs="../../../bitrock/lib"
+qtarch="32"
+
+if [ "$(id -u)" != "0" ]; then
+   echo "This script must be run as root" 1>&2
+   exit 1
+fi
+
+#Do any parameter overrides
+while [ -n "$*" ]
+do
+   eval $1
+   shift
+done
+
+if [ "$arch" = "amd64" ]; then
+  qtarch="64"
+fi
+
+
+# Cleanup any old stuff
+
+if [ -e "$package_dir/nevernote-${version}_${arch}.tar.gz" ] 
+then
+   rm $package_dir/nevernote-${version}_${arch}.tar.gz
+fi
+
+############################
+# Copy the things we need  #
+############################
+
+# Create directories
+mkdir $package_dir/nevernote
+mkdir $package_dir/nevernote/usr/
+mkdir $package_dir/nevernote/usr/share
+mkdir $package_dir/nevernote/usr/share/applications
+mkdir $package_dir/nevernote/usr/share/nevernote
+
+# Copy startup script & images
+cp $source_dir/install.sh $package_dir/nevernote/
+cp $source_dir/*.sh $package_dir/nevernote/usr/share/nevernote/
+cp $source_dir/*.txt $package_dir/nevernote/usr/share/nevernote/
+cp $source_dir/*.html $package_dir/nevernote/usr/share/nevernote/
+cp $source_dir/*.png $package_dir/nevernote/usr/share/nevernote/
+cp $source_dir/nevernote.desktop $package_dir/nevernote/usr/share/applications
+
+# Copy subdirectories
+cp -r $source_dir/images $package_dir/nevernote/usr/share/nevernote/
+cp -r $source_dir/lib $package_dir/nevernote/usr/share/nevernote/
+cp -r $source_dir/qss $package_dir/nevernote/usr/share/nevernote/
+cp -r $source_dir/spell $package_dir/nevernote/usr/share/nevernote/
+cp -r $source_dir/translations $package_dir/nevernote/usr/share/nevernote/
+cp -r $source_dir/xml $package_dir/nevernote/usr/share/nevernote/
+
+
+# Copy QT libraries.
+cp $qtlibs/qtjambi-linux$qtarch-$qtversion.jar $package_dir/nevernote/usr/share/nevernote/lib/
+cp $qtlibs/qtjambi-linux$qtarch-gcc-$qtversion.jar $package_dir/nevernote/usr/share/nevernote/lib/
+
+# Copy NeverNote itself
+cp $qtlibs/../nevernote.jar $package_dir/nevernote/usr/share/nevernote/
+
+# Reset user permissions
+chown -R root:root $package_dir/nevernote/
+
+cd $package_dir
+tar -czf $package_dir/nevernote-${version}_${arch}.tar.gz ./nevernote
+cd -
+
+# Cleanup
+rm -rf $package_dir/nevernote
+
index b3d8495..8ac0cc5 100644 (file)
@@ -200,20 +200,11 @@ public class BrowserWindow extends QWidget {
        public EditorButtonBar buttonLayout;\r
        public final QComboBox fontList;\r
        public final QAction    fontListAction;\r
-<<<<<<< HEAD
        public final QToolButton fontColor;\r
        public final QAction    fontColorAction;\r
        private final ColorMenu fontColorMenu;\r
        public final QToolButton fontHilight;\r
        public final QAction    fontHilightAction;\r
-=======
-       public final QPushButton fontColor;\r
-       public final QAction    fontColorAction;\r
-       private final ColorMenu fontColorMenu;\r
-       public final QPushButton fontHilight;\r
-       public final QAction    fontHilightAction;\r
-//     public final ColorComboBox fontHilight;\r
->>>>>>> 14a0afe3faba057afbddf62aa8ed25139750d68b
        private final ColorMenu fontHilightColorMenu;\r
        public final QFileSystemWatcher fileWatcher;\r
        public int cursorPosition;\r
@@ -493,11 +484,7 @@ public class BrowserWindow extends QWidget {
                }\r
 \r
 //             buttonLayout.addWidget(newSeparator(), 0);\r
-<<<<<<< HEAD
                fontColor = newToolButton("fontColor", tr("Font Color"));\r
-=======
-               fontColor = newEditorButton("fontColor", tr("Font Color"));\r
->>>>>>> 14a0afe3faba057afbddf62aa8ed25139750d68b
                fontColorMenu = new ColorMenu(this);\r
                fontColor.setMenu(fontColorMenu.getMenu());\r
                fontColor.setPopupMode(ToolButtonPopupMode.MenuButtonPopup);\r
@@ -505,22 +492,15 @@ public class BrowserWindow extends QWidget {
                fontColorMenu.getMenu().triggered.connect(this, "fontColorClicked()");\r
                fontColorAction = buttonLayout.addWidget(fontColor);\r
                buttonLayout.toggleFontColorVisible.triggered.connect(this, "toggleFontColorVisible(Boolean)");\r
-<<<<<<< HEAD
                fontHilight = newToolButton("fontHilight", tr("Font Hilight Color"));\r
                fontHilight.setPopupMode(ToolButtonPopupMode.MenuButtonPopup);\r
                fontHilight.setAutoRaise(false);\r
-=======
-               fontHilight = newEditorButton("fontHilight", tr("Font Hilight Color"));\r
->>>>>>> 14a0afe3faba057afbddf62aa8ed25139750d68b
                fontHilightColorMenu = new ColorMenu(this);\r
                fontHilightColorMenu.setDefault(QColor.yellow);\r
                fontHilight.setMenu(fontHilightColorMenu.getMenu());\r
                fontHilightColorMenu.getMenu().triggered.connect(this, "fontHilightClicked()");\r
                fontHilightAction = buttonLayout.addWidget(fontHilight);\r
-<<<<<<< HEAD
                fontHilightColorMenu.setDefault(QColor.yellow);\r
-=======
->>>>>>> 14a0afe3faba057afbddf62aa8ed25139750d68b
                buttonLayout.toggleFontHilight.triggered.connect(this, "toggleFontHilightVisible(Boolean)");\r
 \r
 //             buttonLayout.addWidget(new QLabel(), 1);\r
@@ -2646,7 +2626,6 @@ public class BrowserWindow extends QWidget {
        }\r
 \r
 \r
-<<<<<<< HEAD
        // Invoke spell checker dialog\r
        private void doSpellCheck() {\r
 \r
@@ -2709,8 +2688,5 @@ public class BrowserWindow extends QWidget {
                }\r
 \r
     }\r
-=======
-\r
->>>>>>> 14a0afe3faba057afbddf62aa8ed25139750d68b
 \r
 }\r
index 2ccf8cf..0e48a85 100644 (file)
@@ -24,12 +24,9 @@ public class TableViewHeader extends QHeaderView {
        public TableViewHeader(Orientation orientation, QWidget parent) {\r
                super(orientation, parent);\r
                \r
-<<<<<<< HEAD
                setSortIndicatorShown(true);\r
                setClickable(true);\r
                \r
-=======
->>>>>>> 14a0afe3faba057afbddf62aa8ed25139750d68b
                contextMenu = new QMenu();\r
 \r
                createdDateAction = new QAction(this);\r
diff --git a/uninstall.sh b/uninstall.sh
new file mode 100755 (executable)
index 0000000..550b113
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+
+package_dir=$(cd `dirname $0` && pwd)
+
+if [ "$(id -u)" != "0" ]; then
+   echo "This script must be run as root" 1>&2
+   exit 1
+fi
+
+rm /usr/share/applications/nevernote.desktop
+rm -rf /usr/share/nevernote
+
+echo "Uninstall completed"