Skip to content

Commit

Permalink
Installer Update
Browse files Browse the repository at this point in the history
  • Loading branch information
DanielLMcGuire committed May 11, 2024
1 parent 07df435 commit 849eacf
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 35 deletions.
21 changes: 21 additions & 0 deletions scripts/windows_build/BuildAll.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
@echo off
cd %~dp0
set App=MathBotCLI
title %App% Compiler
echo DMC C# Universal Compiling Script for %App%
echo.
echo Compiling %App%
echo.
cd ..\..\src\Windows\
dotnet build MathBotCLI.csproj --nologo -c Release -o bin\Release\net8.0-windows10.0.17763.0
echo.
echo Application Compiled!
echo.
echo Compiling %App% Installer
echo.
cd /d "C:\Program Files (x86)\NSIS\"
makensis.exe %~dp0\main.nsi
echo.
echo Installer Compiled!
pause
exit
Binary file modified scripts/windows_build/MathBotCLISetup.exe
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

Algorithm Hash Path
--------- ---- ----
SHA256 4AE90731F49157CEA0899EB41E909AEB61DAACA0F10C82E4619A26B0F15F677B C:\Source\MathBotCLI\scripts\...
SHA256 C13E2E67D5BCF0A3071D136513D4B27A758379E73883DAEBA7AE7CB9A9896686 E:\MathBotCLI\scripts\windows...


8 changes: 0 additions & 8 deletions scripts/windows_build/buildinstaller.cmd

This file was deleted.

7 changes: 0 additions & 7 deletions scripts/windows_build/buildwindows.cmd

This file was deleted.

7 changes: 3 additions & 4 deletions scripts/windows_build/computechecksum.cmd
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
@echo off
echo DMC Compiler (Checksum Gen)
powershell.exe "Get-FileHash *Setup.exe -Algorithm SHA256" > checksum.txt
cls
echo DMC Compiler (Checksum Gen)
echo Writing checksum to checksum.txt
echo.
cd %~dp0
powershell.exe "Get-FileHash *Setup.exe -Algorithm SHA256" > SHA256.txt
echo Checksum saved.
pause
exit
3 changes: 3 additions & 0 deletions scripts/windows_build/docs/README.MD
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# THIS IS STILL UNDER ACTIVE DEVELOPMENT, FOR NOW YOU WILL HAVE TO SUPPLY A CUSTOM NEW TAB PAGE AND UPDATER SCRIPT


# Method 1 | .NET SDK (Recommended)

This method uses the .NET SDK to build and install the Simple Browser application.
Expand Down
31 changes: 19 additions & 12 deletions scripts/windows_build/main.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,25 @@
!define APPNAME "MathBotCLI"
!define APP_NAME_IN_INSTALLED_DIR "MathBotCLI"
!define COMPANYNAME "Daniel McGuire Corporation"
!define DESCRIPTION "Command Line Calculator"
!define DESCRIPTION "Simple Web Browser"
!define DEVELOPER "Daniel McGuire" #License Holder
# Files Directory
!define FILE_DIR "..\..\src\windows\bin\Release\net8.0-windows10.0.17763.0" #Replace with the full path of install folder
!define FILE_DIR "..\..\src\windows\bin\Release\net8.0-windows10.0.17763.0" #Replace with the path of install folder (Should be right unless file structure tampered.)
!define LOGO_ICON_FILE "C:\Program Files (x86)\NSIS\Contrib\Graphics\Icons\nsis1-install.ico"
!define LICENSE_TEXT_FILE "main.nsi-extras\LICENSE.txt"
!define HEADER_IMG_FILE "C:\Program Files (x86)\NSIS\Contrib\Graphics\Header\win.bmp"
# These three must be integers
!define VERSIONMAJOR 3 #Major release Number
!define VERSIONMINOR 2 #Minor release Number
!define VERSIONBUILD 1 #Maintenance release Number (bugfixes only)
!define BUILDNUMBER 15 #Source control revision number
!define VERSIONMAJOR 2 #Major release Number
!define VERSIONMINOR 5 #Minor release Number
!define VERSIONBUILD 0 #Maintenance release Number (bugfixes only)
!define BUILDNUMBER 0 #Source control revision number
# These will be displayed by the "Click here for support information" link in "Add/Remove Programs"
# It is possible to use "mailto:" links in here to open email client
!define HELPURL "https://github.com/DanielLMcGuire/MathBotCLI/issues/new/choose"
!define UPDATEURL "https://github.com/DanielLMcGuire/MathBotCLI/releases/latest"
!define ABOUTURL "https://github.com/DanielLMcGuire/MathBotCLI"
!define HELPURL "https://github.com/Daniel-McGuire-Corporation/MathBotCLI/issues"
!define UPDATEURL "https://github.com/Daniel-McGuire-Corporation/MathBotCLI/releases/latest"
!define ABOUTURL "https://github.com/Daniel-McGuire-Corporation/MathBotCLI"
# This is the size (in kB) of all the files copied into "Program Files"
!define INSTALLSIZE 248
!define INSTALLSIZE 21153

;--------------------------------
;General
Expand Down Expand Up @@ -109,18 +109,25 @@
;Installer section

Section "install"
# Files for install directory - to build the installer, these should be in the same directory as the install script (this file)
SetOutPath $INSTDIR

# Files add here should be removed by the uninstaller (see section "uninstall")
File /r "..\..\src\Windows\bin\Release\net7.0\*.*"
Exec '"$INSTDIR\Path\MathBotCLIPATH.exe" add "C:\Program Files (x86)\MathBotCLI"'
File /r "..\..\src\windows\bin\Release\net8.0-windows10.0.17763.0\*.*"

################################################################################################################

# Uninstaller - see function un.onInit and section "uninstall" for configuration
writeUninstaller "$INSTDIR\uninstall.exe"

SetOutPath $INSTDIR
# Start Menu
CreateDirectory "$SMPROGRAMS\${APPNAME}"
CreateShortCut "$SMPROGRAMS\${APPNAME}\${APPNAME}.lnk" "$INSTDIR\${APP_NAME_IN_INSTALLED_DIR}.exe" "" "$INSTDIR\logo.ico"
CreateShortCut "$SMPROGRAMS\${APPNAME}\uninstall.lnk" "$INSTDIR\uninstall.exe" "" ""

# Desktop Shortcut
CreateShortCut "$DESKTOP\${APPNAME}.lnk" "$INSTDIR\${APP_NAME_IN_INSTALLED_DIR}.exe" "" "$INSTDIR\logo.ico"

# Registry information for add/remove programs
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\${APPNAME}" "DisplayName" "${APPNAME} - ${DESCRIPTION}"
Expand Down
4 changes: 2 additions & 2 deletions scripts/windows_build/main.nsi-extras/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Copyright 2024 Daniel McGuire Corporation

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the Software), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
2 changes: 1 addition & 1 deletion src/Windows/MathBotCLI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static void Main(string[] args)
if (length * count > 99999)
{
Console.WriteLine("This attempt was stopped because this could quickly fill up memory");
Console.WriteLine("(The max length and count is 99999)");
Console.WriteLine("(The max amount of total numbers is 99999)");
}
else
{
Expand Down

0 comments on commit 849eacf

Please sign in to comment.