Skip to content

ehcostream/fileutil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

90 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FILEUTIL - 使用指南

准备工作

Linux

输入以下命令安装依赖环境

 $ [sudo] apt-get install wget
 $ [sudo] apt-get install build-essential autoconf libtool pkg-config
 $ [sudo] apt-get install python3 python3-dev golang
 $ [sudo] apt-get install libgflags-dev libgtest-dev
 $ [sudo] apt-get install clang libc++-dev

Windows

项目使用cmake + msvc14.0进行编译,安装以下应用

从Git拉取源代码

从git上拉取 fileutil源代码 (windows打开命令行工具,或者powershell)

$ git clone https://github.com/ehcostream/fileutil.git

部署开发环境

Docker

可以直接拉取已经配置完成的镜像文件,进行编译使用

  • 需要安装docker(自行安装),windows请在powershell或者CMD命令行工具中执行
docker login
docker pull ehcostream/ubuntu:fileutil
docker run -it ehcostream/ubuntu:fileutil

这样就进入生成的容器中了,已经安装所有依赖项,可以直接进行编译使用

$ cd /home/spectrum/Work/fileutil
$ git pull --rebase

编译步骤参考Linux

Linux

安装依赖库

$ [sudo] ./fileutil/distrib/build_linux_develop_env.sh

这个脚本将会编译和安装boostgrpc和它所依赖的第三方库cares,zlib,openssl,protobuf. 等待脚本执行完成,项目所依赖的开发环境就构建完成,由于GFW的原因,建议使用VPN加速,正常下载比较缓慢

编译

$ [sudo] ./build.sh

编译完成后头生成文件和库文件

  • /usr/local/include/futil
  • /usr/local/lib/libfutil.so

Windows

安装依赖库(建议使用powershell,使用Administrator启动)

PS .\fileutil\distrib\build_win32_develop_env.bat

编译

PS .\win32_build.bat

编译完成后头生成文件和库文件

  • c:\futil\include
  • c:\futil\lib

使用

主要有以下功能

  • 压缩
  • 解压
  • 加密
  • 解密
  • 异步压缩
  • 异步解压
  • 异步加密
  • 异步解密

详细使用方法参考test/test.cpp源码

Linux

编译example

进入test目录

$ cd test
$ mkdir build && cd build && cmake .. && make
./test

依赖项

linux上运行依赖libcares.so,libz.so,移植时需要一并移植

Windows

编译example

打开powershell,进入项目所在目录

PS cd test
PS mkdir build && cd build
PS cmake .. -G"Visual Stuido 14 2015"
PS cmake --build --config Release

执行

.\Release\test.exe

依赖项

windwos运行时仅依赖futil.dll,需要拷贝到程序运行目录

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published