Skip to content

Commit

Permalink
nop_continue: init
Browse files Browse the repository at this point in the history
nop_continue is a a windows exe that does nothing without black cmd window
but stays in background until manally terminated.

Close #1
  • Loading branch information
myfreeer committed Mar 28, 2018
1 parent 21b4364 commit 60c8bdb
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CC ?= gcc
CFLAGS += -Wall -Wextra -lkernel32 -O3 -Os -s \
CFLAGS += -Wall -Wextra -lkernel32 -luser32 -O3 -Os -s \
-nostartfiles -nostdlib -nodefaultlibs -mwindows \
-fmerge-all-constants -fno-asynchronous-unwind-tables \
-Wl,--gc-sections -Wl,--build-id=none
Expand All @@ -8,7 +8,7 @@ EXTRA_CFLAGS = -fno-ident -fno-stack-protector -fomit-frame-pointer \
-fno-unwind-tables -falign-functions=1 -falign-jumps=1 -falign-loops=1 \
-ffunction-sections -fdata-sections -fno-math-errno

all: nop.exe
all: nop.exe nop_continue.exe

clean:
-@rm -f *.exe *.o
Expand Down
10 changes: 9 additions & 1 deletion appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,15 @@ build_script:
move /Y nop.exe nop_x64.exe
move /Y nop_continue.exe nop_continue_x64.exe
set MSYSTEM=MINGW32
C:\msys64\usr\bin\bash -lc "cd \"$APPVEYOR_BUILD_FOLDER\" && exec make"
move /Y nop.exe nop_x86.exe
move /Y nop_continue.exe nop_continue_x86.exe
test_script:
- cmd: >-
start /wait nop_x64.exe
Expand All @@ -20,6 +24,10 @@ test_script:
artifacts:
- path: nop_x64.exe
- path: nop_x86.exe
- path: nop_continue_x64.exe
- path: nop_continue_x86.exe
on_failure:
- appveyor PushArtifact nop_x64.exe
- appveyor PushArtifact nop_x86.exe
- appveyor PushArtifact nop_x86.exe
- appveyor PushArtifact nop_continue_x64.exe
- appveyor PushArtifact nop_continue_x86.exe
8 changes: 8 additions & 0 deletions nop_continue.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include <windows.h>

int __cdecl WinMainCRTStartup() {
MSG msg;
GetMessage(&msg, NULL, 0, 0);
ExitProcess(0);
return 0;
}

3 comments on commit 60c8bdb

@deanWpennington
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pardon my lack of knowledge. I happened to need this functionality as well (not for Minecraft in my case). I see there are two versions at x86 and x63.

What's the difference? Thanks in advance, Dean deanpennington@gmail.com

@myfreeer
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@deanWpennington These are compiled binaries, x86 is compiled for 32-bit x86 (IA-32) cpu architecture, x64 is compiled for x86_64 cpu architecture .

@deanWpennington
Copy link

@deanWpennington deanWpennington commented on 60c8bdb Oct 13, 2021 via email

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.