본문 바로가기

개발 관련

Gecko SDK 1.9.2로 버전 업 방법

Gecko SDK 1.9.2로 버전 업 하기

 

 

Gecko는 아래의 사이트에서 받을수 있다.

https://developer.mozilla.org/en/Gecko_SDK

 

 

Gecko 1.9 버전인지 그 이전버전인지 확실하진 않지만,

npupp.h를 사용하는 버전에서 npfunction.h를 사용하는 버전은 상당한 변화가 있다.

1.9.1부터 npfunction.h을 사용하는 것 같다. (확실하지 않은 정보 -0-)

왜 이런짓을 하냐면,,

인터넷에서 발견되는 NPRuntime(NPAPI)소스들이 대부분 이전 버전을 사용하고 있다.

물론 최신 버전에서 버그 픽스가 많이 되어 있겠지?

 

 

존 버전에서 최신 버전 gecko 1.9.2 로 덮어버리면, npupp.h를 찾을 수 없다.

아래의 순서대로 에러 뿜을 것이고, 차례대로 진행해 주면 된다.

 

ㅁ #include"npupp.h" 를 #include "npfunctions.h" 로 바꿔주기

 

ㅁ NPString 구조체 변수명 변경

      - UTF8Characters / UTF8Length

 

ㅁ gecko/include/ 에 있는 expat 관련 헤더파일 삭제

 

ㅁ NPN_GetURLUPP ->  NPN_GetURLProcPtr 변경

 

ㅁ jri.h 삭제

 

 CallNPN_GetURLNotifyProc 에러
 - http://permalink.gmane.org/gmane.comp.video.videolan.vlc.devel/72447
 - (1)
     #if (((NP_VERSION_MAJOR << 8) + NP_VERSION_MINOR) < 20)
      #include "npupp.h" 
     +// e.g. CALL_NPN(CallNPN_GetURLNotify, x, y, z) -> CallNPN_GetURLNotify(x, y, z);
     +#define CALL_NPN(__CallNPNFunc__, ...) (__CallNPNFunc__(__VA_ARGS__))
      #else
      #include "npfunctions.h"
     +#define CALL_NPN(unused, FN, ...) ((*FN)(__VA_ARGS__))
      #endif

 

     err = CallNPN_GetURLNotifyProc(gNetscapeFuncs.geturlnotify, instance, url, window, notifyData);         ->
     err = CALL_NPN(CallNPN_GetURLNotifyProc, gNetscapeFuncs.geturlnotify, instance, url, window, notifyData); 변경

 

   (2)

     아니면, 그냥 아래와 같이해도 된다.!!

     err = g_navigatorFuncs.geturlnotify(npInstance, cspUrl, cspTarget, pNotifyData);

 

ㅁ assert 에러
 - public.h 에 #include <assert.h>


 

ㅁ InnerPluginNPNGate 링크 에러
 - int32 -> int32_t
 - uint32 -> uint32_t
 - npfunctions.h 포맷에 맞추기