Browse Source

Some tweaks on VSCode

Now it works on Windows for me but there are lots of hardcoded paths around... I don't like it.
Ray 6 years ago
parent
commit
98fee844d1

+ 1 - 1
projects/VSCode/.vscode/c_cpp_properties.json

@@ -13,7 +13,7 @@
                 "GRAPHICS_API_OPENGL_33",
                 "GRAPHICS_API_OPENGL_33",
                 "PLATFORM_DESKTOP"
                 "PLATFORM_DESKTOP"
             ],
             ],
-            "compilerPath": "C:/raylib/mingw/bin/gcc.exe",
+            "compilerPath": "C:/raylib/mingw32/bin/gcc.exe",
             "cStandard": "c11",
             "cStandard": "c11",
             "cppStandard": "c++14",
             "cppStandard": "c++14",
             "intelliSenseMode": "clang-x64"
             "intelliSenseMode": "clang-x64"

+ 5 - 5
projects/VSCode/.vscode/launch.json

@@ -8,7 +8,7 @@
             "name": "Debug",
             "name": "Debug",
             "type": "cppdbg",
             "type": "cppdbg",
             "request": "launch",
             "request": "launch",
-            "program": "${workspaceFolder}/game",
+            "program": "${workspaceFolder}/${fileBasenameNoExtension}",
             "args": [],
             "args": [],
             "stopAtEntry": false,
             "stopAtEntry": false,
             "cwd": "${workspaceFolder}",
             "cwd": "${workspaceFolder}",
@@ -23,7 +23,7 @@
               }
               }
             ],
             ],
             "windows": {
             "windows": {
-              "miDebuggerPath": "C:/raylib/mingw/bin/gdb.exe",
+              "miDebuggerPath": "C:/raylib/mingw32/bin/gdb.exe",
             },
             },
             "osx": {
             "osx": {
               "MIMode": "lldb"
               "MIMode": "lldb"
@@ -42,11 +42,11 @@
             "cwd": "${workspaceFolder}",
             "cwd": "${workspaceFolder}",
             "environment": [],
             "environment": [],
             "externalConsole": false,
             "externalConsole": false,
-            "program": "${workspaceFolder}/game",
+            "program": "${workspaceFolder}/${fileBasenameNoExtension}",
             "MIMode": "gdb",
             "MIMode": "gdb",
             "windows": {
             "windows": {
-              "program": "${workspaceFolder}/game.exe",
-              "miDebuggerPath": "C:/raylib/mingw/bin/gdb.exe"
+              "program": "${workspaceFolder}/${fileBasenameNoExtension}.exe",
+              "miDebuggerPath": "C:/raylib/mingw32/bin/gdb.exe"
             },
             },
             "osx": {
             "osx": {
               "MIMode": "lldb"
               "MIMode": "lldb"

+ 2 - 2
projects/VSCode/.vscode/tasks.json

@@ -12,7 +12,7 @@
                 "DEBUGGING=TRUE"
                 "DEBUGGING=TRUE"
             ],
             ],
             "windows": {
             "windows": {
-                "command": "C:/raylib/mingw/bin/mingw32-make.exe",
+                "command": "C:/raylib/mingw32/bin/mingw32-make.exe",
                 "args": [
                 "args": [
                     "RAYLIB_PATH=C:/raylib/raylib"
                     "RAYLIB_PATH=C:/raylib/raylib"
                 ],
                 ],
@@ -35,7 +35,7 @@
                 "PLATFORM=PLATFORM_DESKTOP",
                 "PLATFORM=PLATFORM_DESKTOP",
             ],
             ],
             "windows": {
             "windows": {
-                "command": "C:/raylib/mingw/bin/mingw32-make.exe",
+                "command": "C:/raylib/mingw32/bin/mingw32-make.exe",
                 "args": [
                 "args": [
                     "RAYLIB_PATH=C:/raylib/raylib",
                     "RAYLIB_PATH=C:/raylib/raylib",
                 ],
                 ],

+ 3 - 1
projects/VSCode/Makefile

@@ -54,6 +54,7 @@ ifeq ($(PLATFORM),PLATFORM_DESKTOP)
     # ifeq ($(UNAME),Msys) -> Windows
     # ifeq ($(UNAME),Msys) -> Windows
     ifeq ($(OS),Windows_NT)
     ifeq ($(OS),Windows_NT)
         PLATFORM_OS=WINDOWS
         PLATFORM_OS=WINDOWS
+        export PATH := C:/raylib/mingw32/bin:$(PATH)
     else
     else
         UNAMEOS=$(shell uname)
         UNAMEOS=$(shell uname)
         ifeq ($(UNAMEOS),Linux)
         ifeq ($(UNAMEOS),Linux)
@@ -291,7 +292,8 @@ OBJ_DIR = obj
 
 
 # Define all object files from source files
 # Define all object files from source files
 SRC = $(call rwildcard, *.c, *.h)
 SRC = $(call rwildcard, *.c, *.h)
-OBJS = $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
+#OBJS = $(SRC:$(SRC_DIR)/%.c=$(OBJ_DIR)/%.o)
+OBJS = main.c
 
 
 # For Android platform we call a custom Makefile.Android
 # For Android platform we call a custom Makefile.Android
 ifeq ($(PLATFORM),PLATFORM_ANDROID)
 ifeq ($(PLATFORM),PLATFORM_ANDROID)