From b2e3dfa27dbaf07903b248aa8fd103223c61acbb Mon Sep 17 00:00:00 2001 From: Marcus Tomlinson Date: Sat, 15 Jun 2024 19:28:38 +0100 Subject: [PATCH] Native WebView implementation (#75) --- .github/workflows/build_and_test.yml | 22 ++++++++ .gitignore | 4 +- .gitmodules | 4 ++ .vscode/_settings.json | 4 ++ .vscode/launch.json | 17 ++++++ .vscode/settings.json | 4 ++ .vscode/tasks.json | 27 +++++++++ CMakeLists.txt | 23 ++++++++ .../Local Storage/leveldb/000003.log | Bin 2000 -> 0 bytes main.js | 52 ------------------ package.json | 15 ----- snap/gui/drive.desktop | 2 +- snap/gui/find-my-friends.desktop | 10 ---- snap/gui/find-my-friends.png | Bin 17467 -> 0 bytes snap/gui/find-my-iphone.desktop | 10 ---- snap/gui/find.desktop | 10 ++++ snap/gui/{find-my-iphone.png => find.png} | Bin snap/snapcraft.yaml | 50 ++++++----------- src/main.cpp | 21 +++++++ subprojects/choc | 1 + 20 files changed, 151 insertions(+), 125 deletions(-) create mode 100644 .github/workflows/build_and_test.yml create mode 100644 .gitmodules create mode 100644 .vscode/_settings.json create mode 100644 .vscode/launch.json create mode 100644 .vscode/settings.json create mode 100644 .vscode/tasks.json create mode 100755 CMakeLists.txt delete mode 100644 dump/config/icloud-for-linux/Local Storage/leveldb/000003.log delete mode 100644 main.js delete mode 100644 package.json delete mode 100644 snap/gui/find-my-friends.desktop delete mode 100644 snap/gui/find-my-friends.png delete mode 100644 snap/gui/find-my-iphone.desktop create mode 100644 snap/gui/find.desktop rename snap/gui/{find-my-iphone.png => find.png} (100%) create mode 100644 src/main.cpp create mode 160000 subprojects/choc diff --git a/.github/workflows/build_and_test.yml b/.github/workflows/build_and_test.yml new file mode 100644 index 0000000..82d354d --- /dev/null +++ b/.github/workflows/build_and_test.yml @@ -0,0 +1,22 @@ +name: Build & Test + +on: [push] + +jobs: + build_and_test: + runs-on: ubuntu-20.04 + + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Build + id: snapcraft + uses: snapcore/action-build@v1 + + - uses: actions/upload-artifact@v3 + with: + name: snap + path: ${{ steps.snapcraft.outputs.snap }} diff --git a/.gitignore b/.gitignore index b7784fb..ee28110 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,2 @@ -node_modules -dist *.snap -*.user \ No newline at end of file +build \ No newline at end of file diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..6b8b2f2 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,4 @@ +[submodule "subprojects/choc"] + path = subprojects/choc + url = /~https://github.com/cross-platform/choc.git + branch = fork diff --git a/.vscode/_settings.json b/.vscode/_settings.json new file mode 100644 index 0000000..8b58464 --- /dev/null +++ b/.vscode/_settings.json @@ -0,0 +1,4 @@ +{ + "C_Cpp.default.cppStandard": "c++17", + "lldb.showDisassembly": "never" +} diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..21a2350 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,17 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "Run", + "preLaunchTask": "Build", + "program": "${workspaceFolder}/build/icloud-for-linux", + "args": ["notes", "Notes"], + "cwd": "${workspaceFolder}", + "request": "launch", + "type": "cppdbg", + "osx": { + "type": "lldb" + } + } + ] +} diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..8b58464 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,4 @@ +{ + "C_Cpp.default.cppStandard": "c++17", + "lldb.showDisassembly": "never" +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json new file mode 100644 index 0000000..8bfa811 --- /dev/null +++ b/.vscode/tasks.json @@ -0,0 +1,27 @@ +{ + "version": "2.0.0", + "tasks": [ + { + "label": "Build", + "type": "shell", + "group": { + "kind": "build", + "isDefault": true + }, + "command": [ + "cp .vscode/_settings.json .vscode/settings.json &&", + "mkdir -p build &&", + "cd build &&", + "cmake -DCMAKE_BUILD_TYPE=Debug .. &&", + "cmake --build . -j8 --config Debug" + ], + "problemMatcher": { + "base": "$gcc", + "fileLocation": [ + "relative", + "${workspaceFolder}/build/" + ] + } + } + ] +} diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100755 index 0000000..66f0362 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,23 @@ +cmake_minimum_required(VERSION 3.16) + +project(icloud-for-linux) + +set(CMAKE_CXX_STANDARD 17) + +include_directories(subprojects/choc) + +add_executable( + ${PROJECT_NAME} + src/main.cpp +) + +if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") + find_package(PkgConfig REQUIRED) + pkg_check_modules (gtk3 REQUIRED gtk+-3.0 IMPORTED_TARGET) + pkg_check_modules (webkit2 REQUIRED webkit2gtk-4.0 IMPORTED_TARGET) + target_link_libraries (${PROJECT_NAME} PUBLIC pthread PkgConfig::gtk3 PkgConfig::webkit2) +else() + target_link_libraries(${PROJECT_NAME} "-framework WebKit") +endif() + +install(TARGETS ${PROJECT_NAME} DESTINATION bin) diff --git a/dump/config/icloud-for-linux/Local Storage/leveldb/000003.log b/dump/config/icloud-for-linux/Local Storage/leveldb/000003.log deleted file mode 100644 index a1168b2588f73c0f7fea37c8c8028ec0c88a8745..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2000 zcmb_c%WD%s7|-+#R#6azikCfkaJDvdIROJOaiX2bH4iQTQ;7tdaOIDK3J@B`FLK$d?AcQmXCrss`0fyi?gSOz(@zfL=!{5#*-7~ zsMW?VA>%f3fCtp7Mm(<)Y!egZt?t`ta7S5CH6^Y1u4xz!#?V1FgV_C#)}7}ouqh{Grlk&NdvwMw>lRdh?X zX{Y9TR%%Nqxs)QTsD?!>l_&8wDaD57~iEU^h+k+-{9S<>VVc*}MKWZRN8(_zU+O4VQ08Ayf&(9ro>%6Y%kqYTZKi1$1<=!3gBo#s$aG>t>|n#j1i7{zC^rv7 VaoeCqpWV?Jp~Sg7Oz#Gm^%q5jc`5(^ diff --git a/main.js b/main.js deleted file mode 100644 index 212a60f..0000000 --- a/main.js +++ /dev/null @@ -1,52 +0,0 @@ -const { app, BrowserWindow, Menu, shell } = require('electron') -const fs = require('fs') - -const levelDbDir = 'config/icloud-for-linux/Local Storage/leveldb' -const levelDbFile = '/000003.log' -if (!fs.existsSync(process.env.SNAP_USER_DATA + '/.' + levelDbDir)) { - fs.mkdirSync(process.env.SNAP_USER_DATA + '/.' + levelDbDir, { recursive: true }) - fs.copyFileSync(process.env.SNAP + '/' + levelDbDir + levelDbFile, process.env.SNAP_USER_DATA + '/.' + levelDbDir + levelDbFile) -} - -let tld -try { - tld = fs.readFileSync(process.env.SNAP_USER_COMMON + '/tld', 'utf8').trim() -} -catch { - tld = '.com' - fs.writeFileSync(process.env.SNAP_USER_COMMON + '/tld', tld) -} - -const appName = 'iCloud' -const appUrl = 'https://www.icloud' + tld + '/' - -function createWindow() { - Menu.setApplicationMenu(null) - - const mainWindow = new BrowserWindow({ - width: 1000, - height: 600, - title: appName - }) - - mainWindow.loadURL(appUrl + process.argv[2]) - - mainWindow.webContents.on('will-navigate', (event, url) => { - if (!url.startsWith(appUrl)) { - event.preventDefault() - shell.openExternal(url) - } - }) - - mainWindow.on('close', () => { - app.exit(0) - }) -} - -app.whenReady().then(() => { - createWindow() -}) - -app.on('window-all-closed', function () { - app.quit() -}) diff --git a/package.json b/package.json deleted file mode 100644 index f9ca1a1..0000000 --- a/package.json +++ /dev/null @@ -1,15 +0,0 @@ -{ - "name": "icloud-for-linux", - "author": "Marcus Tomlinson", - "version": "0.0.13", - "description": "iCloud for Linux", - "main": "main.js", - "scripts": { - "start": "electron ." - }, - "repository": "/~https://github.com/cross-platform/icloud-for-linux", - "license": "GPL-3.0", - "devDependencies": { - "electron": "^21.1.1" - } -} diff --git a/snap/gui/drive.desktop b/snap/gui/drive.desktop index 819a43e..e2f6e65 100644 --- a/snap/gui/drive.desktop +++ b/snap/gui/drive.desktop @@ -7,4 +7,4 @@ Type=Application Categories=Office Icon=${SNAP}/meta/gui/drive.png Exec=icloud-for-linux.drive -StartupWMClass=icloud-for-linux.iclouddrive +StartupWMClass=icloud-for-linux.drive diff --git a/snap/gui/find-my-friends.desktop b/snap/gui/find-my-friends.desktop deleted file mode 100644 index bb04ff7..0000000 --- a/snap/gui/find-my-friends.desktop +++ /dev/null @@ -1,10 +0,0 @@ -[Desktop Entry] -Version=0.11 -Name=iCloud Find My Friend -GenericName=iCloud Find My Friend -Comment=iCloud Find My Friend -Type=Application -Categories=Office -Icon=${SNAP}/meta/gui/find-my-friends.png -Exec=icloud-for-linux.find-my-friends -StartupWMClass=icloud-for-linux.fmf diff --git a/snap/gui/find-my-friends.png b/snap/gui/find-my-friends.png deleted file mode 100644 index d4a1adf6a1302ec3cbb8792d007ba346b270198c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 17467 zcmbSRg;yQD(?%}t?k>f-xEFVK_u>UE?sjp9;_mM5UfiAHQe2BefquNdKjGW6IXP#N z-JMKklV|2hq>7R>3L+sQ1Ox<%tc-*j1Oz1Ue+3@)Q-X7kvN|{r`aFh5g8Vw?+cC+wWKJwqMDlen)RS-Wk7t z1k6+(Us$;dSq>)T$qKaruP1LtM3V>Kb&jfTg#WZ}){SVlY$@SgHZG#}mfFp9nZ!ps z5Ug%FZ7};Q@er8bZ{YcR3;VUtF01(7ajfl%Eu{(chTv+I4}_n3z*A)I_Koac`EB&< zxTXlOj_UUun8n4vU8cR1@w|<%@-1Rg9jEvB3`aS6)wK(RvYiMxQc+xW-=;bQ?id^Y zo02wzCQ#s+NJ?O1(^gSk*AL^uvx^MBzl0JacGwgoRpVnlsGF69 zc_Y%7COb1!l%{r$Q;cRi&(KsIdn3@KYBUqJn9$#{1tZ7~G zKF$@&%;nF!>MnZPlg4){PLw8aYo7md$Z?>+G0T4by@|DNFp9CJd!n+crgy6}c`8oe zvU{?&>(alx1xrcr^tZZ_(B*wybx-4KT3tXQ*V9C1U&g}U3GEfnR&2u)qd^3#AI?%E zzOLW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<&yx+6k$rf^e$>BdTqAFHFfcq__3ysw$V_>X;6#;>_;TRa7t zp19dQ`LkjE%F<+=;Hsl_4WcVfC(mbil`@Z`$t?0g;)A%?a&5jD6Hg}?v{sJ{ky|;eVN&MJU$}hakb%(QUWRw=g|syH|UvQtdboSzl`3 zCG&U1)}yyyb2SRexR*!;x_;eeam~-?*))Ye+Lgyw-Q=>#&P}}ap}V?GxVea3$4`_-`u)!K>)rXR$Ct6=tV0$0H>d}sQ5P3&`$X`{d# z^Um|W2j(+vXUZ(x+LHRf>g*SsBo{7(eYNPAU3v!!v`4MGyJUHU7qk&lFRYWrPE5+67T!7WH_)+ z4|dQlklY})<4EOKre2Rf?gf><7%#7Au3T@qUig4vf{f_mnT*fYoM*9@yt^qT=G)(h z6)o}kbyuy!0@*hRWfZxr67;b8-)HqmwEQ3Mt5>dXcx$EH%g+AslRNP-|Kz{Vf1!o&0Qi+_m&26B@``+0~@LGV4G8 +#include +#include + +int main(int, char **argv) +{ + choc::ui::DesktopWindow appWin(choc::ui::Bounds{0, 0, 0, 0}); + appWin.centreWithSize(1000, 600); + appWin.setWindowTitle( "iCloud " + std::string(argv[2]) ); + appWin.windowClosed = []() + { choc::messageloop::stop(); }; + + choc::ui::WebView webView; + webView.navigate("https://www.icloud.com/" + std::string(argv[1])); + + appWin.setContent(webView.getViewHandle()); + appWin.toFront(); + + choc::messageloop::run(); + return 0; +} diff --git a/subprojects/choc b/subprojects/choc new file mode 160000 index 0000000..e330260 --- /dev/null +++ b/subprojects/choc @@ -0,0 +1 @@ +Subproject commit e330260670b884a51774384a21a9048ee845bcca