Skip to content

Commit 2a9589f

Browse files
committed
Merge branch '6.3'
2 parents 8dd1f83 + a43f34b commit 2a9589f

File tree

5 files changed

+67
-12
lines changed

5 files changed

+67
-12
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,4 @@
22
/.vscode
33
/platforms/win/*.dll
44
/platforms/win/*.lib
5+
*.so

README.md

Lines changed: 63 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,36 +12,88 @@ https://www.dynamsoft.com/Company/Contact.aspx
1212
### Installation
1313
* [Visual Studio Community](https://www.visualstudio.com/downloads/)
1414
* [cmake-3.9.5-win64-x64.msi](https://cmake.org/files/v3.9/cmake-3.9.5-win64-x64.msi)
15-
* [Dynamsoft Barcode Reader 6.3](https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-Download.aspx).
15+
* [Dynamsoft Barcode Reader](https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-Download.aspx).
1616

1717
### Steps
1818
1. Copy **DBRx86.lib/DBRx64.lib** and **DynamsoftBarcodeReaderx86.dll/DynamsoftBarcodeReaderx64.dll** to **platforms\win** folder.
1919
2. Create a **build** folder:
20-
2120
```
2221
mkdir build
2322
cd build
2423
```
25-
26-
3. Generate project configuration files:
27-
28-
**Win32**
24+
3. Edit **CMakeLists.txt** to replace the installation path with yours:
25+
```
26+
set(CMAKE_INSTALL_PREFIX "e:/${PROJECT_NAME}")
27+
```
28+
4. Generate project configuration files for win32:
2929
```bash
3030
cmake ..
3131
```
3232
33-
**Win64**
33+
For win64:
3434
```bash
3535
cmake -G"Visual Studio 14 2015 Win64" ..
3636
```
37-
5. Build the project:
38-
37+
5. Build and install the project:
3938
```
40-
cmake --build .
39+
cmake --build . --target install
4140
```
4241
6. Run the app:
42+
```
43+
cd e:\BarcodeReader\bin
44+
BarcodeReader.exe [barcode image file]
45+
```
46+
47+
### Screenshot
48+
49+
![build barcode reader with cmake](images/screenshot.PNG)
50+
51+
## Linux
52+
1. Install **CMake**:
53+
```bash
54+
sudo apt-get install cmake
55+
```
56+
2. Download [Dynamsoft Barcode Reader for Linux](https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-for-Linux-Download.aspx). Copy **libDynamsoftBarcodeReader.so** to **platforms\linux**.
57+
3. Create a **build** folder:
58+
```
59+
mkdir build
60+
cd build
61+
```
62+
4. Build and install the project:
63+
```bash
64+
sudo cmake --build . --target install
65+
```
66+
5. Run the app:
67+
```
68+
BarcodeReader [barcode image file]
69+
```
4370
71+
## macOS
72+
1. Install **CMake**:
73+
```bash
74+
brew install cmake
4475
```
45-
.\Debug\BarcodeReader.exe [barcode image file]
76+
2. Download [Dynamsoft Barcode Reader for macOS](https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-Download.aspx?edition=macos&version=5.2). Copy **libDynamsoftBarcodeReader.dylib** to **platforms\macos**.
77+
3. Create a **build** folder:
4678
```
79+
mkdir build
80+
cd build
81+
```
82+
4. Build and install the project:
83+
```bash
84+
cmake --build . --target install
85+
```
86+
5. Run the app:
87+
```
88+
BarcodeReader [barcode image file]
89+
```
90+
91+
## Reference
92+
* https://cmake.org/cmake-tutorial/
93+
* https://cmake.org/Wiki/CMake_Useful_Variables
94+
* https://stackoverflow.com/questions/10671916/how-to-copy-dll-files-into-the-same-folder-as-the-executable-using-cmake
95+
* https://cmake.org/Wiki/CMake_RPATH_handling
4796
97+
## Blog
98+
* [CMake: Build C++ Project for Windows, Linux and macOS](http://www.codepool.biz/cmake-cc-windows-linux-macos.html)
99+
* [My First C/C++ App Built with CMake on Windows](http://www.codepool.biz/cc-barcode-app-cmake-windows.html)

platforms/linux/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Get [Dynamsoft Barcode Reader SDK for Linux](https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-for-Linux-Download.aspx).

platforms/macos/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Get [Dynamsoft Barcode Reader SDK for macOS](https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-Download.aspx).

platforms/win/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Contact support@dynamsoft.com to get **Dynamsoft Barcode Reader SDK v6.0 Preview for Windows**.
1+
Get [Dynamsoft Barcode Reader SDK for Windows](https://www.dynamsoft.com/Downloads/Dynamic-Barcode-Reader-Download.aspx).

0 commit comments

Comments
 (0)