본문 바로가기
카테고리 없음

vcpkg 에서 NuGet 패키지 만들기. vcpkg export

by i.got.it 2020. 9. 10.

vcpkg export .  zip파일 혹은 NuGet 패키지 파일 생성. 

vcpkg 에서 export 구문으로 특정 패키지의 zip 파일,  NuGet 패키지 설치 파일을 만들 수 있다. 해당파일을 별도 배포 가능하다. 

 



Example:

  vcpkg export zlib zlib:x64-windows boost --nuget



Options:
  --dry-run                       Do not actually export
  --raw                           Export to an uncompressed directory
  --nuget                         Export a NuGet package
  --ifw                           Export to an IFW-based installer
  --zip                           Export to a zip file
  --7zip                          Export to a 7zip (.7z) file
  --x-chocolatey                  Export a Chocolatey package (experimental feature)
  --prefab                        Export to Prefab format
  --prefab-maven                  Enable maven
  --prefab-debug                  Enable prefab debug
  --x-all-installed               Export all installed packages
  --output=...                    Specify the output name (used to construct filename)
  --output-dir=...                Specify the output directory for produced artifacts
  --nuget-id=...                  Specify the id for the exported NuGet package (overrides --output)
  --nuget-version=...             Specify the version for the exported NuGet package
  --ifw-repository-url=...        Specify the remote repository URL for the online installer
  --ifw-packages-directory-path=...
                                  Specify the temporary directory path for the repacked packages
  --ifw-repository-directory-path=...
                                  Specify the directory path for the exported repository
  --ifw-configuration-file-path=...
                                  Specify the temporary file path for the installer configuration
  --ifw-installer-file-path=...   Specify the file path for the exported installer
  --x-maintainer=...              Specify the maintainer for the exported Chocolatey package
                                  (experimental feature)
  --x-version-suffix=...          Specify the version suffix to add for the exported Chocolatey
                                  package (experimental feature)
  --prefab-group-id=...           GroupId uniquely identifies your project according maven
                                  specifications
  --prefab-artifact-id=...        Artifact Id is the name of the project according maven
                                  specifications
  --prefab-version=...            Version is the name of the project according maven specifications
  --prefab-min-sdk=...            Android minimum supported sdk version
  --prefab-target-sdk=...         Android target sdk version
  --triplet <t>                   Specify the target architecture triplet. See 'vcpkg help triplet'
                                  (default: %VCPKG_DEFAULT_TRIPLET%)
  --overlay-ports=<path>          Specify directories to be used when searching for ports
                                  (also: %VCPKG_OVERLAY_PORTS%)
  --overlay-triplets=<path>       Specify directories containing triplets files
  --binarysource=<path>           Add sources for binary caching. See 'vcpkg help binarycaching'
  --downloads-root=<path>         Specify the downloads root directory
                                  (default: %VCPKG_DOWNLOADS%)
  --vcpkg-root <path>             Specify the vcpkg root directory
                                  (default: %VCPKG_ROOT%)
  --x-buildtrees-root=<path>      (Experimental) Specify the buildtrees root directory
  --x-install-root=<path>         (Experimental) Specify the install root directory
  --x-packages-root=<path>        (Experimental) Specify the packages root directory
  --x-scripts-root=<path>         (Experimental) Specify the scripts root directory
  --x-json                        (Experimental) Request JSON output

 

vcpkg 에서 NuGet 패키지 만들어서 Visual C++ 프로젝트에 적용하는 과정 전체. 

 

- 예 : vcpkg 에 설치되어있는 라이브러리중 pthread

 

1. .\vcpkg export pthreads:x64-windows --nuget 실행 하여 nuget 패키지 설치파일 만들기.

2. Visual C++ 프로젝트 실행하여 Tools -> NuGet Package Manager -> Package Manage Console 클릭하여  

구문 Install-Package vcpkg-export-20200910-160637 -Source "D:\vcpkg\vcpkg-master" 실행 

3. 이제 VC++ 해당 프로젝트에서 pthread 라이브러리 사용한 코딩가능. 

 

아래 영상에서 위 1, 2, 3 전체 과정 보임.

 

youtu.be/efANJMuTyvE

 

 

 

 

vcpkg export --output 옵션 적용하여 파일이름에 식별성 높이기. 

- 앞의 예에서 .\vcpkg export pthreads:x64-windows --nuget  으로하면 파일명에 식별수단으로 일자정보가 기입되어있다. 이런식으로 하면 파일명만으로는 이게 어떤 라이브러리인지 식별 어렵다. --output 옵션 적용하여 패키지 이름을 추가하여 파일 생성하는게 이후 관리측면에서 압도적으로 편해진다.  

 


.\vcpkg export pthreads:x64-windows --nuget --output=vcpkg-export-pthreads

 

 

 

위 구문실행한 경우 만들어진 NuGet 폴더명 : vcpkg-export-pthread.1.0.0 

 - 버전번호가 추가되었는데 이는  NuGet 패키지 자체의 버전에 해당하며,  export 대상인 pthread 의 버전 아님. 

 

라이브러리의 버전을 표현하고 싶은경우 아래 구문처럼 기록한다. 

 


 .\vcpkg export pthreads:x64-windows --nuget --output=vcpkg-export-pthreads --nuget-version=3.0.0

 

 

연관 

 

 

 

Vcpkg. 개요 . 설치

Vcpkg - 윈도우, 리눅스, 맥 에서의 C, C++ 라이브러리 매니징 도구. - 배포처 : https://github.com/Microsoft/vcpkg microsoft/vcpkg C++ Library Manager for Windows, Linux, and MacOS. Contribute to micros..

igotit.tistory.com

 

 

 

 

 

 

 

 


첫 등록 : 2020.09.10

최종 수정 : 

단축 주소 : https://igotit.tistory.com/2571

 


 

 

 

댓글



 

비트코인




암호화폐       외환/나스닥/골드       암호화폐/외환/나스닥/골드 암호화폐/외환/나스닥/골드   암호화폐/외환/나스닥/골드
     
현물 |선물 인버스 |선물 USDT       전략매니저(카피트레이딩)     롤오버 이자 없는 스왑프리계좌
( 스왑프리 암호화폐도 거래 가능 )    
MT4, MT5 , cTrader 모두 지원     FTMO 계좌 매매운용. MT4,MT5