Commit [ae6db1] Maximize Restore History

- Great rewrite of build.xml with many additions like automated building of various distribution files

- moved build-support to core
- made the standard plugins use build-support

Björn Kautler Björn Kautler 2006-07-03

<< < 1 .. 3 4 5 (Page 5 of 5)
added package-files/linux/slackware/doinst.sh
added package-files/linux/slackware/jEdit.desktop
added package-files/linux/slackware/slack-required
added package-files/linux/jedit
added package-files/windows/jedit.bat
added package-files/windows/launchstub.exe
changed .cvsignore
changed README.SRC.txt
changed build.properties
changed build.xml
copied jEdit_IE.reg.txt -> package-files/linux/slackware/slack-desc
copied jedit.1 -> package-files/linux/jedit.1
copied jedit.cmd -> package-files/os2/jedit.cmd
copied jedit.spec -> package-files/linux/rpm/jedit.spec
copied win32installer.iss -> package-files/windows/win32installer.iss
package-files/linux/slackware/doinst.sh Diff Switch to side-by-side view
Loading...
package-files/linux/slackware/jEdit.desktop Diff Switch to side-by-side view
Loading...
package-files/linux/slackware/slack-required Diff Switch to side-by-side view
Loading...
package-files/linux/jedit Diff Switch to side-by-side view
Loading...
package-files/windows/jedit.bat Diff Switch to side-by-side view
Loading...
package-files/windows/launchstub.exe Diff Switch to side-by-side view
Loading...
.cvsignore Diff Switch to side-by-side view
Loading...
README.SRC.txt Diff Switch to side-by-side view
Loading...
build.properties Diff Switch to side-by-side view
Loading...
build.xml Diff Switch to side-by-side view
Loading...
jEdit_IE.reg.txt to package-files/linux/slackware/slack-desc
--- a/jEdit_IE.reg.txt
+++ b/package-files/linux/slackware/slack-desc
@@ -1,32 +1,19 @@
-REGEDIT4
+# HOW TO EDIT THIS FILE:
+# The "handy ruler" below makes it easier to edit a package description. Line
+# up the first '|' above the ':' following the base package name, and the '|'
+# on the right side marks the last column you can put a character in. You must
+# make exactly 11 lines for the formatting to be correct. It's also
+# customary to leave one space after the ':'.
 
