Browse Source

Fixed Mac Bundle setup script and its permissions

Thomas Buck 10 years ago
parent
commit
cc9bb0d9b8
3 changed files with 4 additions and 13 deletions
  1. 2
    11
      cmake/setup_mac.sh
  2. 1
    0
      src/CMakeLists.txt
  3. 1
    2
      src/OpenRaider.cpp

+ 2
- 11
cmake/setup_mac.sh View File

17
 fi
17
 fi
18
 if [[ ! -n `find "${HOME}/.OpenRaider/paks" -type f -exec echo Found {} \;` ]]; then
18
 if [[ ! -n `find "${HOME}/.OpenRaider/paks" -type f -exec echo Found {} \;` ]]; then
19
     echo "Missing level files!"
19
     echo "Missing level files!"
20
-    osascript -e 'tell app "System Events" to display alert "No level files stored in ~/.OpenRaider/paks\n\nPlace level files there and edit ~/.OpenRaider/OpenRaider.init"'
20
+    osascript -e 'tell app "System Events" to display alert "No level files stored in ~/.OpenRaider/paks\n\nPlace original Tomb Raider level files there!"'
21
 else
21
 else
22
-    if [[ ! `diff "${HOME}/.OpenRaider/OpenRaider.init" "../Resources/defaults/OpenRaider.init"` ]]; then
23
-        if [[ ! `diff "${HOME}/.OpenRaider/custom.cfg" "../Resources/defaults/custom.cfg"` ]]; then
24
-            echo "Unconfigured user!"
25
-            osascript -e 'tell app "System Events" to display alert "Please edit ~/.OpenRaider/OpenRaider.init or ~/.OpenRaider/custom.cfg"'
26
-        else
27
-            ./OpenRaider
28
-        fi
29
-    else
30
-        ./OpenRaider
31
-    fi
22
+    ./OpenRaider
32
 fi
23
 fi

+ 1
- 0
src/CMakeLists.txt View File

96
         add_custom_command (TARGET OpenRaider POST_BUILD
96
         add_custom_command (TARGET OpenRaider POST_BUILD
97
             COMMAND echo "Injecting setup script..."
97
             COMMAND echo "Injecting setup script..."
98
             COMMAND cp "${PROJECT_SOURCE_DIR}/cmake/setup_mac.sh" "${PROJECT_BINARY_DIR}/src/OpenRaider.app/Contents/MacOS/OpenRaider.sh"
98
             COMMAND cp "${PROJECT_SOURCE_DIR}/cmake/setup_mac.sh" "${PROJECT_BINARY_DIR}/src/OpenRaider.app/Contents/MacOS/OpenRaider.sh"
99
+            COMMAND chmod "a+x" "${PROJECT_BINARY_DIR}/src/OpenRaider.app/Contents/MacOS/OpenRaider.sh"
99
         )
100
         )
100
 
101
 
101
         # Fix executable name, so setup script will be called
102
         # Fix executable name, so setup script will be called

+ 1
- 2
src/OpenRaider.cpp View File

485
                 buffer[2] = 0;
485
                 buffer[2] = 0;
486
                 break;
486
                 break;
487
             default:
487
             default:
488
-                // Workaround until proper SDL2 text input is used
488
+                //! \fixme Workaround until proper SDL2 text input is used
489
                 if ((key >= 1073742049) && (key <= 1073742051))
489
                 if ((key >= 1073742049) && (key <= 1073742051))
490
                     break;
490
                     break;
491
 
491
 
2698
     //fflush(stdout);
2698
     //fflush(stdout);
2699
 }
2699
 }
2700
 
2700
 
2701
-//! \fixme Use rc_get_bool consistently!
2702
 void OpenRaider::consoleCommand(char *cmd)
2701
 void OpenRaider::consoleCommand(char *cmd)
2703
 {
2702
 {
2704
     bool b = false;
2703
     bool b = false;

Loading…
Cancel
Save