Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- uses: actions/setup-python@v2
with:
python-version: '3.9.x'
Expand Down
15 changes: 14 additions & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,25 @@
"${workspaceFolder}/src/idevice",
"~/.nodenv/versions/14.16.1/include/node"
],
"defines": [],
"defines": ["HAVE_OPENSSL"],
"macFrameworkPath": [],
"compilerPath": "/opt/homebrew/bin/gcc-10",
"cStandard": "gnu17",
"cppStandard": "gnu++14",
"intelliSenseMode": "macos-gcc-arm64"
},
{
"name": "Windows",
"includePath": [
"${workspaceFolder}/**",
"${workspaceFolder}/dependencies/include",
"${workspaceFolder}/src/**",
"${workspaceFolder}/src/common",
"${workspaceFolder}/src/idevice"
],
"defines": ["WIN32"],
"cStandard": "gnu17",
"cppStandard": "gnu++14"
}
],
"version": 4
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
"cinttypes": "c",
"cstdbool": "c",
"typeinfo": "c",
"common_binding.h": "c"
"common_binding.h": "c",
"dirent.h": "c"
}
}
41 changes: 34 additions & 7 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,41 @@ $ yarn add libimobiledevice

### Windows

#### Requeriments
#### Requirements for developing

For using libimobiledevice-node on windows the following requeriments are needed:

- Install **Visual Studio 2017 community**.
- Install **Windows SDK 8.1**.
- Be sure **Powershell** command can be called from the command line.
- Add **msbuild.exe** on windows **PATH**.
npm install -g node-gyp
##### Windows MINGW

- Install msys2 win64: [https://www.msys2.org/](https://www.msys2.org/)
- Open MinGW terminal.
- Install git: `pacman -S git`.
- Generate a new ssh key with: `ssh-keygen -t rsa -b 4096`.
- Add the public key on your github `cat ~/.ssh/id_rsa.pub`.
- Clone the libimobiledevice repo: `git clone git@github.com:qustodio/libimobiledevice-fork.git`
- Run: `scripts/bootstrap-win.sh` for installing develop tools.
- Run: `scripts/install.py` for building libimobiledevice and all dependencies.

Once libimobiledevice has been built on MinGW, now is time to build the node package natively.

##### Native Windows

- Install python on windows: https://www.python.org/downloads/.
- Install nvm for windows: https://github.com/coreybutler/nvm-windows
- Open Windows PowerShell.
- Install VisualStudio (must be version 2019), select "Desktop development with C++"
- https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&rel=16
- Install node: nvm install 18.15.0
- Make sure that node is the correct version: `nvm use 18.15.0`
- Go to the libimbobiledevice-node path, for example `cd 'C:\msys64\home\<user-name>\libimobiledevice-node'`.
- Run: `npm i`.

- To troubleshoot:
- powershell as admin: Set-ExecutionPolicy Unrestricted
- In order to ensure you're running the node-gyp v9.3.1, run: `.\node_modules\.bin\node-gyp rebuild`.


# libimobiledevice

```bash
$ yarn add libimobiledevice
Expand Down Expand Up @@ -87,7 +114,7 @@ lib.backup2({
settings: true,
remove: true,
password: 'string',
cloud: 'on|off'
cloud: 'on|off',
full: false,
info: false,
list: false,
Expand Down
30 changes: 21 additions & 9 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -53,16 +53,29 @@
"src/common/libgen.c"
],
"include_dirs": [
"dependencies/x86-windows/include",
"dependencies/libplist/include",
"dependencies/libusbmuxd/include",
"dependencies/plist/include",
"dependencies/include",
"dependencies/libimobiledevice/include"
],
"libraries": [
"<(module_root_dir)/dependencies/x86-windows/lib/*.lib",
"<(module_root_dir)/dependencies/libplist/lib/plist.lib",
"<(module_root_dir)/dependencies/libusbmuxd/lib/usbmuxd.lib",
"<(module_root_dir)/dependencies/libimobiledevice/lib/imobiledevice.lib"
"link_settings": {
"libraries": [
"<(module_root_dir)/dependencies/lib/libssl.dll.a",
"<(module_root_dir)/dependencies/lib/libplist-2.0.dll.a",
"<(module_root_dir)/dependencies/lib/libusbmuxd-2.0.dll.a",
"<(module_root_dir)/dependencies/lib/libimobiledevice-1.0.dll.a",
]
},
"copies": [
{
"destination": "<(module_root_dir)/build/Release/",
"files": [
"<(module_root_dir)/dependencies/lib/libcrypto-1_1-x64.dll",
"<(module_root_dir)/dependencies/lib/libssl-1_1-x64.dll",
"<(module_root_dir)/dependencies/lib/libplist-2.0.dll",
"<(module_root_dir)/dependencies/lib/libusbmuxd-2.0.dll",
"<(module_root_dir)/dependencies/lib/libimobiledevice-1.0.dll",
]
},
]
}
]
Expand All @@ -88,6 +101,5 @@
]
]
},

]
}
Loading