hamlib 0.1.12 → 0.1.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/binding.gyp CHANGED
@@ -21,34 +21,40 @@
21
21
  "cflags_cc!": [ "-fno-exceptions" ],
22
22
  "conditions": [
23
23
  # Linux configuration
24
- ["OS==\"linux\"", {
25
- "include_dirs": [
26
- "/usr/include",
27
- "/usr/local/include"
28
- ],
29
- "libraries": [
30
- "-L/usr/lib",
31
- "-L/usr/local/lib",
32
- "-lhamlib"
33
- ]
34
- }],
24
+ ["OS==\"linux\"", {
25
+ "include_dirs": [
26
+ "/usr/include",
27
+ "/usr/local/include"
28
+ ],
29
+ "libraries": [
30
+ "-L/usr/lib",
31
+ "-L/usr/local/lib",
32
+ "-lhamlib"
33
+ ],
34
+ "ldflags": [
35
+ "-Wl,-rpath,\\$ORIGIN"
36
+ ]
37
+ }],
35
38
  # macOS configuration
36
- ["OS==\"mac\"", {
37
- "include_dirs": [
38
- "/usr/local/include",
39
- "/opt/homebrew/include"
40
- ],
41
- "libraries": [
42
- "-L/usr/local/lib",
43
- "-L/opt/homebrew/lib",
44
- "-lhamlib"
45
- ],
46
- "xcode_settings": {
47
- "GCC_ENABLE_CPP_EXCEPTIONS": "YES",
48
- "CLANG_CXX_LIBRARY": "libc++",
49
- "MACOSX_DEPLOYMENT_TARGET": "10.15"
50
- }
51
- }],
39
+ ["OS==\"mac\"", {
40
+ "include_dirs": [
41
+ "/usr/local/include",
42
+ "/opt/homebrew/include"
43
+ ],
44
+ "libraries": [
45
+ "-L/usr/local/lib",
46
+ "-L/opt/homebrew/lib",
47
+ "-lhamlib"
48
+ ],
49
+ "xcode_settings": {
50
+ "GCC_ENABLE_CPP_EXCEPTIONS": "YES",
51
+ "CLANG_CXX_LIBRARY": "libc++",
52
+ "MACOSX_DEPLOYMENT_TARGET": "10.15"
53
+ },
54
+ "ldflags": [
55
+ "-Wl,-rpath,@loader_path"
56
+ ]
57
+ }],
52
58
  # Windows configuration
53
59
  ["OS==\"win\"", {
54
60
  "defines": [
@@ -81,72 +87,69 @@
81
87
  ]
82
88
  }, {
83
89
  # Traditional Windows build with Visual C++
84
- "include_dirs": [
85
- # Try environment variable in different formats
86
- "<!(node -e \"console.log((process.env.HAMLIB_ROOT || 'C:/hamlib') + '/include')\")",
87
- # Fallback paths
88
- "C:/hamlib/include",
89
- "C:/Program Files/Hamlib/include",
90
- "C:/Program Files (x86)/Hamlib/include"
91
- ],
92
- "library_dirs": [
93
- # Try environment variable paths
94
- "<!(node -e \"console.log((process.env.HAMLIB_ROOT || 'C:/hamlib') + '/bin')\")",
95
- "<!(node -e \"console.log((process.env.HAMLIB_ROOT || 'C:/hamlib') + '/lib')\")",
96
- "<!(node -e \"console.log((process.env.HAMLIB_ROOT || 'C:/hamlib') + '/lib/x64')\")",
97
- "<!(node -e \"console.log((process.env.HAMLIB_ROOT || 'C:/hamlib') + '/lib/msvc')\")",
98
- # Fallback paths
99
- "C:/hamlib/bin",
100
- "C:/hamlib/lib",
101
- "C:/hamlib/lib/x64",
102
- "C:/hamlib/lib/Release",
103
- "C:/Program Files/Hamlib/bin",
104
- "C:/Program Files/Hamlib/lib",
105
- "C:/Program Files (x86)/Hamlib/bin",
106
- "C:/Program Files (x86)/Hamlib/lib"
107
- ],
108
- "libraries": [
109
- # Try to link against the DLL import library
110
- "libhamlib-4.dll.a",
111
- "hamlib-4.dll.a",
112
- "libhamlib.dll.a",
113
- "hamlib.dll.a",
114
- # Fallback to static libraries if available
115
- "libhamlib-4.lib",
116
- "hamlib-4.lib",
117
- "libhamlib.lib",
118
- "hamlib.lib"
119
- ],
120
- "conditions": [
121
- # Add pthread paths only if PTHREAD_ROOT is set
122
- ["\"<!(node -e \"console.log(process.env.PTHREAD_ROOT || '')\")\"!=\"\"", {
123
- "include_dirs": [
124
- "<!(node -e \"console.log((process.env.PTHREAD_ROOT || 'C:/pthread-win32'))\")"
125
- ],
126
- "library_dirs": [
127
- "<!(node -e \"console.log((process.env.PTHREAD_ROOT || 'C:/pthread-win32') + '/lib')\")",
128
- "<!(node -e \"console.log((process.env.PTHREAD_ROOT || 'C:/pthread-win32') + '/lib/x64')\")"
129
- ],
130
- "libraries": [
131
- "pthreadVC2.lib",
132
- "pthreadVCE2.lib",
133
- "pthreadVSE2.lib",
134
- "pthread.lib"
135
- ]
136
- }]
137
- ],
138
- "msvs_settings": {
139
- "VCCLCompilerTool": {
140
- "ExceptionHandling": 1,
141
- "AdditionalOptions": ["/std:c++14"]
142
- }
143
- }
144
- }]
145
- ]
146
- }]
90
+ "include_dirs": [
91
+ # Try environment variable in different formats
92
+ "<!(node -e \"console.log((process.env.HAMLIB_ROOT || 'C:/hamlib') + '/include')\")",
93
+ # Fallback paths
94
+ "C:/hamlib/include",
95
+ "C:/Program Files/Hamlib/include",
96
+ "C:/Program Files (x86)/Hamlib/include"
97
+ ],
98
+ "library_dirs": [
99
+ # Try environment variable paths
100
+ "<!(node -e \"console.log((process.env.HAMLIB_ROOT || 'C:/hamlib') + '/bin')\")",
101
+ "<!(node -e \"console.log((process.env.HAMLIB_ROOT || 'C:/hamlib') + '/lib')\")",
102
+ "<!(node -e \"console.log((process.env.HAMLIB_ROOT || 'C:/hamlib') + '/lib/gcc')\")",
103
+ "<!(node -e \"console.log((process.env.HAMLIB_ROOT || 'C:/hamlib') + '/lib/x64')\")",
104
+ "<!(node -e \"console.log((process.env.HAMLIB_ROOT || 'C:/hamlib') + '/lib/msvc')\")",
105
+ # Fallback paths
106
+ "C:/hamlib/bin",
107
+ "C:/hamlib/lib",
108
+ "C:/hamlib/lib/gcc",
109
+ "C:/hamlib/lib/x64",
110
+ "C:/hamlib/lib/Release",
111
+ "C:/Program Files/Hamlib/bin",
112
+ "C:/Program Files/Hamlib/lib",
113
+ "C:/Program Files/Hamlib/lib/gcc",
114
+ "C:/Program Files (x86)/Hamlib/bin",
115
+ "C:/Program Files (x86)/Hamlib/lib"
116
+ ],
117
+ "libraries": [
118
+ # Link against the import library present in hamlib-w64 zip
119
+ "libhamlib-4.lib",
120
+ # Common Win32 system libs used by hamlib
121
+ "Ws2_32.lib",
122
+ "Winmm.lib"
123
+ ],
124
+ "conditions": [
125
+ # Add pthread paths only if PTHREAD_ROOT is set
126
+ ["\"<!(node -e \"console.log(process.env.PTHREAD_ROOT || '')\")\"!=\"\"", {
127
+ "include_dirs": [
128
+ # Headers are placed directly under PTHREAD_ROOT to match this include path
129
+ "<!(node -e \"console.log((process.env.PTHREAD_ROOT || 'C:/pthread-win32'))\")"
130
+ ],
131
+ "library_dirs": [
132
+ "<!(node -e \"console.log((process.env.PTHREAD_ROOT || 'C:/pthread-win32') + '/lib/x64')\")",
133
+ "<!(node -e \"console.log((process.env.PTHREAD_ROOT || 'C:/pthread-win32') + '/lib')\")"
134
+ ],
135
+ "libraries": [
136
+ # Only link the MSVC import library we download from Sourceware
137
+ "pthreadVC2.lib"
138
+ ]
139
+ }]
140
+ ],
141
+ "msvs_settings": {
142
+ "VCCLCompilerTool": {
143
+ "ExceptionHandling": 1,
144
+ "AdditionalOptions": ["/std:c++14"]
145
+ }
146
+ }
147
+ }]
148
+ ]
149
+ }]
147
150
  ]
148
151
  }]
149
152
  ]
150
153
  }
151
154
  ]
152
- }
155
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hamlib",
3
- "version": "0.1.12",
3
+ "version": "0.1.14",
4
4
  "description": "Node.js wrapper for hamlib radio control library",
5
5
  "main": "index.js",
6
6
  "module": "lib/index.mjs",
@@ -43,7 +43,9 @@
43
43
  "test": "node test/test_loader.js",
44
44
  "test:network": "node test/test_network.js",
45
45
  "prebuild": "prebuildify --napi --strip",
46
- "prepare": ""
46
+ "prepare": "",
47
+ "bundle": "node scripts/bundle-hamlib.js",
48
+ "prebuild:bundle": "npm run prebuild && npm run bundle"
47
49
  },
48
50
  "dependencies": {
49
51
  "node-addon-api": "^4.3.0",
Binary file