git p4 Windows에서 쓰기

아. git-p4를 내가 다시 쓸 일이 생기다니.. OTL

Perforce는 (거지같게도) patch 파일이나 diff 파일 만드는 기능이 빈약해서 git p4 clone 해서 patch 파일을 만들어 사용하면 편하다.

사실 별로 해줄 건 없고,

Git for Windows 깔고,

p4 깔고,

git-p4.py 만 https://raw.github.com/git/git/master/git-p4.py 에서 받아다가 “C:\Program Files (x86)\Git\bin\” 아래에 넣어주면 된다.

git-p4.py 치는 거보다 git p4 로 쓰고 싶으면 “%USERPROFILE%.gitconfig” 를 아래와 같이 고쳐서 alias해주면 된다.

[alias]

p4 = !’C:\\Program Files (x86)\\Git\\bin\\git-p4.py’

기본 config variable은 다음과 같다.

git-p4.user

User specified as an option to all p4 commands, with -u
<user>
. The environment variable P4USER can be used instead.

git-p4.password

Password specified as an option to all p4 commands, with -P
<password>
. The environment variable P4PASS can be used
instead.

git-p4.port

Port specified as an option to all p4 commands, with -p
<port>
. The environment variable P4PORT can be used instead.

git-p4.host

Host specified as an option to all p4 commands, with -h
<host>
. The environment variable P4HOST can be used instead.

git-p4.client

Client specified as an option to all p4 commands, with -c
<client>
, including the client spec. 

참고: http://ericlathrop.com/2012/12/how-to-set-up-git-p4-in-windows/


[Windows] Tortoise*를 사용할 때 Icon Overlay 안보이는 문제

Windows 7 등에서 TortoiseCVS, TortoiseSVN, TortoiseGit, TortoiseHg 등을 사용할 때, 아이콘 오버레이가 안보이는 경우가 있다.

이 경우 레지스트리 문제인데, HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\ShellIconOverlayIdentifiers 아래에 Sub key 가 너무 많아서 그렇다. 15개 까지만 보인다고 한다.

잘 안쓰이는 Icon Overlay 항목에 그냥 “z_”를 추가시켜서 정렬했을 때 아래로 가도록 만들자. 수정 후에는 로그오프/로그인. 간단히 재부팅해도 되고~

참고 : http://stackoverflow.com/questions/1057734/tortoisesvn-icons-not-showing-up-under-windows-7

USB Windows XP 설치

http://www.parkoz.com/zboard/view.php?id=my_tips&page=1&sn1=&divpage=3&sn=off&ss=on&sc=off&keyword=xp&select_arrange=headnum&desc=asc&no=13051
안됨 – /BOOT/BCD 어쩌고

http://blog.naver.com/lvis?Redirect=Log&logNo=10036988219&vid=0
안됨 – Disk error 어쩌고 저쩌고

http://www.usboffice.kr
 – http://www.usboffice.kr/zbxe/275520
  – http://blog.daum.net/idrlee/16100073
 – http://usboffice.kr/zbxe/use_boot/481399/page/3

http://www.msfn.org/board/install-usb-winsetupfromusb-gui-t120444.html

http://nofate.tistory.com/455

NETBOOT로 선회
 http://www.cyworld.com/hyunweb/2811496
성공 – 결국 관건은 C: 에 부팅할 수 있도록 Windows 98 부팅 디스크를 심고, D: 에 I386 폴더를 복사해서 I386 아래의 WINNT 를 실행하는 것이었다. 실행 후 파티션 작업 역시 다시 할 수 있는 듯 하다.

USB 부트
http://blog.naver.com/baljern/140097762413
성공 – diskpart 에서 “create partition primary size=200000 (200기가)”
cmd 에서 “format c: /fs:ntfs /q/u” 로 NTFS 포멧
cmd 에서 x:\i386> “winnt32.exe /syspart:c /tempdrive:c”

MBR 이상인 경우 MBR write 툴도 함께 있음.

Windows Shell Extension 개발 참고자료

MSDN : Creating Shell Extension Handlers

The Complete Idiot’s Guide to Writing Shell Extensions
 Part 1
 Part 2
 Part 3
 Part 4
 Part 5
 Part 6
 Part 7
 Part 8
 Part 9

Shell Extension Context Menu Sample
Registry에 등록하는 건 Post-Build Step 에서 Regsvr32를 이용해서 등록한다. 커맨드는 다음과 같다.

regsvr32.exe /s /c $(OUTDIR)\CtxMenu.dll

Registry에 등록을 해제하는 건 다음과 같은 커맨드로 가능하다.

regsvr32.exe /s /u $(OUTDIR)\CtxMenu.dll

Registry 등록 관련 절차는 ShellExtReg.cpp 내의 RegisterFileMenu() 와 UnregisterFileMenu() 내부를 참고하면 좋다.

원격 데스크톱 연결 – XP3 에서 윈도우즈 키 안먹힐 때..

윈도우즈 XP SP3로 오면서 Remote Desktop Connection tool(RDP Client)인 mstsc가 Ver. 6.0.6001로 업그레이드되면서 몇 가지 변경이 있다.

1. /console 옵션 대신 /admin 옵션을 사용한다는 것
2. 원격 접속된 컴퓨터에서의 Windows-key나 Alt-key 조합이 먹지 않는 것

1 번은 그렇다쳐도 2 번은 정말 불편하다-_-

업그레이드된 버전으로 어떻게 안되나 많이 시도해보았지만 결론은 안되는 듯 하다.
이를 위해 기존 5.2 클라이언트를 사용하기로 결정하고 검색해보았더니 프리웨어로 TSplus Portable RDP 5.2 client가 있다. 이를 이용해서 사용하면 된다.

DOS/Windows 프롬프트 환경에서의 Start 명령

DOS/Windows 환경의 배치파일(.bat)에서 여러 명령을 한꺼번에 수행하고 싶을 때 start란 명령을 사용한다고 한다.
도움말에서 나오는 소개는 “지정된 프로그램이나 명령을 별도의 창에서 시작합니다.” 라고 되어 있다.

start 명령에 대한 도움말은 /? 옵션을 통해 볼 수 있다.

실행하는 형식은 다음과 같다

START [“제목”] [/D경로] [/I] [/MIN] [/MAX] [/SEPARATE | /SHARED]
      [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
      [/WAIT] [/B] [명령어/프로그램]
      [매개 변수]


많이 쓰이는 것으로 보이는 몇가지 옵션을 정리하자면

/D 시작 디렉토리 지정
/B 새 창을 만들지 않고 응용 프로그램 시작

예제

start /D”D:\Source” cmd

배치 파일에서 사용하면 여러 동작을 순차적이 아닌 한번에 시작할 수 있다.

참고 : 윈도우에서 여러 프로그램을 한 번에 실행시키는 팁 – 운명과시간의신