Skip to content

Commit

Permalink
Update version before package phase
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrià llorens committed Apr 5, 2016
1 parent 2939c7b commit 612ef5c
Show file tree
Hide file tree
Showing 7 changed files with 280 additions and 264 deletions.
144 changes: 72 additions & 72 deletions package/linux/DPFManager.spec
Original file line number Diff line number Diff line change
@@ -1,72 +1,72 @@
Summary: DPF Manager
Name: dpf-manager
Version: 2.0
Release: 1
License: Unknown
Vendor: DPF Manager
Prefix: /opt
Provides: dpf-manager
Requires: ld-linux.so.2 libX11.so.6 libXext.so.6 libXi.so.6 libXrender.so.1 libXtst.so.6 libasound.so.2 libc.so.6 libdl.so.2 libgcc_s.so.1 libm.so.6 libpthread.so.0 libthread_db.so.1
Autoprov: 0
Autoreq: 0

#avoid ARCH subfolder
%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm

#comment line below to enable effective jar compression
#it could easily get your package size from 40 to 15Mb but
#build time will substantially increase and it may require unpack200/system java to install
%define __jar_repack %{nil}

%description
DPF Manager

%prep

%build

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/opt
cp -r %{_sourcedir}/DPFManager %{buildroot}/opt

%files

/opt/DPFManager

%post


xdg-desktop-menu install --novendor /opt/DPFManager/DPFManager.desktop

if [ "false" = "true" ]; then
cp /opt/DPFManager/dpf-manager.init /etc/init.d/dpf-manager
if [ -x "/etc/init.d/dpf-manager" ]; then
/sbin/chkconfig --add dpf-manager
if [ "false" = "true" ]; then
/etc/init.d/dpf-manager start
fi
fi
fi

ln -s /opt/DPFManager/DPFManager /usr/bin/dpf-manager

%preun

xdg-desktop-menu uninstall --novendor /opt/DPFManager/DPFManager.desktop

if [ "false" = "true" ]; then
if [ -x "/etc/init.d/dpf-manager" ]; then
if [ "true" = "true" ]; then
/etc/init.d/dpf-manager stop
fi
/sbin/chkconfig --del dpf-manager
rm -f /etc/init.d/dpf-manager
fi
fi

%postun

rm /usr/bin/dpf-manager

%clean
Summary: DPF Manager
Name: dpf-manager
Version: 2.1
Release: 1
License: Unknown
Vendor: DPF Manager
Prefix: /opt
Provides: dpf-manager
Requires: ld-linux.so.2 libX11.so.6 libXext.so.6 libXi.so.6 libXrender.so.1 libXtst.so.6 libasound.so.2 libc.so.6 libdl.so.2 libgcc_s.so.1 libm.so.6 libpthread.so.0 libthread_db.so.1
Autoprov: 0
Autoreq: 0

#avoid ARCH subfolder
%define _rpmfilename %%{NAME}-%%{VERSION}-%%{RELEASE}.%%{ARCH}.rpm

#comment line below to enable effective jar compression
#it could easily get your package size from 40 to 15Mb but
#build time will substantially increase and it may require unpack200/system java to install
%define __jar_repack %{nil}

%description
DPF Manager

%prep

%build

%install
rm -rf %{buildroot}
mkdir -p %{buildroot}/opt
cp -r %{_sourcedir}/DPFManager %{buildroot}/opt

%files

/opt/DPFManager

%post


xdg-desktop-menu install --novendor /opt/DPFManager/DPFManager.desktop

if [ "false" = "true" ]; then
cp /opt/DPFManager/dpf-manager.init /etc/init.d/dpf-manager
if [ -x "/etc/init.d/dpf-manager" ]; then
/sbin/chkconfig --add dpf-manager
if [ "false" = "true" ]; then
/etc/init.d/dpf-manager start
fi
fi
fi

ln -s /opt/DPFManager/DPFManager /usr/bin/dpf-manager

%preun

xdg-desktop-menu uninstall --novendor /opt/DPFManager/DPFManager.desktop

if [ "false" = "true" ]; then
if [ -x "/etc/init.d/dpf-manager" ]; then
if [ "true" = "true" ]; then
/etc/init.d/dpf-manager stop
fi
/sbin/chkconfig --del dpf-manager
rm -f /etc/init.d/dpf-manager
fi
fi

%postun

rm /usr/bin/dpf-manager

%clean
180 changes: 90 additions & 90 deletions package/windows/DPF Manager.iss
Original file line number Diff line number Diff line change
@@ -1,90 +1,90 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{0D5B5F16-9992-49DC-AD65-D66FE249CE67}
AppName=DPF Manager
AppVersion=2.0
AppVerName=DPF Manager 2.0
AppPublisher=DPF Manager
AppComments=DPF Manager
AppCopyright=Copyright (C) 2015-2016
AppPublisherURL=http://dpfmanager.org/
AppSupportURL=http://dpfmanager.org/
AppUpdatesURL=http://dpfmanager.org/
UsePreviousAppDir=no
;DefaultDirName={localappdata}\DPF Manager
DefaultDirName={pf}\DPF Manager
DefaultGroupName=DPF Manager
OutputBaseFilename=DPF Manager-2.0
Compression=lzma
SolidCompression=yes
PrivilegesRequired=admin
SetupIconFile=DPF Manager\DPF Manager.ico
UninstallDisplayIcon={app}\DPF Manager.ico
UninstallDisplayName=DPF Manager
ArchitecturesInstallIn64BitMode=x64
ChangesEnvironment=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: modifypath; Description: "Add application directory to your system path"

