fixed minor bugs in linux

This commit is contained in:
Josh Ashton
2024-04-08 10:26:25 -06:00
parent 8ac780faeb
commit 3db9b0485d
21 changed files with 17 additions and 5 deletions
BIN
View File
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
+1 -1
View File
@@ -297,7 +297,7 @@ public class Nav extends JPanel {
*/ */
private void openFile(String filename) { private void openFile(String filename) {
//file path is not working for everyone had to append src/ to run //file path is not working for everyone had to append src/ to run
File f = new File("src/resources/" + filename + ".sdku"); File f = new File("resources/" + filename + ".sdku");
// If the file does not exist, print an error message and return. // If the file does not exist, print an error message and return.
if(f == null || !f.exists() || f.isDirectory() || !f.canRead()) { if(f == null || !f.exists() || f.isDirectory() || !f.canRead()) {
System.out.println( System.out.println(
+5 -4
View File
@@ -185,9 +185,10 @@ public class Settings {
fontName + ".ttf"; fontName + ".ttf";
else if(os.startsWith("mac")) else if(os.startsWith("mac"))
fontFilepath = "/Library/Fonts/" + fontName + ".ttf"; fontFilepath = "/Library/Fonts/" + fontName + ".ttf";
else else {
fontFilepath = "/usr/share/fonts/" + fontName + ".ttf"; fontName = "HackNerdFontMono-Regular";
fontFilepath = "/usr/share/fonts/TTF/" + fontName + ".ttf";
}
// Register the font with the GraphicsEnvironment. // Register the font with the GraphicsEnvironment.
try { try {
GraphicsEnvironment ge = GraphicsEnvironment. GraphicsEnvironment ge = GraphicsEnvironment.
@@ -538,4 +539,4 @@ public class Settings {
this.autoSaveFrequency = autoSaveFrequency; this.autoSaveFrequency = autoSaveFrequency;
updateSettingsFile(); updateSettingsFile();
} }
} }
+11
View File
@@ -22,6 +22,17 @@ function run() {
jar cfe sudoku.jar App -C bin . jar cfe sudoku.jar App -C bin .
;; ;;
"-h" | "--help")
echo "Usage: run.sh [OPTION]"
echo "Run the program"
echo
echo "Options:"
echo " -c, --cli Run the program in the CLI"
echo " -b, --build Compile the program"
echo " -j, --jar Create a JAR file"
echo " -h, --help Display this help message"
;;
*) *)
echo "Invalid argument" echo "Invalid argument"
;; ;;
BIN
View File
Binary file not shown.