9 Commits

Author SHA1 Message Date
efrick 66695f595f Merge branch 'issue#4' of https://efrick.ddns.net/git/ABSC/PDF-Merge into issue#4 2024-08-08 12:38:50 -04:00
efrick cd64c19fa3 Fix null warnings in AboutBox1
One warning was left because it should not ever return null unless the
package has been damaged.
All other warnings have been resolved. This should close issue #4.
2024-08-08 12:38:11 -04:00
efrick 70cc9583af Fix null warnings in AboutBox1
One warning was left because it should not ever return null unless the
package has been damaged.
2024-08-08 12:36:16 -04:00
efrick a1c79ab1f3 Fixed null warning in MergePDFs 2024-08-08 11:41:02 -04:00
efrick d0a9bc9055 Fix null warning in MainForm 2024-08-08 11:37:22 -04:00
efrick 006228647d Fix null literal warning in ConfForm. 2024-08-08 11:35:31 -04:00
efrick af2f15fd40 Add an unistaller and Registry entries.
The software can now uninstall itself and will show up in Add or Remove software.
2024-08-07 14:44:21 -04:00
efrick 065df71090 Set permissions on the install folder during the installation.
This was causing a error when the application was run due to the regular user not having write permissions.
2024-08-07 14:01:42 -04:00
efrick a17d288f92 Merge pull request 'Resolve issue #1' (#5) from issue#1 into master
Reviewed-on: ABSC/PDF-Merge#5
2024-08-06 10:42:35 -04:00
5 changed files with 27 additions and 11 deletions
+2 -2
View File
@@ -37,7 +37,7 @@ namespace PDF_Merge
return titleAttribute.Title;
}
}
return Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().CodeBase);
return Path.GetFileNameWithoutExtension(Assembly.GetExecutingAssembly().Location);
}
}
@@ -45,7 +45,7 @@ namespace PDF_Merge
{
get
{
return Assembly.GetExecutingAssembly().GetName().Version.ToString();
return Assembly.GetExecutingAssembly()?.GetName()?.Version?.ToString();
}
}
+5 -5
View File
@@ -17,11 +17,11 @@ namespace PDF_Merge
{
InitializeComponent();
string sourcePath = ConfigurationManager.AppSettings["PDF-Path"];
string outputPath = ConfigurationManager.AppSettings["PDF-Output"];
string outputName = ConfigurationManager.AppSettings["PDF-Name"];
string outputExt = ConfigurationManager.AppSettings["PDF-Extension"];
string dateIndex = ConfigurationManager.AppSettings["dateIndex"];
string sourcePath = ConfigurationManager.AppSettings["PDF-Path"] ?? "";
string outputPath = ConfigurationManager.AppSettings["PDF-Output"] ?? "";
string outputName = ConfigurationManager.AppSettings["PDF-Name"] ?? "merged";
string outputExt = ConfigurationManager.AppSettings["PDF-Extension"] ?? ".pdf";
string dateIndex = ConfigurationManager.AppSettings["dateIndex"] ?? "0";
int dateIndexValue;
+1 -1
View File
@@ -25,7 +25,7 @@ namespace PDF_Merge
}
public void SetPathLable()
{
string sourcePath = ConfigurationManager.AppSettings["PDF-Path"];
string sourcePath = ConfigurationManager.AppSettings["PDF-Path"] ?? "";
if (sourcePath != null)
{
+2 -2
View File
@@ -60,7 +60,7 @@
}
public static string[] CollectPdfFiles()
{
string dirPath = ConfigurationManager.AppSettings["PDF-Path"];
string dirPath = ConfigurationManager.AppSettings["PDF-Path"] ?? "";
Console.WriteLine(dirPath);
string[] pdfFiles = Directory.EnumerateFiles(dirPath, "*.pdf").ToArray();
Array.Sort(pdfFiles);
@@ -81,7 +81,7 @@
public static string GetDate()
{
DateTime date = DateTime.Now;
string dateFormat = ConfigurationManager.AppSettings["dateFormat"];
string dateFormat = ConfigurationManager.AppSettings["dateFormat"] ?? "yyyy-MM-dd";
return date.ToString(dateFormat);
}
}
+17 -1
View File
@@ -34,7 +34,23 @@ SectionGroup "PDF-Merge" pdf_merge_inst
File "bin\Release\PDF-Merge.zip"
nsisunz::UnzipToLog "$INSTDIR\PDF-Merge.zip" "$INSTDIR"
Delete "$INSTDIR\PDF-Merge.zip"
nsExec::ExecToStack 'icacls "$INSTDIR" /grant Everyone:F /T'
CreateShortCut "$DESKTOP\PDF-Merge.lnk" "${APP_EXE}"
File "PDF-Merge Icon.ico"
; Write the registry keys to add the program to the Installed Programs list
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\PDF-Merge\" "InstallDate" 0x00000000
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\PDF-Merge\" "DisplayName" "PDF-Merge"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\PDF-Merge\" "DisplayVersion" "$Current_Version"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\PDF-Merge\" "Publisher" "$Company_Name"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\PDF-Merge\" "UninstallString" '"$INSTDIR\uninst.exe"'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\PDF-Merge\" "DisplayIcon" '"$INSTDIR\PDF-Merge Icon.ico"'
WriteUninstaller "uninst.exe"
SectionEnd
SectionGroupEnd
Section "Uninstall"
Delete "$DESKTOP\PDF-Merge.lnk"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\PDF-Merge\"
RMDir /r "$INSTDIR"
SectionEnd