[Files]
Source: "DPF Manager\DPF Manager.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "DPF Manager\app\dpf-manager-console.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "DPF Manager\*"; DestDir: "{app}"; Excludes: "*.exe,resources"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "DPF Manager\app\resources\*"; DestDir: "{app}"; Excludes: "*.dpf,*.iss"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "DPF Manager\app\resources\*.dpf"; DestDir: "{%HOMEPATH}\DPF Manager"; Flags: ignoreversion

[Icons]
Name: "{group}\DPF Manager"; Filename: "{app}\DPF Manager.exe"
Name: "{commondesktop}\DPF Manager"; Filename: "{app}\DPF Manager.exe"; Tasks: desktopicon

[Run]
Filename: "{app}\DPF Manager.exe"; Description: "{cm:LaunchProgram,DPFManager}"; Flags: nowait postinstall skipifsilent

[UninstallDelete]
Type: dirifempty; Name: "{pf}\DPF Manager"

[Code]
const
ModPathName = 'modifypath';
ModPathType = 'user';
Procedure customUninstall();
var
mRes : integer;
begin
// Ask fro delete DPF Manager folder
mRes := MsgBox('Do you want to remove also the reports and configuration files?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2)
// Line breaks with with ' #13#13 '
if mRes = IDYES then begin
// Delete config files
DeleteFile('{%HOMEPATH}\DPF Manager\*.dpf');
//DeleteFile('{%HOMEPATH}\DPF Manager\dpfmanager.properties');
DeleteFile('{%HOMEPATH}\DPF Manager\dpfmanager.properties');
// Delete reports directory recursively
DelTree('{%HOMEPATH}\DPF Manager\reports', True, True, True);
// Delete DPF Manager user folder only if empty
RemoveDir('{%HOMEPATH}\DPF Manager');
end;
end;
function ModPathDir(): TArrayOfString;
begin
setArrayLength(Result, 1)
Result[0] := ExpandConstant('{app}');
end;
// Fixed for javapackager
#include "DPF Manager\app\resources\modpath.iss"
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{0D5B5F16-9992-49DC-AD65-D66FE249CE67}
AppName=DPF Manager
AppVersion=2.1
AppVerName=DPF Manager {#SetupSetting("AppVersion")}
AppPublisher=DPF Manager
AppComments=DPF Manager
AppCopyright=Copyright (C) 2015-2016
AppPublisherURL=http://dpfmanager.org/
AppSupportURL=http://dpfmanager.org/
AppUpdatesURL=http://dpfmanager.org/
UsePreviousAppDir=no
;DefaultDirName={localappdata}\DPF Manager
DefaultDirName={pf}\DPF Manager
DefaultGroupName=DPF Manager
OutputBaseFilename=DPF Manager-{#SetupSetting("AppVersion")}
Compression=lzma
SolidCompression=yes
PrivilegesRequired=admin
SetupIconFile=DPF Manager\DPF Manager.ico
UninstallDisplayIcon={app}\DPF Manager.ico
UninstallDisplayName=DPF Manager
ArchitecturesInstallIn64BitMode=x64
ChangesEnvironment=yes

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: modifypath; Description: "Add application directory to your system path"

[Files]
Source: "DPF Manager\DPF Manager.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "DPF Manager\app\dpf-manager-console.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "DPF Manager\*"; DestDir: "{app}"; Excludes: "*.exe,resources"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "DPF Manager\app\resources\*"; DestDir: "{app}"; Excludes: "*.dpf,*.iss"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "DPF Manager\app\resources\*.dpf"; DestDir: "{%HOMEPATH}\DPF Manager"; Flags: ignoreversion

[Icons]
Name: "{group}\DPF Manager"; Filename: "{app}\DPF Manager.exe"
Name: "{commondesktop}\DPF Manager"; Filename: "{app}\DPF Manager.exe"; Tasks: desktopicon

[Run]
Filename: "{app}\DPF Manager.exe"; Description: "{cm:LaunchProgram,DPFManager}"; Flags: nowait postinstall skipifsilent

[UninstallDelete]
Type: dirifempty; Name: "{pf}\DPF Manager"

[Code]
const
ModPathName = 'modifypath';
ModPathType = 'user';
Procedure customUninstall();
var
mRes : integer;
begin
// Ask fro delete DPF Manager folder
mRes := MsgBox('Do you want to remove also the reports and configuration files?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2)
// Line breaks with with ' #13#13 '
if mRes = IDYES then begin
// Delete config files
DeleteFile('{%HOMEPATH}\DPF Manager\*.dpf');
//DeleteFile('{%HOMEPATH}\DPF Manager\dpfmanager.properties');
DeleteFile('{%HOMEPATH}\DPF Manager\dpfmanager.properties');
// Delete reports directory recursively
DelTree('{%HOMEPATH}\DPF Manager\reports', True, True, True);
// Delete DPF Manager user folder only if empty
RemoveDir('{%HOMEPATH}\DPF Manager');
end;
end;
function ModPathDir(): TArrayOfString;
begin
setArrayLength(Result, 1)
Result[0] := ExpandConstant('{app}');
end;
// Fixed for javapackager
#include "DPF Manager\app\resources\modpath.iss"
Loading

0 comments on commit 612ef5c

Please sign in to comment.