# HG changeset patch # User David Barts # Date 1588222161 25200 # Node ID d175593317a8d70100e9a51521e61ed8804c01f4 # Parent 3d86f03911681f43800395308d706e7e131c6dbd Add a bunch of packaging stuff, NOT WORKING YET, diff -r 3d86f0391168 -r d175593317a8 build.xml --- a/build.xml Fri Apr 24 19:45:57 2020 -0700 +++ b/build.xml Wed Apr 29 21:49:21 2020 -0700 @@ -21,14 +21,12 @@ - - - @@ -43,6 +41,8 @@ + + @@ -74,7 +74,7 @@ classname="net.sf.launch4j.ant.Launch4jTask" uri="antlib:net.sf.launch4j.ant"> - + @@ -88,14 +88,14 @@ classname="de.masters_of_disaster.ant.tasks.calculatesize.CalculateSize" uri="antlib:de.masters_of_disaster.ant.tasks"> - + + uri="antlib:de.masters_of_disaster.ant.tasks"> - + @@ -143,8 +143,16 @@ - - + + + + + + + + + + @@ -181,68 +189,174 @@ - - - - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - + - - - - - - - - - - - - - - + + - - - + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 3d86f0391168 -r d175593317a8 package-files/linux/deb/Packages --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/deb/Packages Wed Apr 29 21:49:21 2020 -0700 @@ -0,0 +1,15 @@ +Package: jpegwasher +Version: @app.version@ +Architecture: all +Installed-Size: @deb.installed.size@ +Recommends: default-jre | openjdk-8-jre +Suggests: default-jdk | openjdk-8-jdk +Filename: @deb.repository.file@ +Size: @deb.size@ +MD5sum: @deb.md5@ +SHA1: @deb.sha1@ +SHA256: @deb.sha256@ +Section: contrib/graphics +Homepage: http://notyouraveragetechie.com/JpegWasher.html +Priority: optional +Description: Removes privacy-compromising metadata from digital photos. diff -r 3d86f0391168 -r d175593317a8 package-files/linux/deb/control --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/deb/control Wed Apr 29 21:49:21 2020 -0700 @@ -0,0 +1,11 @@ +Package: jpegwasher +Version: @app.version@ +Architecture: all +Section: contrib/graphics +Homepage: http://www.jedit.org/ +Recommends: default-jre | openjdk-8-jre +Build-depends: default-jdk | openjdk-8-jdk, ant +Suggests: default-jdk | openjdk-8-jdk +Priority: optional +Installed-Size: @deb.installed.size@ +Description: Removes privacy-compromising metadata from digital photos. diff -r 3d86f0391168 -r d175593317a8 package-files/linux/deb/jpegwasher --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/deb/jpegwasher Wed Apr 29 21:49:21 2020 -0700 @@ -0,0 +1,2 @@ +?package(jpegwasher):needs="X11" section="Contrib/Graphics" \ + title="JpegWasher" command="/usr/bin/jpegwasher" diff -r 3d86f0391168 -r d175593317a8 package-files/linux/deb/jpegwasher.desktop --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/deb/jpegwasher.desktop Wed Apr 29 21:49:21 2020 -0700 @@ -0,0 +1,14 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=JpegWasher +GenericName=Privacy for your photos +Comment=Removes privacy-compromising metadata +Exec=jpegwasher +Icon=/usr/share/jpegwasher/doc/jpegwasher.png +Terminal=false +Type=Application +Categories=Graphics;Photography;Security; +StartupNotify=true +MimeType=image/jpeg; +StartupWMClass=jpegwasher +Keywords=Metadata;Remove;JPEG;Privacy diff -r 3d86f0391168 -r d175593317a8 package-files/linux/deb/postinst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/deb/postinst Wed Apr 29 21:49:21 2020 -0700 @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +if [ "$1" = "configure" ] && [ -x /usr/bin/update-menus ]; then update-menus ; fi diff -r 3d86f0391168 -r d175593317a8 package-files/linux/deb/postrm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/deb/postrm Wed Apr 29 21:49:21 2020 -0700 @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi diff -r 3d86f0391168 -r d175593317a8 package-files/linux/jpegwasher --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/jpegwasher Wed Apr 29 21:49:21 2020 -0700 @@ -0,0 +1,25 @@ +#!/bin/sh +# +# Runs JpegWasher. Adopted from a similar script in the jEdit distribution. +# +# Find a java installation. +if [ -z "${JAVA_HOME}" ]; then + echo 'Warning: $JAVA_HOME environment variable not set! Consider setting it.' + echo ' Attempting to locate java...' + j=`which java 2>/dev/null` + if [ -z "$j" ]; then + echo "Failed to locate the java virtual machine! Bailing..." + exit 1 + else + echo "Found a virtual machine at: $j..." + JAVA="$j" + fi +else + JAVA="${JAVA_HOME}/bin/java" +fi + +# Antialias menus and dockable text: +ANTIALIAS_ALL="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true" + +# Launch application. +exec "${JAVA}" ${ANTIALIAS_ALL} -jar "/usr/share/JpegWasher/jars/@jar.filename@" diff -r 3d86f0391168 -r d175593317a8 package-files/linux/jpegwasher.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/jpegwasher.1 Wed Apr 29 21:49:21 2020 -0700 @@ -0,0 +1,20 @@ +.TH JPEGWASHER 1 +.SH NAME +.B JpegWasher +\- remove privacy-compromising metadata from digital photos +.SH SYNOPSIS +.B "jpegwasher" +.SH DESCRIPTION +This is a simple (and hopefully user-friendly), GUI-based tool for removing +extraneous metadata from JPEG files containing digital photographs. More +information is available in the built-in help for the program. +.SH FILES +.TP +~/.jpegwasher/* +Various configuration and other cached data lives here. +.SH "SEE ALSO" +.BR java (1) +.BR kotlin (1) +.SH BUGS +Only works well on JPEG files. Use on other image file types is likely to +damage them by removing important metadata. diff -r 3d86f0391168 -r d175593317a8 package-files/osx/.background/._background.png Binary file package-files/osx/.background/._background.png has changed diff -r 3d86f0391168 -r d175593317a8 package-files/osx/.background/background.png Binary file package-files/osx/.background/background.png has changed diff -r 3d86f0391168 -r d175593317a8 package-files/osx/DS_Store Binary file package-files/osx/DS_Store has changed diff -r 3d86f0391168 -r d175593317a8 package-files/osx/jedit Binary file package-files/osx/jedit has changed diff -r 3d86f0391168 -r d175593317a8 package-files/windows/jEdit.url --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/windows/jEdit.url Wed Apr 29 21:49:21 2020 -0700 @@ -0,0 +1,3 @@ +[InternetShortcut] +URL=http://www.jEdit.org +IconFile=jedit.exe diff -r 3d86f0391168 -r d175593317a8 package-files/windows/jedit.launch4j.xml --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/windows/jedit.launch4j.xml Wed Apr 29 21:49:21 2020 -0700 @@ -0,0 +1,51 @@ + + + + + gui + jedit.exe + @jar.filename@ + true + jEdit + http://www.java.com/download + http://www.jEdit.org + -reuseview + true + @base.dir@/icons/jedit.ico + + @target.java.version@.0 + + preferJdk + + + @jedit.build.number@ + @jedit.version@ + jEdit - Programmer's Text Editor + Copyright © 1998-@current.year@ Contributors + @jedit.build.number@ + @jedit.version@ + jEdit + Contributors + jEdit + jedit.exe + + diff -r 3d86f0391168 -r d175593317a8 package-files/windows/win32installer.iss --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/windows/win32installer.iss Wed Apr 29 21:49:21 2020 -0700 @@ -0,0 +1,288 @@ +; Inno Setup installer script for jEdit +; encoding=UTF-8Y +; (BOM seems the only way to let Inno Setup know the encoding) +; +; Björn "Vampire" Kautler +; + +[Setup] +AllowNoIcons=true +AppContact=jedit-devel@lists.sourceforge.net +AppCopyright=Copyright © 1998-@current.year@ Contributors +AppID=jEdit +AppName=jEdit +AppPublisher=Contributors +AppPublisherURL=http://www.jEdit.org +AppReadmeFile={app}\doc\README.txt +AppSupportURL=http://www.jEdit.org +AppUpdatesURL=http://www.jEdit.org +AppVerName=jEdit @jedit.version@ +AppVersion=@jedit.version@ +ArchitecturesInstallIn64BitMode=x64 +ChangesAssociations=true +ChangesEnvironment=true +DefaultDirName={pf}\jEdit +DefaultGroupName=jEdit +FlatComponentsList=false +; Do not use LicenseFile here as the GPL does not require acceptance of +; the license for running the program, but still show it as information +InfoBeforeFile=@dist.dir.for.innosetup@\doc\COPYING.txt +OutputBaseFilename=@win.filename@ +OutputDir=@dist.dir.for.innosetup@ +SetupIconFile=@base.dir.for.innosetup@\icons\jedit.ico +ShowTasksTreeLines=true +SolidCompression=true +SourceDir=@dist.dir.for.innosetup@ +TimeStampsInUTC=true +UninstallDisplayIcon={app}\jedit.exe +UninstallDisplayName=jEdit @jedit.version@ +VersionInfoCompany=Contributors +VersionInfoCopyright=Copyright © 1998-@current.year@ Contributors +VersionInfoDescription=Programmer's Text Editor +VersionInfoTextVersion=@jedit.version@ +VersionInfoVersion=@jedit.build.number@ +WizardImageFile=@base.dir.for.innosetup@\icons\WindowsInstallerImage.bmp +WizardSmallImageFile=@base.dir.for.innosetup@\icons\WindowsInstallerSmallImage.bmp + +[Components] +Name: main; Description: jEdit - Programmer's Text Editor; Flags: fixed; Types: custom compact full +Name: apidoc; Description: {cm:APIDocumentation}; Types: full +Name: macros; Description: {cm:Macros}; Types: compact full + +[Tasks] +Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons} +Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons} +Name: autostartserver; Description: {cm:AutostartJEditServer}; GroupDescription: Autostart: + +[Files] +Source: @jar.filename@; DestDir: {app}; Flags: ignoreversion sortfilesbyextension sortfilesbyname; Components: main +Source: jedit.exe; DestDir: {app}; Flags: ignoreversion sortfilesbyextension sortfilesbyname; AfterInstall: updatePATHVariable; Components: main +Source: classes\package-files\windows\jEdit.url; DestDir: {app}; Flags: ignoreversion sortfilesbyextension sortfilesbyname; Components: main +Source: doc\*; DestDir: {app}\doc; Excludes: \doc\api\*; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension sortfilesbyname; Components: main +Source: doc\api\*; DestDir: {app}\doc\api; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension sortfilesbyname; Components: apidoc +Source: jars\QuickNotepad.jar; DestDir: {app}\jars; Flags: ignoreversion sortfilesbyextension sortfilesbyname; Components: main +Source: macros\*; DestDir: {app}\macros; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension sortfilesbyname; Components: macros +Source: keymaps\*; DestDir: {app}\keymaps; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension sortfilesbyname; Components: main +Source: modes\*; DestDir: {app}\modes; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension sortfilesbyname; Components: main +Source: properties\*; DestDir: {app}\properties; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension sortfilesbyname; Components: main +Source: startup\*; DestDir: {app}\startup; Flags: ignoreversion recursesubdirs createallsubdirs sortfilesbyextension sortfilesbyname; Components: main + +[Icons] +Name: {group}\jEdit; Filename: {app}\jedit.exe; WorkingDir: {app}; Comment: jEdit - Programmer's Text Editor; HotKey: ctrl+alt+j +Name: {group}\{cm:ProgramOnTheWeb,jEdit}; Filename: {app}\jEdit.url; Comment: jEdit Website +Name: {group}\{cm:LaunchProgram,jEdit Server}; Filename: {app}\jedit.exe; Parameters: "-background -nogui --l4j-dont-wait"; WorkingDir: {app}; Comment: {cm:LaunchProgram,jEdit Server} +Name: {group}\{cm:QuitProgram,jEdit Server}; Filename: {app}\jedit.exe; Parameters: "-quit"; WorkingDir: {app}; Comment: {cm:QuitProgram,jEdit Server} +Name: {group}\{cm:UninstallProgram,jEdit}; Filename: {uninstallexe}; Comment: {cm:UninstallProgram,jEdit} +Name: {userdesktop}\jEdit; Filename: {app}\jedit.exe; Tasks: desktopicon; WorkingDir: {app}; Comment: jEdit - Programmer's Text Editor +Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\jEdit; Filename: {app}\jedit.exe; Tasks: quicklaunchicon; WorkingDir: {app}; Comment: jEdit - Programmer's Text Editor + +[Languages] +Name: en; MessagesFile: compiler:Default.isl +Name: de; MessagesFile: compiler:Languages\German.isl +Name: eu; MessagesFile: compiler:Languages\Basque.isl +Name: pt_BR; MessagesFile: compiler:Languages\BrazilianPortuguese.isl +Name: ca; MessagesFile: compiler:Languages\Catalan.isl +Name: cs; MessagesFile: compiler:Languages\Czech.isl +Name: da; MessagesFile: compiler:Languages\Danish.isl +Name: nl; MessagesFile: compiler:Languages\Dutch.isl +Name: fi; MessagesFile: compiler:Languages\Finnish.isl +Name: fr; MessagesFile: compiler:Languages\French.isl +Name: he; MessagesFile: compiler:Languages\Hebrew.isl +Name: hu; MessagesFile: compiler:Languages\Hungarian.isl +Name: it; MessagesFile: compiler:Languages\Italian.isl +Name: ja; MessagesFile: compiler:Languages\Japanese.isl +Name: no; MessagesFile: compiler:Languages\Norwegian.isl +Name: pl; MessagesFile: compiler:Languages\Polish.isl +Name: pt; MessagesFile: compiler:Languages\Portuguese.isl +Name: ru; MessagesFile: compiler:Languages\Russian.isl +Name: sk; MessagesFile: compiler:Languages\Slovak.isl +Name: sl; MessagesFile: compiler:Languages\Slovenian.isl +Name: es; MessagesFile: compiler:Languages\Spanish.isl + +[CustomMessages] +; Default messages +APIDocumentation=API Documentation (for macro and plugin development) +Macros=Default set of macros (highly recommended) +AutostartJEditServer=Start jEdit Server automatically on system startup +QuitProgram=Quit %1 +OpenWithProgram=Open with %1 +pleaseQuitJEdit=The installer will now try to quit a running instance of jEdit.%nPlease save your work and exit jEdit for the installation to continue. +ViewFile=View %1 +; German messages +de.APIDocumentation=API Dokumentation (für Macro und Plugin Entwicklung) +de.Macros=Standard Makros (sehr empfohlen) +de.AutostartJEditServer=jEdit Server automatisch beim Hochfahren starten +de.QuitProgram=%1 beenden +de.OpenWithProgram=Mit %1 öffnen +de.pleaseQuitJEdit=Die Installation wird nun versuchen eine laufende Instanz von jEdit zu beenden.%nBitte speichern Sie Ihre Arbeit und beenden Sie jEdit um mit der Installation fortzufahren. +de.ViewFile=%1 anzeigen +; French messages +fr.APIDocumentation=API Documentation (pour développement de Macro et Plugin) +fr.Macros=Macros standards (vraiment recommandées) +fr.AutostartJEditServer=Démarrer automatiquement le serveur jEdit au démarrage de l'ordinateur +fr.QuitProgram=Quitter %1 +fr.OpenWithProgram=Ouvrir avec %1 +fr.pleaseQuitJEdit=L'installation va tenter à présent de quitter une instance de jEdit en cours.%nVeuillez enregistrer votre travail et quitter jEdit afin de poursuivre l'installation. +fr.ViewFile=Afficher %1 + +[Registry] +Root: HKCR; Subkey: *\Shell; Flags: uninsdeletekeyifempty +Root: HKCR; Subkey: *\Shell\{cm:OpenWithProgram,jEdit}; Flags: uninsdeletekey +Root: HKCR; Subkey: *\Shell\{cm:OpenWithProgram,jEdit}\Command; ValueType: string; ValueData: """{app}\jedit.exe"" ""%1""" +Root: HKCR; Subkey: *\Shell\{cm:OpenWithProgram,jEdit}; ValueName: Icon; ValueType: string; ValueData: "{app}\jedit.exe" +Root: HKLM; Subkey: SOFTWARE\Microsoft\Windows\CurrentVersion\Run; ValueType: string; ValueName: jEdit Server; ValueData: """{app}\jedit.exe"" -background -nogui --l4j-dont-wait"; Flags: uninsdeletevalue; Tasks: autostartserver + +[Run] +Filename: {app}\jedit.exe; Description: {cm:ViewFile,README}; Parameters: "--l4j-dont-wait -nosettings ""{app}\doc\README.txt"""; WorkingDir: {app}; Flags: nowait postinstall skipifsilent +Filename: {app}\jedit.exe; Description: {cm:ViewFile,CHANGES}; Parameters: "--l4j-dont-wait -nosettings ""{app}\doc\CHANGES.txt"""; WorkingDir: {app}; Flags: nowait postinstall skipifsilent +Filename: {app}\jedit.exe; Description: {cm:LaunchProgram,jEdit}; Parameters: "--l4j-dont-wait"; WorkingDir: {app}; Flags: nowait postinstall skipifsilent; Tasks: not autostartserver +Filename: {app}\jedit.exe; Description: {cm:LaunchProgram,jEdit}; Parameters: "--l4j-dont-wait -background"; WorkingDir: {app}; Flags: nowait postinstall skipifsilent; Tasks: autostartserver + +[Code] +function findPathLine(lines: Array Of String): Integer; +var + i : Integer; +begin + for i := 0 to GetArrayLength(lines) - 1 do begin + if Uppercase(Copy(Trim(lines[i]),1,5)) = 'PATH=' then begin + Result := i; + end; + end; +end; + +function appendAppDirIfNecessary(var path: String): Boolean; +var + appDir : String; +begin + appDir := ExpandConstant('{app}'); + if Pos(Uppercase(appDir),Uppercase(path)) = 0 then begin + if Copy(path,Length(path),1) <> ';' then begin + path := path + ';'; + end; + path := path + appDir; + Result := true; + end else begin + Result := false; + end; +end; + +procedure updatePATHVariableInRegistry; +var + path : String; +begin + RegQueryStringValue(HKLM,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment','Path',path); + if appendAppDirIfNecessary(path) then begin + RegWriteStringValue(HKLM,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment','Path',path); + end; +end; + +procedure updatePATHVariableInAutoexecBat; +var + lines : Array Of String; + pathLine : Integer; + path : String; +begin + LoadStringsFromFile(ExpandConstant('{sd}\AUTOEXEC.BAT'),lines); + pathLine := findPathLine(lines); + if pathLine = -1 then begin + pathLine := GetArrayLength(lines); + SetArrayLength(lines,pathLine + 1); + lines[pathLine] := 'PATH='; + end; + path := Trim(lines[pathLine]); + if appendAppDirIfNecessary(path) then begin + lines[pathLine] := path; + SaveStringsToFile(ExpandConstant('{sd}\AUTOEXEC.BAT'),lines,false); + end; +end; + +procedure updatePATHVariable; +begin + if UsingWinNT then begin + updatePATHVariableInRegistry; + end else begin + updatePATHVariableInAutoexecBat; + end; +end; + +function removeAppDirIfNecessary(var path: String): Boolean; +var + appDir : String; + position : Integer; +begin + appDir := ExpandConstant('{app}'); + position := Pos(Uppercase(appDir),Uppercase(path)); + if position = 0 then begin + Result := false; + end else begin + Delete(path,position,Length(appDir)); + if Copy(path,position,1) = ';' then begin + Delete(path,position,1); + end; + Result := true; + end; +end; + +procedure cleanPATHVariableInRegistry; +var + path : String; +begin + RegQueryStringValue(HKLM,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment','Path',path); + if removeAppDirIfNecessary(path) then begin + RegWriteStringValue(HKLM,'SYSTEM\CurrentControlSet\Control\Session Manager\Environment','Path',path); + end; +end; + +procedure cleanPATHVariableInAutoexecBat; +var + lines : Array Of String; + pathLine : Integer; + path : String; +begin + LoadStringsFromFile(ExpandConstant('{sd}\AUTOEXEC.BAT'),lines); + pathLine := findPathLine(lines); + if pathLine <> -1 then begin + path := Trim(lines[pathLine]); + if removeAppDirIfNecessary(path) then begin + lines[pathLine] := path; + SaveStringsToFile(ExpandConstant('{sd}\AUTOEXEC.BAT'),lines,false); + end; + end; +end; + +procedure cleanPATHVariable; +begin + if UsingWinNT then begin + cleanPATHVariableInRegistry; + end else begin + cleanPATHVariableInAutoexecBat; + end; +end; + +procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); +begin + if CurUninstallStep = usPostUninstall then begin + cleanPATHVariable; + end; +end; + +procedure quitJEdit; +var + resultCode : Integer; +begin + case SuppressibleMsgBox(CustomMessage('pleaseQuitJEdit'),mbConfirmation,MB_OKCANCEL or MB_DEFBUTTON2, IDYES) of + IDOK: begin + ExtractTemporaryFile('@jar.filename@'); + ExtractTemporaryFile('jedit.exe'); + ExecAsOriginalUser(ExpandConstant('{tmp}/jedit.exe'),'-quit',ExpandConstant('{tmp}'),SW_SHOW,ewWaitUntilTerminated,resultCode); + end; + IDCANCEL: Abort; + end; +end; + +procedure CurStepChanged(CurStep: TSetupStep); +begin + if CurStep = ssInstall then begin + quitJEdit; + end; +end;