-; This is an example of a Windows registry information file containing
-; registry entries for adding jEdit to the list of applications that
-; is displayed by Internet Explorer for editing the contents of a web page.
-; To use this file, rename the file to jEdit_IE.reg, modify the
-; path to jEdit.exe as indicated below, double-click the entry representing
-; the file in an Explorer window and respond to the prompts accordingly.
-;
-; Internet Explorer version 5.0 or greater is required, as well as
-; as jEdit 4.0 and jEditLauncher 4.0.4 or greater.
-;
-; Direct comments or questions about this file to John Gellene (jgellene@jedit.org).
-;
-
-[HKEY_CLASSES_ROOT\.htm\OpenWithList\jEdit ]
-
-[HKEY_CLASSES_ROOT\.htm\OpenWithList\jEdit \shell]
-
-[HKEY_CLASSES_ROOT\.htm\OpenWithList\jEdit \shell\edit]
-
-; Substitute your path to jEdit.exe for the dummy path shown here.
-
-[HKEY_CLASSES_ROOT\.htm\OpenWithList\jEdit \shell\edit\command]
-@="C:\\Path\\to\\jEdit.exe /1 %1"
-
-; The next entry makes jEdit the helper application for the "View Source"
-; command in Internet Explorer.  The preceding entries are required for
-; this entry to be effective.
-
-[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\View Source Editor\Editor Name]
-@="jEdit"
+      |-----handy-ruler------------------------------------------------------|
+jEdit: jEdit @jedit.version@ (Programmer's Text Editor)
+jEdit: 
+jEdit: jEdit is a mature and well-designed programmer's text editor that
+jEdit: has been in development for over 7 years. While jEdit beats many
+jEdit: expensive development tools for features and ease of use, it is
+jEdit: released as free software with full source code, provided under
+jEdit: the terms of the GNU General Public License.
+jEdit: 
+jEdit: For more information please visit the jEdit website at:
+jEdit:   http://www.jEdit.org 
+jEdit: 
jedit.1 to package-files/linux/jedit.1
--- a/jedit.1
+++ b/package-files/linux/jedit.1
@@ -1,8 +1,8 @@
-.TH JEDIT 1 "April 23, 2003"
+.TH JEDIT 1 "June 14, 2006" jEdit "jEdit - Programmer's Text Editor"
 
 .SH NAME
-.B jedit
-\- Programmer's text editor written in Java
+.B jEdit
+\- Programmer's Text Editor written in Java
 
 .SH SYNOPSIS
 .B "jedit "
@@ -16,17 +16,17 @@
 
 This manual page briefly documents \fBjEdit\fP's command-line parameters.
 Complete documentation can be found by invoking the Help->jEdit Help
-menu item within \fBjEdit\fP.
+menu item within \fBjEdit\fP or by invoking jedit -usage.
 
 \fBjEdit\fP  is a cross-platform text editor written in Java. It
 has an extensive feature set that includes syntax highlighting, auto indent,
 folding, word wrap, abbreviation expansion, multiple clipboards, powerful search
-and replace, and much more.
+and replace and much more.
 
 Furthermore, \fBjEdit\fP is extremely customizable, and extensible, using either macros
 written in the BeanShell scripting language, or plugins written in Java.
 
-\fBjEdit\fP requires Java 2 version 1.3.
+\fBjEdit\fP requires Java 2 version 1.4.
 
 \fBjEdit\fP is released under the GNU General Public License, which can be found in
 the online help.
@@ -145,28 +145,7 @@
 .SH FILES
 
 .TP
-/usr/local/share/jedit/4.2/
-\fBjEdit\fP program files.
-
-.TP
-/usr/local/share/jedit/4.2/doc/
-\fBjEdit\fP online help, which can be viewed from within \fBjEdit\fP using the
-Help->jEdit Help command.
-
-.TP
-/usr/local/share/jedit/4.2/jedit.jar
-The \fBjEdit\fP program.
-
-.TP
-/usr/local/bin/jedit
-Shell script for starting \fBjEdit\fP.
-
-.TP
-/usr/local/man/man1/jedit.1
-This manual page.
-
-.TP
-$HOME/.jedit
+~/.jedit
 Each user who runs \fBjEdit\fP has a settings directory. Its content is documented
 in the "Customizing jEdit" section of the online help.
 
@@ -174,15 +153,10 @@
 .BR java (1)
 
 .SH VERSION
-\fBjEdit\fP 4.2
+\fBjEdit\fP @jedit.version@
 
 .SH BUGS
-See http://www.jedit.org/index.php?page=feedback for bug reporting information.
+See http://www.jEdit.org/index.php?page=feedback for bug reporting information.
 
 .SH WEB
-http://www.jedit.org/
-
-.SH AUTHOR
-This page was written by Krzysztof Krzyzaniak (eloy) <eloy@debian.org> for
-Debian project, with further modifications and additions for \fBjEdit\fP 4.2 by
-Slava Pestov <slava@jedit.org>.
+http://www.jEdit.org/
jedit.cmd to package-files/os2/jedit.cmd
--- a/jedit.cmd
+++ b/package-files/os2/jedit.cmd
@@ -1,73 +1,73 @@
-/* MAINTAINERS: Robert Henschel (os2info@gmx.net)
- *              Christoph vogt (ch.vogt@gmx.net)
- *              Gili Tzabari (junk@bbs.darktech.org)
- * PLATFORM: OS/2, eCS
- * 
- * Used to run JEdit 3.1
- */
-
-
-rc = QueryJavaVersion()
-if (rc = -1) then
-do
-  say "java.exe cannot be found"
-  return -1;
-end
-if (rc = -2) then
-  say "Unexpected response to JAVA -VERSION. Assuming newest version is being used."
-
-arguments = "-settings=%HOME%\.jedit -server=%HOME%\.jedit\server"
-jedit_dir = GetExecPath()
-
-if (iMajor = 1 & iMid <= 1) then
-    'java -classpath %classpath%;'jedit_dir'\jedit.jar org.gjt.sp.jedit.jEdit 'arguments
-  else
-    'java -jar 'jedit_dir'\jedit.jar 'arguments
-
-return 0
-
-
-
-
-
- /*
-  * Java version detector.
-  * Assumes java -version return quoted ("") version number.
-  * Written by os2bird on #netlabs
-  *
-  * Returns -1 on no java or failed to execute
-  *         -2 on invalid java version string.
-  *         version number.
-  */
-QueryJavaVersion: procedure expose iMajor iMid iMinor
-cQueued =  queued();
-'@echo off'
-'java -version 2>&1 | rxqueue /LIFO'
-i = queued();
-do while i > cQueued
-    pull sStr
-    if (pos("JAVA VERSION ", sStr) > 0) | (pos("JAVA.EXE VERSION ", sStr) > 0) then
-    do
-        do while(queued() > 0) 
-          pull sStrIngore; /* flush input stream */
-        end
-        parse var sStr sStuff '"'iMajor'.'iMid'.'iMinor'"'
-        if (iMinor <> '') then
-            return iMajor*100 + iMid * 10 + iMinor;
-         else
-             return -2
-     end
-     i = i - 1;
- end
- return -1;
-
-
-/*
- * Returns the path of the script being executed.
- */
-GetExecPath: procedure
-parse source result
-parse var result 'OS/2 ' dummy result                        /* Get full path of script */
-result=filespec("drive", result) || filespec("path", result) /* strip away filename */
-result=substr(result, 1, length(result)-1)                   /* remove backslash */
+/* MAINTAINERS: Robert Henschel (os2info@gmx.net)
+ *              Christoph vogt (ch.vogt@gmx.net)
+ *              Gili Tzabari (junk@bbs.darktech.org)
+ * PLATFORM: OS/2, eCS
+ * 
+ * Used to run JEdit 3.1
+ */
+
+
+rc = QueryJavaVersion()
+if (rc = -1) then
+do
+  say "java.exe cannot be found"
+  return -1;
+end
+if (rc = -2) then
+  say "Unexpected response to JAVA -VERSION. Assuming newest version is being used."
+
+arguments = "-settings=%HOME%\.jedit -server=%HOME%\.jedit\server"
+jedit_dir = GetExecPath()
+
+if (iMajor = 1 & iMid <= 1) then
+    'java -classpath %classpath%;'jedit_dir'\jedit.jar org.gjt.sp.jedit.jEdit 'arguments
+  else
+    'java -jar 'jedit_dir'\jedit.jar 'arguments
+
+return 0
+
+
+
+
+
+ /*
+  * Java version detector.
+  * Assumes java -version return quoted ("") version number.
+  * Written by os2bird on #netlabs
+  *
+  * Returns -1 on no java or failed to execute
+  *         -2 on invalid java version string.
+  *         version number.
+  */
+QueryJavaVersion: procedure expose iMajor iMid iMinor
+cQueued =  queued();
+'@echo off'
+'java -version 2>&1 | rxqueue /LIFO'
+i = queued();
+do while i > cQueued
+    pull sStr
+    if (pos("JAVA VERSION ", sStr) > 0) | (pos("JAVA.EXE VERSION ", sStr) > 0) then
+    do
+        do while(queued() > 0) 
+          pull sStrIngore; /* flush input stream */
+        end
+        parse var sStr sStuff '"'iMajor'.'iMid'.'iMinor'"'
+        if (iMinor <> '') then
+            return iMajor*100 + iMid * 10 + iMinor;
+         else
+             return -2
+     end
+     i = i - 1;
+ end
+ return -1;
+
+
+/*
+ * Returns the path of the script being executed.
+ */
+GetExecPath: procedure
+parse source result
+parse var result 'OS/2 ' dummy result                        /* Get full path of script */
+result=filespec("drive", result) || filespec("path", result) /* strip away filename */
+result=substr(result, 1, length(result)-1)                   /* remove backslash */
 return result
jedit.spec to package-files/linux/rpm/jedit.spec
--- a/jedit.spec
+++ b/package-files/linux/rpm/jedit.spec
@@ -20,7 +20,7 @@
 Group: Applications/Editors
 Source0: http://prdownloads.sourceforge.net/jedit/jedit41pre9source.tar.gz
 Source1: jedit.sh.in
-URL: http://www.jedit.org
+URL: http://www.jEdit.org
 Vendor: Slava Pestov <slava@jedit.org>
 Packager: Slava Pestov <slava@jedit.org>
 BuildArch: noarch
win32installer.iss to package-files/windows/win32installer.iss
--- a/win32installer.iss
+++ b/package-files/windows/win32installer.iss
@@ -1,214 +1,291 @@
 ; Inno Setup installer script for jEdit
-; Ollie Rutherfurd <oliver@jedit.org>
+; Björn "Vampire" Kautler <Vampire@jEdit.org>
 ;
-; $Id$
-;
-; For each release:
-;
-; * change JEDIT_HOME to location of jEdit files, if 
-;   not building from source directory.
-; * change AppVerName
-;
-; TODO: create htmlhelp file?
-; TODO: read version number from source
-; TODO: figure out how to generate "jedit.bat" in source dir
-
-#define JEDIT_HOME "." ; Where files for installer are located.
 
 [Setup]
 AppName=jEdit
-AppVerName=jEdit 4.2pre15
-AppVersion=4.2
-AppPublisher=Slava Pestov
-AppPublisherURL=http://www.jedit.org/
-AppSupportURL=http://www.jedit.org/
-AppUpdatesURL=http://www.jedit.org/
+AppVerName=jEdit @jedit.version@
+AppPublisher=Slava Pestov and others
+AppPublisherURL=http://www.jEdit.org
+AppSupportURL=http://www.jEdit.org
+AppUpdatesURL=http://www.jEdit.org
 DefaultDirName={pf}\jEdit
-DefaultGroupName=jEdit 4.2
-AllowNoIcons=yes
+DefaultGroupName=jEdit
+AllowNoIcons=true
+LicenseFile=@dist.dir@\doc\COPYING.txt
+OutputDir=@dist.dir@
+OutputBaseFilename=@win.filename@
+SetupIconFile=@base.dir@\icons\jedit.ico
 Compression=lzma
-SolidCompression=yes
-; using orange icon from: http://www.jedit.org/index.php?page=images
-SetupIconFile={#JEDIT_HOME}\jedit.ico
-LicenseFile={#JEDIT_HOME}\doc\COPYING.txt
-UninstallIconFile={#JEDIT_HOME}\jedit.ico
-ChangesAssociations=yes
+SolidCompression=true
+SourceDir=@dist.dir@
+VersionInfoVersion=@jedit.build.number@
+VersionInfoCompany=Slava Pestov and others
+VersionInfoDescription=Programmer's Text Editor
+VersionInfoTextVersion=@jedit.version@
+VersionInfoCopyright=Copyright Š 1998-@current.year@ Slava Pestov
+ShowLanguageDialog=yes
+AppCopyright=Copyright Š 1998-@current.year@ Slava Pestov
+ChangesAssociations=true
+TimeStampsInUTC=true
+FlatComponentsList=false
+ShowTasksTreeLines=true
+WindowShowCaption=false
+WindowResizable=false
+WindowVisible=true
+AppVersion=@jedit.version@
+AppID={{10B7DCF9-FD90-4063-82B7-91C174D47338}
+UninstallDisplayName=jEdit @jedit.version@
+AppContact=devel@jEdit.org
+AppReadmeFile={app}\doc\README.txt
+UninstallDisplayIcon={app}\jedit.ico
+ChangesEnvironment=true
+PrivilegesRequired=admin
+WizardImageFile=@base.dir@\icons\WindowsInstallerImage.bmp
+WizardSmallImageFile=@base.dir@\icons\WindowsInstallerSmallImage.bmp
+
+[Languages]
+Name: english; MessagesFile: compiler:Default.isl
+Name: brazilianportuguese; MessagesFile: compiler:Languages\BrazilianPortuguese.isl
+Name: catalan; MessagesFile: compiler:Languages\Catalan.isl
+Name: czech; MessagesFile: compiler:Languages\Czech.isl
+Name: danish; MessagesFile: compiler:Languages\Danish.isl
+Name: dutch; MessagesFile: compiler:Languages\Dutch.isl
+Name: finnish; MessagesFile: compiler:Languages\Finnish.isl
+Name: french; MessagesFile: compiler:Languages\French.isl
+Name: german; MessagesFile: compiler:Languages\German.isl
+Name: hungarian; MessagesFile: compiler:Languages\Hungarian.isl
+Name: italian; MessagesFile: compiler:Languages\Italian.isl
+Name: norwegian; MessagesFile: compiler:Languages\Norwegian.isl
+Name: polish; MessagesFile: compiler:Languages\Polish.isl
+Name: portuguese; MessagesFile: compiler:Languages\Portuguese.isl
+Name: russian; MessagesFile: compiler:Languages\Russian.isl
+Name: slovak; MessagesFile: compiler:Languages\Slovak.isl
+Name: slovenian; MessagesFile: compiler:Languages\Slovenian.isl
+
+[Tasks]
+Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}
+Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}
+Name: autostartserver; Description: Start jEdit Server automatically on system startup; GroupDescription: Autostart:; Languages: slovenian slovak russian portuguese polish norwegian italian hungarian french finnish dutch danish czech catalan brazilianportuguese english
+Name: autostartserver; Description: jEdit Server automatisch beim Hochfahren starten; GroupDescription: Autostart:; Languages: german
+
+[Files]
+Source: @jar.filename@; DestDir: {app}; Flags: ignoreversion sortfilesbyextension; Components: main
+Source: doc\*; DestDir: {app}\doc; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Excludes: api\*,README.txt; Components: main
+Source: doc\api\*; DestDir: {app}\doc\api; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: apidoc
+Source: jars\LatestVersion.jar; DestDir: {app}\jars; Flags: ignoreversion sortfilesbyextension; Components: main
+Source: jars\QuickNotepad.jar; DestDir: {app}\jars; Flags: ignoreversion sortfilesbyextension; Components: main
+Source: macros\*; DestDir: {app}\macros; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: macros
+Source: modes\*; DestDir: {app}\modes; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: main
+Source: properties\*; DestDir: {app}\properties; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: main
+Source: startup\*; DestDir: {app}\startup; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension; Components: main
+Source: @base.dir@\icons\jedit.ico; DestDir: {app}; Flags: ignoreversion sortfilesbyextension; Components: main
+Source: doc\README.txt; DestDir: {app}\doc; Flags: isreadme ignoreversion sortfilesbyextension; Components: main
+Source: classes\package-files\windows\jedit.bat; DestDir: {app}; Flags: ignoreversion sortfilesbyextension; AfterInstall: UpdateBatchfile; Components: batchfile
+Source: classes\package-files\windows\launchstub.exe; DestDir: {app}; Flags: ignoreversion sortfilesbyextension; Components: batchfile
+
+[INI]
+Filename: {app}\jEdit.url; Section: InternetShortcut; Key: URL; String: http://www.jEdit.org
+
+[Icons]
+Name: {group}\jEdit; Filename: {code:javaPath}; WorkingDir: {app}; IconFilename: {app}\jedit.ico; Comment: jEdit - Programmer's Text Editor; HotKey: ctrl+alt+j; IconIndex: 0; Parameters: "-jar ""{app}\@jar.filename@"" -reuseview"
+Name: {group}\{cm:ProgramOnTheWeb,jEdit}; Filename: {app}\jEdit.url; Comment: jEdit Website
+Name: {group}\Start jEdit Server; Filename: {code:javaPath}; Parameters: "-jar ""{app}\@jar.filename@"" -background -nogui"; WorkingDir: {app}; IconFilename: {app}\jedit.ico; Comment: Start jEdit Server; IconIndex: 0; Languages: slovenian slovak russian portuguese polish norwegian italian hungarian french finnish dutch danish czech catalan brazilianportuguese english
+Name: {group}\Quit jEdit Server; Filename: {code:javaPath}; Parameters: "-jar ""{app}\@jar.filename@"" -quit"; WorkingDir: {app}; IconFilename: {app}\jedit.ico; Comment: Quit jEdit Server; IconIndex: 0; Languages: slovenian slovak russian portuguese polish norwegian italian hungarian french finnish dutch danish czech catalan brazilianportuguese english
+Name: {group}\jEdit Server Starten; Filename: {code:javaPath}; Parameters: "-jar ""{app}\@jar.filename@"" -background -nogui"; WorkingDir: {app}; IconFilename: {app}\jedit.ico; Comment: jEdit Server Starten; IconIndex: 0; Languages: german
+Name: {group}\jEdit Server Beenden; Filename: {code:javaPath}; Parameters: "-jar ""{app}\@jar.filename@"" -quit"; WorkingDir: {app}; IconFilename: {app}\jedit.ico; Comment: jEdit Server Beenden; IconIndex: 0; Languages: german
+Name: {group}\{cm:UninstallProgram,jEdit}; Filename: {uninstallexe}; Comment: {cm:UninstallProgram,jEdit}
+Name: {userdesktop}\jEdit; Filename: {code:javaPath}; Tasks: desktopicon; WorkingDir: {app}; IconFilename: {app}\jedit.ico; Comment: jEdit - Programmer's Text Editor; IconIndex: 0; Parameters: "-jar ""{app}\@jar.filename@"""
+Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\jEdit; Filename: {code:javaPath}; Tasks: quicklaunchicon; WorkingDir: {app}; IconFilename: {app}\jedit.ico; Comment: jEdit - Programmer's Text Editor; IconIndex: 0; Parameters: "-jar ""{app}\@jar.filename@"""
+
+[Run]
+Filename: {code:javaPath}; Description: {cm:LaunchProgram,jEdit}; Flags: postinstall skipifsilent nowait; WorkingDir: {app}; Parameters: "-jar ""{app}\@jar.filename@"""
+
+[Components]
+Name: main; Description: jEdit - Programmer's Text Editor; Flags: fixed; Types: custom compact full
+Name: apidoc; Description: API Documentation (for macro and plugin development); Types: custom full
+Name: macros; Description: Default set of macros (highly recommended); Types: custom compact full
+Name: batchfile; Description: Batch file (for command-line usage); Types: custom compact full
 
 [Registry]
-Root: HKCR; Subkey: "*\Shell"; flags: uninsdeletekeyifempty
-Root: HKCR; Subkey: "*\Shell\Open with jEdit"; flags: uninsdeletekey
-Root: HKCR; Subkey: "*\Shell\Open with jEdit\command"; ValueType: string; ValueData: """{code:GetJavaPath}"" -jar ""{app}\jedit.jar"" -reuseview ""%1"""; flags: uninsdeletekey
-
-[Tasks]
-Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
-Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"
-
-[Files]
-; May need to copy icon file to JEDIT_HOME
-; Using orange icon from: http://www.jedit.org/index.php?page=images
-Source: "{#JEDIT_HOME}\jedit.ico"; DestDir: "{app}"; Flags: ignoreversion; Components: main
-Source: "{#JEDIT_HOME}\jedit.jar"; DestDir: "{app}"; Flags: ignoreversion; Components: main
-Source: "{#JEDIT_HOME}\doc\*"; Excludes: "api\*"; DestDir: "{app}\doc"; Flags: ignoreversion recursesubdirs; Components: main
-Source: "{#JEDIT_HOME}\doc\api\*"; DestDir: "{app}\doc\api"; Flags: ignoreversion recursesubdirs; Components: apidoc
-Source: "{#JEDIT_HOME}\jars\*"; DestDir: "{app}\jars"; Flags: ignoreversion recursesubdirs; Components: main
-Source: "{#JEDIT_HOME}\macros\*"; DestDir: "{app}\macros"; Flags: ignoreversion recursesubdirs; Components: macros
-Source: "{#JEDIT_HOME}\modes\*"; DestDir: "{app}\modes"; Flags: ignoreversion recursesubdirs; Components: main
-Source: "{#JEDIT_HOME}\properties\*"; DestDir: "{app}\properties"; Flags: ignoreversion recursesubdirs; Components: main
-Source: "{#JEDIT_HOME}\startup\*"; DestDir: "{app}\startup"; Flags: ignoreversion recursesubdirs; Components: main
-; This batch file can be empty, but it must exist. 
-; I couldn't figure out how generate a file without 
-; an existing one.
-Source: "{#JEDIT_HOME}\jedit.bat"; DestDir: "{win}"; AfterInstall: UpdateBatchFile; Components: batchfile
-
-[Components]
-Name: "main"; Description: "jEdit text editor"; Types: full compact custom; Flags: fixed
-Name: "apidoc"; Description: "API Documentation (for macro and plugin development)"; Types: full custom
-Name: "macros"; Description: "Default set of macros (highly recommended)"; Types: full compact custom
-Name: "batchfile"; Description: "Batch file (for command-line usage)"; Types: full compact custom
-
-[Icons]
-Name: "{group}\jEdit"; IconFilename: "{app}\jedit.ico"; Filename: "{code:GetJavaPath}"; WorkingDir: "{app}"; Parameters: "-jar ""{app}\jedit.jar"""
-Name: "{group}\{cm:UninstallProgram,jEdit}"; Filename: "{uninstallexe}"
-Name: "{userdesktop}\jEdit"; IconFilename: "{app}\jedit.ico"; Filename: "{code:GetJavaPath}"; WorkingDir: "{app}"; Parameters: "-jar ""{app}\jedit.jar"""; Tasks: desktopicon
-Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\jEdit"; IconFilename: "{app}\jedit.ico"; Filename: "{code:GetJavaPath}"; WorkingDir: "{app}"; Parameters: "-jar ""{app}\jedit.jar"""; Tasks: quicklaunchicon
-
-[Run]
-Filename: "{code:GetJavaPath}"; WorkingDir: "{app}"; Parameters: "-jar ""{app}\jedit.jar"""; Description: "{cm:LaunchProgram,jEdit}"; Flags: shellexec postinstall skipifsilent
+Root: HKCR; Subkey: *\Shell; Flags: uninsdeletekeyifempty
+Root: HKCR; Subkey: *\Shell\Open with jEdit; Flags: uninsdeletekey; Languages: slovenian slovak russian portuguese polish norwegian italian hungarian french finnish dutch danish czech catalan brazilianportuguese english
+Root: HKCR; Subkey: *\Shell\Open with jEdit\Command; ValueType: string; ValueData: """{code:javaPath}"" -jar ""{app}\@jar.filename@"" -reuseview ""%1"""; Flags: uninsdeletekey; Languages: slovenian slovak russian portuguese polish norwegian italian hungarian french finnish dutch danish czech catalan brazilianportuguese english
+Root: HKCR; Subkey: *\Shell\Mit jEdit Öffnen; Flags: uninsdeletekey; Languages: german
+Root: HKCR; Subkey: *\Shell\Mit jEdit Öffnen\Command; ValueType: string; ValueData: """{code:javaPath}"" -jar ""{app}\@jar.filename@"" -reuseview ""%1"""; Flags: uninsdeletekey; Languages: german
+Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Run; ValueType: string; ValueData: """{code:javaPath}"" -jar ""{app}\@jar.filename@"" -background -nogui"; Tasks: autostartserver; ValueName: jEdit Server; Flags: uninsdeletevalue
+
+[UninstallDelete]
+Type: files; Name: {app}\jEdit.url
 
 [Code]
 var
 	javawExePath: String;
 
-(* looks for JRE version, in Registry *)
-function getJREVersion(): String;
-var
-	javaVersion: String;
-begin
-	javaVersion := '';
-	RegQueryStringValue(HKLM, 'SOFTWARE\JavaSoft\Java Runtime Environment', 'CurrentVersion', javaVersion);
-	GetVersionNumbersString(javaVersion, javaVersion);
-	Result := javaVersion;
-end;
-
-(* looks for JDK version, in Registry *)
-function getJDKVersion(): String;
-var
-	jdkVersion: String;
+// looks for current JRE version, in Registry
+function getJREVersion: String;
+var
+	jreVersion : String;
+begin
+	jreVersion := '';
+	RegQueryStringValue(HKLM,'SOFTWARE\JavaSoft\Java Runtime Environment','CurrentVersion',jreVersion);
+	Result := jreVersion;
+end;
+
+// looks for current JDK version, in Registry
+function getJDKVersion: String;
+var
+	jdkVersion : String;
 begin
 	jdkVersion := '';
-	RegQueryStringValue(HKLM, 'SOFTWARE\JavaSoft\Java Development Kit', 'CurrentVersion', jdkVersion);
-	GetVersionNumbersString(jdkVersion, jdkVersion);
+	RegQueryStringValue(HKLM,'SOFTWARE\JavaSoft\Java Development Kit', 'CurrentVersion', jdkVersion);
 	Result := jdkVersion;
 end;
 
-(* Finds path to "javaw.exe" by looking up JDK or JRE locations *)
-(* in the registry.  Ensures the file actually exists.  If none *)
-(* is found, an empty string is returned. 						*)
-function GetJavaPath(Default: String): String;
-var
-	javaVersion: String;
-	javaHome: String;
-	path: String;
-begin
-	path := '';
+// Finds path to "javaw.exe" by looking up JDK or JRE locations
+// in the registry.  Ensures the file actually exists.  If none
+// is found, an empty string is returned.
+function javaPath(Param: String): String;
+var
+	javaVersion : String;
+	javaHome : String;
+	path : String;
+begin
 	if Length(javawExePath) > 0 then begin
 		Result := javawExePath;
-		path := javawExePath;
-	end;
-
-	// try to find JDK "javaw.exe"
-	javaVersion := getJDKVersion();
-	if (Length(path) = 0) and (Length(javaVersion) > 0) and ((javaVersion) >= '1.3.0') then begin
-		RegQueryStringValue(HKLM, 'SOFTWARE\JavaSoft\Java Development Kit\' + javaVersion, 'JavaHome', javaHome);
-		path := javaHome + '\bin\' + 'javaw.exe';
+		exit;
+	end;
+
+	// try to find JRE "javaw.exe"
+	javaVersion := getJREVersion;
+	if (Length(javaVersion) > 0) and (javaVersion >= '1.4') then begin
+		RegQueryStringValue(HKLM,'SOFTWARE\JavaSoft\Java Runtime Environment\' + javaVersion,'JavaHome',javaHome);
+		path := javaHome + '\bin\javaw.exe';
+		if FileExists(path) then begin
+			Log('(JRE) found javaw.exe: ' + path);
+			javawExePath := path;
+			Result := javawExePath;
+			exit;
+		end;
+	end;
+
+	// if we didn't find a JRE "javaw.exe", try for a JDK one
+	Log('(JDK) JRE not found or too old, looking for JDK');
+	javaVersion := getJDKVersion;
+	if (Length(javaVersion) > 0) and (javaVersion >= '1.4') then begin
+		RegQueryStringValue(HKLM,'SOFTWARE\JavaSoft\Java Development Kit\' + javaVersion,'JavaHome',javaHome);
+		path := javaHome + '\bin\javaw.exe';
 		if FileExists(path) then begin
 			Log('(JDK) found javaw.exe: ' + path);
-			Result := path;
-		end;
-	end;
-
-	// if we didn't find a JDK "javaw.exe", try for a JRE one
-	if Length(path) = 0 then begin
-		Log('(JRE) JDK not found, looking for JRE');
-		javaVersion := getJREVersion();
-		if (Length(javaVersion) > 0) and ((javaVersion) >= '1.3.0') then begin
-			RegQueryStringValue(HKLM, 'SOFTWARE\JavaSoft\Java Runtime Environment\' + javaVersion, 'JavaHome', javaHome);
-			path := javaHome + '\bin\' + 'javaw.exe';
-			if FileExists(path) then begin
-				Log('(JRE) found javaw.exe: ' + path);
-				Result := path;
-			end
-		end;
-	end;
-
-	(*
-	// if unable to find Java path in registry, try %JAVA_HOME%
-	// (maybe not a good idea)
-	if Length(path) = 0 then begin
-		javaHome := GetEnv('JAVA_HOME');
-		if Length(javaHome) > 0 then begin
-			path := javaHome + '\bin\' + 'javaw.exe';
-			if FileExists(path) then begin
-				Log('(JAVA_HOME) found java.exe: ' + path);
-				Result := path;
-			end;
-		end;
-	end;
-	*)
-
-	(*
-	// let user browse for Java -- maybe not a good idea
-	if Length(path) = 0 then begin
-		MsgBox('Setup was unable to automatically find "javaw.exe".' + #13  
-			    + #13 +
-			   'If you have a JDK or JRE, version 1.3 or greater, installed' + #13
-			   'please locate "javaw.exe".  If you don''t have a JDK or JRE' + #13
-			   'installed, download and install from http://java.sun.com/ and' + #13
-			   'restart setup.', mbError, MB_OK);
-		Log('unable to find javaw.exe, prompting for path');
-		if GetOpenFileName('Browse for javaw.exe', path, '.', 'EXE files (*.exe)|*.exe', '.exe') then begin
-			Log('(BROWSE): user selected: ' + path);
-			Result := path;
-		end;
-	end;
-	*)
-
-	javawExePath := Result;	// save found value as global
-end;
-
-(* generates a batch file for command-line usage *)
-procedure UpdateBatchFile();
-var
-	appDir: String;
-	batchFile: String;
-	jarPath: String;
-	javaPath: String;
-	winDir: String;
-begin
-	winDir := ExpandConstant('{win}');
-	appDir := ExpandConstant('{app}');
-	javaPath := GetJavaPath('');
-	batchFile := winDir + '\' + 'jedit.bat';
-	jarPath := appDir + '\' + 'jedit.jar';
-	SaveStringToFile(batchFile, javaPath + ' -jar "' + jarPath + '" -reuseview %1 %2 %3 %4 %5 %6 %7 %8 %9', False);
-end;
-
-(* Called on setup startup *)
-function InitializeSetup(): Boolean;
-var
-	javaPath: String;
-begin
-	javaPath := GetJavaPath('');
-	if Length(javaPath) > 0 then begin
-		//MsgBox('Found javaw.exe here: ' + javaPath, mbInformation, MB_OK);
+			javawExePath := path;
+			Result := javawExePath;
+			exit;
+		end;
+	end;
+
+	// we didn't find a suitable "javaw.exe"
+	Result := '';
+end;
+
+// updates the batch file for commandline usage
+// and includes its path in %PATH
+procedure UpdateBatchFile;
+var
+	tmpS : String;
+	tmpSA : Array Of String;
+	i, pathLine : Integer;
+begin
+	LoadStringFromFile(ExpandConstant('{app}\jedit.bat'),tmpS);
+	StringChange(tmpS,'{jedit.jar}','{app}\@jar.filename@');
+	SaveStringToFile(ExpandConstant('{app}\jedit.bat'),ExpandConstantEx(tmpS,'javaw.exe',javaPath('')),false);
+	if UsingWinNT then begin
+		tmpS := '';
+		RegQueryStringValue(HKLM,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment','Path',tmpS);
+		if Pos(Uppercase(ExpandConstant('{app}')),Uppercase(tmpS)) = 0 then begin
+			if not (Copy(tmpS,Length(tmpS),1) = ';') then begin
+				tmpS := tmpS + ';';
+			end;
+			tmpS := tmpS + ExpandConstant('{app}');
+		end;
+		RegWriteStringValue(HKLM,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment','Path',tmpS);
+	end else begin
+		LoadStringsFromFile(ExpandConstant('{sd}\AUTOEXEC.BAT'),tmpSA);
+		pathLine := -1;
+		for i := 0 to GetArrayLength(tmpSA) - 1 do begin
+			tmpS := Trim(tmpSA[i]);
+			if Uppercase(Copy(tmpS,1,5)) = 'PATH=' then begin
+				pathLine := i;
+				if not (Pos(Uppercase(ExpandConstant('{app}')),Uppercase(tmpS)) = 0) then begin
+					exit;
+				end;
+			end;
+		end;
+		if pathLine = -1 then begin
+			SetArrayLength(tmpSA,GetArrayLength(tmpSA) + 1);
+			tmpSA[GetArrayLength(tmpSA) - 1] := 'PATH=' + ExpandConstant('{app}');
+		end else begin
+			tmpS := Trim(tmpSA[pathLine]);
+			if not (Copy(tmpS,Length(tmpS),1) = ';') then begin
+				tmpS := tmpS + ';';
+			end;
+			tmpSA[pathLine] := tmpS + ExpandConstant('{app}');
+		end;
+		SaveStringsToFile(ExpandConstant('{sd}\AUTOEXEC.BAT'),tmpSA,false);
+	end;
+end;
+
+// Called on setup startup
+function InitializeSetup: Boolean;
+begin
+	// check if java >= 1.4 is installed
+	if Length(javaPath('')) > 0 then begin
 		Result := true;
-	end
-	else begin
-		MsgBox('Setup unable to find a Java Development Kit or Java Runtime 1.3, or higher, installed.' + #13 +
-			   'You must have installed at least JDK or JRE, 1.3 or higher to continue setup.' + #13 +
+	end	else begin
+		MsgBox('Setup was unable to find an installed Java Runtime Environment or Java Development Kit of version 1.4, or higher.' + #13 +
+			   'You must have installed at least JDK or JRE 1.4 to continue setup.' + #13 +
 			   'Please install one from http://java.sun.com and restart setup.', mbInformation, MB_OK);
 		Result := false;
 	end;
 end;
 
-// :noTabs=false:tabSize=4:
+// Called on entering a new step while uninstalling
+procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep);
+var
+	tmpS : String;
+	tmpSA : Array Of String;
+	i, position : Integer;
+begin
+	if CurUninstallStep = usPostUninstall then begin
+		if UsingWinNT then begin
+			tmpS := '';
+			RegQueryStringValue(HKLM,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment','Path',tmpS);
+			position := Pos(Uppercase(ExpandConstant('{app}')),Uppercase(tmpS));
+			if not (position = 0) then begin
+				Delete(tmpS,position,Length(ExpandConstant('{app}')));
+				if Copy(tmpS,position,1) = ';' then begin
+					Delete(tmpS,position,1);
+				end;
+			end;
+			RegWriteStringValue(HKLM,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment','Path',tmpS);
+		end else begin
+			LoadStringsFromFile(ExpandConstant('{sd}\AUTOEXEC.BAT'),tmpSA);
+			for i := 0 to GetArrayLength(tmpSA) - 1 do begin
+				tmpS := Trim(tmpSA[i]);
+				if Uppercase(Copy(tmpS,1,5)) = 'PATH=' then begin
+					position := Pos(Uppercase(ExpandConstant('{app}')),Uppercase(tmpS));
+					if not (position = 0) then begin
+						Delete(tmpS,position,Length(ExpandConstant('{app}')));
+						if Copy(tmpS,position,1) = ';' then begin
+							Delete(tmpS,position,1);
+						end;
+					end;
+					tmpSA[i] := tmpS;
+				end;
+			end;
+			SaveStringsToFile(ExpandConstant('{sd}\AUTOEXEC.BAT'),tmpSA,false);
+		end;
+	end else if CurUninstallStep = usUninstall then begin
+		// Delete Plugins that were downloaded to application directory
+		DelTree(ExpandConstant('{app}\jars'),true,true,true);
+	end;
+end;
<< < 1 .. 3 4 5 (Page 5 of 5)