Skip to content

Instantly share code, notes, and snippets.

@adler3d
Last active August 8, 2018 12:04
Show Gist options
  • Save adler3d/e553b811b28d06e6e05c8d739c168843 to your computer and use it in GitHub Desktop.
Save adler3d/e553b811b28d06e6e05c8d739c168843 to your computer and use it in GitHub Desktop.
empty_win32_app.diff for notepad++/updater/GUP.exe
diff --git a/build.bat b/build.bat
new file mode 100644
index 0000000..6d470d4
--- /dev/null
+++ b/build.bat
@@ -0,0 +1,6 @@
+@if "%DevEnvDir%" == "" (
+ @call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat"
+)
+@cl /nologo main.cpp /FeGUP.exe /Os /EHsc
+@del main.obj
+@GUP.exe
\ No newline at end of file
diff --git a/main.cpp b/main.cpp
new file mode 100644
index 0000000..1532e11
--- /dev/null
+++ b/main.cpp
@@ -0,0 +1,5 @@
+#include <windows.h>
+int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow)
+{
+ return 0;
+}
\ No newline at end of file
@if "%DevEnvDir%" == "" (
@call "C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\Tools\vsvars32.bat"
)
@cl /nologo main.cpp /FeGUP.exe /Os /EHsc
@del main.obj
@GUP.exe
#include <windows.h>
int WINAPI WinMain(HINSTANCE hInstance,HINSTANCE hPrevInstance,LPSTR lpCmdLine,int nCmdShow){return 0;}
/*
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars64.bat"
cl /nologo empty_main.cpp /Os /EHsc
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment