├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── README.md ├── data ├── assets │ ├── fonts │ │ ├── Roboto.ttf │ │ └── Roboto_ext.ttf │ ├── images │ │ ├── catalog.png │ │ ├── circle.png │ │ ├── connect.png │ │ ├── cross.png │ │ ├── disconnect.png │ │ ├── file.png │ │ ├── folder.png │ │ ├── refresh.png │ │ ├── search.png │ │ ├── square.png │ │ ├── triangle.png │ │ └── update.png │ └── langs │ │ ├── Arabic.ini │ │ ├── Catalan.ini │ │ ├── Croatian.ini │ │ ├── Dutch.ini │ │ ├── English.ini │ │ ├── Euskera.ini │ │ ├── French.ini │ │ ├── Galego.ini │ │ ├── German.ini │ │ ├── Greek.ini │ │ ├── Hungarian.ini │ │ ├── Indonesian.ini │ │ ├── Italiano.ini │ │ ├── Japanese.ini │ │ ├── Korean.ini │ │ ├── Polish.ini │ │ ├── Portuguese_BR.ini │ │ ├── Romanian.ini │ │ ├── Russian.ini │ │ ├── Ryukyuan.ini │ │ ├── Simplified Chinese.ini │ │ ├── Spanish.ini │ │ ├── Thai.ini │ │ ├── Traditional Chinese.ini │ │ └── Turkish.ini ├── sce_module │ ├── libSceFios2.prx │ └── libc.prx └── sce_sys │ ├── about │ └── right.sprx │ └── icon0.png ├── screenshot.jpg └── source ├── actions.cpp ├── actions.h ├── common.h ├── config.cpp ├── config.h ├── fs.cpp ├── fs.h ├── ftpclient.cpp ├── ftpclient.h ├── gui.cpp ├── gui.h ├── imconfig.h ├── ime_dialog.cpp ├── ime_dialog.h ├── imgui.cpp ├── imgui.h ├── imgui_draw.cpp ├── imgui_impl_sdl.cpp ├── imgui_impl_sdl.h ├── imgui_impl_sdlrenderer.cpp ├── imgui_impl_sdlrenderer.h ├── imgui_internal.h ├── imgui_tables.cpp ├── imgui_widgets.cpp ├── imstb_rectpack.h ├── imstb_textedit.h ├── imstb_truetype.h ├── inifile.c ├── inifile.h ├── lang.cpp ├── lang.h ├── main.cpp ├── orbis_jbc.c ├── orbis_jbc.h ├── remote_client.h ├── rtc.cpp ├── rtc.h ├── util.h ├── windows.cpp └── windows.h /.gitignore: -------------------------------------------------------------------------------- 1 | CMakeLists.txt.user 2 | CMakeCache.txt 3 | CMakeFiles 4 | CMakeScripts 5 | Testing 6 | Makefile 7 | cmake_install.cmake 8 | install_manifest.txt 9 | compile_commands.json 10 | CTestTestfile.cmake 11 | _deps 12 | build 13 | .vscode 14 | -------------------------------------------------------------------------------- /CMakeLists.txt: -------------------------------------------------------------------------------- 1 | cmake_minimum_required(VERSION 3.0) 2 | 3 | project(ps4_ftp_client) 4 | 5 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDONT_HAVE_STRUPR") 6 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive") 7 | 8 | add_executable(ps4_ftp_client 9 | source/actions.cpp 10 | source/config.cpp 11 | source/fs.cpp 12 | source/ftpclient.cpp 13 | source/gui.cpp 14 | source/ime_dialog.cpp 15 | source/inifile.c 16 | source/lang.cpp 17 | source/main.cpp 18 | source/orbis_jbc.c 19 | source/rtc.cpp 20 | source/windows.cpp 21 | source/imgui_draw.cpp 22 | source/imgui_impl_sdl.cpp 23 | source/imgui_impl_sdlrenderer.cpp 24 | source/imgui_tables.cpp 25 | source/imgui_widgets.cpp 26 | source/imgui.cpp 27 | ) 28 | 29 | add_self(ps4_ftp_client) 30 | 31 | add_pkg(ps4_ftp_client ${CMAKE_SOURCE_DIR}/data "FTPC00001" "PS4 FTP Client" "01.09" 32 0) 32 | 33 | target_link_libraries(ps4_ftp_client 34 | c 35 | c++ 36 | png 37 | z 38 | pthread 39 | SDL2 40 | samplerate 41 | jbc 42 | kernel 43 | SceShellCoreUtil 44 | SceSysmodule 45 | SceSystemService 46 | ScePigletv2VSH 47 | ScePrecompiledShaders 48 | SceRtc 49 | SceUserService 50 | ScePad 51 | SceAudioOut 52 | SceSysUtil 53 | SceImeDialog 54 | SceNet 55 | ) 56 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # This repo is archived, please refer to the superceded version. https://github.com/cy33hc/ps4-ezremote-client 2 | 3 | # PS4 FTP Client 4 | 5 | Simple FTP client for the PS4 6 | 7 | ![Preview](/screenshot.jpg) 8 | 9 | ## Installation 10 | Copy the **ps4_ftp_client.pkg** in to a FAT32 format usb drive then install from package installer 11 | 12 | ## Controls 13 | ``` 14 | Triangle - Menu (after a file(s)/folder(s) is selected) 15 | Cross - Select Button/TextBox 16 | Circle - Un-Select the file list to navigate to other widgets 17 | Square - Mark file(s)/folder(s) for Delete/Rename/Upload/Download 18 | R1 - Navigate to the Remote list of files 19 | L1 - Navigate to the Local list of files 20 | TouchPad Button - Exit Application 21 | ``` 22 | 23 | ## Multi Language Support 24 | The appplication support following languages 25 | 26 | The following languages are auto detected. 27 | ``` 28 | Dutch 29 | English 30 | French 31 | German 32 | Italiano 33 | Japanese 34 | Korean 35 | Polish 36 | Portuguese_BR 37 | Russian 38 | Spanish 39 | Simplified Chinese 40 | Traditional Chinese 41 | ``` 42 | 43 | The following aren't standard languages supported by the PS4, therefore requires a config file update. 44 | ``` 45 | Arabic 46 | Catalan 47 | Croatian 48 | Euskera 49 | Galego 50 | Greek 51 | Hungarian 52 | Indonesian 53 | Ryukyuan 54 | Thai 55 | Turkish 56 | ``` 57 | User must modify the file **/data/ps4-ftp-client/config.ini** located in the ps4 hard drive and update the **language** setting to with the **exact** values from the list above. 58 | 59 | **HELP:** There are no language translations for the following languages, therefore not support yet. Please help expand the list by submitting translation for the following languages. If you would like to help, please download this [Template](https://github.com/cy33hc/ps4-ftp-client/blob/master/data/assets/langs/English.ini), make your changes and submit an issue with the file attached. 60 | ``` 61 | Finnish 62 | Swedish 63 | Danish 64 | Norwegian 65 | Czech 66 | Romanian 67 | Vietnamese 68 | ``` 69 | or any other language that you have a traslation for. 70 | 71 | ## Building 72 | ``` 73 | 1. Download the pacbrew-pacman from following location and install. 74 | https://github.com/PacBrew/pacbrew-pacman/releases 75 | 2. Run following cmds 76 | pacbrew-pacman -Sy 77 | pacbrew-pacman -S ps4-openorbis ps4-openorbis-portlibs 78 | chmod guo+x /opt/pacbrew/ps4/openorbis/ps4vars.sh 79 | source /opt/pacbrew/ps4/openorbis/ps4vars.sh 80 | mkdir build; cd build 81 | openorbis-cmake .. 82 | make 83 | ``` 84 | 85 | ## Credits 86 | The color theme was borrowed from NX-Shell on the switch. 87 | -------------------------------------------------------------------------------- /data/assets/fonts/Roboto.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/assets/fonts/Roboto.ttf -------------------------------------------------------------------------------- /data/assets/fonts/Roboto_ext.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/assets/fonts/Roboto_ext.ttf -------------------------------------------------------------------------------- /data/assets/images/catalog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/assets/images/catalog.png -------------------------------------------------------------------------------- /data/assets/images/circle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/assets/images/circle.png -------------------------------------------------------------------------------- /data/assets/images/connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/assets/images/connect.png -------------------------------------------------------------------------------- /data/assets/images/cross.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/assets/images/cross.png -------------------------------------------------------------------------------- /data/assets/images/disconnect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/assets/images/disconnect.png -------------------------------------------------------------------------------- /data/assets/images/file.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/assets/images/file.png -------------------------------------------------------------------------------- /data/assets/images/folder.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/assets/images/folder.png -------------------------------------------------------------------------------- /data/assets/images/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/assets/images/refresh.png -------------------------------------------------------------------------------- /data/assets/images/search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/assets/images/search.png -------------------------------------------------------------------------------- /data/assets/images/square.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/assets/images/square.png -------------------------------------------------------------------------------- /data/assets/images/triangle.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/assets/images/triangle.png -------------------------------------------------------------------------------- /data/assets/images/update.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/assets/images/update.png -------------------------------------------------------------------------------- /data/assets/langs/Arabic.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=إعداد الاتصال 2 | STR_SITE=الموقع 3 | STR_LOCAL=محلي 4 | STR_REMOTE=بعيد 5 | STR_MESSAGES=الرسائل 6 | STR_UPDATE_SOFTWARE=تحديث التطبيق 7 | STR_CONNECT_FTP=توصيل 8 | STR_DISCONNECT_FTP=قطع الاتصال 9 | STR_SEARCH=بحث 10 | STR_REFRESH=تحديث 11 | STR_SERVER=الخادم 12 | STR_USERNAME=اسم المستخدم 13 | STR_PASSWORD=كلمة المرور 14 | STR_PORT=المنفذ 15 | STR_PASV=متجاوز 16 | STR_DIRECTORY=المسار 17 | STR_FILTER=الفلتر 18 | STR_YES=نعم 19 | STR_NO=لا 20 | STR_CANCEL=إلغاء 21 | STR_CONTINUE=استمرار 22 | STR_CLOSE=اغلاق 23 | STR_FOLDER=المجلد 24 | STR_FILE=الملف 25 | STR_TYPE=النوع 26 | STR_NAME=الاسم 27 | STR_SIZE=الحجم 28 | STR_DATE=التاريخ 29 | STR_NEW_FOLDER=مجلد جديد 30 | STR_RENAME=أعادة تسمية 31 | STR_DELETE=حذف 32 | STR_UPLOAD=رفع 33 | STR_DOWNLOAD=تحميل 34 | STR_SELECT_ALL=تحديد الكل 35 | STR_CLEAR_ALL=تجاهل الكل 36 | STR_UPLOADING=قيد الرفع 37 | STR_DOWNLOADING=قيد التحميل 38 | STR_OVERWRITE=الكتابة فوق 39 | STR_DONT_OVERWRITE=لاتكتب فوق 40 | STR_ASK_FOR_CONFIRM=أسال لتأكيد 41 | STR_DONT_ASK_CONFIRM=لاتسأل لتأكيد 42 | STR_ALLWAYS_USE_OPTION=استخدم هذا الاختيار بشكل دائم ولاتسأل مجددا 43 | STR_ACTIONS=الإجراءات 44 | STR_CONFIRM=تأكيد 45 | STR_OVERWRITE_OPTIONS=خيارات الاستبدال او الكتابة فوق 46 | STR_PROPERTIES=الخصائص 47 | STR_PROGRESS=التقدم 48 | STR_UPDATES=التحديثات 49 | STR_DEL_CONFIRM_MSG=هل انت متأكد من اجراء حذف حذف الملف او المجلد? 50 | STR_CANCEL_ACTION_MSG=قيد الإلغاء. بأنتظار الاتصال الاخير ليتم إلغائه 51 | STR_FAIL_UPLOAD_MSG=فشل في رفع الملف 52 | STR_FAIL_DOWNLOAD_MSG=فشل في تحميل الملف 53 | STR_FAIL_READ_LOCAL_DIR_MSG=فشل في قراءة محتويات المسار او المجلد غير متوفر. 54 | STR_CONNECTION_CLOSE_ERR_MSG=٤٢٦ أغلق الاتصال. 55 | STR_REMOTE_TERM_CONN_MSG=٤٢٦ الخادم البعيد قطع الإتصال. 56 | STR_FAIL_LOGIN_MSG=٣٠٠ فشل تسجيل الدخول. الرجاء التاكد من اسم المستخدم وكلمة المرور. 57 | STR_FAIL_TIMEOUT_MSG=٤٢٦ فشل. انتهى الاتصال. 58 | STR_FAIL_DEL_DIR_MSG=فشل في حذف المسار 59 | STR_DELETING=قيد الحذف 60 | STR_FAIL_DEL_FILE_MSG=فشل في حذف الملف 61 | STR_DELETED=تم الحذف 62 | STR_LINK=ربط 63 | STR_SHARE=مشاركة 64 | STR_FAILED=٣١٠ فشل 65 | STR_FAIL_CREATE_LOCAL_FILE_MSG= فشل في انشاء الملف في المحلي ٣١٠ 66 | STR_INSTALL=تثبيت 67 | STR_INSTALLING=يقوم بالتثبيت 68 | STR_INSTALL_SUCCESS=تم بنجاح 69 | STR_INSTALL_FAILED=فشل 70 | STR_INSTALL_SKIPPED=تم التخطي 71 | STR_CHECK_HTTP_MSG=فحص الإتصال بخادم HTTP البعيد 72 | STR_FAILED_HTTP_CHECK=فشل الإتصال بخادم HTTP 73 | STR_REMOTE_NOT_HTTP=البعيد ليس خادم HTTP 74 | STR_INSTALL_FROM_DATA_MSG=الحزمة غير متوفرة في /data او /mnt/usbX مجلد 75 | STR_ALREADY_INSTALLED_MSG=الحزمة مثبتة مسبقا 76 | -------------------------------------------------------------------------------- /data/assets/langs/Catalan.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Configuració de connexió 2 | STR_SITE=Lloc 3 | STR_LOCAL=Local 4 | STR_REMOTE=Remot 5 | STR_MESSAGES=Missatges 6 | STR_UPDATE_SOFTWARE=Actualització de programari 7 | STR_CONNECT_FTP=Connectar 8 | STR_DISCONNECT_FTP=Desconnectar 9 | STR_SEARCH=Cercar 10 | STR_REFRESH=Refrescar 11 | STR_SERVER=Servidor 12 | STR_USERNAME=Nom d'usuari 13 | STR_PASSWORD=Mot de pas 14 | STR_PORT=Port 15 | STR_PASV=Passiu 16 | STR_DIRECTORY=Directori 17 | STR_FILTER=Filtre 18 | STR_YES=Sí 19 | STR_NO=No 20 | STR_CANCEL=Cancel·lar 21 | STR_CONTINUE=Continuar 22 | STR_CLOSE=Tancar 23 | STR_FOLDER=Carpeta 24 | STR_FILE=Arxiu 25 | STR_TYPE=Tipus 26 | STR_NAME=Nom 27 | STR_SIZE=Mida 28 | STR_DATE=Data 29 | STR_NEW_FOLDER=Nova carpeta 30 | STR_RENAME=Reanomenar 31 | STR_DELETE=Esborrar 32 | STR_UPLOAD=Pujar 33 | STR_DOWNLOAD=Descarregar 34 | STR_SELECT_ALL=Seleccionar tot 35 | STR_CLEAR_ALL=Netejar tot 36 | STR_UPLOADING=Pujant 37 | STR_DOWNLOADING=Descarregant 38 | STR_OVERWRITE=Sobreescriure 39 | STR_DONT_OVERWRITE=No sobreescriguis 40 | STR_ASK_FOR_CONFIRM=Demana confirmació 41 | STR_DONT_ASK_CONFIRM=No demanis confirmació 42 | STR_ALLWAYS_USE_OPTION=Empra sempre aquesta opció i no tornis a preguntar 43 | STR_ACTIONS=Accions 44 | STR_CONFIRM=Confirmar 45 | STR_OVERWRITE_OPTIONS=Opcions de sobreescritura 46 | STR_PROPERTIES=Propietats 47 | STR_PROGRESS=Progrés 48 | STR_UPDATES=Actualitzacions 49 | STR_DEL_CONFIRM_MSG=Realment vols esborrar aquest fitxer(s)/carpeta(s)? 50 | STR_CANCEL_ACTION_MSG=Cancel·lant. Esperant a que es completi la última acció. 51 | STR_FAIL_UPLOAD_MSG=Errada al pujar fitxer. 52 | STR_FAIL_DOWNLOAD_MSG=Errada al descarregar fitxer. 53 | STR_FAIL_READ_LOCAL_DIR_MSG=Errada al llegir els continguts del directori o el directori no existeix. 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 Connexió tancada. 55 | STR_REMOTE_TERM_CONN_MSG=426 El servidor remot ha tancat la connexió. 56 | STR_FAIL_LOGIN_MSG=300 Inici de sessió fallit. Si us plau, comproba el nom d'usuari i mot de pas. 57 | STR_FAIL_TIMEOUT_MSG=426 Fallit. S'ha superat el temps màxim d'espera de connexió. 58 | STR_FAIL_DEL_DIR_MSG=Errada a l'esborrar la carpeta. 59 | STR_DELETING=Esborrant. 60 | STR_FAIL_DEL_FILE_MSG=Error a l'esborrar el fitxer. 61 | STR_DELETED=Esborrat. 62 | -------------------------------------------------------------------------------- /data/assets/langs/Croatian.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Postavke spajanja 2 | STR_SITE=Stranica 3 | STR_LOCAL=Lokalno 4 | STR_REMOTE=Daljinsko 5 | STR_MESSAGES=Poruke 6 | STR_UPDATE_SOFTWARE=Ažuriranje softvera 7 | STR_CONNECT_FTP=Spajanje 8 | STR_DISCONNECT_FTP=Odspajanje 9 | STR_SEARCH=Pretražiti 10 | STR_REFRESH=Osvježiti 11 | STR_SERVER=Server 12 | STR_USERNAME=Korisničko ime 13 | STR_PASSWORD=Šifra 14 | STR_PORT=Port 15 | STR_PASV=Pasv 16 | STR_DIRECTORY=Direktorij 17 | STR_FILTER=Filter 18 | STR_YES=Da 19 | STR_NO=Ne 20 | STR_CANCEL=Odustani 21 | STR_CONTINUE=Nastavi 22 | STR_CLOSE=Zatvori 23 | STR_FOLDER=Mapa 24 | STR_FILE=Datoteka 25 | STR_TYPE=Tip 26 | STR_NAME=Ime 27 | STR_SIZE=Veličina 28 | STR_DATE=Datum 29 | STR_NEW_FOLDER=Nova mapa 30 | STR_RENAME=Preimenovati 31 | STR_DELETE=Izbrisati 32 | STR_UPLOAD=Učitati 33 | STR_DOWNLOAD=Skinuti 34 | STR_SELECT_ALL=Izabrati sve 35 | STR_CLEAR_ALL=Pobrisati sve 36 | STR_UPLOADING=Učitavanje 37 | STR_DOWNLOADING=Skidanje 38 | STR_OVERWRITE=Prebrisati 39 | STR_DONT_OVERWRITE=Nemoj prebrisati 40 | STR_ASK_FOR_CONFIRM=Pitati za dopuštenje 41 | STR_DONT_ASK_CONFIRM=Nemoj pitati za dopuštenje 42 | STR_ALLWAYS_USE_OPTION=Uvijek koristiti ovu opciju i ne pitaj me više 43 | STR_ACTIONS=Akcija 44 | STR_CONFIRM=Potvrdi 45 | STR_OVERWRITE_OPTIONS=Prebrisati opcije 46 | STR_PROPERTIES=Svojstva 47 | STR_PROGRESS=Napredak 48 | STR_UPDATES=Ažuriranja 49 | STR_DEL_CONFIRM_MSG=Dali ste sigurni da želite izbrisati ovu/e mapu/e, datoteku/e? 50 | STR_CANCEL_ACTION_MSG=Odustajanje. Čekanje da završi zadnji zadatak 51 | STR_FAIL_UPLOAD_MSG=Neuspješno učitavanje podataka 52 | STR_FAIL_DOWNLOAD_MSG=Neuspješno skidanje podataka 53 | STR_FAIL_READ_LOCAL_DIR_MSG=Neuspješno čitanje sadržaja ova datoteka ili mapa ne postoji 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 Koneckija zatvorena 55 | STR_REMOTE_TERM_CONN_MSG=426 Daljinski server je prekinio konekciju 56 | STR_FAIL_LOGIN_MSG=300 Neuspjelo ulogiranje. Provjerite svoje korisničko ime i šifru. 57 | STR_FAIL_TIMEOUT_MSG=426 Neuspjelo. Konekcijska pauza 58 | STR_FAIL_DEL_DIR_MSG=Neuspješno brisanje mape 59 | STR_DELETING=Brisanje 60 | STR_FAIL_DEL_FILE_MSG=Neuspješno brisanje datoteke 61 | STR_DELETED=Obrisano -------------------------------------------------------------------------------- /data/assets/langs/Dutch.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Verbindingsinstellingen 2 | STR_SITE=Site 3 | STR_LOCAL=Lokaal 4 | STR_REMOTE=Extern 5 | STR_MESSAGES=Berichten 6 | STR_UPDATE_SOFTWARE=Update Software 7 | STR_CONNECT_FTP=Verbind met 8 | STR_DISCONNECT_FTP=Verbreek verbinding met 9 | STR_SEARCH=Zoek 10 | STR_REFRESH=Vernieuw 11 | STR_SERVER=Server 12 | STR_USERNAME=Gebruikersnaam 13 | STR_PASSWORD=Wachtwoord 14 | STR_PORT=Poort 15 | STR_PASV=Pasv 16 | STR_DIRECTORY=Locatie 17 | STR_FILTER=Filter 18 | STR_YES=Ja 19 | STR_NO=Nee 20 | STR_CANCEL=Annuleren 21 | STR_CONTINUE=Ga door 22 | STR_CLOSE=Sluit 23 | STR_FOLDER=Map 24 | STR_FILE=Bestand 25 | STR_TYPE=Type 26 | STR_NAME=Naam 27 | STR_SIZE=Grootte 28 | STR_DATE=Datum 29 | STR_NEW_FOLDER=Nieuwe Map 30 | STR_RENAME=Hernoemen 31 | STR_DELETE=Verwijderen 32 | STR_UPLOAD=Upload 33 | STR_DOWNLOAD=Download 34 | STR_SELECT_ALL=Alles selecteren 35 | STR_CLEAR_ALL=Alles wissen 36 | STR_UPLOADING=Uploaden 37 | STR_DOWNLOADING=Downloaden 38 | STR_OVERWRITE=Overschrijven 39 | STR_DONT_OVERWRITE=Niet Overschrijven 40 | STR_ASK_FOR_CONFIRM=Vraag om bevestiging 41 | STR_DONT_ASK_CONFIRM=Vraag niet om bevestiging 42 | STR_ALLWAYS_USE_OPTION=Gebruik altijd deze optie en niet opnieuw vragen 43 | STR_ACTIONS=Acties 44 | STR_CONFIRM=Bevestig 45 | STR_OVERWRITE_OPTIONS=Opties Overschrijven 46 | STR_PROPERTIES=Eigenschappen 47 | STR_PROGRESS=Voortgang 48 | STR_UPDATES=Updates 49 | STR_DEL_CONFIRM_MSG=Ben je zeker dat je dit(deze) bestand(en) of map(pen) wilt verwijderen? 50 | STR_CANCEL_ACTION_MSG=Annuleren. Wachten tot de laatste actie voltooid is. 51 | STR_FAIL_UPLOAD_MSG=Uploaden van bestand mislukt 52 | STR_FAIL_DOWNLOAD_MSG=Downloaden van bestand mislukt 53 | STR_FAIL_READ_LOCAL_DIR_MSG=Lezen van inhoud mislukt, map is onbekend 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 Verbinding verbroken. 55 | STR_REMOTE_TERM_CONN_MSG=426 Externe server heeft de verbinding verbroken. 56 | STR_FAIL_LOGIN_MSG=300 Inloggen mislukt. Controleer je gebruikersnaam of wachtwoord. 57 | STR_FAIL_TIMEOUT_MSG=426 Mislukt. Verbinding time-out. 58 | STR_FAIL_DEL_DIR_MSG=Verwijderen van map mislukt. 59 | STR_DELETING=Verwijderen 60 | STR_FAIL_DEL_FILE_MSG=Verwijderen van bestand mislukt. 61 | STR_DELETED=Verwijderd -------------------------------------------------------------------------------- /data/assets/langs/English.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Connection Settings 2 | STR_SITE=Site 3 | STR_LOCAL=Local 4 | STR_REMOTE=Remote 5 | STR_MESSAGES=Messages 6 | STR_UPDATE_SOFTWARE=Update Software 7 | STR_CONNECT_FTP=Connect 8 | STR_DISCONNECT_FTP=Disconnect 9 | STR_SEARCH=Search 10 | STR_REFRESH=Refresh 11 | STR_SERVER=Server 12 | STR_USERNAME=Username 13 | STR_PASSWORD=Password 14 | STR_PORT=Port 15 | STR_PASV=Pasv 16 | STR_DIRECTORY=Directory 17 | STR_FILTER=Filter 18 | STR_YES=Yes 19 | STR_NO=No 20 | STR_CANCEL=Cancel 21 | STR_CONTINUE=Continue 22 | STR_CLOSE=Close 23 | STR_FOLDER=Folder 24 | STR_FILE=File 25 | STR_TYPE=Type 26 | STR_NAME=Name 27 | STR_SIZE=Size 28 | STR_DATE=Date 29 | STR_NEW_FOLDER=New Folder 30 | STR_RENAME=Rename 31 | STR_DELETE=Delete 32 | STR_UPLOAD=Upload 33 | STR_DOWNLOAD=Download 34 | STR_SELECT_ALL=Select All 35 | STR_CLEAR_ALL=Clear All 36 | STR_UPLOADING=Uploading 37 | STR_DOWNLOADING=Downloading 38 | STR_OVERWRITE=Overwrite 39 | STR_DONT_OVERWRITE=Don't Overwrite 40 | STR_ASK_FOR_CONFIRM=Ask for Confirmation 41 | STR_DONT_ASK_CONFIRM=Don't Ask for Confirmation 42 | STR_ALLWAYS_USE_OPTION=Always use this option and don't ask again 43 | STR_ACTIONS=Actions 44 | STR_CONFIRM=Confirm 45 | STR_OVERWRITE_OPTIONS=Overwrite Options 46 | STR_PROPERTIES=Properties 47 | STR_PROGRESS=Progress 48 | STR_UPDATES=Updates 49 | STR_DEL_CONFIRM_MSG=Are you sure you want to delete this file(s)/folder(s)? 50 | STR_CANCEL_ACTION_MSG=Canceling. Waiting for last action to complete 51 | STR_FAIL_UPLOAD_MSG=Failed to upload file 52 | STR_FAIL_DOWNLOAD_MSG=Failed to download file 53 | STR_FAIL_READ_LOCAL_DIR_MSG=Failed to read contents of directory or folder does not exist. 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 Connection closed. 55 | STR_REMOTE_TERM_CONN_MSG=426 Remote Server has terminated the connection. 56 | STR_FAIL_LOGIN_MSG=300 Failed Login. Please check your username or password. 57 | STR_FAIL_TIMEOUT_MSG=426 Failed. Connection timeout. 58 | STR_FAIL_DEL_DIR_MSG=Failed to delete directory 59 | STR_DELETING=Deleting 60 | STR_FAIL_DEL_FILE_MSG=Failed to delete file 61 | STR_DELETED=Deleted -------------------------------------------------------------------------------- /data/assets/langs/Euskera.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Konexio ezarpenak 2 | STR_SITE=Gunea 3 | STR_LOCAL=Lekuko 4 | STR_REMOTE=Urrunekoa 5 | STR_MESSAGES=Mezuak 6 | STR_UPDATE_SOFTWARE=Eguneratu Softwarea 7 | STR_CONNECT_FTP=Konektatu 8 | STR_DISCONNECT_FTP=Deskonektatu 9 | STR_SEARCH=Bilatu 10 | STR_REFRESH=Freskatu 11 | STR_SERVER=Zerbitzaria 12 | STR_USERNAME=Erabiltzaile izena 13 | STR_PASSWORD=Pasahitza 14 | STR_PORT=Portua 15 | STR_PASV=Pasiboa 16 | STR_DIRECTORY=Direktorioa 17 | STR_FILTER=Iragazkia 18 | STR_YES=Bai 19 | STR_NO=Ez 20 | STR_CANCEL=Utzi 21 | STR_CONTINUE=Jarraitu 22 | STR_CLOSE=Itxi 23 | STR_FOLDER=Karpeta 24 | STR_FILE=Fitxategia 25 | STR_TYPE=Mota 26 | STR_NAME=Izena 27 | STR_SIZE=Tamaina 28 | STR_DATE=Data 29 | STR_NEW_FOLDER=Karpeta berria 30 | STR_RENAME=Aldatu izena 31 | STR_DELETE=Ezabatu 32 | STR_UPLOAD=Kargatu 33 | STR_DOWNLOAD=Deskargatu 34 | STR_SELECT_ALL=Hautatu guztiak 35 | STR_CLEAR_ALL=Garbitu guztiak 36 | STR_UPLOADING=Kargatzen 37 | STR_DOWNLOADING=Deskargatzen 38 | STR_OVERWRITE=Gainidatzi 39 | STR_DONT_OVERWRITE=Ez gainidatzi 40 | STR_ASK_FOR_CONFIRM=Baieztapena eskatu 41 | STR_DONT_ASK_CONFIRM=Ez eskatu baieztapena 42 | STR_ALLWAYS_USE_OPTION=Erabili beti aukera hau eta ez galdetu berriro 43 | STR_ACTIONS=Ekintzak 44 | STR_CONFIRM=Berretsi 45 | STR_OVERWRITE_OPTIONS=Gainidatzi aukerak 46 | STR_PROPERTIES=Propietateak 47 | STR_PROGRESS=Aurrerapena 48 | STR_UPDATES=Eguneraketak 49 | STR_DEL_CONFIRM_MSG=Ziur fitxategi/karpeta hau(k) ezabatu nahi duzula? 50 | STR_CANCEL_ACTION_MSG=Bertan behera uzten. Azken ekintza amaitzeko zain 51 | STR_FAIL_UPLOAD_MSG=Ezin izan da fitxategia kargatu 52 | STR_FAIL_DOWNLOAD_MSG=Ezin izan da deskargatu fitxategia 53 | STR_FAIL_READ_LOCAL_DIR_MSG=Ezin izan da direktorioa edo karpetaren edukia irakurtzean existitzen. 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 Konexioa itxita. 55 | STR_REMOTE_TERM_CONN_MSG=426 Urruneko zerbitzariak konexioa amaitu du. 56 | STR_FAIL_LOGIN_MSG=300 Ezin izan da saioa hasi. Mesedez, egiaztatu zure erabiltzaile-izena edo pasahitza. 57 | STR_FAIL_TIMEOUT_MSG=426 Huts egin. Konexioaren denbora-muga. 58 | STR_FAIL_DEL_DIR_MSG=Ezin izan da ezabatu direktorioa 59 | STR_DELETING=Ezabatzen 60 | STR_FAIL_DEL_FILE_MSG=Ezin izan da fitxategia ezabatu 61 | STR_DELETED=Ezabatu da 62 | -------------------------------------------------------------------------------- /data/assets/langs/French.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Paramètres de connexion 2 | STR_SITE=Site 3 | STR_LOCAL=Local 4 | STR_REMOTE=A distance 5 | STR_MESSAGES=Messages 6 | STR_UPDATE_SOFTWARE=Mise à jour logicielle 7 | STR_CONNECT_FTP=Connexion 8 | STR_DISCONNECT_FTP=Déconnexion 9 | STR_SEARCH=Rechercher 10 | STR_REFRESH=Rafraîchir 11 | STR_SERVER=Serveur 12 | STR_USERNAME=Identifiant 13 | STR_PASSWORD=Mot de passe 14 | STR_PORT=Port 15 | STR_PASV=Pasv 16 | STR_DIRECTORY=Répertoire 17 | STR_FILTER=Filtre 18 | STR_YES=Oui 19 | STR_NO=Non 20 | STR_CANCEL=Annuler 21 | STR_CONTINUE=Continuer 22 | STR_CLOSE=Fermer 23 | STR_FOLDER=Dossier 24 | STR_FILE=Fichier 25 | STR_TYPE=Type 26 | STR_NAME=Nom 27 | STR_SIZE=Taille 28 | STR_DATE=Date 29 | STR_NEW_FOLDER=Nouveau dossier 30 | STR_RENAME=Renommer 31 | STR_DELETE=Supprimer 32 | STR_UPLOAD=Uploader 33 | STR_DOWNLOAD=Télécharger 34 | STR_SELECT_ALL=Tout sélectionner 35 | STR_CLEAR_ALL=Tout vider 36 | STR_UPLOADING=En cours d'upload 37 | STR_DOWNLOADING=En cours de téléchargement 38 | STR_OVERWRITE=Remplacer 39 | STR_DONT_OVERWRITE=Ne pas remplacer 40 | STR_ASK_FOR_CONFIRM=Demander confirmation 41 | STR_DONT_ASK_CONFIRM=Ne pas demander confirmation 42 | STR_ALLWAYS_USE_OPTION=Toujours utiliser cette option et ne plus jamais me demander 43 | STR_ACTIONS=Actions 44 | STR_CONFIRM=Confirmer 45 | STR_OVERWRITE_OPTIONS=Remplacer les options 46 | STR_PROPERTIES=Propriétés 47 | STR_PROGRESS=Etat d'avancement 48 | STR_UPDATES=Mises à jour 49 | STR_DEL_CONFIRM_MSG=Êtes vous sûr de vouloir supprimer ce(s) fichier(s)/dossier(s) ? 50 | STR_CANCEL_ACTION_MSG=En cours d'annulation. En attente de la fin de la dernière action. 51 | STR_FAIL_UPLOAD_MSG=Echec de l'upload du fichier 52 | STR_FAIL_DOWNLOAD_MSG=Echec du téléchargement du fichier 53 | STR_FAIL_READ_LOCAL_DIR_MSG=Echec de la lecture du contenu du dossier/le dossier n'existe pas. 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 Connexion interrompue 55 | STR_REMOTE_TERM_CONN_MSG=426 Le serveur à distance à interrompu la connexion 56 | STR_FAIL_LOGIN_MSG=300 Echec d'identification. Merci de vérifier votre identifiant et votre mot de passe 57 | STR_FAIL_TIMEOUT_MSG=426 Echec. La connection a mis trop de temps à répondre 58 | STR_FAIL_DEL_DIR_MSG=Echec de la suppression du dossier 59 | STR_DELETING=En cours de suppression 60 | STR_FAIL_DEL_FILE_MSG=Echec de la suppression du fichier 61 | STR_DELETED=Supprimé 62 | -------------------------------------------------------------------------------- /data/assets/langs/Galego.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Axustes de conexión 2 | STR_SITE=Sitio 3 | STR_LOCAL=Local 4 | STR_REMOTE=Remoto 5 | STR_MESSAGES=Mensaxes 6 | STR_UPDATE_SOFTWARE=Actualizar Software 7 | STR_CONNECT_FTP=Conectar 8 | STR_DISCONNECT_FTP=Desconectar 9 | STR_SEARCH=Busca 10 | STR_REFRESH=Actualizar 11 | STR_SERVER=Servidor 12 | STR_USERNAME=Nome de usuario 13 | STR_PASSWORD=Contrasinal 14 | STR_PORT=Porto 15 | STR_PASV=Pasivo 16 | STR_DIRECTORY=Directorio 17 | STR_FILTER=Filtro 18 | STR_YES=Si 19 | STR_NO=Non 20 | STR_CANCEL=Cancelar 21 | STR_CONTINUE=Continuar 22 | STR_CLOSE=Pechar 23 | STR_FOLDER=Carpeta 24 | STR_FILE=Arquivo 25 | STR_TYPE=Tipo 26 | STR_NAME=Nome 27 | STR_SIZE=Tamaño 28 | STR_DATE=Data 29 | STR_NEW_FOLDER=Nova carpeta 30 | STR_RENAME=Renomear 31 | STR_DELETE=Eliminar 32 | STR_UPLOAD=Cargar 33 | STR_DOWNLOAD=Descargar 34 | STR_SELECT_ALL=Seleccionar todo 35 | STR_CLEAR_ALL=Limpar todo 36 | STR_UPLOADING=Cargando 37 | STR_DOWNLOADING=Descargando 38 | STR_OVERWRITE=Sobrescribir 39 | STR_DONT_OVERWRITE=Non sobrescribir 40 | STR_ASK_FOR_CONFIRM=Pedir confirmación 41 | STR_DONT_ASK_CONFIRM=Non pidas confirmación 42 | STR_ALLWAYS_USE_OPTION=Use sempre esta opción e non volva preguntar 43 | STR_ACTIONS=Accións 44 | STR_CONFIRM=Confirmar 45 | STR_OVERWRITE_OPTIONS=Opcións de sobrescritura 46 | STR_PROPERTIES=Propiedades 47 | STR_PROGRESS=Progreso 48 | STR_UPDATES=Actualizacións 49 | STR_DEL_CONFIRM_MSG=Estás seguro de que queres eliminar este(s) ficheiro(s)/cartafol(s)? 50 | STR_CANCEL_ACTION_MSG=Cancelando. Agardando a que se complete a última acción. 51 | STR_FAIL_UPLOAD_MSG=Produciuse un erro ao cargar o ficheiro. 52 | STR_FAIL_DOWNLOAD_MSG=Produciuse un erro ao descargar o ficheiro. 53 | STR_FAIL_READ_LOCAL_DIR_MSG=Non se puido ler o contido do directorio ou cartafol non existe. 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 Conexión pechada. 55 | STR_REMOTE_TERM_CONN_MSG=426 O servidor remoto rematou a conexión. 56 | STR_FAIL_LOGIN_MSG=300 Fallou o inicio de sesión. Comproba o teu nome de usuario ou contrasinal. 57 | STR_FAIL_TIMEOUT_MSG=426 Fallou. Superouse o tempo de espera da conexión. 58 | STR_FAIL_DEL_DIR_MSG=Produciuse un erro ao eliminar o directorio. 59 | STR_DELETING=Eliminando... 60 | STR_FAIL_DEL_FILE_MSG=Produciuse un erro ao eliminar o ficheiro. 61 | STR_DELETED=Eliminado. 62 | -------------------------------------------------------------------------------- /data/assets/langs/German.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Verbindungseinstellungen 2 | STR_SITE=Site 3 | STR_LOCAL=Lokal 4 | STR_REMOTE=Remote 5 | STR_MESSAGES=Nachrichten 6 | STR_UPDATE_SOFTWARE=Software aktualisieren 7 | STR_CONNECT_FTP=Verbinde 8 | STR_DISCONNECT_FTP=Trenne 9 | STR_SEARCH=Suchen 10 | STR_REFRESH=Aktualisieren 11 | STR_SERVER=Server 12 | STR_USERNAME=Benutzername 13 | STR_PASSWORD=Passwort 14 | STR_PORT=Port 15 | STR_PASV=Pasv 16 | STR_DIRECTORY=Verzeichnis 17 | STR_FILTER=Filter 18 | STR_YES=Ja 19 | STR_NO=Nein 20 | STR_CANCEL=Abbrechen 21 | STR_CONTINUE=Fortfahren 22 | STR_CLOSE=Schließen 23 | STR_FOLDER=Ordner 24 | STR_FILE=Datei 25 | STR_TYPE=Typ 26 | STR_NAME=Name 27 | STR_SIZE=Größe 28 | STR_DATE=Datum 29 | STR_NEW_FOLDER=Neuer Ordner 30 | STR_RENAME=Umbenennen 31 | STR_DELETE=Löschen 32 | STR_UPLOAD=Hochladen 33 | STR_DOWNLOAD=Herunterladen 34 | STR_SELECT_ALL=Alles auswählen 35 | STR_CLEAR_ALL=Alles abwählen 36 | STR_UPLOADING=Hochladen 37 | STR_DOWNLOADING=Herunterladen 38 | STR_OVERWRITE=Überschreiben 39 | STR_DONT_OVERWRITE=Nicht Überschreiben 40 | STR_ASK_FOR_CONFIRM=Nach einer Bestätigung fragen 41 | STR_DONT_ASK_CONFIRM=Nicht nach einer Bestätigung fragen 42 | STR_ALLWAYS_USE_OPTION=Immer diese Option verwenden und nicht mehr nachfragen 43 | STR_ACTIONS=Aktionen 44 | STR_CONFIRM=Bestätigen 45 | STR_OVERWRITE_OPTIONS=Optionen für das Überschreiben 46 | STR_PROPERTIES=Eigenschaften 47 | STR_PROGRESS=Fortschritt 48 | STR_UPDATES=Updates 49 | STR_DEL_CONFIRM_MSG=Sind Sie sicher, dass Sie diese Datei(en)/Ordner löschen wollen? 50 | STR_CANCEL_ACTION_MSG=Abbruch. Warte auf Abschluss der letzten Aktion 51 | STR_FAIL_UPLOAD_MSG=Dateiupload gescheitert 52 | STR_FAIL_DOWNLOAD_MSG=Dateidownload gescheitert 53 | STR_FAIL_READ_LOCAL_DIR_MSG=Inhalt des Verzeichnisses konnte nicht gelesen werden oder der Ordner existiert nicht. 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 Verbindung getrennt. 55 | STR_REMOTE_TERM_CONN_MSG=426 Remote Server hat die die Verbindung getrennt. 56 | STR_FAIL_LOGIN_MSG=300 Login fehlgeschlagen. Bitte Passwort und Benutzernamen überprüfen. 57 | STR_FAIL_TIMEOUT_MSG=426 Fehler. Verbindung abgelaufen. 58 | STR_FAIL_DEL_DIR_MSG=Verzeichnis konnte nicht gelöscht werden 59 | STR_DELETING=Löschen 60 | STR_FAIL_DEL_FILE_MSG=Datei konnte nicht gelöscht werden 61 | STR_DELETED=Gelöscht -------------------------------------------------------------------------------- /data/assets/langs/Greek.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Ρυθμίσεις Σύνδεσης 2 | STR_SITE=Τοποθεσία 3 | STR_LOCAL=Τοπικό 4 | STR_REMOTE=Remote 5 | STR_MESSAGES=Απομακρυσμένο 6 | STR_UPDATE_SOFTWARE=Ενημέρωση Λογισμικού 7 | STR_CONNECT_SMB=Σύνδεση 8 | STR_DISCONNECT_SMB=Αποσύνδεση 9 | STR_SEARCH=Αναζήτηση 10 | STR_REFRESH=Ανανέωση 11 | STR_SERVER=Διακομιστής 12 | STR_USERNAME=Όνομα Χρήστη 13 | STR_PASSWORD=Κωδικός Πρόσβασης 14 | STR_PORT=Θύρα 15 | STR_PASV=Παθητ.Λειτ. 16 | STR_DIRECTORY=Κατάλογος 17 | STR_FILTER=Φίλτρο 18 | STR_YES=Ναί 19 | STR_NO=Όχι 20 | STR_CANCEL=Ακύρωση 21 | STR_CONTINUE=Συνεχίστε 22 | STR_CLOSE=Κλείσιμο 23 | STR_FOLDER=Φάκελος 24 | STR_FILE=Αρχείο 25 | STR_TYPE=Τύπος 26 | STR_NAME=Όνομα 27 | STR_SIZE=Μέγεθος 28 | STR_DATE=Ημερομηνία 29 | STR_NEW_FOLDER=Νέος Φάκελος 30 | STR_RENAME=Μετονομασία 31 | STR_DELETE=Διαγραφή 32 | STR_UPLOAD=Ανέβασμα 33 | STR_DOWNLOAD=Λήψη 34 | STR_SELECT_ALL=Επιλογή Όλων 35 | STR_CLEAR_ALL=Εκκαθάριση Όλων 36 | STR_UPLOADING=Μεταφόρτωση 37 | STR_DOWNLOADING=Κατεβαίνει 38 | STR_OVERWRITE=Αντικατάσταση 39 | STR_DONT_OVERWRITE=Μην Αντικαταστήσετε 40 | STR_ASK_FOR_CONFIRM=Ρωτήστε για επιβεβαίωση 41 | STR_DONT_ASK_CONFIRM=Μη Ρωτάτε για επιβεβαίωση 42 | STR_ALLWAYS_USE_OPTION=Χρησιμοποιήστε πάντα αυτή την επιλογή και μην ξαναρωτήσετε 43 | STR_ACTIONS=Ενέργειες 44 | STR_CONFIRM=Επιβεβαίωση 45 | STR_OVERWRITE_OPTIONS=Επιλογές Αντικατάστασης 46 | STR_PROPERTIES=Ιδιότητες 47 | STR_PROGRESS=Πρόοδος 48 | STR_UPDATES=Ενημερώσεις 49 | STR_DEL_CONFIRM_MSG=Είστε σίγουροι ότι θέλετε να διαγράψετε αυτό(-α) το(-α) αρχείο(-α)/φάκελο(-ους); 50 | STR_CANCEL_ACTION_MSG=Ακύρωση. Αναμονή για την ολοκλήρωση της τελευταίας ενέργειας 51 | STR_FAIL_UPLOAD_MSG=Απέτυχε το ανέβασμα Αρχείου 52 | STR_FAIL_DOWNLOAD_MSG=Αποτυχία λήψης αρχείου 53 | STR_FAIL_READ_LOCAL_DIR_MSG=Απέτυχε να διαβάσει τα περιεχόμενα του καταλόγου ή ο φάκελος δεν υπάρχει. 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 Η σύνδεση έκλεισε. 55 | STR_REMOTE_TERM_CONN_MSG=426 Ο απομακρυσμένος διακομιστής τερμάτισε τη σύνδεση. 56 | STR_FAIL_LOGIN_MSG=300 Αποτυχημένη σύνδεση. Παρακαλούμε ελέγξτε το όνομα χρήστη ή τον κωδικό πρόσβασής σας. 57 | STR_FAIL_TIMEOUT_MSG=426 Απέτυχε. Η σύνδεση έχει διακοπεί. 58 | STR_FAIL_DEL_DIR_MSG=Απέτυχε η διαγραφή καταλόγου 59 | STR_DELETING=Διαγραφή 60 | STR_FAIL_DEL_FILE_MSG=Αποτυχία διαγραφής αρχείου 61 | STR_DELETED=Διαγράφηκε(-αν) 62 | STR_LINK=Σύνδεσμος 63 | STR_SHARE=Μοιραστείτε 64 | STR_FAILED=310 Απέτυχε 65 | STR_FAIL_CREATE_LOCAL_FILE_MSG=310 Απέτυχε η δημιουργία αρχείου στο τοπικό 66 | STR_INSTALL=Εγκαταστήστε το 67 | STR_INSTALLING=Εγκατάσταση 68 | STR_INSTALL_SUCCESS=Επιτυχία 69 | STR_INSTALL_FAILED=Αποτυχία 70 | STR_INSTALL_SKIPPED=Παραλείπεται(-ονται/φθηκε/φθηκαν) 71 | STR_CHECK_HTTP_MSG=Έλεγχος σύνδεσης με απομακρυσμένο διακομιστή HTTP 72 | STR_FAILED_HTTP_CHECK=Απέτυχε η σύνδεση με τον διακομιστή HTTP 73 | STR_REMOTE_NOT_HTTP=Το απομακρυσμένο δεν είναι διακομιστής HTTP 74 | STR_INSTALL_FROM_DATA_MSG=Το Package δεν βρίσκεται στο φάκελο /data ή /mnt/usbX 75 | STR_ALREADY_INSTALLED_MSG=Το Package είναι ήδη εγκατεστημένο 76 | -------------------------------------------------------------------------------- /data/assets/langs/Hungarian.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Kapcsolati beállítások 2 | STR_SITE=Site 3 | STR_LOCAL=Helyi 4 | STR_REMOTE=Távoli 5 | STR_MESSAGES=Üzenetek 6 | STR_UPDATE_SOFTWARE=Szoftver frissítés 7 | STR_CONNECT_FTP=Kapcsolódás 8 | STR_DISCONNECT_FTP=Szétkapcsol 9 | STR_SEARCH=Keres 10 | STR_REFRESH=Frissít 11 | STR_SERVER=Szerver 12 | STR_USERNAME=Felhasználónév 13 | STR_PASSWORD=Jelszó 14 | STR_PORT=Port 15 | STR_PASV=Pasv 16 | STR_DIRECTORY=Útvonal 17 | STR_FILTER=Szűrés 18 | STR_YES=Igen 19 | STR_NO=Nem 20 | STR_CANCEL=Kilép 21 | STR_CONTINUE=Folytatás 22 | STR_CLOSE=Bezár 23 | STR_FOLDER=Mappa 24 | STR_FILE=Fájl 25 | STR_TYPE=Típus 26 | STR_NAME=Fájlnév 27 | STR_SIZE=Méret 28 | STR_DATE=Dátum 29 | STR_NEW_FOLDER=Új Mappa 30 | STR_RENAME=Átnevez 31 | STR_DELETE=Töröl 32 | STR_UPLOAD=Feltölt 33 | STR_DOWNLOAD=Letölt 34 | STR_SELECT_ALL=Mind kijelöl 35 | STR_CLEAR_ALL=Kijelölést megszüntet 36 | STR_UPLOADING=Feltöltés 37 | STR_DOWNLOADING=Letöltés 38 | STR_OVERWRITE=Felülír 39 | STR_DONT_OVERWRITE=Ne írja felül 40 | STR_ASK_FOR_CONFIRM=Kérjen megerősítést 41 | STR_DONT_ASK_CONFIRM=Ne kérjen megerősítést 42 | STR_ALLWAYS_USE_OPTION=Mindig ezt a beállítást használja és ne kérdezze úja 43 | STR_ACTIONS=Műveletek 44 | STR_CONFIRM=Megerősít 45 | STR_OVERWRITE_OPTIONS=Felülírási beállítások 46 | STR_PROPERTIES=Tulajdonságok 47 | STR_PROGRESS=Folyamat 48 | STR_UPDATES=Frissítések 49 | STR_DEL_CONFIRM_MSG=Biztos benne, hogy törli a mappá(ka)t vagy a fájl(oka)t? 50 | STR_CANCEL_ACTION_MSG=Kilépés. Várakozás az utolsó művelet befejezésére 51 | STR_FAIL_UPLOAD_MSG=Sikertelen feltöltés 52 | STR_FAIL_DOWNLOAD_MSG=Sikertelen letöltés 53 | STR_FAIL_READ_LOCAL_DIR_MSG=Az útvonal nem érhető el vagy a mappa nem létezik. 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 Kapcsolat megszakadt. 55 | STR_REMOTE_TERM_CONN_MSG=426 Távoli szerver megszakította a kapcsolatot. 56 | STR_FAIL_LOGIN_MSG=300 Sikertelen belépés. Kérem, ellenőrizze a felhasználónevet és a jelszót. 57 | STR_FAIL_TIMEOUT_MSG=426 Hiba. Kapcsolat időtúllépés. 58 | STR_FAIL_DEL_DIR_MSG=Nem sikerült a mappát törölni 59 | STR_DELETING=Törlés 60 | STR_FAIL_DEL_FILE_MSG=A fájl törlése sikertelen 61 | STR_DELETED=Törölve 62 | -------------------------------------------------------------------------------- /data/assets/langs/Indonesian.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Pengaturan Koneksi 2 | STR_SITE=Situs 3 | STR_LOCAL=Lokal 4 | STR_REMOTE=Remote 5 | STR_MESSAGES=Pesan 6 | STR_UPDATE_SOFTWARE=Perbarui Software 7 | STR_CONNECT_FTP=Hubungkan 8 | STR_DISCONNECT_FTP=Putuskan 9 | STR_SEARCH=Cari 10 | STR_REFRESH=Refresh 11 | STR_SERVER=Server 12 | STR_USERNAME=Nama Pengguna 13 | STR_PASSWORD=Kata Sandi 14 | STR_PORT=Port 15 | STR_PASV=Pasv 16 | STR_DIRECTORY=Direktori 17 | STR_FILTER=Filter 18 | STR_YES=Iya 19 | STR_NO=Tidak 20 | STR_CANCEL=Batal 21 | STR_CONTINUE=Lanjut 22 | STR_CLOSE=Tutup 23 | STR_FOLDER=Folder 24 | STR_FILE=File 25 | STR_TYPE=Jenis 26 | STR_NAME=Nama 27 | STR_SIZE=Ukuran 28 | STR_DATE=Tanggal 29 | STR_NEW_FOLDER=Folder Baru 30 | STR_RENAME=Ganti Nama 31 | STR_DELETE=Hapus 32 | STR_UPLOAD=Unggah 33 | STR_DOWNLOAD=Unduh 34 | STR_SELECT_ALL=Pilih Semua 35 | STR_CLEAR_ALL=Lepaskan Semua 36 | STR_UPLOADING=Mengunggah 37 | STR_DOWNLOADING=Mengunduh 38 | STR_OVERWRITE=Overwrite 39 | STR_DONT_OVERWRITE=Jangan Overwrite 40 | STR_ASK_FOR_CONFIRM=Minta untuk Konfirmasi 41 | STR_DONT_ASK_CONFIRM=Jangan minta untuk Konfirmasi 42 | STR_ALLWAYS_USE_OPTION=Selalu gunakan opsi ini dan jangan tanya lagi 43 | STR_ACTIONS=Aksi 44 | STR_CONFIRM=Setuju 45 | STR_OVERWRITE_OPTIONS=Opsi Overwrite 46 | STR_PROPERTIES=Perincian 47 | STR_PROGRESS=Progres 48 | STR_UPDATES=Pembaruan 49 | STR_DEL_CONFIRM_MSG=Apakah kamu mau menghapus file/folder ini? 50 | STR_CANCEL_ACTION_MSG=Membatalkan. Menunggu aksi terakhir untuk selesai 51 | STR_FAIL_UPLOAD_MSG=Pengunggahan file gagal 52 | STR_FAIL_DOWNLOAD_MSG=Pengunduhan file gagal 53 | STR_FAIL_READ_LOCAL_DIR_MSG=Isi direktori gagal dibaca atau folder tidak ada. 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 Koneksi ditutup. 55 | STR_REMOTE_TERM_CONN_MSG=426 Server Remote telah menutupkan koneksi. 56 | STR_FAIL_LOGIN_MSG=300 Login gagal. Tolong perhatikan nama pengguna dan kata sandi. 57 | STR_FAIL_TIMEOUT_MSG=426 Gagal. Waktu koneksi habis/timeout. 58 | STR_FAIL_DEL_DIR_MSG=Direktori gagal dihapus 59 | STR_DELETING=Menghapus 60 | STR_FAIL_DEL_FILE_MSG=File gagal dihapus 61 | STR_DELETED=Dihapus 62 | -------------------------------------------------------------------------------- /data/assets/langs/Italiano.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Impostazioni di rete 2 | STR_SITE=Sito 3 | STR_LOCAL=Locale 4 | STR_REMOTE=Remoto 5 | STR_MESSAGES=Messaggi 6 | STR_UPDATE_SOFTWARE=Aggiornamento di sistema 7 | STR_CONNECT_FTP=Connesione 8 | STR_DISCONNECT_FTP=Disconnetti da 9 | STR_SEARCH=Cerca 10 | STR_REFRESH=Aggiorna 11 | STR_SERVER=Server 12 | STR_USERNAME=Nome utente 13 | STR_PASSWORD=Password 14 | STR_PORT=Porta 15 | STR_PASV=Pasv 16 | STR_DIRECTORY=Percorso 17 | STR_FILTER=Filtro 18 | STR_YES=Sì 19 | STR_NO=No 20 | STR_CANCEL=Annulla 21 | STR_CONTINUE=Conferma 22 | STR_CLOSE=Chiudi 23 | STR_FOLDER=Cartella 24 | STR_FILE=File 25 | STR_TYPE=Tipo 26 | STR_NAME=Nome 27 | STR_SIZE=Dimensione 28 | STR_DATE=Data 29 | STR_NEW_FOLDER=Nuova cartella 30 | STR_RENAME=Rinomina 31 | STR_DELETE=Elimina 32 | STR_UPLOAD=Carica 33 | STR_DOWNLOAD=Scarica 34 | STR_SELECT_ALL=Seleziona tutto 35 | STR_CLEAR_ALL=Elimina tutto 36 | STR_UPLOADING=Caricando 37 | STR_DOWNLOADING=Scaricando 38 | STR_OVERWRITE=Socrascrivi 39 | STR_DONT_OVERWRITE=Non sovrascrivere 40 | STR_ASK_FOR_CONFIRM=Chiedere conferma 41 | STR_DONT_ASK_CONFIRM=Non chiedere conferma 42 | STR_ALLWAYS_USE_OPTION=Usa sempre questa opzione e non chiedere in seguito 43 | STR_ACTIONS=Opzioni 44 | STR_CONFIRM=Conferma 45 | STR_OVERWRITE_OPTIONS=Sovrascrivere impostazioni 46 | STR_PROPERTIES=Proprietà 47 | STR_PROGRESS=Stato 48 | STR_UPDATES=Aggiornamenti 49 | STR_DEL_CONFIRM_MSG=Sei sicuro di voler eliminare questo(i) file o cartella(e)? 50 | STR_CANCEL_ACTION_MSG=Annulamento. Attendo il completamento dell'ultima operazione eseguita. 51 | STR_FAIL_UPLOAD_MSG=Caricamento fallito 52 | STR_FAIL_DOWNLOAD_MSG=Scaricamento fallito 53 | STR_FAIL_READ_LOCAL_DIR_MSG=Non è stato possibile leggere il contenuto del percorso o la cartella non esiste. 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 Connessione chiusa. 55 | STR_REMOTE_TERM_CONN_MSG=426 Errore. Il server remoto ha terminato la connessione. 56 | STR_FAIL_LOGIN_MSG=300 Login Fallito. Controllare Nome utente o password. 57 | STR_FAIL_TIMEOUT_MSG=426 Errore. La connessione ha richiesto troppo tempo. 58 | STR_FAIL_DEL_DIR_MSG=Impossibile eliminare il percorso 59 | STR_DELETING=Eliminazione 60 | STR_FAIL_DEL_FILE_MSG=Impossibile eliminare il file 61 | STR_DELETED=Eliminato 62 | -------------------------------------------------------------------------------- /data/assets/langs/Japanese.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=接続の設定 2 | STR_SITE=サイト 3 | STR_LOCAL=ローカル 4 | STR_REMOTE=リモート 5 | STR_MESSAGES=メッセージ 6 | STR_UPDATE_SOFTWARE=ソフトウェアの更新 7 | STR_CONNECT_FTP=に接続 8 | STR_DISCONNECT_FTP=を切断 9 | STR_SEARCH=検索 10 | STR_REFRESH=更新 11 | STR_SERVER=サーバー 12 | STR_USERNAME=ユーザー名 13 | STR_PASSWORD=パスワード 14 | STR_PORT=ポート 15 | STR_PASV=Pasv 16 | STR_DIRECTORY=ディレクトリ 17 | STR_FILTER=フィルター 18 | STR_YES=はい 19 | STR_NO=いいえ 20 | STR_CANCEL=キャンセル 21 | STR_CONTINUE=続ける 22 | STR_CLOSE=閉じる 23 | STR_FOLDER=フォルダー 24 | STR_FILE=ファイル 25 | STR_TYPE=タイプ 26 | STR_NAME=名前 27 | STR_SIZE=サイズ 28 | STR_DATE=日付 29 | STR_NEW_FOLDER=新しいフォルダー 30 | STR_RENAME=名前を変更 31 | STR_DELETE=消去 32 | STR_UPLOAD=アップロード 33 | STR_DOWNLOAD=ダウンロード 34 | STR_SELECT_ALL=全て選択 35 | STR_CLEAR_ALL=全てクリア 36 | STR_UPLOADING=アップロード 37 | STR_DOWNLOADING=ダウンロード 38 | STR_OVERWRITE=上書き 39 | STR_DONT_OVERWRITE=上書きしない 40 | STR_ASK_FOR_CONFIRM=確認を求める 41 | STR_DONT_ASK_CONFIRM=確認を求めない 42 | STR_ALLWAYS_USE_OPTION=常にこのオプションを使用し、二度と尋ねない 43 | STR_ACTIONS=アクション 44 | STR_CONFIRM=確認 45 | STR_OVERWRITE_OPTIONS=上書きオプション 46 | STR_PROPERTIES=プロパティ 47 | STR_PROGRESS=進捗 48 | STR_UPDATES=更新 49 | STR_DEL_CONFIRM_MSG=このファイル/フォルダを削除してもよろしいですか? 50 | STR_CANCEL_ACTION_MSG=キャンセルします。 最後のアクションが完了するのを待っています 51 | STR_FAIL_UPLOAD_MSG=ファイルのアップロードに失敗しました 52 | STR_FAIL_DOWNLOAD_MSG=ファイルのダウンロードに失敗しました 53 | STR_FAIL_READ_LOCAL_DIR_MSG=ディレクトリまたはフォルダの内容の読み取りに失敗しましたが存在しません。 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 接続が閉じられました。 55 | STR_REMOTE_TERM_CONN_MSG=426 リモートサーバーが接続を終了しました。 56 | STR_FAIL_LOGIN_MSG=300 ログインに失敗しました。 ユーザー名またはパスワードを確認してください。 57 | STR_FAIL_TIMEOUT_MSG=426 失敗した。 接続タイムアウト。 58 | STR_FAIL_DEL_DIR_MSG=ディレクトリの削除に失敗しました 59 | STR_DELETING=削除 60 | STR_FAIL_DEL_FILE_MSG=ファイルの削除に失敗しました 61 | STR_DELETED=削除 62 | -------------------------------------------------------------------------------- /data/assets/langs/Korean.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=접속 설정 2 | STR_SITE=사이트 3 | STR_LOCAL=로컬 4 | STR_REMOTE=리모트 5 | STR_MESSAGES=메시지 6 | STR_UPDATE_SOFTWARE=소프트웨어 업데이트 7 | STR_CONNECT_FTP=접속 8 | STR_DISCONNECT_FTP=끊기 9 | STR_SEARCH=검색 10 | STR_REFRESH=새로고침 11 | STR_SERVER=서버 12 | STR_USERNAME=사용자 13 | STR_PASSWORD=비밀번호 14 | STR_PORT=포트 15 | STR_PASV=수동형 16 | STR_DIRECTORY=디렉토리 17 | STR_FILTER=필터 18 | STR_YES=네 19 | STR_NO=아니오 20 | STR_CANCEL=취소 21 | STR_CONTINUE=계속 22 | STR_CLOSE=닫기 23 | STR_FOLDER=폴더 24 | STR_FILE=파일 25 | STR_TYPE=종류 26 | STR_NAME=이름 27 | STR_SIZE=크기 28 | STR_DATE=일시 29 | STR_NEW_FOLDER=새 폴더 30 | STR_RENAME=이름 변경 31 | STR_DELETE=삭제 32 | STR_UPLOAD=업로드 33 | STR_DOWNLOAD=다운로드 34 | STR_SELECT_ALL=전체 선택 35 | STR_CLEAR_ALL=전체 삭제 36 | STR_UPLOADING=업로드 중 37 | STR_DOWNLOADING=다운로드 중 38 | STR_OVERWRITE=덮어쓰기 39 | STR_DONT_OVERWRITE=덮어쓰기 금지 40 | STR_ASK_FOR_CONFIRM=수락여부를 질문 41 | STR_DONT_ASK_CONFIRM=수락여부를 묻지 않음 42 | STR_ALLWAYS_USE_OPTION=두번다시 묻지 않고 항상 이 설정을 사용 43 | STR_ACTIONS=실행 44 | STR_CONFIRM=확인 45 | STR_OVERWRITE_OPTIONS=덮어쓰기 옵션 46 | STR_PROPERTIES=속성 47 | STR_PROGRESS=진행 48 | STR_UPDATES=업데이트 49 | STR_DEL_CONFIRM_MSG=이 파일(들) 또는 폴더(들)를 삭제하시겠습니까? 50 | STR_CANCEL_ACTION_MSG=취소되었습니다. 마지막 실행이 완료될 때 까지 대기하여 주십시오. 51 | STR_FAIL_UPLOAD_MSG=파일 업로드에 실패하였습니다. 52 | STR_FAIL_DOWNLOAD_MSG=파일 다운로드에 실패하였습니다. 53 | STR_FAIL_READ_LOCAL_DIR_MSG=디렉토리의 내용을 읽을 수 없거나 폴더가 존재하지 않습니다. 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 접속 종료. 55 | STR_REMOTE_TERM_CONN_MSG=426 원격 서버의 접속이 종료되었습니다. 56 | STR_FAIL_LOGIN_MSG=300 로그인에 실패하였습니다. 사용자명과 패스워드를 체크하여 주십시오. 57 | STR_FAIL_TIMEOUT_MSG=426 실패. 접속시간 초과. 58 | STR_FAIL_DEL_DIR_MSG=디렉토리 삭제에 실패하였습니다. 59 | STR_DELETING=삭제 중 60 | STR_FAIL_DEL_FILE_MSG=파일 삭제에 실패하였습니다. 61 | STR_DELETED=삭제됨 -------------------------------------------------------------------------------- /data/assets/langs/Polish.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Ustawienia połączenia 2 | STR_SITE=Strona 3 | STR_LOCAL=Lokalny 4 | STR_REMOTE=Zdalny 5 | STR_MESSAGES=Wiadomości 6 | STR_UPDATE_SOFTWARE=Aktualizuj aplikację 7 | STR_CONNECT_FTP=Połącz 8 | STR_DISCONNECT_FTP=Rozłącz 9 | STR_SEARCH=Szukaj 10 | STR_REFRESH=Odśwież 11 | STR_SERVER=Serwer 12 | STR_USERNAME=Użytkownik 13 | STR_PASSWORD=Hasło 14 | STR_PORT=Port 15 | STR_PASV=Pasywny 16 | STR_DIRECTORY=Katalog 17 | STR_FILTER=Filtr 18 | STR_YES=Tak 19 | STR_NO=Nie 20 | STR_CANCEL=Anuluj 21 | STR_CONTINUE=Kontynuuj 22 | STR_CLOSE=Zamknij 23 | STR_FOLDER=Folder 24 | STR_FILE=Plik 25 | STR_TYPE=Typ 26 | STR_NAME=Nazwa 27 | STR_SIZE=Rozmiar 28 | STR_DATE=Data 29 | STR_NEW_FOLDER=Nowy folder 30 | STR_RENAME=Zmień nazwę 31 | STR_DELETE=Usuń 32 | STR_UPLOAD=Wyślij 33 | STR_DOWNLOAD=Pobierz 34 | STR_SELECT_ALL=Zaznacz wszystko 35 | STR_CLEAR_ALL=Wyczyść zaznaczenie 36 | STR_UPLOADING=Wysyłanie 37 | STR_DOWNLOADING=Pobieranie 38 | STR_OVERWRITE=Nadpisz 39 | STR_DONT_OVERWRITE=Nie nadpisuj 40 | STR_ASK_FOR_CONFIRM=Pytaj o potwierdzenie 41 | STR_DONT_ASK_CONFIRM=Nie pytaj o potwierdzenie 42 | STR_ALLWAYS_USE_OPTION=Zawsze używaj tej opcji i nie pytaj ponownie 43 | STR_ACTIONS=Akcje 44 | STR_CONFIRM=Potwierdź 45 | STR_OVERWRITE_OPTIONS=Nadpisz Opcje 46 | STR_PROPERTIES=Właściwości 47 | STR_PROGRESS=Postęp 48 | STR_UPDATES=Aktualizacje 49 | STR_DEL_CONFIRM_MSG=Czy na pewno usunąć wybrane plik(i)/folder(y)? 50 | STR_CANCEL_ACTION_MSG=Anulowanie. Oczekiwanie na zakończenie ostatniej operacji 51 | STR_FAIL_UPLOAD_MSG=Niepowodzenie wysłania pliku 52 | STR_FAIL_DOWNLOAD_MSG=Niepowodzenie pobierania pliku 53 | STR_FAIL_READ_LOCAL_DIR_MSG=Nie udało się odczytać listy plików w katalogu lub katalog nie istnieje. 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 Połączenie zamknięte. 55 | STR_REMOTE_TERM_CONN_MSG=426 Serwer zdalny zakończył połączenie. 56 | STR_FAIL_LOGIN_MSG=300 Nieudane logowanie. Sprawdź nazwę użytkownika i/lub hasło. 57 | STR_FAIL_TIMEOUT_MSG=426 Przekroczono limit czasu oczekiwania na połączenie. 58 | STR_FAIL_DEL_DIR_MSG=Niepowodzenie usuwania katalogu 59 | STR_DELETING=Usuwanie 60 | STR_FAIL_DEL_FILE_MSG=Niepowodzenie usuwania pliku 61 | STR_DELETED=Usunięto 62 | -------------------------------------------------------------------------------- /data/assets/langs/Portuguese_BR.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Configurações de Conexão 2 | STR_SITE=Site 3 | STR_LOCAL=Local 4 | STR_REMOTE=Remoto 5 | STR_MESSAGES=Mensagens 6 | STR_UPDATE_SOFTWARE=Atualizar Software 7 | STR_CONNECT_FTP=Conectar 8 | STR_DISCONNECT_FTP=Desconectar 9 | STR_SEARCH=Pesquisar 10 | STR_REFRESH=Recarregar 11 | STR_SERVER=Servidor 12 | STR_USERNAME=Usuário 13 | STR_PASSWORD=Senha 14 | STR_PORT=Porta 15 | STR_PASV=Salvar 16 | STR_DIRECTORY=Diretório 17 | STR_FILTER=Filtro 18 | STR_YES=Sim 19 | STR_NO=Não 20 | STR_CANCEL=Cancelar 21 | STR_CONTINUE=Continuar 22 | STR_CLOSE=Fechar 23 | STR_FOLDER=Pasta 24 | STR_FILE=Arquivo 25 | STR_TYPE=Tipo 26 | STR_NAME=Nome 27 | STR_SIZE=Tamanho 28 | STR_DATE=Data 29 | STR_NEW_FOLDER=Nova pasta 30 | STR_RENAME=Renomear 31 | STR_DELETE=Deletar 32 | STR_UPLOAD=Carregar 33 | STR_DOWNLOAD=Baixar 34 | STR_SELECT_ALL=Selecionar tudo 35 | STR_CLEAR_ALL=Apagar tudo 36 | STR_UPLOADING=Carregando 37 | STR_DOWNLOADING=Baixando 38 | STR_OVERWRITE=Sobrescrever 39 | STR_DONT_OVERWRITE=Não sobrescrever 40 | STR_ASK_FOR_CONFIRM=Perguntar novamente 41 | STR_DONT_ASK_CONFIRM=Não perguntar novamente 42 | STR_ALLWAYS_USE_OPTION=Usar sempre esta opção e não perguntar novamente 43 | STR_ACTIONS=Ações 44 | STR_CONFIRM=Confirmar 45 | STR_OVERWRITE_OPTIONS=Sobrescrever opções 46 | STR_PROPERTIES=Propriedades 47 | STR_PROGRESS=Progresso 48 | STR_UPDATES=Atualizações 49 | STR_DEL_CONFIRM_MSG=Tem certeza que deseja deletar este(a) arquivo(s)/pasta(s)? 50 | STR_CANCEL_ACTION_MSG=Cancelando. Aguardando a conclusão da última ação 51 | STR_FAIL_UPLOAD_MSG=Falha em carregar o arquivo 52 | STR_FAIL_DOWNLOAD_MSG=Falha em baixar o arquivo 53 | STR_FAIL_READ_LOCAL_DIR_MSG=Falha ao ler o conteúdo do diretório ou pasta não existe. 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 Conexão encerrada. 55 | STR_REMOTE_TERM_CONN_MSG=426 O servidor remoto encerrou a conexão. 56 | STR_FAIL_LOGIN_MSG=300 Falha no login. Favor checar o usuário e senha. 57 | STR_FAIL_TIMEOUT_MSG=426 Falha. Tempo limite de conexão atingido. 58 | STR_FAIL_DEL_DIR_MSG=Falha ao excluir o diretório 59 | STR_DELETING=Excluindo 60 | STR_FAIL_DEL_FILE_MSG=Falha ao excluir o arquivo 61 | STR_DELETED=Excluido 62 | -------------------------------------------------------------------------------- /data/assets/langs/Romanian.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Setări de conecțiune 2 | STR_SITE=Site 3 | STR_LOCAL=Local 4 | STR_REMOTE=Distant 5 | STR_MESSAGES=Mesaje 6 | STR_UPDATE_SOFTWARE=Update de aplicație 7 | STR_CONNECT_FTP=Conecteazăte 8 | STR_DISCONNECT_FTP=Deconecteazăte 9 | STR_SEARCH=Caută 10 | STR_REFRESH=Reîncarca 11 | STR_SERVER=Servere 12 | STR_USERNAME=Nume de utilizator 13 | STR_PASSWORD=Parola 14 | STR_PORT=Portul 15 | STR_PASV=Pasv-ul 16 | STR_DIRECTORY=Directorul 17 | STR_FILTER=Filtru 18 | STR_YES=Da 19 | STR_NO=Nu 20 | STR_CANCEL=Anulează 21 | STR_CONTINUE=Continuă 22 | STR_CLOSE=Închide 23 | STR_FOLDER=Dosar 24 | STR_FILE=Fișier 25 | STR_TYPE=Tip 26 | STR_NAME=Nume 27 | STR_SIZE=Mărime 28 | STR_DATE=Data 29 | STR_NEW_FOLDER=Nou dosar 30 | STR_RENAME=Renumește 31 | STR_DELETE=Șterge 32 | STR_UPLOAD=Încarcă 33 | STR_DOWNLOAD=Descarcă 34 | STR_SELECT_ALL=Selectează tot 35 | STR_CLEAR_ALL=Șterge tot 36 | STR_UPLOADING=Încarcă 37 | STR_DOWNLOADING=Descarcă 38 | STR_OVERWRITE=Suprascrie 39 | STR_DONT_OVERWRITE=Nu suprascrie 40 | STR_ASK_FOR_CONFIRM=Întreabă pentru confirmare 41 | STR_DONT_ASK_CONFIRM=Nu întreba pentru confirmare 42 | STR_ALLWAYS_USE_OPTION=Mereu să folosești această opțiune și să nu mă m-ai întrebi 43 | STR_ACTIONS=Acțiuni 44 | STR_CONFIRM=Confirmă 45 | STR_OVERWRITE_OPTIONS=Suprascrie opțiunile 46 | STR_PROPERTIES=Proprietăți 47 | STR_PROGRESS=Progres 48 | STR_UPDATES=Updateturi 49 | STR_DEL_CONFIRM_MSG=Ești sigur că vrei să ștergi aceast fișier(e)/dosar(e)? 50 | STR_CANCEL_ACTION_MSG=Anulînd. Așteptînd pentru ultima acțiune să fie completată 51 | STR_FAIL_UPLOAD_MSG=Fișierul a eșuat să fie încărcat 52 | STR_FAIL_DOWNLOAD_MSG=Fișierul a eșuat să fie descărcat 53 | STR_FAIL_READ_LOCAL_DIR_MSG=A eșuat să citească conținutul directorului sau dosarului care nu există 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 Conecțiune închisă 55 | STR_REMOTE_TERM_CONN_MSG=426 Servărul distant ți-a terminat conecțiunea. 56 | STR_FAIL_LOGIN_MSG=300 Autentificarea eșuata. Te rog sa verifici numele de utilizator și parola. 57 | STR_FAIL_TIMEOUT_MSG=426 Eșuat. Conecțiune terminată 58 | STR_FAIL_DEL_DIR_MSG=A eșuat sa se ștearga directorul 59 | STR_DELETING=Ștergînd 60 | STR_FAIL_DEL_FILE_MSG=A eșuat ștersul fișierului 61 | STR_DELETED=Șters 62 | -------------------------------------------------------------------------------- /data/assets/langs/Russian.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Настройка Связей 2 | STR_SITE=Сайт 3 | STR_LOCAL=Локальная 4 | STR_REMOTE=Дистанционная 5 | STR_MESSAGES=Сообщения 6 | STR_UPDATE_SOFTWARE=Обновить Программу 7 | STR_CONNECT_FTP=Подключить 8 | STR_DISCONNECT_FTP=Отключить 9 | STR_SEARCH=Найти 10 | STR_REFRESH=Обновить 11 | STR_SERVER=Сервер 12 | STR_USERNAME=Пользователь 13 | STR_PASSWORD=Пароль 14 | STR_PORT=Порт 15 | STR_PASV=Пассивный 16 | STR_DIRECTORY=Директория 17 | STR_FILTER=Фильтр 18 | STR_YES=Да 19 | STR_NO=Нет 20 | STR_CANCEL=Отменить 21 | STR_CONTINUE=Продолжить 22 | STR_CLOSE=Закрыть 23 | STR_FOLDER=Папка 24 | STR_FILE=Файл 25 | STR_TYPE=Тип 26 | STR_NAME=Название 27 | STR_SIZE=Размер 28 | STR_DATE=Дата 29 | STR_NEW_FOLDER=Новая Папка 30 | STR_RENAME=Переименовать 31 | STR_DELETE=Удалить 32 | STR_UPLOAD=Отправить 33 | STR_DOWNLOAD=Получить 34 | STR_SELECT_ALL=Выбрать Все 35 | STR_CLEAR_ALL=Отменить Все 36 | STR_UPLOADING=Получаются 37 | STR_DOWNLOADING=Отправляются 38 | STR_OVERWRITE=Переписать 39 | STR_DONT_OVERWRITE=Не Переписывать 40 | STR_ASK_FOR_CONFIRM=Спросить Подтверждение 41 | STR_DONT_ASK_CONFIRM=Не Спрашивать Подтверждение 42 | STR_ALLWAYS_USE_OPTION=Всегда используйте эту опцию, и больше не спрашивайте 43 | STR_ACTIONS=Действия 44 | STR_CONFIRM=Подтвердить 45 | STR_OVERWRITE_OPTIONS=Переписать Опции 46 | STR_PROPERTIES=Свойства 47 | STR_PROGRESS=Прогресс 48 | STR_UPDATES=Обновления 49 | STR_DEL_CONFIRM_MSG=Уверены, что хотите удалить эти файлы/папки? 50 | STR_CANCEL_ACTION_MSG=Отмена. Ожидаем завершения последнего действия 51 | STR_FAIL_UPLOAD_MSG=Отправление файла неуспешно 52 | STR_FAIL_DOWNLOAD_MSG=Загрузка файла неуспешна 53 | STR_FAIL_READ_LOCAL_DIR_MSG=Чтение содержимых файла или папки неуспешно, или папка не существует 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 Соединениние Закрыто. 55 | STR_REMOTE_TERM_CONN_MSG=426 Дистанционный Сервер Закрыл Соединение. 56 | STR_FAIL_LOGIN_MSG=300 Неуспешный Логин. Пожалуйста проверьте ваше имя пользователя или пароль. 57 | STR_FAIL_TIMEOUT_MSG=426 Неуспешно. Время соединения вышло. 58 | STR_FAIL_DEL_DIR_MSG=Удаление папки неуспешно 59 | STR_DELETING=Удаляются 60 | STR_FAIL_DEL_FILE_MSG=Удаление файла неуспешно 61 | STR_DELETED=Удалено -------------------------------------------------------------------------------- /data/assets/langs/Ryukyuan.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=接続ぬ設定 2 | STR_SITE=サイト 3 | STR_LOCAL=ローカル 4 | STR_REMOTE=リモート 5 | STR_MESSAGES=メッセージ 6 | STR_UPDATE_SOFTWARE=ソフトウェアぬ更新 7 | STR_CONNECT_FTP=んかい接続 8 | STR_DISCONNECT_FTP=切断 9 | STR_SEARCH=検索 10 | STR_REFRESH=更新 11 | STR_SERVER=サーバー 12 | STR_USERNAME=ユーザー名 13 | STR_PASSWORD=パスワード 14 | STR_PORT=ポート 15 | STR_PASV=Pasv 16 | STR_DIRECTORY=ディレクトリ 17 | STR_FILTER=フィルター 18 | STR_YES=はい 19 | STR_NO=うぅーうぅー 20 | STR_CANCEL=キャンセル 21 | STR_CONTINUE=続きーん 22 | STR_CLOSE=くーいん 23 | STR_FOLDER=フォルダー 24 | STR_FILE=ファイル 25 | STR_TYPE=タイプ 26 | STR_NAME=なめー 27 | STR_SIZE=サイズ 28 | STR_DATE=日付 29 | STR_NEW_FOLDER=みーさるフォルダー 30 | STR_RENAME=なめー変更 31 | STR_DELETE=消去 32 | STR_UPLOAD=アップロード 33 | STR_DOWNLOAD=ダウンロード 34 | STR_SELECT_ALL=まじり選択 35 | STR_CLEAR_ALL=まじりクリア 36 | STR_UPLOADING=アップロード 37 | STR_DOWNLOADING=ダウンロード 38 | STR_OVERWRITE=上書き 39 | STR_DONT_OVERWRITE=上書きさん 40 | STR_ASK_FOR_CONFIRM=確認むとぅみーん 41 | STR_DONT_ASK_CONFIRM=確認むとぅみらん 42 | STR_ALLWAYS_USE_OPTION=常にくぬオプション使用しー、二度とぅたんにらん 43 | STR_ACTIONS=アクション 44 | STR_CONFIRM=確認 45 | STR_OVERWRITE_OPTIONS=上書きオプション 46 | STR_PROPERTIES=プロパティ 47 | STR_PROGRESS=進捗 48 | STR_UPDATES=更新 49 | STR_DEL_CONFIRM_MSG=くぬファイル/フォルダ削除しんゆたさいびーが? 50 | STR_CANCEL_ACTION_MSG=キャンセルさびーん。 最後ぬアクションぬしーうわいし待っちょーいびーん 51 | STR_FAIL_UPLOAD_MSG=ファイルぬアップロードんかいしーやんじゃびたん 52 | STR_FAIL_DOWNLOAD_MSG=ファイルぬダウンロードんかいしーやんじゃびたん 53 | STR_FAIL_READ_LOCAL_DIR_MSG=ディレクトリあらんでぃフォルダぬ内容ぬ読み取りんかいしーやんじゃびたんしが存在さびらん。 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 接続ぬくーららりやびたん。 55 | STR_REMOTE_TERM_CONN_MSG=426 リモートサーバーぬ接続終了さびたん。 56 | STR_FAIL_LOGIN_MSG=300 ログインんかいしーやんじゃびたん。 ユーザー名あらんでぃパスワード確認しくぃみそーれー。 57 | STR_FAIL_TIMEOUT_MSG=426 しーやんたん。 接続タイムアウト。 58 | STR_FAIL_DEL_DIR_MSG=ディレクトリぬ削除んかいしーやんじゃびたん 59 | STR_DELETING=削除 60 | STR_FAIL_DEL_FILE_MSG=ファイルぬ削除んかいしーやんじゃびたん 61 | STR_DELETED=削除 62 | -------------------------------------------------------------------------------- /data/assets/langs/Simplified Chinese.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=连接设置 2 | STR_SITE=地点 3 | STR_LOCAL=当地的 4 | STR_REMOTE=偏僻的 5 | STR_MESSAGES=留言 6 | STR_UPDATE_SOFTWARE=更新软件 7 | STR_CONNECT_FTP=连接 8 | STR_DISCONNECT_FTP=断开 9 | STR_SEARCH=搜索 10 | STR_REFRESH=刷新 11 | STR_SERVER=服务器 12 | STR_USERNAME=用户名 13 | STR_PASSWORD=密码 14 | STR_PORT=港口 15 | STR_PASV=帕夫 16 | STR_DIRECTORY=目录 17 | STR_FILTER=筛选 18 | STR_YES=是的 19 | STR_NO=不 20 | STR_CANCEL=取消 21 | STR_CONTINUE=继续 22 | STR_CLOSE=关闭 23 | STR_FOLDER=文件夹 24 | STR_FILE=文件 25 | STR_TYPE=类型 26 | STR_NAME=姓名 27 | STR_SIZE=尺寸 28 | STR_DATE=日期 29 | STR_NEW_FOLDER=新建文件夹 30 | STR_RENAME=改名 31 | STR_DELETE=删除 32 | STR_UPLOAD=上传 33 | STR_DOWNLOAD=下载 34 | STR_SELECT_ALL=全选 35 | STR_CLEAR_ALL=全部清除 36 | STR_UPLOADING=上传 37 | STR_DOWNLOADING=下载 38 | STR_OVERWRITE=覆盖 39 | STR_DONT_OVERWRITE=不要覆盖 40 | STR_ASK_FOR_CONFIRM=要求确认 41 | STR_DONT_ASK_CONFIRM=不要要求确认 42 | STR_ALLWAYS_USE_OPTION=始终使用此选项,不再询问 43 | STR_ACTIONS=行动 44 | STR_CONFIRM=确认 45 | STR_OVERWRITE_OPTIONS=覆盖选项 46 | STR_PROPERTIES=特性 47 | STR_PROGRESS=进步 48 | STR_UPDATES=更新 49 | STR_DEL_CONFIRM_MSG=您确定要删除此文件/文件夹吗? 50 | STR_CANCEL_ACTION_MSG=取消。 等待最后一个动作完成 51 | STR_FAIL_UPLOAD_MSG=上传文件失败 52 | STR_FAIL_DOWNLOAD_MSG=下载文件失败 53 | STR_FAIL_READ_LOCAL_DIR_MSG=读取目录内容失败或文件夹不存在。 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 连接已关闭。 55 | STR_REMOTE_TERM_CONN_MSG=426 远程服务器已终止连接。 56 | STR_FAIL_LOGIN_MSG=300 登录失败。 请检查您的用户名或密码。 57 | STR_FAIL_TIMEOUT_MSG=426 失败。 连接超时。 58 | STR_FAIL_DEL_DIR_MSG=删除目录失败 59 | STR_DELETING=删除 60 | STR_FAIL_DEL_FILE_MSG=删除文件失败 61 | STR_DELETED=已删除 62 | -------------------------------------------------------------------------------- /data/assets/langs/Spanish.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Ajustes de conexión 2 | STR_SITE=Sitio 3 | STR_LOCAL=Local 4 | STR_REMOTE=Remoto 5 | STR_MESSAGES=Mensajes 6 | STR_UPDATE_SOFTWARE=Actualizar software 7 | STR_CONNECT_FTP=Conectar 8 | STR_DISCONNECT_FTP=Desconectar 9 | STR_SEARCH=Buscar 10 | STR_REFRESH=Actualizar 11 | STR_SERVER=Servidor 12 | STR_USERNAME=Usuario 13 | STR_PASSWORD=Contraseña 14 | STR_PORT=Puerto 15 | STR_PASV=Pasv 16 | STR_DIRECTORY=Directorio 17 | STR_FILTER=Filtro 18 | STR_YES=Sí 19 | STR_NO=No 20 | STR_CANCEL=Cancelar 21 | STR_CONTINUE=Continuar 22 | STR_CLOSE=Cerrar 23 | STR_FOLDER=Carpeta 24 | STR_FILE=Archivo 25 | STR_TYPE=Tipo 26 | STR_NAME=Nombre 27 | STR_SIZE=Tamaño 28 | STR_DATE=Fecha 29 | STR_NEW_FOLDER=Nueva carpeta 30 | STR_RENAME=Cambiar nombre 31 | STR_DELETE=Eliminar 32 | STR_UPLOAD=Enviar 33 | STR_DOWNLOAD=Descargar 34 | STR_SELECT_ALL=Seleccionar todo 35 | STR_CLEAR_ALL=Deseleccionar todo 36 | STR_UPLOADING=Enviando 37 | STR_DOWNLOADING=Descargando 38 | STR_OVERWRITE=Sobrescribir 39 | STR_DONT_OVERWRITE=No sobrescribir 40 | STR_ASK_FOR_CONFIRM=Pedir confirmación 41 | STR_DONT_ASK_CONFIRM=No pedir confirmación 42 | STR_ALLWAYS_USE_OPTION=Usar siempre esta opción y no volver a preguntar 43 | STR_ACTIONS=Acciones 44 | STR_CONFIRM=Confirmación 45 | STR_OVERWRITE_OPTIONS=Opciones de sobrescritura 46 | STR_PROPERTIES=Propiedades 47 | STR_PROGRESS=Progreso 48 | STR_UPDATES=Actualizaciones 49 | STR_DEL_CONFIRM_MSG=¿Seguro que deseas eliminar este(estos) archivo(s) o carpeta(s)? 50 | STR_CANCEL_ACTION_MSG=Cancelando. Esperando a finalizar la última acción 51 | STR_FAIL_UPLOAD_MSG=Error al enviar el archivo 52 | STR_FAIL_DOWNLOAD_MSG=Error al descargar el archivo 53 | STR_FAIL_READ_LOCAL_DIR_MSG=Error al leer los contenidos del directorio o la carpeta no existe. 54 | STR_CONNECTION_CLOSE_ERR_MSG=426: conexión cerrada. 55 | STR_REMOTE_TERM_CONN_MSG=426: el servidor remoto ha cerrado la conexión. 56 | STR_FAIL_LOGIN_MSG=300: error al iniciar sesión. Comprueba tu nombre de usuario y contraseña. 57 | STR_FAIL_TIMEOUT_MSG=426: error se agotó el tiempo de espera. 58 | STR_FAIL_DEL_DIR_MSG=Error al eliminar el directorio 59 | STR_DELETING=Eliminando 60 | STR_FAIL_DEL_FILE_MSG=Error al eliminar el archivo 61 | STR_DELETED=Eliminado 62 | -------------------------------------------------------------------------------- /data/assets/langs/Thai.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=การตั้งค่าการเชื่อมต่อ 2 | STR_SITE=เวปไซต์ 3 | STR_LOCAL=ภายใน 4 | STR_REMOTE=ระยะไกล 5 | STR_MESSAGES=ข้อความ 6 | STR_UPDATE_SOFTWARE=อัปเดตซอฟต์แวร์ 7 | STR_CONNECT_FTP=เชื่อมต่อ 8 | STR_DISCONNECT_FTP=ยกเลิกการเชื่อมต่อ 9 | STR_SEARCH=ค้นหา 10 | STR_REFRESH=รีเฟรช 11 | STR_SERVER=เซิร์ฟเวอร์ 12 | STR_USERNAME=ชื่อผู้ใช้ 13 | STR_PASSWORD=รหัสผ่าน 14 | STR_PORT=พอร์ต 15 | STR_PASV=Pasv 16 | STR_DIRECTORY=ไดเรกทอรี 17 | STR_FILTER=ฟิลเตอร์ 18 | STR_YES=ใช่ 19 | STR_NO=ไม่ 20 | STR_CANCEL=ยกเลิก 21 | STR_CONTINUE=ดำเนินการต่อ 22 | STR_CLOSE=ปิด 23 | STR_FOLDER=โฟลเดอร์ 24 | STR_FILE=ไฟล์ 25 | STR_TYPE=ประเภท 26 | STR_NAME=ชื่อ 27 | STR_SIZE=ขนาด 28 | STR_DATE=วันที่ 29 | STR_NEW_FOLDER=โฟลเดอร์ใหม่ 30 | STR_RENAME=เปลี่ยนชื่อ 31 | STR_DELETE=ลบ 32 | STR_UPLOAD=อัปโหลด 33 | STR_DOWNLOAD=ดาวน์โหลด 34 | STR_SELECT_ALL=เลือกทั้งหมด 35 | STR_CLEAR_ALL=ล้างทั้งหมด 36 | STR_UPLOADING=กำลังอัปโหลด 37 | STR_DOWNLOADING=กำลังดาวน์โหลด 38 | STR_OVERWRITE=เขียนทับ 39 | STR_DONT_OVERWRITE=ไม่เขียนทับ 40 | STR_ASK_FOR_CONFIRM=ไม่ต้องยืนยัน 41 | STR_DONT_ASK_CONFIRM=ต้องยืนยัน 42 | STR_ALLWAYS_USE_OPTION=ใช้ตัวเลือกนี้อยู่เสมอและไม่แสดงอีก 43 | STR_ACTIONS=การดำเนินการ 44 | STR_CONFIRM=ยืนยัน 45 | STR_OVERWRITE_OPTIONS=ตัวเลือกเขียนทับ 46 | STR_PROPERTIES=คุณสมบัติ 47 | STR_PROGRESS=ความคืบหน้า 48 | STR_UPDATES=อัปเดต 49 | STR_DEL_CONFIRM_MSG=คุณแน่ใจหรือว่าต้องการลบไฟล์/โฟลเดอร์นี้? 50 | STR_CANCEL_ACTION_MSG=ยกเลิก กำลังรอการดำเนินการสุดท้าย 51 | STR_FAIL_UPLOAD_MSG=อัปโหลดไฟล์ล้มเหลว 52 | STR_FAIL_DOWNLOAD_MSG=ดาวน์โหลดไฟล์ล้มเหลว 53 | STR_FAIL_READ_LOCAL_DIR_MSG=ไม่สามารถอ่านเนื้อหาของไดเรกทอรีหรือโฟลเดอร์นี้ได้ หรือโฟลเดอร์ไม่มีอยู่ 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 การเชื่อมต่อถูกปิด 55 | STR_REMOTE_TERM_CONN_MSG=426 เซิร์ฟเวอร์ระยะไกลได้ยุติการเชื่อมต่อ 56 | STR_FAIL_LOGIN_MSG=300 การเข้าสู่ระบบล้มเหลว กรุณาตรวจสอบชื่อผู้ใช้หรือรหัสผ่านของคุณ 57 | STR_FAIL_TIMEOUT_MSG=426 ล้มเหลว หมดเวลาการเชื่อมต่อ 58 | STR_FAIL_DEL_DIR_MSG=ไม่สามารถลบไดเรกทอรี 59 | STR_DELETING=กำลังลบ 60 | STR_FAIL_DEL_FILE_MSG=ไม่สามารถลบไฟล์ 61 | STR_DELETED=ลบแล้ว 62 | -------------------------------------------------------------------------------- /data/assets/langs/Traditional Chinese.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=連接設定 2 | STR_SITE=主機 3 | STR_LOCAL=本地 4 | STR_REMOTE=遠端 5 | STR_MESSAGES=狀態 6 | STR_UPDATE_SOFTWARE=更新版本 7 | STR_CONNECT_FTP=連接 8 | STR_DISCONNECT_FTP=中斷 9 | STR_SEARCH=搜尋 10 | STR_REFRESH=重新整理 11 | STR_SERVER=伺服器 12 | STR_USERNAME=使用者 13 | STR_PASSWORD=密碼 14 | STR_PORT=連接埠 15 | STR_PASV=Pasv 16 | STR_DIRECTORY=路徑 17 | STR_FILTER=篩選 18 | STR_YES=是 19 | STR_NO=否 20 | STR_CANCEL=取消 21 | STR_CONTINUE=繼續 22 | STR_CLOSE=關閉 23 | STR_FOLDER=資料夾 24 | STR_FILE=檔案 25 | STR_TYPE=類型 26 | STR_NAME=名稱 27 | STR_SIZE=大小 28 | STR_DATE=日期 29 | STR_NEW_FOLDER=新建資料夾 30 | STR_RENAME=更名 31 | STR_DELETE=刪除 32 | STR_UPLOAD=上傳 33 | STR_DOWNLOAD=下載 34 | STR_SELECT_ALL=全選 35 | STR_CLEAR_ALL=全部清除 36 | STR_UPLOADING=上傳 37 | STR_DOWNLOADING=下載 38 | STR_OVERWRITE=覆蓋 39 | STR_DONT_OVERWRITE=不要覆蓋 40 | STR_ASK_FOR_CONFIRM=詢問確認 41 | STR_DONT_ASK_CONFIRM=無須再次確認 42 | STR_ALLWAYS_USE_OPTION=預設使用此設定,不再詢問 43 | STR_ACTIONS=操作 44 | STR_CONFIRM=確認 45 | STR_OVERWRITE_OPTIONS=覆蓋選項 46 | STR_PROPERTIES=屬性 47 | STR_PROGRESS=進程 48 | STR_UPDATES=更新 49 | STR_DEL_CONFIRM_MSG=確認要刪除此檔案/資料夾嗎? 50 | STR_CANCEL_ACTION_MSG=取消,等待最後一個動作完成 51 | STR_FAIL_UPLOAD_MSG=上傳檔案失敗 52 | STR_FAIL_DOWNLOAD_MSG=下載檔案失敗 53 | STR_FAIL_READ_LOCAL_DIR_MSG=讀取資料夾失敗或資料夾不存在。 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 連線已關閉。 55 | STR_REMOTE_TERM_CONN_MSG=426 遠端伺服器已終止連線。 56 | STR_FAIL_LOGIN_MSG=300 連線失敗。請檢查使用者名稱或密碼。 57 | STR_FAIL_TIMEOUT_MSG=426 連線失敗。連線逾時。 58 | STR_FAIL_DEL_DIR_MSG=刪除資料夾失敗 59 | STR_DELETING=正在刪除 60 | STR_FAIL_DEL_FILE_MSG=刪除檔案失敗 61 | STR_DELETED=已刪除 62 | -------------------------------------------------------------------------------- /data/assets/langs/Turkish.ini: -------------------------------------------------------------------------------- 1 | STR_CONNECTION_SETTINGS=Bağlantı Ayarları 2 | STR_SITE=Site 3 | STR_LOCAL=Yerel 4 | STR_REMOTE=Uzaktan 5 | STR_MESSAGES=Mesajlar 6 | STR_UPDATE_SOFTWARE=Yazılımı Güncelle 7 | STR_CONNECT_FTP=Bağlan 8 | STR_DISCONNECT_FTP=Bağlantıyı kes 9 | STR_SEARCH=Ara 10 | STR_REFRESH=Yenile 11 | STR_SERVER=Sunucu 12 | STR_USERNAME=Kullanıcı Adı 13 | STR_PASSWORD=Şifre 14 | STR_PORT=Port 15 | STR_PASV=Pasv 16 | STR_DIRECTORY=Dizin 17 | STR_FILTER=Filtre 18 | STR_YES=Evet 19 | STR_NO=Hayır 20 | STR_CANCEL=İptal 21 | STR_CONTINUE=Devam 22 | STR_CLOSE=Kapat 23 | STR_FOLDER=Klasör 24 | STR_FILE=Dosya 25 | STR_TYPE=Tip 26 | STR_NAME=Ad 27 | STR_SIZE=Boyut 28 | STR_DATE=Tarih 29 | STR_NEW_FOLDER=Yeni Klasör 30 | STR_RENAME=Yeniden Adlandır 31 | STR_DELETE=Sil 32 | STR_UPLOAD=Karşıya Yükle 33 | STR_DOWNLOAD=İndir 34 | STR_SELECT_ALL=Tümünü Seç 35 | STR_CLEAR_ALL=Tümünü Temizle 36 | STR_UPLOADING=Karşıya Yükleniyor 37 | STR_DOWNLOADING=İndiriliyor 38 | STR_OVERWRITE=Üzerine yaz 39 | STR_DONT_OVERWRITE=Üzerine yazma 40 | STR_ASK_FOR_CONFIRM=Onaylamak için sor 41 | STR_DONT_ASK_CONFIRM=Onaylamak için sorma 42 | STR_ALLWAYS_USE_OPTION=Daima bu seçeneği kullan ve bir daha sorma 43 | STR_ACTIONS=Eylemler 44 | STR_CONFIRM=Onayla 45 | STR_OVERWRITE_OPTIONS=Ayarların üzerine yaz 46 | STR_PROPERTIES=Özellikler 47 | STR_PROGRESS=Durum 48 | STR_UPDATES=Güncellemeler 49 | STR_DEL_CONFIRM_MSG=Bu dosya(ları)/klasör(leri) silmek istediğinizden emin misiniz? 50 | STR_CANCEL_ACTION_MSG=İptal ediliyor. Son işlemin tamamlanması bekleniyor 51 | STR_FAIL_UPLOAD_MSG=Dosya karşıya yükleme başarısız 52 | STR_FAIL_DOWNLOAD_MSG=Dosya indirme başarısız 53 | STR_FAIL_READ_LOCAL_DIR_MSG=Dizindeki içerikler okunamadı ya da öyle bir klasör yok 54 | STR_CONNECTION_CLOSE_ERR_MSG=426 Bağlantı kesildi. 55 | STR_REMOTE_TERM_CONN_MSG=426 Uzaktan Sunucu bağlantıyı kesti. 56 | STR_FAIL_LOGIN_MSG=300 Giriş başarısız. Lütfen kullanıcı adınızı ve şifrenizi kontrol edin. 57 | STR_FAIL_TIMEOUT_MSG=426 Başarısız. Bağlantı zaman aşımına uğradı. 58 | STR_FAIL_DEL_DIR_MSG=Dizin silme başarısız 59 | STR_DELETING=Siliniyor 60 | STR_FAIL_DEL_FILE_MSG=Dosya silme başarısız 61 | STR_DELETED=Silindi 62 | STR_LINK=Link 63 | STR_SHARE=Paylaş 64 | STR_FAILED=310 Başarısız 65 | STR_FAIL_CREATE_LOCAL_FILE_MSG=310 Yerelde dosya oluşturulumu başarısız 66 | STR_INSTALL=Yükle 67 | STR_INSTALLING=Yükleniyor 68 | STR_INSTALL_SUCCESS=Başarılı 69 | STR_INSTALL_FAILED=Başarısız 70 | STR_INSTALL_SKIPPED=Atlandı 71 | STR_CHECK_HTTP_MSG=Uzaktan HTTP Sunucusu bağlantısı kontrol ediliyor 72 | STR_FAILED_HTTP_CHECK=HTTP Sunucusuna bağlantı başarısız 73 | STR_REMOTE_NOT_HTTP=Uzaktaki HTTP Sunucusu değil 74 | STR_INSTALL_FROM_DATA_MSG=Paket /data ya da /mnt/usbX dizininde değil 75 | STR_ALREADY_INSTALLED_MSG=Paket zaten kurulu -------------------------------------------------------------------------------- /data/sce_module/libSceFios2.prx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/sce_module/libSceFios2.prx -------------------------------------------------------------------------------- /data/sce_module/libc.prx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/sce_module/libc.prx -------------------------------------------------------------------------------- /data/sce_sys/about/right.sprx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/sce_sys/about/right.sprx -------------------------------------------------------------------------------- /data/sce_sys/icon0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/data/sce_sys/icon0.png -------------------------------------------------------------------------------- /screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/cy33hc/ps4-ftp-client/5c5bf0ee2fb8afe045685e6237a5fa5697e8a354/screenshot.jpg -------------------------------------------------------------------------------- /source/actions.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include "fs.h" 5 | #include "config.h" 6 | #include "windows.h" 7 | #include "ftpclient.h" 8 | #include "util.h" 9 | #include "lang.h" 10 | #include "actions.h" 11 | 12 | namespace Actions 13 | { 14 | 15 | void RefreshLocalFiles(bool apply_filter) 16 | { 17 | multi_selected_local_files.clear(); 18 | local_files.clear(); 19 | int err; 20 | if (strlen(local_filter) > 0 && apply_filter) 21 | { 22 | std::vector temp_files = FS::ListDir(local_directory, &err); 23 | std::string lower_filter = Util::ToLower(local_filter); 24 | for (std::vector::iterator it = temp_files.begin(); it != temp_files.end();) 25 | { 26 | std::string lower_name = Util::ToLower(it->name); 27 | if (lower_name.find(lower_filter) != std::string::npos || strcmp(it->name, "..") == 0) 28 | { 29 | local_files.push_back(*it); 30 | } 31 | ++it; 32 | } 33 | temp_files.clear(); 34 | } 35 | else 36 | { 37 | local_files = FS::ListDir(local_directory, &err); 38 | } 39 | DirEntry::Sort(local_files); 40 | if (err != 0) 41 | sprintf(status_message, lang_strings[STR_FAIL_READ_LOCAL_DIR_MSG]); 42 | } 43 | 44 | void RefreshRemoteFiles(bool apply_filter) 45 | { 46 | if (!ftpclient->Ping()) 47 | { 48 | ftpclient->Quit(); 49 | sprintf(status_message, lang_strings[STR_CONNECTION_CLOSE_ERR_MSG]); 50 | return; 51 | } 52 | 53 | std::string strList; 54 | multi_selected_remote_files.clear(); 55 | remote_files.clear(); 56 | if (strlen(remote_filter) > 0 && apply_filter) 57 | { 58 | std::vector temp_files = ftpclient->ListDir(remote_directory); 59 | std::string lower_filter = Util::ToLower(remote_filter); 60 | for (std::vector::iterator it = temp_files.begin(); it != temp_files.end();) 61 | { 62 | std::string lower_name = Util::ToLower(it->name); 63 | if (lower_name.find(lower_filter) != std::string::npos || strcmp(it->name, "..") == 0) 64 | { 65 | remote_files.push_back(*it); 66 | } 67 | ++it; 68 | } 69 | temp_files.clear(); 70 | } 71 | else 72 | { 73 | remote_files = ftpclient->ListDir(remote_directory); 74 | } 75 | DirEntry::Sort(remote_files); 76 | sprintf(status_message, "%s", ftpclient->LastResponse()); 77 | } 78 | 79 | void HandleChangeLocalDirectory(const DirEntry entry) 80 | { 81 | if (!entry.isDir) 82 | return; 83 | 84 | if (strcmp(entry.name, "..") == 0) 85 | { 86 | std::string temp_path = std::string(entry.directory); 87 | if (temp_path.size() > 1) 88 | { 89 | if (temp_path.find_last_of("/") == 0) 90 | { 91 | sprintf(local_directory, "/"); 92 | } 93 | else 94 | { 95 | sprintf(local_directory, "%s", temp_path.substr(0, temp_path.find_last_of("/")).c_str()); 96 | } 97 | } 98 | sprintf(local_file_to_select, "%s", temp_path.substr(temp_path.find_last_of("/") + 1).c_str()); 99 | } 100 | else 101 | { 102 | sprintf(local_directory, "%s", entry.path); 103 | } 104 | RefreshLocalFiles(false); 105 | if (strcmp(entry.name, "..") != 0) 106 | { 107 | sprintf(local_file_to_select, "%s", local_files[0].name); 108 | } 109 | selected_action = ACTION_NONE; 110 | } 111 | 112 | void HandleChangeRemoteDirectory(const DirEntry entry) 113 | { 114 | if (!entry.isDir) 115 | return; 116 | 117 | if (!ftpclient->Ping()) 118 | { 119 | ftpclient->Quit(); 120 | sprintf(status_message, lang_strings[STR_CONNECTION_CLOSE_ERR_MSG]); 121 | return; 122 | } 123 | 124 | if (strcmp(entry.name, "..") == 0) 125 | { 126 | std::string temp_path = std::string(entry.directory); 127 | if (temp_path.size() > 1) 128 | { 129 | if (temp_path.find_last_of("/") == 0) 130 | { 131 | sprintf(remote_directory, "/"); 132 | } 133 | else 134 | { 135 | sprintf(remote_directory, "%s", temp_path.substr(0, temp_path.find_last_of("/")).c_str()); 136 | } 137 | } 138 | sprintf(remote_file_to_select, "%s", temp_path.substr(temp_path.find_last_of("/") + 1).c_str()); 139 | } 140 | else 141 | { 142 | sprintf(remote_directory, "%s", entry.path); 143 | } 144 | RefreshRemoteFiles(false); 145 | if (strcmp(entry.name, "..") != 0) 146 | { 147 | sprintf(remote_file_to_select, "%s", remote_files[0].name); 148 | } 149 | selected_action = ACTION_NONE; 150 | } 151 | 152 | void HandleRefreshLocalFiles() 153 | { 154 | int prev_count = local_files.size(); 155 | RefreshLocalFiles(false); 156 | int new_count = local_files.size(); 157 | if (prev_count != new_count) 158 | { 159 | sprintf(local_file_to_select, "%s", local_files[0].name); 160 | } 161 | selected_action = ACTION_NONE; 162 | } 163 | 164 | void HandleRefreshRemoteFiles() 165 | { 166 | int prev_count = remote_files.size(); 167 | RefreshRemoteFiles(false); 168 | int new_count = remote_files.size(); 169 | if (prev_count != new_count) 170 | { 171 | sprintf(remote_file_to_select, "%s", remote_files[0].name); 172 | } 173 | selected_action = ACTION_NONE; 174 | } 175 | 176 | void CreateNewLocalFolder(char *new_folder) 177 | { 178 | std::string folder = std::string(new_folder); 179 | folder = Util::Rtrim(Util::Trim(folder, " "), "/"); 180 | std::string path = FS::GetPath(local_directory, folder); 181 | FS::MkDirs(path); 182 | RefreshLocalFiles(false); 183 | sprintf(local_file_to_select, "%s", folder.c_str()); 184 | } 185 | 186 | void CreateNewRemoteFolder(char *new_folder) 187 | { 188 | std::string folder = std::string(new_folder); 189 | folder = Util::Rtrim(Util::Trim(folder, " "), "/"); 190 | std::string path = FS::GetPath(remote_directory, folder); 191 | ftpclient->Mkdir(path.c_str()); 192 | RefreshRemoteFiles(false); 193 | sprintf(remote_file_to_select, "%s", folder.c_str()); 194 | } 195 | 196 | void RenameLocalFolder(const char *old_path, const char *new_path) 197 | { 198 | std::string new_name = std::string(new_path); 199 | new_name = Util::Rtrim(Util::Trim(new_name, " "), "/"); 200 | std::string path = FS::GetPath(local_directory, new_name); 201 | FS::Rename(old_path, path); 202 | RefreshLocalFiles(false); 203 | sprintf(local_file_to_select, "%s", new_name.c_str()); 204 | } 205 | 206 | void RenameRemoteFolder(const char *old_path, const char *new_path) 207 | { 208 | std::string new_name = std::string(new_path); 209 | new_name = Util::Rtrim(Util::Trim(new_name, " "), "/"); 210 | std::string path = FS::GetPath(remote_directory, new_name); 211 | ftpclient->Rename(old_path, path.c_str()); 212 | RefreshRemoteFiles(false); 213 | sprintf(remote_file_to_select, "%s", new_name.c_str()); 214 | } 215 | 216 | void *DeleteSelectedLocalFilesThread(void *argp) 217 | { 218 | for (std::set::iterator it = multi_selected_local_files.begin(); it != multi_selected_local_files.end(); ++it) 219 | { 220 | FS::RmRecursive(it->path); 221 | } 222 | activity_inprogess = false; 223 | Windows::SetModalMode(false); 224 | selected_action = ACTION_REFRESH_LOCAL_FILES; 225 | return NULL; 226 | } 227 | 228 | void DeleteSelectedLocalFiles() 229 | { 230 | int ret = pthread_create(&bk_activity_thid, NULL, DeleteSelectedLocalFilesThread, NULL); 231 | if (ret != 0) 232 | { 233 | activity_inprogess = false; 234 | Windows::SetModalMode(false); 235 | selected_action = ACTION_REFRESH_LOCAL_FILES; 236 | } 237 | } 238 | 239 | void *DeleteSelectedRemotesFilesThread(void *argp) 240 | { 241 | if (ftpclient->Ping()) 242 | { 243 | for (std::set::iterator it = multi_selected_remote_files.begin(); it != multi_selected_remote_files.end(); ++it) 244 | { 245 | if (it->isDir) 246 | ftpclient->Rmdir(it->path, true); 247 | else 248 | ftpclient->Delete(it->path); 249 | } 250 | selected_action = ACTION_REFRESH_REMOTE_FILES; 251 | } 252 | else 253 | { 254 | ftpclient->Quit(); 255 | sprintf(status_message, lang_strings[STR_CONNECTION_CLOSE_ERR_MSG]); 256 | DisconnectFTP(); 257 | } 258 | activity_inprogess = false; 259 | Windows::SetModalMode(false); 260 | return NULL; 261 | } 262 | 263 | void DeleteSelectedRemotesFiles() 264 | { 265 | int res = pthread_create(&bk_activity_thid, NULL, DeleteSelectedRemotesFilesThread, NULL); 266 | if (res != 0) 267 | { 268 | activity_inprogess = false; 269 | Windows::SetModalMode(false); 270 | } 271 | } 272 | 273 | int UploadFile(const char *src, const char *dest) 274 | { 275 | int ret; 276 | int64_t filesize; 277 | ret = ftpclient->Ping(); 278 | if (ret == 0) 279 | { 280 | ftpclient->Quit(); 281 | sprintf(status_message, lang_strings[STR_CONNECTION_CLOSE_ERR_MSG]); 282 | return ret; 283 | } 284 | 285 | if (overwrite_type == OVERWRITE_PROMPT && ftpclient->FileExists(dest)) 286 | { 287 | sprintf(confirm_message, "%s %s?", lang_strings[STR_OVERWRITE], dest); 288 | confirm_state = CONFIRM_WAIT; 289 | action_to_take = selected_action; 290 | activity_inprogess = false; 291 | while (confirm_state == CONFIRM_WAIT) 292 | { 293 | sceKernelUsleep(100000); 294 | } 295 | activity_inprogess = true; 296 | selected_action = action_to_take; 297 | } 298 | else if (overwrite_type == OVERWRITE_NONE && ftpclient->FileExists(dest)) 299 | { 300 | confirm_state = CONFIRM_NO; 301 | } 302 | else 303 | { 304 | confirm_state = CONFIRM_YES; 305 | } 306 | 307 | if (confirm_state == CONFIRM_YES) 308 | { 309 | return ftpclient->Put(src, dest, 0); 310 | } 311 | 312 | return 1; 313 | } 314 | 315 | int Upload(const DirEntry &src, const char *dest) 316 | { 317 | if (stop_activity) 318 | return 1; 319 | 320 | int ret; 321 | if (src.isDir) 322 | { 323 | int err; 324 | std::vector entries = FS::ListDir(src.path, &err); 325 | ftpclient->Mkdir(dest); 326 | for (int i = 0; i < entries.size(); i++) 327 | { 328 | if (stop_activity) 329 | return 1; 330 | 331 | int path_length = strlen(dest) + strlen(entries[i].name) + 2; 332 | char *new_path = (char *)malloc(path_length); 333 | snprintf(new_path, path_length, "%s%s%s", dest, FS::hasEndSlash(dest) ? "" : "/", entries[i].name); 334 | 335 | if (entries[i].isDir) 336 | { 337 | if (strcmp(entries[i].name, "..") == 0) 338 | continue; 339 | 340 | ftpclient->Mkdir(new_path); 341 | ret = Upload(entries[i], new_path); 342 | if (ret <= 0) 343 | { 344 | free(new_path); 345 | return ret; 346 | } 347 | } 348 | else 349 | { 350 | snprintf(activity_message, 1024, "%s %s", lang_strings[STR_UPLOADING], entries[i].path); 351 | bytes_to_download = entries[i].file_size; 352 | ret = UploadFile(entries[i].path, new_path); 353 | if (ret <= 0) 354 | { 355 | sprintf(status_message, "%s %s", lang_strings[STR_FAIL_UPLOAD_MSG], entries[i].path); 356 | free(new_path); 357 | return ret; 358 | } 359 | } 360 | free(new_path); 361 | } 362 | } 363 | else 364 | { 365 | int path_length = strlen(dest) + strlen(src.name) + 2; 366 | char *new_path = (char *)malloc(path_length); 367 | snprintf(new_path, path_length, "%s%s%s", dest, FS::hasEndSlash(dest) ? "" : "/", src.name); 368 | snprintf(activity_message, 1024, "%s %s", lang_strings[STR_UPLOADING], src.name); 369 | bytes_to_download = src.file_size; 370 | ret = UploadFile(src.path, new_path); 371 | if (ret <= 0) 372 | { 373 | free(new_path); 374 | sprintf(status_message, "%s %s", lang_strings[STR_FAIL_UPLOAD_MSG], src.name); 375 | return 0; 376 | } 377 | free(new_path); 378 | } 379 | return 1; 380 | } 381 | 382 | void *UploadFilesThread(void *argp) 383 | { 384 | file_transfering = true; 385 | for (std::set::iterator it = multi_selected_local_files.begin(); it != multi_selected_local_files.end(); ++it) 386 | { 387 | if (it->isDir) 388 | { 389 | char new_dir[512]; 390 | sprintf(new_dir, "%s%s%s", remote_directory, FS::hasEndSlash(remote_directory) ? "" : "/", it->name); 391 | Upload(*it, new_dir); 392 | } 393 | else 394 | { 395 | Upload(*it, remote_directory); 396 | } 397 | } 398 | activity_inprogess = false; 399 | file_transfering = false; 400 | multi_selected_local_files.clear(); 401 | Windows::SetModalMode(false); 402 | selected_action = ACTION_REFRESH_REMOTE_FILES; 403 | return NULL; 404 | } 405 | 406 | void UploadFiles() 407 | { 408 | int res = pthread_create(&bk_activity_thid, NULL, UploadFilesThread, NULL); 409 | if (res != 0) 410 | { 411 | activity_inprogess = false; 412 | file_transfering = false; 413 | multi_selected_local_files.clear(); 414 | Windows::SetModalMode(false); 415 | selected_action = ACTION_REFRESH_REMOTE_FILES; 416 | } 417 | } 418 | 419 | int DownloadFile(const char *src, const char *dest) 420 | { 421 | int ret; 422 | ret = ftpclient->Size(src, &bytes_to_download); 423 | if (ret == 0) 424 | { 425 | ftpclient->Quit(); 426 | sprintf(status_message, lang_strings[STR_CONNECTION_CLOSE_ERR_MSG]); 427 | return ret; 428 | } 429 | 430 | if (overwrite_type == OVERWRITE_PROMPT && FS::FileExists(dest)) 431 | { 432 | sprintf(confirm_message, "%s %s?", lang_strings[STR_OVERWRITE], dest); 433 | confirm_state = CONFIRM_WAIT; 434 | action_to_take = selected_action; 435 | activity_inprogess = false; 436 | while (confirm_state == CONFIRM_WAIT) 437 | { 438 | sceKernelUsleep(100000); 439 | } 440 | activity_inprogess = true; 441 | selected_action = action_to_take; 442 | } 443 | else if (overwrite_type == OVERWRITE_NONE && FS::FileExists(dest)) 444 | { 445 | confirm_state = CONFIRM_NO; 446 | } 447 | else 448 | { 449 | confirm_state = CONFIRM_YES; 450 | } 451 | 452 | if (confirm_state == CONFIRM_YES) 453 | { 454 | return ftpclient->Get(dest, src, 0); 455 | } 456 | 457 | return 1; 458 | } 459 | 460 | int Download(const DirEntry &src, const char *dest) 461 | { 462 | if (stop_activity) 463 | return 1; 464 | 465 | int ret; 466 | if (src.isDir) 467 | { 468 | int err; 469 | std::vector entries = ftpclient->ListDir(src.path); 470 | FS::MkDirs(dest); 471 | for (int i = 0; i < entries.size(); i++) 472 | { 473 | if (stop_activity) 474 | return 1; 475 | 476 | int path_length = strlen(dest) + strlen(entries[i].name) + 2; 477 | char *new_path = (char *)malloc(path_length); 478 | snprintf(new_path, path_length, "%s%s%s", dest, FS::hasEndSlash(dest) ? "" : "/", entries[i].name); 479 | 480 | if (entries[i].isDir) 481 | { 482 | if (strcmp(entries[i].name, "..") == 0) 483 | continue; 484 | 485 | FS::MkDirs(new_path); 486 | ret = Download(entries[i], new_path); 487 | if (ret <= 0) 488 | { 489 | free(new_path); 490 | return ret; 491 | } 492 | } 493 | else 494 | { 495 | snprintf(activity_message, 1024, "%s %s", lang_strings[STR_DOWNLOADING], entries[i].path); 496 | ret = DownloadFile(entries[i].path, new_path); 497 | if (ret <= 0) 498 | { 499 | sprintf(status_message, "%s %s", lang_strings[STR_FAIL_DOWNLOAD_MSG], entries[i].path); 500 | free(new_path); 501 | return ret; 502 | } 503 | } 504 | free(new_path); 505 | } 506 | } 507 | else 508 | { 509 | int path_length = strlen(dest) + strlen(src.name) + 2; 510 | char *new_path = (char *)malloc(path_length); 511 | snprintf(new_path, path_length, "%s%s%s", dest, FS::hasEndSlash(dest) ? "" : "/", src.name); 512 | snprintf(activity_message, 1024, "%s %s", lang_strings[STR_DOWNLOADING], src.path); 513 | ret = DownloadFile(src.path, new_path); 514 | if (ret <= 0) 515 | { 516 | free(new_path); 517 | sprintf(status_message, "%s %s", lang_strings[STR_FAIL_DOWNLOAD_MSG], src.path); 518 | return 0; 519 | } 520 | free(new_path); 521 | } 522 | return 1; 523 | } 524 | 525 | void *DownloadFilesThread(void *argp) 526 | { 527 | file_transfering = true; 528 | for (std::set::iterator it = multi_selected_remote_files.begin(); it != multi_selected_remote_files.end(); ++it) 529 | { 530 | if (it->isDir) 531 | { 532 | char new_dir[512]; 533 | sprintf(new_dir, "%s%s%s", local_directory, FS::hasEndSlash(local_directory) ? "" : "/", it->name); 534 | Download(*it, new_dir); 535 | } 536 | else 537 | { 538 | Download(*it, local_directory); 539 | } 540 | } 541 | file_transfering = false; 542 | activity_inprogess = false; 543 | multi_selected_remote_files.clear(); 544 | Windows::SetModalMode(false); 545 | selected_action = ACTION_REFRESH_LOCAL_FILES; 546 | return NULL; 547 | } 548 | 549 | void DownloadFiles() 550 | { 551 | int res = pthread_create(&bk_activity_thid, NULL, DownloadFilesThread, NULL); 552 | if (res != 0) 553 | { 554 | file_transfering = false; 555 | activity_inprogess = false; 556 | multi_selected_remote_files.clear(); 557 | Windows::SetModalMode(false); 558 | selected_action = ACTION_REFRESH_LOCAL_FILES; 559 | } 560 | } 561 | 562 | void *KeepAliveThread(void *argp) 563 | { 564 | long idle; 565 | FtpClient *client = (FtpClient*) ftpclient; 566 | while (client->IsConnected()) 567 | { 568 | idle = client->GetIdleTime(); 569 | if (idle > 60000000) 570 | { 571 | if (!ftpclient->Ping()) 572 | { 573 | client->Quit(); 574 | sprintf(status_message, lang_strings[STR_REMOTE_TERM_CONN_MSG]); 575 | return NULL; 576 | } 577 | } 578 | sceKernelUsleep(500000); 579 | } 580 | return NULL; 581 | } 582 | 583 | void ConnectFTP() 584 | { 585 | CONFIG::SaveConfig(); 586 | if (ftpclient->Connect(ftp_settings->server_ip, ftp_settings->server_port, ftp_settings->username, ftp_settings->password)) 587 | { 588 | RefreshRemoteFiles(false); 589 | sprintf(status_message, "%s", ftpclient->LastResponse()); 590 | 591 | int res = pthread_create(&ftp_keep_alive_thid, NULL, KeepAliveThread, NULL); 592 | } 593 | else 594 | { 595 | sprintf(status_message, "%s", ftpclient->LastResponse()); 596 | } 597 | selected_action = ACTION_NONE; 598 | } 599 | 600 | void DisconnectFTP() 601 | { 602 | ftpclient->Quit(); 603 | multi_selected_remote_files.clear(); 604 | remote_files.clear(); 605 | sprintf(remote_directory, "/"); 606 | sprintf(status_message, ""); 607 | } 608 | 609 | void SelectAllLocalFiles() 610 | { 611 | for (int i = 0; i < local_files.size(); i++) 612 | { 613 | if (strcmp(local_files[i].name, "..") != 0) 614 | multi_selected_local_files.insert(local_files[i]); 615 | } 616 | } 617 | 618 | void SelectAllRemoteFiles() 619 | { 620 | for (int i = 0; i < remote_files.size(); i++) 621 | { 622 | if (strcmp(remote_files[i].name, "..") != 0) 623 | multi_selected_remote_files.insert(remote_files[i]); 624 | } 625 | } 626 | } 627 | -------------------------------------------------------------------------------- /source/actions.h: -------------------------------------------------------------------------------- 1 | #ifndef ACTIONS_H 2 | #define ACTIONS_H 3 | 4 | #include 5 | #include "common.h" 6 | 7 | #define CONFIRM_NONE -1 8 | #define CONFIRM_WAIT 0 9 | #define CONFIRM_YES 1 10 | #define CONFIRM_NO 2 11 | 12 | enum ACTIONS 13 | { 14 | ACTION_NONE = 0, 15 | ACTION_UPLOAD, 16 | ACTION_DOWNLOAD, 17 | ACTION_DELETE_LOCAL, 18 | ACTION_DELETE_REMOTE, 19 | ACTION_RENAME_LOCAL, 20 | ACTION_RENAME_REMOTE, 21 | ACTION_NEW_LOCAL_FOLDER, 22 | ACTION_NEW_REMOTE_FOLDER, 23 | ACTION_CHANGE_LOCAL_DIRECTORY, 24 | ACTION_CHANGE_REMOTE_DIRECTORY, 25 | ACTION_APPLY_LOCAL_FILTER, 26 | ACTION_APPLY_REMOTE_FILTER, 27 | ACTION_REFRESH_LOCAL_FILES, 28 | ACTION_REFRESH_REMOTE_FILES, 29 | ACTION_SHOW_LOCAL_PROPERTIES, 30 | ACTION_SHOW_REMOTE_PROPERTIES, 31 | ACTION_LOCAL_SELECT_ALL, 32 | ACTION_REMOTE_SELECT_ALL, 33 | ACTION_LOCAL_CLEAR_ALL, 34 | ACTION_REMOTE_CLEAR_ALL, 35 | ACTION_CONNECT_FTP, 36 | ACTION_DISCONNECT_FTP, 37 | ACTION_DISCONNECT_FTP_AND_EXIT 38 | }; 39 | 40 | enum OverWriteType 41 | { 42 | OVERWRITE_NONE = 0, 43 | OVERWRITE_PROMPT, 44 | OVERWRITE_ALL 45 | }; 46 | 47 | static pthread_t bk_activity_thid; 48 | static pthread_t ftp_keep_alive_thid; 49 | 50 | namespace Actions 51 | { 52 | 53 | void RefreshLocalFiles(bool apply_filter); 54 | void RefreshRemoteFiles(bool apply_filter); 55 | void HandleChangeLocalDirectory(const DirEntry entry); 56 | void HandleChangeRemoteDirectory(const DirEntry entry); 57 | void HandleRefreshLocalFiles(); 58 | void HandleRefreshRemoteFiles(); 59 | void CreateNewLocalFolder(char *new_folder); 60 | void CreateNewRemoteFolder(char *new_folder); 61 | void RenameLocalFolder(const char *old_path, const char *new_path); 62 | void RenameRemoteFolder(const char *old_path, const char *new_path); 63 | void *DeleteSelectedLocalFilesThread(void *argp); 64 | void DeleteSelectedLocalFiles(); 65 | void *DeleteSelectedRemotesFilesThread(void *argp); 66 | void DeleteSelectedRemotesFiles(); 67 | void *UploadFilesThread(void *argp); 68 | void UploadFiles(); 69 | void *DownloadFilesThread(void *argp); 70 | void DownloadFiles(); 71 | void ConnectFTP(); 72 | void DisconnectFTP(); 73 | void SelectAllLocalFiles(); 74 | void SelectAllRemoteFiles(); 75 | } 76 | 77 | #endif -------------------------------------------------------------------------------- /source/common.h: -------------------------------------------------------------------------------- 1 | #ifndef COMMON_H 2 | #define COMMON_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | typedef struct 9 | { 10 | uint16_t year; 11 | uint8_t month; 12 | uint8_t day; 13 | uint8_t dayOfWeek; 14 | uint8_t hours; 15 | uint8_t minutes; 16 | uint8_t seconds; 17 | uint32_t microsecond; 18 | } DateTime; 19 | 20 | struct DirEntry 21 | { 22 | char directory[512]; 23 | char name[256]; 24 | char display_size[48]; 25 | char display_date[32]; 26 | char path[768]; 27 | uint64_t file_size; 28 | bool isDir; 29 | bool isLink; 30 | DateTime modified; 31 | 32 | friend bool operator<(DirEntry const &a, DirEntry const &b) 33 | { 34 | return strcmp(a.name, b.name) < 0; 35 | } 36 | 37 | static int DirEntryComparator(const void *v1, const void *v2) 38 | { 39 | const DirEntry *p1 = (DirEntry *)v1; 40 | const DirEntry *p2 = (DirEntry *)v2; 41 | if (strcasecmp(p1->name, "..") == 0) 42 | return -1; 43 | if (strcasecmp(p2->name, "..") == 0) 44 | return 1; 45 | 46 | if (p1->isDir && !p2->isDir) 47 | { 48 | return -1; 49 | } 50 | else if (!p1->isDir && p2->isDir) 51 | { 52 | return 1; 53 | } 54 | 55 | return strcasecmp(p1->name, p2->name); 56 | } 57 | 58 | static void Sort(std::vector &list) 59 | { 60 | qsort(&list[0], list.size(), sizeof(DirEntry), DirEntryComparator); 61 | } 62 | }; 63 | 64 | #endif -------------------------------------------------------------------------------- /source/config.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "config.h" 6 | #include "fs.h" 7 | #include "lang.h" 8 | 9 | extern "C" 10 | { 11 | #include "inifile.h" 12 | } 13 | 14 | bool swap_xo; 15 | FtpSettings *ftp_settings; 16 | char local_directory[255]; 17 | char remote_directory[255]; 18 | char app_ver[6]; 19 | char last_site[32]; 20 | char display_site[32]; 21 | char language[128]; 22 | std::vector sites; 23 | std::map site_settings; 24 | 25 | namespace CONFIG 26 | { 27 | 28 | void LoadConfig() 29 | { 30 | if (!FS::FolderExists(DATA_PATH)) 31 | { 32 | FS::MkDirs(DATA_PATH); 33 | } 34 | 35 | sites = {"Site 1", "Site 2", "Site 3", "Site 4", "Site 5", "Site 6", "Site 7", "Site 8", "Site 9"}; 36 | 37 | OpenIniFile(CONFIG_INI_FILE); 38 | 39 | // Load global config 40 | swap_xo = ReadBool(CONFIG_GLOBAL, CONFIG_SWAP_XO, false); 41 | WriteBool(CONFIG_GLOBAL, CONFIG_SWAP_XO, swap_xo); 42 | 43 | sprintf(language, "%s", ReadString(CONFIG_GLOBAL, CONFIG_LANGUAGE, "")); 44 | WriteString(CONFIG_GLOBAL, CONFIG_LANGUAGE, language); 45 | 46 | sprintf(local_directory, "%s", ReadString(CONFIG_GLOBAL, CONFIG_LOCAL_DIRECTORY, "/")); 47 | WriteString(CONFIG_GLOBAL, CONFIG_LOCAL_DIRECTORY, local_directory); 48 | 49 | sprintf(remote_directory, "%s", ReadString(CONFIG_GLOBAL, CONFIG_REMOTE_DIRECTORY, "/")); 50 | WriteString(CONFIG_GLOBAL, CONFIG_REMOTE_DIRECTORY, remote_directory); 51 | 52 | for (int i = 0; i < sites.size(); i++) 53 | { 54 | FtpSettings setting; 55 | sprintf(setting.site_name, "%s", sites[i].c_str()); 56 | 57 | sprintf(setting.server_ip, "%s", ReadString(sites[i].c_str(), CONFIG_FTP_SERVER_IP, "")); 58 | WriteString(sites[i].c_str(), CONFIG_FTP_SERVER_IP, setting.server_ip); 59 | 60 | setting.server_port = ReadInt(sites[i].c_str(), CONFIG_FTP_SERVER_PORT, 21); 61 | WriteInt(sites[i].c_str(), CONFIG_FTP_SERVER_PORT, setting.server_port); 62 | 63 | setting.pasv_mode = ReadBool(sites[i].c_str(), CONFIG_FTP_TRANSFER_MODE, true); 64 | WriteBool(sites[i].c_str(), CONFIG_FTP_TRANSFER_MODE, setting.pasv_mode); 65 | 66 | sprintf(setting.username, "%s", ReadString(sites[i].c_str(), CONFIG_FTP_SERVER_USER, "")); 67 | WriteString(sites[i].c_str(), CONFIG_FTP_SERVER_USER, setting.username); 68 | 69 | sprintf(setting.password, "%s", ReadString(sites[i].c_str(), CONFIG_FTP_SERVER_PASSWORD, "")); 70 | WriteString(sites[i].c_str(), CONFIG_FTP_SERVER_PASSWORD, setting.password); 71 | 72 | site_settings.insert(std::make_pair(sites[i], setting)); 73 | } 74 | 75 | sprintf(last_site, "%s", ReadString(CONFIG_GLOBAL, CONFIG_LAST_SITE, sites[0].c_str())); 76 | WriteString(CONFIG_GLOBAL, CONFIG_LAST_SITE, last_site); 77 | 78 | ftp_settings = &site_settings[std::string(last_site)]; 79 | 80 | WriteIniFile(CONFIG_INI_FILE); 81 | CloseIniFile(); 82 | } 83 | 84 | void SaveConfig() 85 | { 86 | OpenIniFile(CONFIG_INI_FILE); 87 | 88 | WriteString(last_site, CONFIG_FTP_SERVER_IP, ftp_settings->server_ip); 89 | WriteInt(last_site, CONFIG_FTP_SERVER_PORT, ftp_settings->server_port); 90 | WriteBool(last_site, CONFIG_FTP_TRANSFER_MODE, ftp_settings->pasv_mode); 91 | WriteString(last_site, CONFIG_FTP_SERVER_USER, ftp_settings->username); 92 | WriteString(last_site, CONFIG_FTP_SERVER_PASSWORD, ftp_settings->password); 93 | WriteString(CONFIG_GLOBAL, CONFIG_LAST_SITE, last_site); 94 | WriteIniFile(CONFIG_INI_FILE); 95 | CloseIniFile(); 96 | } 97 | 98 | void ParseMultiValueString(const char *prefix_list, std::vector &prefixes, bool toLower) 99 | { 100 | std::string prefix = ""; 101 | int length = strlen(prefix_list); 102 | for (int i = 0; i < length; i++) 103 | { 104 | char c = prefix_list[i]; 105 | if (c != ' ' && c != '\t' && c != ',') 106 | { 107 | if (toLower) 108 | { 109 | prefix += std::tolower(c); 110 | } 111 | else 112 | { 113 | prefix += c; 114 | } 115 | } 116 | 117 | if (c == ',' || i == length - 1) 118 | { 119 | prefixes.push_back(prefix); 120 | prefix = ""; 121 | } 122 | } 123 | } 124 | 125 | std::string GetMultiValueString(std::vector &multi_values) 126 | { 127 | std::string vts = std::string(""); 128 | if (multi_values.size() > 0) 129 | { 130 | for (int i = 0; i < multi_values.size() - 1; i++) 131 | { 132 | vts.append(multi_values[i]).append(","); 133 | } 134 | vts.append(multi_values[multi_values.size() - 1]); 135 | } 136 | return vts; 137 | } 138 | 139 | void RemoveFromMultiValues(std::vector &multi_values, std::string value) 140 | { 141 | auto itr = std::find(multi_values.begin(), multi_values.end(), value); 142 | if (itr != multi_values.end()) 143 | multi_values.erase(itr); 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /source/config.h: -------------------------------------------------------------------------------- 1 | #ifndef LAUNCHER_CONFIG_H 2 | #define LAUNCHER_CONFIG_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | 9 | #define APP_ID "ps4-ftp-client" 10 | #define DATA_PATH "/data/" APP_ID 11 | #define CONFIG_INI_FILE DATA_PATH "/config.ini" 12 | 13 | #define CONFIG_GLOBAL "Global" 14 | 15 | #define CONFIG_DEFAULT_STYLE_NAME "Default" 16 | #define CONFIG_SWAP_XO "swap_xo" 17 | 18 | #define CONFIG_FTP_SERVER_NAME "ftp_server_name" 19 | #define CONFIG_FTP_SERVER_IP "ftp_server_ip" 20 | #define CONFIG_FTP_SERVER_PORT "ftp_server_port" 21 | #define CONFIG_FTP_SERVER_USER "ftp_server_user" 22 | #define CONFIG_FTP_SERVER_PASSWORD "ftp_server_password" 23 | #define CONFIG_FTP_TRANSFER_MODE "ftp_transfer_mode" 24 | 25 | #define CONFIG_LAST_SITE "last_site" 26 | 27 | #define CONFIG_LOCAL_DIRECTORY "local_directory" 28 | #define CONFIG_REMOTE_DIRECTORY "remote_directory" 29 | 30 | #define CONFIG_LANGUAGE "language" 31 | 32 | struct FtpSettings 33 | { 34 | char site_name[32]; 35 | char server_ip[16]; 36 | char username[33]; 37 | char password[25]; 38 | int server_port; 39 | bool pasv_mode; 40 | }; 41 | 42 | extern bool swap_xo; 43 | extern std::vector sites; 44 | extern std::map site_settings; 45 | extern char local_directory[255]; 46 | extern char remote_directory[255]; 47 | extern char app_ver[6]; 48 | extern char last_site[32]; 49 | extern char display_site[32]; 50 | extern char language[128]; 51 | extern FtpSettings *ftp_settings; 52 | 53 | namespace CONFIG 54 | { 55 | void LoadConfig(); 56 | void SaveConfig(); 57 | void RemoveFromMultiValues(std::vector &multi_values, std::string value); 58 | void ParseMultiValueString(const char *prefix_list, std::vector &prefixes, bool toLower); 59 | std::string GetMultiValueString(std::vector &multi_values); 60 | } 61 | #endif 62 | -------------------------------------------------------------------------------- /source/fs.cpp: -------------------------------------------------------------------------------- 1 | #include "fs.h" 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | 11 | #include "util.h" 12 | #include "lang.h" 13 | #include "rtc.h" 14 | #include "windows.h" 15 | 16 | namespace FS 17 | { 18 | int hasEndSlash(const char *path) 19 | { 20 | return path[strlen(path) - 1] == '/'; 21 | } 22 | 23 | void MkDirs(const std::string &ppath, bool prev) 24 | { 25 | std::string path = ppath; 26 | if (!prev) 27 | { 28 | path.push_back('/'); 29 | } 30 | auto ptr = path.begin(); 31 | while (true) 32 | { 33 | ptr = std::find(ptr, path.end(), '/'); 34 | if (ptr == path.end()) 35 | break; 36 | 37 | char last = *ptr; 38 | *ptr = 0; 39 | int err = mkdir(path.c_str(), 0777); 40 | *ptr = last; 41 | ++ptr; 42 | } 43 | } 44 | 45 | void Rm(const std::string &file) 46 | { 47 | remove(file.c_str()); 48 | } 49 | 50 | void RmDir(const std::string &path) 51 | { 52 | remove(path.c_str()); 53 | } 54 | 55 | int64_t GetSize(const std::string &path) 56 | { 57 | struct stat file_stat = {0}; 58 | int err = stat(path.c_str(), &file_stat); 59 | if (err < 0) 60 | { 61 | return -1; 62 | } 63 | return file_stat.st_size; 64 | } 65 | 66 | bool FileExists(const std::string &path) 67 | { 68 | struct stat file_stat = {0}; 69 | return (stat(path.c_str(), std::addressof(file_stat)) == 0 && S_ISREG(file_stat.st_mode)); 70 | } 71 | 72 | bool FolderExists(const std::string &path) 73 | { 74 | struct stat dir_stat = {0}; 75 | return (stat(path.c_str(), &dir_stat) == 0); 76 | } 77 | 78 | void Rename(const std::string &from, const std::string &to) 79 | { 80 | int res = rename(from.c_str(), to.c_str()); 81 | } 82 | 83 | FILE *Create(const std::string &path) 84 | { 85 | FILE *fd = fopen(path.c_str(), "w"); 86 | 87 | return fd; 88 | } 89 | 90 | FILE *OpenRW(const std::string &path) 91 | { 92 | FILE *fd = fopen(path.c_str(), "w+"); 93 | return fd; 94 | } 95 | 96 | FILE *OpenRead(const std::string &path) 97 | { 98 | FILE *fd = fopen(path.c_str(), "r"); 99 | return fd; 100 | } 101 | 102 | FILE *Append(const std::string &path) 103 | { 104 | FILE *fd = fopen(path.c_str(), "a"); 105 | return fd; 106 | } 107 | 108 | int64_t Seek(FILE *f, uint64_t offset) 109 | { 110 | auto const pos = fseek(f, offset, SEEK_SET); 111 | return pos; 112 | } 113 | 114 | int Read(FILE *f, void *buffer, uint32_t size) 115 | { 116 | const auto read = fread(buffer, size, 1, f); 117 | return read; 118 | } 119 | 120 | int Write(FILE *f, const void *buffer, uint32_t size) 121 | { 122 | int write = fwrite(buffer, size, 1, f); 123 | return write; 124 | } 125 | 126 | void Close(FILE *fd) 127 | { 128 | int err = fclose(fd); 129 | } 130 | 131 | std::vector Load(const std::string &path) 132 | { 133 | FILE *fd = fopen(path.c_str(), "r"); 134 | if (fd == nullptr) 135 | return std::vector(0); 136 | 137 | const auto size = fseek(fd, 0, SEEK_END); 138 | fseek(fd, 0, SEEK_SET); 139 | 140 | std::vector data(size); 141 | 142 | const auto read = fread(data.data(), data.size(), 1, fd); 143 | fclose(fd); 144 | if (read < 0) 145 | return std::vector(0); 146 | 147 | data.resize(read); 148 | 149 | return data; 150 | } 151 | 152 | void Save(const std::string &path, const void *data, uint32_t size) 153 | { 154 | FILE *fd = fopen(path.c_str(), "w+"); 155 | if (fd == nullptr) 156 | return; 157 | 158 | const char *data8 = static_cast(data); 159 | while (size != 0) 160 | { 161 | int written = fwrite(data8, size, 1, fd); 162 | fclose(fd); 163 | if (written <= 0) 164 | return; 165 | data8 += written; 166 | size -= written; 167 | } 168 | } 169 | 170 | std::vector ListDir(const std::string &ppath, int *err) 171 | { 172 | std::vector out; 173 | DirEntry entry; 174 | std::string path = ppath; 175 | 176 | memset(&entry, 0, sizeof(DirEntry)); 177 | sprintf(entry.directory, "%s", path.c_str()); 178 | sprintf(entry.name, ".."); 179 | sprintf(entry.display_size, lang_strings[STR_FOLDER]); 180 | sprintf(entry.path, "%s", path.c_str()); 181 | entry.file_size = 0; 182 | entry.isDir = true; 183 | out.push_back(entry); 184 | 185 | DIR *fd = opendir(path.c_str()); 186 | *err = 0; 187 | if (fd == NULL) 188 | { 189 | *err = 1; 190 | return out; 191 | } 192 | 193 | while (true) 194 | { 195 | struct dirent *dirent; 196 | DirEntry entry; 197 | dirent = readdir(fd); 198 | if (dirent == NULL) 199 | { 200 | closedir(fd); 201 | return out; 202 | } 203 | else 204 | { 205 | if (strcmp(dirent->d_name, ".") == 0 || strcmp(dirent->d_name, "..") == 0) 206 | { 207 | continue; 208 | } 209 | 210 | snprintf(entry.directory, 512, "%s", path.c_str()); 211 | snprintf(entry.name, 256, "%s", dirent->d_name); 212 | 213 | if (hasEndSlash(path.c_str())) 214 | { 215 | sprintf(entry.path, "%s%s", path.c_str(), dirent->d_name); 216 | } 217 | else 218 | { 219 | sprintf(entry.path, "%s/%s", path.c_str(), dirent->d_name); 220 | } 221 | struct stat file_stat = {0}; 222 | stat(entry.path, &file_stat); 223 | struct tm tm = *localtime(&file_stat.st_mtim.tv_sec); 224 | 225 | OrbisDateTime gmt; 226 | OrbisDateTime lt; 227 | 228 | gmt.day = tm.tm_mday; 229 | gmt.month = tm.tm_mon + 1; 230 | gmt.year = tm.tm_year + 1900; 231 | gmt.hour = tm.tm_hour; 232 | gmt.minute = tm.tm_min; 233 | gmt.second = tm.tm_sec; 234 | 235 | convertUtcToLocalTime(&gmt, <); 236 | 237 | entry.modified.day = lt.day; 238 | entry.modified.month = lt.month; 239 | entry.modified.year = lt.year; 240 | entry.modified.hours = lt.hour; 241 | entry.modified.minutes = lt.minute; 242 | entry.modified.seconds = lt.second; 243 | entry.file_size = file_stat.st_size; 244 | 245 | if (dirent->d_type & DT_DIR) 246 | { 247 | entry.isDir = true; 248 | entry.file_size = 0; 249 | sprintf(entry.display_size, lang_strings[STR_FOLDER]); 250 | } 251 | else 252 | { 253 | if (entry.file_size < 1024) 254 | { 255 | sprintf(entry.display_size, "%lldB", entry.file_size); 256 | } 257 | else if (entry.file_size < 1024 * 1024) 258 | { 259 | sprintf(entry.display_size, "%.2fKB", entry.file_size * 1.0f / 1024); 260 | } 261 | else if (entry.file_size < 1024 * 1024 * 1024) 262 | { 263 | sprintf(entry.display_size, "%.2fMB", entry.file_size * 1.0f / (1024 * 1024)); 264 | } 265 | else 266 | { 267 | sprintf(entry.display_size, "%.2fGB", entry.file_size * 1.0f / (1024 * 1024 * 1024)); 268 | } 269 | entry.isDir = false; 270 | } 271 | out.push_back(entry); 272 | } 273 | } 274 | closedir(fd); 275 | 276 | return out; 277 | } 278 | 279 | std::vector ListFiles(const std::string &path) 280 | { 281 | DIR *fd = opendir(path.c_str()); 282 | if (fd == NULL) 283 | return std::vector(0); 284 | 285 | std::vector out; 286 | while (true) 287 | { 288 | struct dirent *dirent; 289 | dirent = readdir(fd); 290 | if (dirent == NULL) 291 | { 292 | closedir(fd); 293 | return out; 294 | } 295 | 296 | if (strcmp(dirent->d_name, ".") == 0 || strcmp(dirent->d_name, "..") == 0) 297 | { 298 | continue; 299 | } 300 | 301 | if (dirent->d_type & DT_DIR) 302 | { 303 | std::vector files = FS::ListFiles(path + "/" + dirent->d_name); 304 | for (std::vector::iterator it = files.begin(); it != files.end();) 305 | { 306 | out.push_back(std::string(dirent->d_name) + "/" + *it); 307 | ++it; 308 | } 309 | } 310 | else 311 | { 312 | out.push_back(dirent->d_name); 313 | } 314 | } 315 | closedir(fd); 316 | return out; 317 | } 318 | 319 | int RmRecursive(const std::string &path) 320 | { 321 | if (stop_activity) 322 | return 1; 323 | 324 | DIR *dfd = opendir(path.c_str()); 325 | if (dfd != NULL) 326 | { 327 | struct dirent *dir = NULL; 328 | do 329 | { 330 | dir = readdir(dfd); 331 | if (dir == NULL || strcmp(dir->d_name, ".") == 0 || strcmp(dir->d_name, "..") == 0) 332 | { 333 | continue; 334 | } 335 | 336 | char new_path[512]; 337 | snprintf(new_path, 512, "%s%s%s", path.c_str(), hasEndSlash(path.c_str()) ? "" : "/", dir->d_name); 338 | 339 | if (dir->d_type & DT_DIR) 340 | { 341 | int ret = RmRecursive(new_path); 342 | if (ret <= 0) 343 | { 344 | sprintf(status_message, "%s %s", lang_strings[STR_FAIL_DEL_DIR_MSG], new_path); 345 | closedir(dfd); 346 | return ret; 347 | } 348 | } 349 | else 350 | { 351 | snprintf(activity_message, 1024, "%s %s", lang_strings[STR_DELETING], new_path); 352 | int ret = remove(new_path); 353 | if (ret < 0) 354 | { 355 | sprintf(status_message, "%s %s", lang_strings[STR_FAIL_DEL_FILE_MSG], new_path); 356 | closedir(dfd); 357 | return ret; 358 | } 359 | } 360 | } while (dir != NULL && !stop_activity); 361 | 362 | closedir(dfd); 363 | 364 | if (stop_activity) 365 | return 0; 366 | 367 | int ret = rmdir(path.c_str()); 368 | if (ret < 0) 369 | { 370 | sprintf(status_message, "%s %s", lang_strings[STR_FAIL_DEL_DIR_MSG], path.c_str()); 371 | return ret; 372 | } 373 | snprintf(activity_message, 1024, "%s %s", lang_strings[STR_DELETED], path.c_str()); 374 | } 375 | else 376 | { 377 | int ret = remove(path.c_str()); 378 | if (ret < 0) 379 | { 380 | sprintf(status_message, "%s %s", lang_strings[STR_FAIL_DEL_FILE_MSG], path.c_str()); 381 | return ret; 382 | } 383 | snprintf(activity_message, 1024, "%s %s", lang_strings[STR_DELETED], path.c_str()); 384 | } 385 | 386 | return 1; 387 | } 388 | 389 | std::string GetPath(const std::string &ppath1, const std::string &ppath2) 390 | { 391 | std::string path1 = ppath1; 392 | std::string path2 = ppath2; 393 | path2 = Util::Rtrim(Util::Trim(path2, " "), "/"); 394 | return path1 + "/" + path2; 395 | } 396 | } 397 | -------------------------------------------------------------------------------- /source/fs.h: -------------------------------------------------------------------------------- 1 | #ifndef LAUNCHER_FS_H 2 | #define LAUNCHER_FS_H 3 | 4 | #pragma once 5 | #include 6 | #include 7 | #include 8 | #include 9 | 10 | #include "common.h" 11 | 12 | #define MAX_PATH_LENGTH 1024 13 | 14 | namespace FS 15 | { 16 | std::string GetPath(const std::string &path1, const std::string &path2); 17 | 18 | void MkDirs(const std::string &path, bool prev = false); 19 | 20 | void Rm(const std::string &file); 21 | void RmDir(const std::string &path); 22 | int RmRecursive(const std::string &path); 23 | 24 | int64_t GetSize(const char *path); 25 | 26 | bool FileExists(const std::string &path); 27 | bool FolderExists(const std::string &path); 28 | 29 | void Rename(const std::string &from, const std::string &to); 30 | 31 | // creates file (if it exists, truncates size to 0) 32 | FILE *Create(const std::string &path); 33 | 34 | // open existing file in read/write, fails if file does not exist 35 | FILE *OpenRW(const std::string &path); 36 | 37 | // open existing file in read/write, fails if file does not exist 38 | FILE *OpenRead(const std::string &path); 39 | 40 | // open file for writing, next write will append data to end of it 41 | FILE *Append(const std::string &path); 42 | 43 | void Close(FILE *f); 44 | 45 | int64_t Seek(FILE *f, uint64_t offset); 46 | int Read(FILE *f, void *buffer, uint32_t size); 47 | int Write(FILE *f, const void *buffer, uint32_t size); 48 | 49 | std::vector Load(const std::string &path); 50 | void Save(const std::string &path, const void *data, uint32_t size); 51 | 52 | std::vector ListFiles(const std::string &path); 53 | std::vector ListDir(const std::string &path, int *err); 54 | 55 | int hasEndSlash(const char *path); 56 | } 57 | 58 | #endif -------------------------------------------------------------------------------- /source/ftpclient.h: -------------------------------------------------------------------------------- 1 | #ifndef FTPCLIENT_H 2 | #define FTPCLIENT_H 3 | 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include "remote_client.h" 10 | 11 | #define FTP_CLIENT_MAX_FILENAME_LEN 128 12 | 13 | typedef int (*FtpCallbackXfer)(int64_t xfered, void *arg); 14 | 15 | struct ftphandle 16 | { 17 | char *cput, *cget; 18 | int handle; 19 | int cavail, cleft; 20 | char *buf; 21 | int dir; 22 | ftphandle *ctrl; 23 | int cmode; 24 | int64_t xfered; 25 | int64_t xfered1; 26 | int64_t cbbytes; 27 | char response[512]; 28 | int64_t offset; 29 | bool correctpasv; 30 | FtpCallbackXfer xfercb; 31 | void *cbarg; 32 | bool is_connected; 33 | }; 34 | 35 | class FtpClient : public RemoteClient 36 | { 37 | public: 38 | enum accesstype 39 | { 40 | dir = 1, 41 | dirverbose, 42 | dirmlsd, 43 | fileread, 44 | filewrite, 45 | filereadappend, 46 | filewriteappend 47 | }; 48 | 49 | enum transfermode 50 | { 51 | ascii = 'A', 52 | image = 'I' 53 | }; 54 | 55 | enum connmode 56 | { 57 | pasv = 1, 58 | port 59 | }; 60 | 61 | enum attributes 62 | { 63 | directory = 1, 64 | readonly = 2 65 | }; 66 | 67 | FtpClient(); 68 | ~FtpClient(); 69 | int Connect(const std::string &host, unsigned short port, const std::string &user, const std::string &pass); 70 | void SetConnmode(connmode mode); 71 | int Site(const std::string &cmd); 72 | int Raw(const std::string &cmd); 73 | int SysType(char *buf, int max); 74 | int Mkdir(const std::string &path); 75 | int Chdir(const std::string &path); 76 | int Cdup(); 77 | int Rmdir(const std::string &path); 78 | int Rmdir(const std::string &path, bool recursive); 79 | int Size(const std::string &path, int64_t *size); 80 | int Get(const std::string &outputfile, const std::string &path, int64_t offset = 0); 81 | int Put(const std::string &inputfile, const std::string &path, int64_t offset = 0); 82 | int Rename(const std::string &src, const std::string &dst); 83 | int Delete(const std::string &path); 84 | std::vector ListFiles(const std::string &path, bool includeSubDir = false); 85 | std::vector ListDir(const std::string &path); 86 | void SetCallbackXferFunction(FtpCallbackXfer pointer); 87 | void SetCallbackArg(void *arg); 88 | void SetCallbackBytes(int64_t bytes); 89 | bool Noop(); 90 | bool Ping(); 91 | bool FileExists(const std::string &path); 92 | bool IsConnected(); 93 | char *LastResponse(); 94 | long GetIdleTime(); 95 | int Quit(); 96 | 97 | private: 98 | ftphandle *mp_ftphandle; 99 | struct tm cur_time; 100 | timeval tick; 101 | 102 | int FtpSendCmd(const std::string &cmd, char expected_resp, ftphandle *nControl); 103 | ftphandle *RawOpen(const std::string &path, accesstype type, transfermode mode); 104 | int RawClose(ftphandle *handle); 105 | int RawWrite(void *buf, int len, ftphandle *handle); 106 | int RawRead(void *buf, int max, ftphandle *handle); 107 | int ReadResponse(char c, ftphandle *nControl); 108 | int Readline(char *buf, int max, ftphandle *nControl); 109 | int Writeline(char *buf, int len, ftphandle *nData); 110 | void ClearHandle(); 111 | int FtpOpenPasv(ftphandle *nControl, ftphandle **nData, transfermode mode, int dir, std::string &cmd); 112 | int FtpOpenPort(ftphandle *nControl, ftphandle **nData, transfermode mode, int dir, std::string &cmd); 113 | int FtpAcceptConnection(ftphandle *nData, ftphandle *nControl); 114 | int CorrectPasvResponse(int *v); 115 | int FtpAccess(const std::string &path, accesstype type, transfermode mode, ftphandle *nControl, ftphandle **nData); 116 | int FtpXfer(const std::string &localfile, const std::string &path, ftphandle *nControl, accesstype type, transfermode mode); 117 | int FtpWrite(void *buf, int len, ftphandle *nData); 118 | int FtpRead(void *buf, int max, ftphandle *nData); 119 | int FtpClose(ftphandle *nData); 120 | int ParseDirEntry(char *line, DirEntry *dirEntry); 121 | int ParseMLSDDirEntry(char *line, DirEntry *dirEntry); 122 | }; 123 | 124 | #endif -------------------------------------------------------------------------------- /source/gui.cpp: -------------------------------------------------------------------------------- 1 | #include "imgui.h" 2 | #include 3 | #include "windows.h" 4 | #include "gui.h" 5 | #include "ftpclient.h" 6 | #include "SDL2/SDL.h" 7 | #include "imgui_impl_sdl.h" 8 | #include "imgui_impl_sdlrenderer.h" 9 | 10 | bool done = false; 11 | int gui_mode = GUI_MODE_BROWSER; 12 | 13 | namespace GUI 14 | { 15 | int RenderLoop(SDL_Renderer *renderer) 16 | { 17 | Windows::Init(); 18 | while (!done) 19 | { 20 | if (gui_mode == GUI_MODE_BROWSER) 21 | { 22 | SDL_Event event; 23 | while (SDL_PollEvent(&event)) 24 | { 25 | ImGui_ImplSDL2_ProcessEvent(&event); 26 | } 27 | 28 | ImGui_ImplSDLRenderer_NewFrame(); 29 | ImGui_ImplSDL2_NewFrame(); 30 | ImGui::NewFrame(); 31 | 32 | Windows::HandleWindowInput(); 33 | Windows::MainWindow(); 34 | Windows::ExecuteActions(); 35 | 36 | ImGui::Render(); 37 | ImGui_ImplSDLRenderer_RenderDrawData(ImGui::GetDrawData()); 38 | SDL_RenderPresent(renderer); 39 | } 40 | else if (gui_mode == GUI_MODE_IME) 41 | { 42 | Windows::HandleImeInput(); 43 | } 44 | } 45 | return 0; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /source/gui.h: -------------------------------------------------------------------------------- 1 | #ifndef LAUNCHER_GUI_H 2 | #define LAUNCHER_GUI_H 3 | 4 | #include 5 | #include "SDL2/SDL.h" 6 | 7 | #define GUI_MODE_BROWSER 0 8 | #define GUI_MODE_IME 1 9 | 10 | extern bool done; 11 | extern int gui_mode; 12 | 13 | namespace GUI 14 | { 15 | int RenderLoop(SDL_Renderer *renderer); 16 | } 17 | 18 | #endif 19 | -------------------------------------------------------------------------------- /source/imconfig.h: -------------------------------------------------------------------------------- 1 | //----------------------------------------------------------------------------- 2 | // COMPILE-TIME OPTIONS FOR DEAR IMGUI 3 | // Runtime options (clipboard callbacks, enabling various features, etc.) can generally be set via the ImGuiIO structure. 4 | // You can use ImGui::SetAllocatorFunctions() before calling ImGui::CreateContext() to rewire memory allocation functions. 5 | //----------------------------------------------------------------------------- 6 | // A) You may edit imconfig.h (and not overwrite it when updating Dear ImGui, or maintain a patch/rebased branch with your modifications to it) 7 | // B) or '#define IMGUI_USER_CONFIG "my_imgui_config.h"' in your project and then add directives in your own file without touching this template. 8 | //----------------------------------------------------------------------------- 9 | // You need to make sure that configuration settings are defined consistently _everywhere_ Dear ImGui is used, which include the imgui*.cpp 10 | // files but also _any_ of your code that uses Dear ImGui. This is because some compile-time options have an affect on data structures. 11 | // Defining those options in imconfig.h will ensure every compilation unit gets to see the same data structure layouts. 12 | // Call IMGUI_CHECKVERSION() from your .cpp files to verify that the data structures your files are using are matching the ones imgui.cpp is using. 13 | //----------------------------------------------------------------------------- 14 | 15 | #pragma once 16 | 17 | //---- Define assertion handler. Defaults to calling assert(). 18 | // If your macro uses multiple statements, make sure is enclosed in a 'do { .. } while (0)' block so it can be used as a single statement. 19 | //#define IM_ASSERT(_EXPR) MyAssert(_EXPR) 20 | //#define IM_ASSERT(_EXPR) ((void)(_EXPR)) // Disable asserts 21 | 22 | //---- Define attributes of all API symbols declarations, e.g. for DLL under Windows 23 | // Using Dear ImGui via a shared library is not recommended, because of function call overhead and because we don't guarantee backward nor forward ABI compatibility. 24 | // DLL users: heaps and globals are not shared across DLL boundaries! You will need to call SetCurrentContext() + SetAllocatorFunctions() 25 | // for each static/DLL boundary you are calling from. Read "Context and Memory Allocators" section of imgui.cpp for more details. 26 | //#define IMGUI_API __declspec( dllexport ) 27 | //#define IMGUI_API __declspec( dllimport ) 28 | 29 | //---- Don't define obsolete functions/enums/behaviors. Consider enabling from time to time after updating to avoid using soon-to-be obsolete function/names. 30 | //#define IMGUI_DISABLE_OBSOLETE_FUNCTIONS 31 | //#define IMGUI_DISABLE_OBSOLETE_KEYIO // 1.87: disable legacy io.KeyMap[]+io.KeysDown[] in favor io.AddKeyEvent(). This will be folded into IMGUI_DISABLE_OBSOLETE_FUNCTIONS in a few versions. 32 | 33 | //---- Disable all of Dear ImGui or don't implement standard windows/tools. 34 | // It is very strongly recommended to NOT disable the demo windows and debug tool during development. They are extremely useful in day to day work. Please read comments in imgui_demo.cpp. 35 | //#define IMGUI_DISABLE // Disable everything: all headers and source files will be empty. 36 | //#define IMGUI_DISABLE_DEMO_WINDOWS // Disable demo windows: ShowDemoWindow()/ShowStyleEditor() will be empty. 37 | //#define IMGUI_DISABLE_DEBUG_TOOLS // Disable metrics/debugger and other debug tools: ShowMetricsWindow(), ShowDebugLogWindow() and ShowStackToolWindow() will be empty (this was called IMGUI_DISABLE_METRICS_WINDOW before 1.88). 38 | 39 | //---- Don't implement some functions to reduce linkage requirements. 40 | //#define IMGUI_DISABLE_WIN32_DEFAULT_CLIPBOARD_FUNCTIONS // [Win32] Don't implement default clipboard handler. Won't use and link with OpenClipboard/GetClipboardData/CloseClipboard etc. (user32.lib/.a, kernel32.lib/.a) 41 | //#define IMGUI_ENABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] [Default with Visual Studio] Implement default IME handler (require imm32.lib/.a, auto-link for Visual Studio, -limm32 on command-line for MinGW) 42 | //#define IMGUI_DISABLE_WIN32_DEFAULT_IME_FUNCTIONS // [Win32] [Default with non-Visual Studio compilers] Don't implement default IME handler (won't require imm32.lib/.a) 43 | //#define IMGUI_DISABLE_WIN32_FUNCTIONS // [Win32] Won't use and link with any Win32 function (clipboard, ime). 44 | //#define IMGUI_ENABLE_OSX_DEFAULT_CLIPBOARD_FUNCTIONS // [OSX] Implement default OSX clipboard handler (need to link with '-framework ApplicationServices', this is why this is not the default). 45 | //#define IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS // Don't implement ImFormatString/ImFormatStringV so you can implement them yourself (e.g. if you don't want to link with vsnprintf) 46 | //#define IMGUI_DISABLE_DEFAULT_MATH_FUNCTIONS // Don't implement ImFabs/ImSqrt/ImPow/ImFmod/ImCos/ImSin/ImAcos/ImAtan2 so you can implement them yourself. 47 | //#define IMGUI_DISABLE_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle at all (replace them with dummies) 48 | //#define IMGUI_DISABLE_DEFAULT_FILE_FUNCTIONS // Don't implement ImFileOpen/ImFileClose/ImFileRead/ImFileWrite and ImFileHandle so you can implement them yourself if you don't want to link with fopen/fclose/fread/fwrite. This will also disable the LogToTTY() function. 49 | //#define IMGUI_DISABLE_DEFAULT_ALLOCATORS // Don't implement default allocators calling malloc()/free() to avoid linking with them. You will need to call ImGui::SetAllocatorFunctions(). 50 | //#define IMGUI_DISABLE_SSE // Disable use of SSE intrinsics even if available 51 | 52 | //---- Include imgui_user.h at the end of imgui.h as a convenience 53 | //#define IMGUI_INCLUDE_IMGUI_USER_H 54 | 55 | //---- Pack colors to BGRA8 instead of RGBA8 (to avoid converting from one to another) 56 | //#define IMGUI_USE_BGRA_PACKED_COLOR 57 | 58 | //---- Use 32-bit for ImWchar (default is 16-bit) to support unicode planes 1-16. (e.g. point beyond 0xFFFF like emoticons, dingbats, symbols, shapes, ancient languages, etc...) 59 | //#define IMGUI_USE_WCHAR32 60 | 61 | //---- Avoid multiple STB libraries implementations, or redefine path/filenames to prioritize another version 62 | // By default the embedded implementations are declared static and not available outside of Dear ImGui sources files. 63 | //#define IMGUI_STB_TRUETYPE_FILENAME "my_folder/stb_truetype.h" 64 | //#define IMGUI_STB_RECT_PACK_FILENAME "my_folder/stb_rect_pack.h" 65 | //#define IMGUI_STB_SPRINTF_FILENAME "my_folder/stb_sprintf.h" // only used if enabled 66 | //#define IMGUI_DISABLE_STB_TRUETYPE_IMPLEMENTATION 67 | //#define IMGUI_DISABLE_STB_RECT_PACK_IMPLEMENTATION 68 | 69 | //---- Use stb_sprintf.h for a faster implementation of vsnprintf instead of the one from libc (unless IMGUI_DISABLE_DEFAULT_FORMAT_FUNCTIONS is defined) 70 | // Compatibility checks of arguments and formats done by clang and GCC will be disabled in order to support the extra formats provided by stb_sprintf.h. 71 | //#define IMGUI_USE_STB_SPRINTF 72 | 73 | //---- Use FreeType to build and rasterize the font atlas (instead of stb_truetype which is embedded by default in Dear ImGui) 74 | // Requires FreeType headers to be available in the include path. Requires program to be compiled with 'misc/freetype/imgui_freetype.cpp' (in this repository) + the FreeType library (not provided). 75 | // On Windows you may use vcpkg with 'vcpkg install freetype --triplet=x64-windows' + 'vcpkg integrate install'. 76 | //#define IMGUI_ENABLE_FREETYPE 77 | 78 | //---- Use stb_truetype to build and rasterize the font atlas (default) 79 | // The only purpose of this define is if you want force compilation of the stb_truetype backend ALONG with the FreeType backend. 80 | //#define IMGUI_ENABLE_STB_TRUETYPE 81 | 82 | //---- Define constructor and implicit cast operators to convert back<>forth between your math types and ImVec2/ImVec4. 83 | // This will be inlined as part of ImVec2 and ImVec4 class declarations. 84 | /* 85 | #define IM_VEC2_CLASS_EXTRA \ 86 | constexpr ImVec2(const MyVec2& f) : x(f.x), y(f.y) {} \ 87 | operator MyVec2() const { return MyVec2(x,y); } 88 | 89 | #define IM_VEC4_CLASS_EXTRA \ 90 | constexpr ImVec4(const MyVec4& f) : x(f.x), y(f.y), z(f.z), w(f.w) {} \ 91 | operator MyVec4() const { return MyVec4(x,y,z,w); } 92 | */ 93 | 94 | //---- Use 32-bit vertex indices (default is 16-bit) is one way to allow large meshes with more than 64K vertices. 95 | // Your renderer backend will need to support it (most example renderer backends support both 16/32-bit indices). 96 | // Another way to allow large meshes while keeping 16-bit indices is to handle ImDrawCmd::VtxOffset in your renderer. 97 | // Read about ImGuiBackendFlags_RendererHasVtxOffset for details. 98 | //#define ImDrawIdx unsigned int 99 | 100 | //---- Override ImDrawCallback signature (will need to modify renderer backends accordingly) 101 | //struct ImDrawList; 102 | //struct ImDrawCmd; 103 | //typedef void (*MyImDrawCallback)(const ImDrawList* draw_list, const ImDrawCmd* cmd, void* my_renderer_user_data); 104 | //#define ImDrawCallback MyImDrawCallback 105 | 106 | //---- Debug Tools: Macro to break in Debugger 107 | // (use 'Metrics->Tools->Item Picker' to pick widgets with the mouse and break into them for easy debugging.) 108 | //#define IM_DEBUG_BREAK IM_ASSERT(0) 109 | //#define IM_DEBUG_BREAK __debugbreak() 110 | 111 | //---- Debug Tools: Have the Item Picker break in the ItemAdd() function instead of ItemHoverable(), 112 | // (which comes earlier in the code, will catch a few extra items, allow picking items other than Hovered one.) 113 | // This adds a small runtime cost which is why it is not enabled by default. 114 | //#define IMGUI_DEBUG_TOOL_ITEM_PICKER_EX 115 | 116 | //---- Debug Tools: Enable slower asserts 117 | //#define IMGUI_DEBUG_PARANOID 118 | 119 | //---- Tip: You can add extra functions within the ImGui:: namespace, here or in your own headers files. 120 | /* 121 | namespace ImGui 122 | { 123 | void MyFunction(const char* name, const MyMatrix44& v); 124 | } 125 | */ 126 | -------------------------------------------------------------------------------- /source/ime_dialog.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include "ime_dialog.h" 11 | 12 | static int ime_dialog_running = 0; 13 | static uint16_t inputTextBuffer[512+1]; 14 | static uint8_t storebuffer[512]; 15 | static char initial_ime_text[512]; 16 | static int max_text_length; 17 | 18 | static void utf16_to_utf8(const uint16_t *src, uint8_t *dst) 19 | { 20 | int i; 21 | for (i = 0; src[i]; i++) 22 | { 23 | if ((src[i] & 0xFF80) == 0) 24 | { 25 | *(dst++) = src[i] & 0xFF; 26 | } 27 | else if ((src[i] & 0xF800) == 0) 28 | { 29 | *(dst++) = ((src[i] >> 6) & 0xFF) | 0xC0; 30 | *(dst++) = (src[i] & 0x3F) | 0x80; 31 | } 32 | else if ((src[i] & 0xFC00) == 0xD800 && (src[i + 1] & 0xFC00) == 0xDC00) 33 | { 34 | *(dst++) = (((src[i] + 64) >> 8) & 0x3) | 0xF0; 35 | *(dst++) = (((src[i] >> 2) + 16) & 0x3F) | 0x80; 36 | *(dst++) = ((src[i] >> 4) & 0x30) | 0x80 | ((src[i + 1] << 2) & 0xF); 37 | *(dst++) = (src[i + 1] & 0x3F) | 0x80; 38 | i += 1; 39 | } 40 | else 41 | { 42 | *(dst++) = ((src[i] >> 12) & 0xF) | 0xE0; 43 | *(dst++) = ((src[i] >> 6) & 0x3F) | 0x80; 44 | *(dst++) = (src[i] & 0x3F) | 0x80; 45 | } 46 | } 47 | 48 | *dst = '\0'; 49 | } 50 | 51 | static void utf8_to_utf16(const uint8_t *src, uint16_t *dst) 52 | { 53 | int i; 54 | for (i = 0; src[i];) 55 | { 56 | if ((src[i] & 0xE0) == 0xE0) 57 | { 58 | *(dst++) = ((src[i] & 0x0F) << 12) | ((src[i + 1] & 0x3F) << 6) | (src[i + 2] & 0x3F); 59 | i += 3; 60 | } 61 | else if ((src[i] & 0xC0) == 0xC0) 62 | { 63 | *(dst++) = ((src[i] & 0x1F) << 6) | (src[i + 1] & 0x3F); 64 | i += 2; 65 | } 66 | else 67 | { 68 | *(dst++) = src[i]; 69 | i += 1; 70 | } 71 | } 72 | 73 | *dst = '\0'; 74 | } 75 | 76 | namespace Dialog 77 | { 78 | 79 | int initImeDialog(const char *Title, const char *initialTextBuffer, int max_text_length, OrbisImeType type, float posx, float posy) 80 | { 81 | if (ime_dialog_running) 82 | return IME_DIALOG_ALREADY_RUNNING; 83 | 84 | uint16_t title[100]; 85 | 86 | if ((initialTextBuffer && strlen(initialTextBuffer) > 511) || (Title && strlen(Title) > 99)) 87 | { 88 | ime_dialog_running = 0; 89 | return -1; 90 | } 91 | 92 | memset(&inputTextBuffer[0], 0, sizeof(inputTextBuffer)); 93 | memset(&storebuffer[0], 0, sizeof(storebuffer)); 94 | memset(&initial_ime_text[0], 0, sizeof(initial_ime_text)); 95 | 96 | if (initialTextBuffer) 97 | { 98 | snprintf(initial_ime_text, 511, "%s", initialTextBuffer); 99 | } 100 | 101 | // converts the multibyte string src to a wide-character string starting at dest. 102 | utf8_to_utf16((uint8_t *)initialTextBuffer, inputTextBuffer); 103 | utf8_to_utf16((uint8_t *)Title, title); 104 | 105 | OrbisImeDialogSetting param; 106 | memset(¶m, 0, sizeof(OrbisImeDialogSetting)); 107 | 108 | int UserID = 0; 109 | sceUserServiceGetInitialUser(&UserID); 110 | param.supportedLanguages = 0; 111 | param.maxTextLength = max_text_length; 112 | param.inputTextBuffer = reinterpret_cast(inputTextBuffer); 113 | param.title = reinterpret_cast(title); 114 | param.userId = UserID; 115 | param.type = type; 116 | param.posx = posx; 117 | param.posy = posy; 118 | param.enterLabel = ORBIS_BUTTON_LABEL_DEFAULT; 119 | 120 | int res = sceImeDialogInit(¶m, NULL); 121 | if (res >= 0) 122 | { 123 | ime_dialog_running = 1; 124 | } 125 | 126 | return res; 127 | } 128 | 129 | int isImeDialogRunning() 130 | { 131 | return ime_dialog_running; 132 | } 133 | 134 | uint8_t *getImeDialogInputText() 135 | { 136 | return storebuffer; 137 | } 138 | 139 | uint16_t *getImeDialogInputText16() 140 | { 141 | return inputTextBuffer; 142 | } 143 | 144 | const char *getImeDialogInitialText() 145 | { 146 | return initial_ime_text; 147 | } 148 | 149 | int updateImeDialog() 150 | { 151 | if (!ime_dialog_running) 152 | return IME_DIALOG_RESULT_NONE; 153 | 154 | int status; 155 | while (1) 156 | { 157 | status = sceImeDialogGetStatus(); 158 | 159 | if (status == ORBIS_DIALOG_STATUS_STOPPED) 160 | { 161 | OrbisDialogResult result; 162 | memset(&result, 0, sizeof(OrbisDialogResult)); 163 | sceImeDialogGetResult(&result); 164 | 165 | if (result.endstatus == ORBIS_DIALOG_CANCEL) 166 | { 167 | status = IME_DIALOG_RESULT_CANCELED; 168 | goto Finished; 169 | } 170 | 171 | if (result.endstatus == ORBIS_DIALOG_OK) 172 | { 173 | utf16_to_utf8(inputTextBuffer, storebuffer); 174 | status = IME_DIALOG_RESULT_FINISHED; 175 | goto Finished; 176 | } 177 | } 178 | 179 | if (status == ORBIS_DIALOG_STATUS_NONE) 180 | { 181 | status = IME_DIALOG_RESULT_NONE; 182 | goto Finished; 183 | } 184 | } 185 | Finished: 186 | sceImeDialogTerm(); 187 | ime_dialog_running = 0; 188 | return status; 189 | } 190 | 191 | } // namespace Dialog -------------------------------------------------------------------------------- /source/ime_dialog.h: -------------------------------------------------------------------------------- 1 | /* 2 | VitaShell 3 | Copyright (C) 2015-2018, TheFloW 4 | 5 | This program is free software: you can redistribute it and/or modify 6 | it under the terms of the GNU General Public License as published by 7 | the Free Software Foundation, either version 3 of the License, or 8 | (at your option) any later version. 9 | 10 | This program is distributed in the hope that it will be useful, 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 | GNU General Public License for more details. 14 | 15 | You should have received a copy of the GNU General Public License 16 | along with this program. If not, see . 17 | */ 18 | 19 | #ifndef __IME_DIALOG_H__ 20 | #define __IME_DIALOG_H__ 21 | 22 | #define IME_DIALOG_RESULT_NONE 0 23 | #define IME_DIALOG_RESULT_RUNNING 1 24 | #define IME_DIALOG_RESULT_FINISHED 2 25 | #define IME_DIALOG_RESULT_CANCELED 3 26 | 27 | #define IME_DIALOG_ALREADY_RUNNING -1 28 | 29 | #include 30 | 31 | typedef void (*ime_callback_t)(int ime_result); 32 | 33 | namespace Dialog 34 | { 35 | int initImeDialog(const char *Title, const char *initialTextBuffer, int max_text_length, OrbisImeType type, float posx, float posy); 36 | uint8_t *getImeDialogInputText(); 37 | uint16_t *getImeDialogInputText16(); 38 | const char *getImeDialogInitialText(); 39 | int isImeDialogRunning(); 40 | int updateImeDialog(); 41 | } 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /source/imgui_impl_sdl.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Platform Backend for SDL2 2 | // This needs to be used along with a Renderer (e.g. DirectX11, OpenGL3, Vulkan..) 3 | // (Info: SDL2 is a cross-platform general purpose library for handling windows, inputs, graphics context creation, etc.) 4 | 5 | // Implemented features: 6 | // [X] Platform: Clipboard support. 7 | // [X] Platform: Keyboard support. Since 1.87 we are using the io.AddKeyEvent() function. Pass ImGuiKey values to all key functions e.g. ImGui::IsKeyPressed(ImGuiKey_Space). [Legacy SDL_SCANCODE_* values will also be supported unless IMGUI_DISABLE_OBSOLETE_KEYIO is set] 8 | // [X] Platform: Gamepad support. Enabled with 'io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad'. 9 | // [X] Platform: Mouse cursor shape and visibility. Disable with 'io.ConfigFlags |= ImGuiConfigFlags_NoMouseCursorChange'. 10 | // Missing features: 11 | // [ ] Platform: SDL2 handling of IME under Windows appears to be broken and it explicitly disable the regular Windows IME. You can restore Windows IME by compiling SDL with SDL_DISABLE_WINDOWS_IME. 12 | 13 | // You can use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 14 | // Prefer including the entire imgui/ repository into your project (either as a copy or as a submodule), and only build the backends you need. 15 | // If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp. 16 | // Read online: https://github.com/ocornut/imgui/tree/master/docs 17 | 18 | #pragma once 19 | #include "imgui.h" // IMGUI_IMPL_API 20 | 21 | struct SDL_Window; 22 | struct SDL_Renderer; 23 | typedef union SDL_Event SDL_Event; 24 | 25 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForOpenGL(SDL_Window* window, void* sdl_gl_context); 26 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForVulkan(SDL_Window* window); 27 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForD3D(SDL_Window* window); 28 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForMetal(SDL_Window* window); 29 | IMGUI_IMPL_API bool ImGui_ImplSDL2_InitForSDLRenderer(SDL_Window* window, SDL_Renderer* renderer); 30 | IMGUI_IMPL_API void ImGui_ImplSDL2_Shutdown(); 31 | IMGUI_IMPL_API void ImGui_ImplSDL2_NewFrame(); 32 | IMGUI_IMPL_API bool ImGui_ImplSDL2_ProcessEvent(const SDL_Event* event); 33 | IMGUI_IMPL_API void ImGui_ImplSDL2_DisableButton(int button , bool disabled); 34 | 35 | #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS 36 | static inline void ImGui_ImplSDL2_NewFrame(SDL_Window*) { ImGui_ImplSDL2_NewFrame(); } // 1.84: removed unnecessary parameter 37 | #endif 38 | -------------------------------------------------------------------------------- /source/imgui_impl_sdlrenderer.cpp: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer Backend for SDL_Renderer 2 | // (Requires: SDL 2.0.17+) 3 | 4 | // Important to understand: SDL_Renderer is an _optional_ component of SDL. 5 | // For a multi-platform app consider using e.g. SDL+DirectX on Windows and SDL+OpenGL on Linux/OSX. 6 | // If your application will want to render any non trivial amount of graphics other than UI, 7 | // please be aware that SDL_Renderer offers a limited graphic API to the end-user and it might 8 | // be difficult to step out of those boundaries. 9 | // However, we understand it is a convenient choice to get an app started easily. 10 | 11 | // Implemented features: 12 | // [X] Renderer: User texture binding. Use 'SDL_Texture*' as ImTextureID. Read the FAQ about ImTextureID! 13 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices. 14 | // Missing features: 15 | 16 | // You can copy and use unmodified imgui_impl_* files in your project. See examples/ folder for examples of using this. 17 | // If you are new to Dear ImGui, read documentation from the docs/ folder + read the top of imgui.cpp. 18 | // Read online: https://github.com/ocornut/imgui/tree/master/docs 19 | 20 | // CHANGELOG 21 | // 2021-12-21: Update SDL_RenderGeometryRaw() format to work with SDL 2.0.19. 22 | // 2021-12-03: Added support for large mesh (64K+ vertices), enable ImGuiBackendFlags_RendererHasVtxOffset flag. 23 | // 2021-10-06: Backup and restore modified ClipRect/Viewport. 24 | // 2021-09-21: Initial version. 25 | 26 | #include "imgui.h" 27 | #include "imgui_impl_sdlrenderer.h" 28 | #if defined(_MSC_VER) && _MSC_VER <= 1500 // MSVC 2008 or earlier 29 | #include // intptr_t 30 | #else 31 | #include // intptr_t 32 | #endif 33 | 34 | // SDL 35 | #include 36 | #if !SDL_VERSION_ATLEAST(2,0,17) 37 | #error This backend requires SDL 2.0.17+ because of SDL_RenderGeometry() function 38 | #endif 39 | 40 | // SDL_Renderer data 41 | struct ImGui_ImplSDLRenderer_Data 42 | { 43 | SDL_Renderer* SDLRenderer; 44 | SDL_Texture* FontTexture; 45 | ImGui_ImplSDLRenderer_Data() { memset((void*)this, 0, sizeof(*this)); } 46 | }; 47 | 48 | // Backend data stored in io.BackendRendererUserData to allow support for multiple Dear ImGui contexts 49 | // It is STRONGLY preferred that you use docking branch with multi-viewports (== single Dear ImGui context + multiple windows) instead of multiple Dear ImGui contexts. 50 | static ImGui_ImplSDLRenderer_Data* ImGui_ImplSDLRenderer_GetBackendData() 51 | { 52 | return ImGui::GetCurrentContext() ? (ImGui_ImplSDLRenderer_Data*)ImGui::GetIO().BackendRendererUserData : NULL; 53 | } 54 | 55 | // Functions 56 | bool ImGui_ImplSDLRenderer_Init(SDL_Renderer* renderer) 57 | { 58 | ImGuiIO& io = ImGui::GetIO(); 59 | IM_ASSERT(io.BackendRendererUserData == NULL && "Already initialized a renderer backend!"); 60 | IM_ASSERT(renderer != NULL && "SDL_Renderer not initialized!"); 61 | 62 | // Setup backend capabilities flags 63 | ImGui_ImplSDLRenderer_Data* bd = IM_NEW(ImGui_ImplSDLRenderer_Data)(); 64 | io.BackendRendererUserData = (void*)bd; 65 | io.BackendRendererName = "imgui_impl_sdlrenderer"; 66 | io.BackendFlags |= ImGuiBackendFlags_RendererHasVtxOffset; // We can honor the ImDrawCmd::VtxOffset field, allowing for large meshes. 67 | 68 | bd->SDLRenderer = renderer; 69 | 70 | return true; 71 | } 72 | 73 | void ImGui_ImplSDLRenderer_Shutdown() 74 | { 75 | ImGui_ImplSDLRenderer_Data* bd = ImGui_ImplSDLRenderer_GetBackendData(); 76 | IM_ASSERT(bd != NULL && "No renderer backend to shutdown, or already shutdown?"); 77 | ImGuiIO& io = ImGui::GetIO(); 78 | 79 | ImGui_ImplSDLRenderer_DestroyDeviceObjects(); 80 | 81 | io.BackendRendererName = NULL; 82 | io.BackendRendererUserData = NULL; 83 | IM_DELETE(bd); 84 | } 85 | 86 | static void ImGui_ImplSDLRenderer_SetupRenderState() 87 | { 88 | ImGui_ImplSDLRenderer_Data* bd = ImGui_ImplSDLRenderer_GetBackendData(); 89 | 90 | // Clear out any viewports and cliprect set by the user 91 | // FIXME: Technically speaking there are lots of other things we could backup/setup/restore during our render process. 92 | SDL_RenderSetViewport(bd->SDLRenderer, NULL); 93 | SDL_RenderSetClipRect(bd->SDLRenderer, NULL); 94 | } 95 | 96 | void ImGui_ImplSDLRenderer_NewFrame() 97 | { 98 | ImGui_ImplSDLRenderer_Data* bd = ImGui_ImplSDLRenderer_GetBackendData(); 99 | IM_ASSERT(bd != NULL && "Did you call ImGui_ImplSDLRenderer_Init()?"); 100 | 101 | if (!bd->FontTexture) 102 | ImGui_ImplSDLRenderer_CreateDeviceObjects(); 103 | } 104 | 105 | void ImGui_ImplSDLRenderer_RenderDrawData(ImDrawData* draw_data) 106 | { 107 | ImGui_ImplSDLRenderer_Data* bd = ImGui_ImplSDLRenderer_GetBackendData(); 108 | 109 | // If there's a scale factor set by the user, use that instead 110 | // If the user has specified a scale factor to SDL_Renderer already via SDL_RenderSetScale(), SDL will scale whatever we pass 111 | // to SDL_RenderGeometryRaw() by that scale factor. In that case we don't want to be also scaling it ourselves here. 112 | float rsx = 1.0f; 113 | float rsy = 1.0f; 114 | SDL_RenderGetScale(bd->SDLRenderer, &rsx, &rsy); 115 | ImVec2 render_scale; 116 | render_scale.x = (rsx == 1.0f) ? draw_data->FramebufferScale.x : 1.0f; 117 | render_scale.y = (rsy == 1.0f) ? draw_data->FramebufferScale.y : 1.0f; 118 | 119 | // Avoid rendering when minimized, scale coordinates for retina displays (screen coordinates != framebuffer coordinates) 120 | int fb_width = (int)(draw_data->DisplaySize.x * render_scale.x); 121 | int fb_height = (int)(draw_data->DisplaySize.y * render_scale.y); 122 | if (fb_width == 0 || fb_height == 0) 123 | return; 124 | 125 | // Backup SDL_Renderer state that will be modified to restore it afterwards 126 | struct BackupSDLRendererState 127 | { 128 | SDL_Rect Viewport; 129 | bool ClipEnabled; 130 | SDL_Rect ClipRect; 131 | }; 132 | BackupSDLRendererState old = {}; 133 | old.ClipEnabled = SDL_RenderIsClipEnabled(bd->SDLRenderer) == SDL_TRUE; 134 | SDL_RenderGetViewport(bd->SDLRenderer, &old.Viewport); 135 | SDL_RenderGetClipRect(bd->SDLRenderer, &old.ClipRect); 136 | 137 | // Will project scissor/clipping rectangles into framebuffer space 138 | ImVec2 clip_off = draw_data->DisplayPos; // (0,0) unless using multi-viewports 139 | ImVec2 clip_scale = render_scale; 140 | 141 | // Render command lists 142 | ImGui_ImplSDLRenderer_SetupRenderState(); 143 | for (int n = 0; n < draw_data->CmdListsCount; n++) 144 | { 145 | const ImDrawList* cmd_list = draw_data->CmdLists[n]; 146 | const ImDrawVert* vtx_buffer = cmd_list->VtxBuffer.Data; 147 | const ImDrawIdx* idx_buffer = cmd_list->IdxBuffer.Data; 148 | 149 | for (int cmd_i = 0; cmd_i < cmd_list->CmdBuffer.Size; cmd_i++) 150 | { 151 | const ImDrawCmd* pcmd = &cmd_list->CmdBuffer[cmd_i]; 152 | if (pcmd->UserCallback) 153 | { 154 | // User callback, registered via ImDrawList::AddCallback() 155 | // (ImDrawCallback_ResetRenderState is a special callback value used by the user to request the renderer to reset render state.) 156 | if (pcmd->UserCallback == ImDrawCallback_ResetRenderState) 157 | ImGui_ImplSDLRenderer_SetupRenderState(); 158 | else 159 | pcmd->UserCallback(cmd_list, pcmd); 160 | } 161 | else 162 | { 163 | // Project scissor/clipping rectangles into framebuffer space 164 | ImVec2 clip_min((pcmd->ClipRect.x - clip_off.x) * clip_scale.x, (pcmd->ClipRect.y - clip_off.y) * clip_scale.y); 165 | ImVec2 clip_max((pcmd->ClipRect.z - clip_off.x) * clip_scale.x, (pcmd->ClipRect.w - clip_off.y) * clip_scale.y); 166 | if (clip_min.x < 0.0f) { clip_min.x = 0.0f; } 167 | if (clip_min.y < 0.0f) { clip_min.y = 0.0f; } 168 | if (clip_max.x > fb_width) { clip_max.x = (float)fb_width; } 169 | if (clip_max.y > fb_height) { clip_max.y = (float)fb_height; } 170 | if (clip_max.x <= clip_min.x || clip_max.y <= clip_min.y) 171 | continue; 172 | 173 | SDL_Rect r = { (int)(clip_min.x), (int)(clip_min.y), (int)(clip_max.x - clip_min.x), (int)(clip_max.y - clip_min.y) }; 174 | SDL_RenderSetClipRect(bd->SDLRenderer, &r); 175 | 176 | const float* xy = (const float*)((const char*)(vtx_buffer + pcmd->VtxOffset) + IM_OFFSETOF(ImDrawVert, pos)); 177 | const float* uv = (const float*)((const char*)(vtx_buffer + pcmd->VtxOffset) + IM_OFFSETOF(ImDrawVert, uv)); 178 | #if SDL_VERSION_ATLEAST(2,0,19) 179 | const SDL_Color* color = (const SDL_Color*)((const char*)(vtx_buffer + pcmd->VtxOffset) + IM_OFFSETOF(ImDrawVert, col)); // SDL 2.0.19+ 180 | #else 181 | const int* color = (const int*)((const char*)(vtx_buffer + pcmd->VtxOffset) + IM_OFFSETOF(ImDrawVert, col)); // SDL 2.0.17 and 2.0.18 182 | #endif 183 | 184 | // Bind texture, Draw 185 | SDL_Texture* tex = (SDL_Texture*)pcmd->GetTexID(); 186 | SDL_RenderGeometryRaw(bd->SDLRenderer, tex, 187 | xy, (int)sizeof(ImDrawVert), 188 | color, (int)sizeof(ImDrawVert), 189 | uv, (int)sizeof(ImDrawVert), 190 | cmd_list->VtxBuffer.Size - pcmd->VtxOffset, 191 | idx_buffer + pcmd->IdxOffset, pcmd->ElemCount, sizeof(ImDrawIdx)); 192 | } 193 | } 194 | } 195 | 196 | // Restore modified SDL_Renderer state 197 | SDL_RenderSetViewport(bd->SDLRenderer, &old.Viewport); 198 | SDL_RenderSetClipRect(bd->SDLRenderer, old.ClipEnabled ? &old.ClipRect : NULL); 199 | } 200 | 201 | // Called by Init/NewFrame/Shutdown 202 | bool ImGui_ImplSDLRenderer_CreateFontsTexture() 203 | { 204 | ImGuiIO& io = ImGui::GetIO(); 205 | ImGui_ImplSDLRenderer_Data* bd = ImGui_ImplSDLRenderer_GetBackendData(); 206 | 207 | // Build texture atlas 208 | unsigned char* pixels; 209 | int width, height; 210 | io.Fonts->GetTexDataAsRGBA32(&pixels, &width, &height); // Load as RGBA 32-bit (75% of the memory is wasted, but default font is so small) because it is more likely to be compatible with user's existing shaders. If your ImTextureId represent a higher-level concept than just a GL texture id, consider calling GetTexDataAsAlpha8() instead to save on GPU memory. 211 | 212 | // Upload texture to graphics system 213 | // (Bilinear sampling is required by default. Set 'io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines' or 'style.AntiAliasedLinesUseTex = false' to allow point/nearest sampling) 214 | SDL_Surface* surface = SDL_CreateRGBSurfaceFrom((void*) pixels, width, height, 32, 4 * width, 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF); 215 | bd->FontTexture = SDL_CreateTextureFromSurface(bd->SDLRenderer, surface); 216 | if (bd->FontTexture == NULL) 217 | { 218 | SDL_Log("error creating texture"); 219 | return false; 220 | } 221 | SDL_UpdateTexture(bd->FontTexture, NULL, pixels, 4 * width); 222 | SDL_SetTextureBlendMode(bd->FontTexture, SDL_BLENDMODE_BLEND); 223 | SDL_SetTextureScaleMode(bd->FontTexture, SDL_ScaleModeLinear); 224 | SDL_FreeSurface(surface); 225 | 226 | // Store our identifier 227 | io.Fonts->SetTexID((ImTextureID)(intptr_t)bd->FontTexture); 228 | 229 | return true; 230 | } 231 | 232 | void ImGui_ImplSDLRenderer_DestroyFontsTexture() 233 | { 234 | ImGuiIO& io = ImGui::GetIO(); 235 | ImGui_ImplSDLRenderer_Data* bd = ImGui_ImplSDLRenderer_GetBackendData(); 236 | if (bd->FontTexture) 237 | { 238 | io.Fonts->SetTexID(0); 239 | SDL_DestroyTexture(bd->FontTexture); 240 | bd->FontTexture = NULL; 241 | } 242 | } 243 | 244 | bool ImGui_ImplSDLRenderer_CreateDeviceObjects() 245 | { 246 | return ImGui_ImplSDLRenderer_CreateFontsTexture(); 247 | } 248 | 249 | void ImGui_ImplSDLRenderer_DestroyDeviceObjects() 250 | { 251 | ImGui_ImplSDLRenderer_DestroyFontsTexture(); 252 | } 253 | -------------------------------------------------------------------------------- /source/imgui_impl_sdlrenderer.h: -------------------------------------------------------------------------------- 1 | // dear imgui: Renderer Backend for SDL_Renderer 2 | // (Requires: SDL 2.0.17+) 3 | 4 | // Important to understand: SDL_Renderer is an _optional_ component of SDL. 5 | // For a multi-platform app consider using e.g. SDL+DirectX on Windows and SDL+OpenGL on Linux/OSX. 6 | // If your application will want to render any non trivial amount of graphics other than UI, 7 | // please be aware that SDL_Renderer offers a limited graphic API to the end-user and it might 8 | // be difficult to step out of those boundaries. 9 | // However, we understand it is a convenient choice to get an app started easily. 10 | 11 | // Implemented features: 12 | // [X] Renderer: User texture binding. Use 'SDL_Texture*' as ImTextureID. Read the FAQ about ImTextureID! 13 | // [X] Renderer: Support for large meshes (64k+ vertices) with 16-bit indices. 14 | 15 | #pragma once 16 | #include "imgui.h" // IMGUI_IMPL_API 17 | 18 | struct SDL_Renderer; 19 | 20 | IMGUI_IMPL_API bool ImGui_ImplSDLRenderer_Init(SDL_Renderer* renderer); 21 | IMGUI_IMPL_API void ImGui_ImplSDLRenderer_Shutdown(); 22 | IMGUI_IMPL_API void ImGui_ImplSDLRenderer_NewFrame(); 23 | IMGUI_IMPL_API void ImGui_ImplSDLRenderer_RenderDrawData(ImDrawData* draw_data); 24 | 25 | // Called by Init/NewFrame/Shutdown 26 | IMGUI_IMPL_API bool ImGui_ImplSDLRenderer_CreateFontsTexture(); 27 | IMGUI_IMPL_API void ImGui_ImplSDLRenderer_DestroyFontsTexture(); 28 | IMGUI_IMPL_API bool ImGui_ImplSDLRenderer_CreateDeviceObjects(); 29 | IMGUI_IMPL_API void ImGui_ImplSDLRenderer_DestroyDeviceObjects(); 30 | -------------------------------------------------------------------------------- /source/inifile.c: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | Filename : IniFile.C 3 | Version : 0.51 4 | Author(s) : Carsten Breuer 5 | --[ Description ]------------------------------------------------------- 6 | 7 | This file contains a complete interface to read and write ini files 8 | like windows do it. It's also avaiable as a C++ class. 9 | 10 | --[ History ] ---------------------------------------------------------- 11 | 12 | 0.10: Original file by Carsten Breuer. First beta version. 13 | 0.20: Some bugs resolved and some suggestions from 14 | jim hall (freedos.org) implemented. 15 | 0.30: Some stuff for unix added. They dont know strupr. 16 | Thanks to Dieter Engelbrecht (dieter@wintop.net). 17 | 0.40: Bug at WriteString fixed. 18 | 0.50: Problem with file pointer solved 19 | 0.51: We better do smaller steps now. I have reformated to tab4. Sorry 20 | New function DeletepKey added. Thanks for the guy who post this. 21 | 22 | --[ How to compile ]---------------------------------------------------- 23 | 24 | This file was developed under DJGPP and Rhide. If you are familiar with 25 | Borland C++ 3.1, you will feel like at home ;-)). 26 | Both tools are free software. 27 | 28 | Downloads at: http://www.delorie.com/djgpp 29 | 30 | 31 | --[ Where to get help/information ]------------------------------------- 32 | 33 | The author : C.Breuer@OpenWin.de 34 | 35 | --[ License ] ---------------------------------------------------------- 36 | 37 | LGPL (Free for private and comercial use) 38 | 39 | This program is free software; you can redistribute it and/or 40 | modify it under the terms of the GNU Library General Public License 41 | as published by the Free Software Foundation; either version 2 42 | of the License, or (at your option) any later version. 43 | 44 | This program is distributed in the hope that it will be useful, 45 | but WITHOUT ANY WARRANTY; without even the implied warranty of 46 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 47 | GNU Library General Public License for more details. 48 | 49 | You should have received a copy of the GNU Library General Public License 50 | along with this program; if not, write to the Free Software 51 | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 52 | 53 | ------------------------------------------------------------------------ 54 | Copyright (c) 2000 Carsten Breuer 55 | /************************************************************************/ 56 | 57 | /* defines for, or consts and inline functions for C++ */ 58 | 59 | /* global includes */ 60 | #include 61 | #include 62 | #include 63 | 64 | /* local includes */ 65 | #include "inifile.h" 66 | 67 | /* Global Variables */ 68 | 69 | struct ENTRY *Entry = NULL; 70 | struct ENTRY *CurEntry = NULL; 71 | char Result[4096] = 72 | {""}; 73 | FILE *IniFile; 74 | 75 | /* Private functions declarations */ 76 | void AddpKey(struct ENTRY *Entry, cchr *pKey, cchr *Value); 77 | void FreeMem(void *Ptr); 78 | void FreeAllMem(void); 79 | bool FindpKey(cchr *Section, cchr *pKey, EFIND *List); 80 | bool AddSectionAndpKey(cchr *Section, cchr *pKey, cchr *Value); 81 | struct ENTRY *MakeNewEntry(void); 82 | 83 | /*========================================================================= 84 | strupr -de- 85 | ------------------------------------------------------------------------- 86 | Job : String to Uppercase 22.03.2001 Dieter Engelbrecht dieter@wintop.net 87 | /*========================================================================*/ 88 | #ifdef DONT_HAVE_STRUPR 89 | /* DONT_HAVE_STRUPR is set when INI_REMOVE_CR is defined */ 90 | void strupr(char *str) 91 | { 92 | // We dont check the ptr because the original also dont do it. 93 | while (*str != 0) 94 | { 95 | if (islower(*str)) 96 | { 97 | *str = toupper(*str); 98 | } 99 | str++; 100 | } 101 | } 102 | #endif 103 | 104 | /*========================================================================= 105 | OpenIniFile 106 | ------------------------------------------------------------------------- 107 | Job : Opens an ini file or creates a new one if the requested file 108 | doesnt exists. 109 | 110 | Att : Be sure to call CloseIniFile to free all mem allocated during 111 | operation! 112 | /*========================================================================*/ 113 | bool OpenIniFile(cchr *FileName) 114 | { 115 | char Str[5120]; 116 | char *pStr; 117 | struct ENTRY *pEntry; 118 | 119 | FreeAllMem(); 120 | 121 | if (FileName == NULL) 122 | { 123 | return FALSE; 124 | } 125 | if ((IniFile = fopen(FileName, "r")) == NULL) 126 | { 127 | return FALSE; 128 | } 129 | 130 | while (fgets(Str, 5120, IniFile) != NULL) 131 | { 132 | pStr = strchr(Str, '\n'); 133 | if (pStr != NULL) 134 | { 135 | *pStr = 0; 136 | } 137 | pEntry = MakeNewEntry(); 138 | if (pEntry == NULL) 139 | { 140 | return FALSE; 141 | } 142 | 143 | #ifdef INI_REMOVE_CR 144 | Len = strlen(Str); 145 | if (Len > 0) 146 | { 147 | if (Str[Len - 1] == '\r') 148 | { 149 | Str[Len - 1] = '\0'; 150 | } 151 | } 152 | #endif 153 | 154 | pEntry->Text = (char *)malloc(strlen(Str) + 1); 155 | if (pEntry->Text == NULL) 156 | { 157 | FreeAllMem(); 158 | return FALSE; 159 | } 160 | strcpy(pEntry->Text, Str); 161 | pStr = strchr(Str, ';'); 162 | if (pStr != NULL) 163 | { 164 | *pStr = 0; 165 | } /* Cut all comments */ 166 | if ((strstr(Str, "[") > 0) && (strstr(Str, "]") > 0)) /* Is Section */ 167 | { 168 | pEntry->Type = tpSECTION; 169 | } 170 | else 171 | { 172 | if (strstr(Str, "=") > 0) 173 | { 174 | pEntry->Type = tpKEYVALUE; 175 | } 176 | else 177 | { 178 | pEntry->Type = tpCOMMENT; 179 | } 180 | } 181 | CurEntry = pEntry; 182 | } 183 | fclose(IniFile); 184 | IniFile = NULL; 185 | return TRUE; 186 | } 187 | 188 | /*========================================================================= 189 | CloseIniFile 190 | ------------------------------------------------------------------------- 191 | Job : Frees the memory and closes the ini file without any 192 | modifications. If you want to write the file use 193 | WriteIniFile instead. 194 | /*========================================================================*/ 195 | void CloseIniFile(void) 196 | { 197 | FreeAllMem(); 198 | if (IniFile != NULL) 199 | { 200 | fclose(IniFile); 201 | IniFile = NULL; 202 | } 203 | } 204 | 205 | /*========================================================================= 206 | WriteIniFile 207 | ------------------------------------------------------------------------- 208 | Job : Writes the iniFile to the disk and close it. Frees all memory 209 | allocated by WriteIniFile; 210 | /*========================================================================*/ 211 | bool WriteIniFile(const char *FileName) 212 | { 213 | struct ENTRY *pEntry = Entry; 214 | IniFile = NULL; 215 | if (IniFile != NULL) 216 | { 217 | fclose(IniFile); 218 | } 219 | if ((IniFile = fopen(FileName, "wb")) == NULL) 220 | { 221 | FreeAllMem(); 222 | return FALSE; 223 | } 224 | 225 | while (pEntry != NULL) 226 | { 227 | if (pEntry->Type != tpNULL) 228 | { 229 | fprintf(IniFile, "%s\n", pEntry->Text); 230 | pEntry = pEntry->pNext; 231 | } 232 | } 233 | 234 | fclose(IniFile); 235 | IniFile = NULL; 236 | return TRUE; 237 | } 238 | 239 | /*========================================================================= 240 | WriteString : Writes a string to the ini file 241 | *========================================================================*/ 242 | void WriteString(cchr *Section, cchr *pKey, cchr *Value) 243 | { 244 | EFIND List; 245 | char Str[5120]; 246 | 247 | if (ArePtrValid(Section, pKey, Value) == FALSE) 248 | { 249 | return; 250 | } 251 | if (FindpKey(Section, pKey, &List) == TRUE) 252 | { 253 | sprintf(Str, "%s=%s%s", List.KeyText, Value, List.Comment); 254 | FreeMem(List.pKey->Text); 255 | List.pKey->Text = (char *)malloc(strlen(Str) + 1); 256 | strcpy(List.pKey->Text, Str); 257 | } 258 | else 259 | { 260 | if ((List.pSec != NULL) && (List.pKey == NULL)) /* section exist, pKey not */ 261 | { 262 | AddpKey(List.pSec, pKey, Value); 263 | } 264 | else 265 | { 266 | AddSectionAndpKey(Section, pKey, Value); 267 | } 268 | } 269 | } 270 | 271 | /*========================================================================= 272 | WriteBool : Writes a boolean to the ini file 273 | *========================================================================*/ 274 | void WriteBool(cchr *Section, cchr *pKey, bool Value) 275 | { 276 | char Val[2] = {'0', 0}; 277 | if (Value != 0) 278 | { 279 | Val[0] = '1'; 280 | } 281 | WriteString(Section, pKey, Val); 282 | } 283 | 284 | /*========================================================================= 285 | WriteInt : Writes an integer to the ini file 286 | *========================================================================*/ 287 | void WriteInt(cchr *Section, cchr *pKey, int Value) 288 | { 289 | char Val[12]; /* 32bit maximum + sign + \0 */ 290 | sprintf(Val, "%d", Value); 291 | WriteString(Section, pKey, Val); 292 | } 293 | 294 | /*========================================================================= 295 | WriteDouble : Writes a double to the ini file 296 | *========================================================================*/ 297 | void WriteDouble(cchr *Section, cchr *pKey, double Value) 298 | { 299 | char Val[32]; /* DDDDDDDDDDDDDDD+E308\0 */ 300 | sprintf(Val, "%1.10lE", Value); 301 | WriteString(Section, pKey, Val); 302 | } 303 | 304 | /*========================================================================= 305 | ReadString : Reads a string from the ini file 306 | *========================================================================*/ 307 | const char * 308 | ReadString(cchr *Section, cchr *pKey, cchr *Default) 309 | { 310 | EFIND List; 311 | if (ArePtrValid(Section, pKey, Default) == FALSE) 312 | { 313 | return Default; 314 | } 315 | if (FindpKey(Section, pKey, &List) == TRUE) 316 | { 317 | strcpy(Result, List.ValText); 318 | return Result; 319 | } 320 | return Default; 321 | } 322 | 323 | /*========================================================================= 324 | ReadBool : Reads a boolean from the ini file 325 | *========================================================================*/ 326 | bool ReadBool(cchr *Section, cchr *pKey, bool Default) 327 | { 328 | char Val[2] = {"0"}; 329 | if (Default != 0) 330 | { 331 | Val[0] = '1'; 332 | } 333 | return (atoi(ReadString(Section, pKey, Val)) ? 1 : 0); /* Only 0 or 1 allowed */ 334 | } 335 | 336 | /*========================================================================= 337 | ReadInt : Reads a integer from the ini file 338 | *========================================================================*/ 339 | int ReadInt(cchr *Section, cchr *pKey, int Default) 340 | { 341 | char Val[12]; 342 | sprintf(Val, "%d", Default); 343 | return (atoi(ReadString(Section, pKey, Val))); 344 | } 345 | 346 | /*========================================================================= 347 | ReadDouble : Reads a double from the ini file 348 | *========================================================================*/ 349 | double 350 | ReadDouble(cchr *Section, cchr *pKey, double Default) 351 | { 352 | double Val; 353 | sprintf(Result, "%1.10lE", Default); 354 | sscanf(ReadString(Section, pKey, Result), "%lE", &Val); 355 | return Val; 356 | } 357 | 358 | /*========================================================================= 359 | DeleteKey : Deletes a pKey from the ini file. 360 | *========================================================================*/ 361 | 362 | bool DeleteKey(cchr *Section, cchr *pKey) 363 | { 364 | EFIND List; 365 | struct ENTRY *pPrev; 366 | struct ENTRY *pNext; 367 | 368 | if (FindpKey(Section, pKey, &List) == TRUE) 369 | { 370 | pPrev = List.pKey->pPrev; 371 | pNext = List.pKey->pNext; 372 | if (pPrev) 373 | { 374 | pPrev->pNext = pNext; 375 | } 376 | if (pNext) 377 | { 378 | pNext->pPrev = pPrev; 379 | } 380 | FreeMem(List.pKey->Text); 381 | FreeMem(List.pKey); 382 | return TRUE; 383 | } 384 | return FALSE; 385 | } 386 | 387 | /* Here we start with our helper functions */ 388 | /*========================================================================= 389 | FreeMem : Frees a pointer. It is set to NULL by Free AllMem 390 | *========================================================================*/ 391 | void FreeMem(void *Ptr) 392 | { 393 | if (Ptr != NULL) 394 | { 395 | free(Ptr); 396 | } 397 | } 398 | 399 | /*========================================================================= 400 | FreeAllMem : Frees all allocated memory and set the pointer to NULL. 401 | Thats IMO one of the most important issues relating 402 | to pointers : 403 | 404 | A pointer is valid or NULL. 405 | *========================================================================*/ 406 | void FreeAllMem(void) 407 | { 408 | struct ENTRY *pEntry; 409 | struct ENTRY *pNextEntry; 410 | pEntry = Entry; 411 | while (1) 412 | { 413 | if (pEntry == NULL) 414 | { 415 | break; 416 | } 417 | pNextEntry = pEntry->pNext; 418 | FreeMem(pEntry->Text); /* Frees the pointer if not NULL */ 419 | FreeMem(pEntry); 420 | pEntry = pNextEntry; 421 | } 422 | Entry = NULL; 423 | CurEntry = NULL; 424 | } 425 | 426 | /*========================================================================= 427 | FindSection : Searches the chained list for a section. The section 428 | must be given without the brackets! 429 | Return Value: NULL at an error or a pointer to the ENTRY structure 430 | if succeed. 431 | *========================================================================*/ 432 | struct ENTRY * 433 | FindSection(cchr *Section) 434 | { 435 | char Sec[130]; 436 | char iSec[130]; 437 | struct ENTRY *pEntry; 438 | sprintf(Sec, "[%s]", Section); 439 | strupr(Sec); 440 | pEntry = Entry; /* Get a pointer to the first Entry */ 441 | while (pEntry != NULL) 442 | { 443 | if (pEntry->Type == tpSECTION) 444 | { 445 | strcpy(iSec, pEntry->Text); 446 | strupr(iSec); 447 | if (strcmp(Sec, iSec) == 0) 448 | { 449 | return pEntry; 450 | } 451 | } 452 | pEntry = pEntry->pNext; 453 | } 454 | return NULL; 455 | } 456 | 457 | /*========================================================================= 458 | FindpKey : Searches the chained list for a pKey under a given section 459 | Return Value: NULL at an error or a pointer to the ENTRY structure 460 | if succeed. 461 | *========================================================================*/ 462 | bool FindpKey(cchr *Section, cchr *pKey, EFIND *List) 463 | { 464 | char Search[130]; 465 | char Found[130]; 466 | char Text[5120]; 467 | char *pText; 468 | struct ENTRY *pEntry; 469 | List->pSec = NULL; 470 | List->pKey = NULL; 471 | pEntry = FindSection(Section); 472 | if (pEntry == NULL) 473 | { 474 | return FALSE; 475 | } 476 | List->pSec = pEntry; 477 | List->KeyText[0] = 0; 478 | List->ValText[0] = 0; 479 | List->Comment[0] = 0; 480 | pEntry = pEntry->pNext; 481 | if (pEntry == NULL) 482 | { 483 | return FALSE; 484 | } 485 | sprintf(Search, "%s", pKey); 486 | strupr(Search); 487 | while (pEntry != NULL) 488 | { 489 | if ((pEntry->Type == tpSECTION) || /* Stop after next section or EOF */ 490 | (pEntry->Type == tpNULL)) 491 | { 492 | return FALSE; 493 | } 494 | if (pEntry->Type == tpKEYVALUE) 495 | { 496 | strcpy(Text, pEntry->Text); 497 | pText = strchr(Text, ';'); 498 | if (pText != NULL) 499 | { 500 | strcpy(List->Comment, Text); 501 | *pText = 0; 502 | } 503 | pText = strchr(Text, '='); 504 | if (pText != NULL) 505 | { 506 | *pText = 0; 507 | strcpy(List->KeyText, Text); 508 | strcpy(Found, Text); 509 | *pText = '='; 510 | strupr(Found); 511 | /* printf ("%s,%s\n", Search, Found); */ 512 | if (strcmp(Found, Search) == 0) 513 | { 514 | strcpy(List->ValText, pText + 1); 515 | List->pKey = pEntry; 516 | return TRUE; 517 | } 518 | } 519 | } 520 | pEntry = pEntry->pNext; 521 | } 522 | return FALSE; 523 | } 524 | 525 | /*========================================================================= 526 | AddItem : Adds an item (pKey or section) to the chaines list 527 | *========================================================================*/ 528 | bool AddItem(char Type, cchr *Text) 529 | { 530 | struct ENTRY *pEntry = MakeNewEntry(); 531 | if (pEntry == NULL) 532 | { 533 | return FALSE; 534 | } 535 | pEntry->Type = Type; 536 | pEntry->Text = (char *)malloc(strlen(Text) + 1); 537 | if (pEntry->Text == NULL) 538 | { 539 | free(pEntry); 540 | return FALSE; 541 | } 542 | strcpy(pEntry->Text, Text); 543 | pEntry->pNext = NULL; 544 | if (CurEntry != NULL) 545 | { 546 | CurEntry->pNext = pEntry; 547 | } 548 | CurEntry = pEntry; 549 | return TRUE; 550 | } 551 | 552 | /*========================================================================= 553 | AddItemAt : Adds an item at a selected position. This means, that the 554 | chained list will be broken at the selected position and 555 | that the new item will be Inserted. 556 | Before : A.Next = &B 557 | After : A.Next = &NewItem, NewItem.Next = &B 558 | *========================================================================*/ 559 | bool AddItemAt(struct ENTRY *EntryAt, char Mode, cchr *Text) 560 | { 561 | struct ENTRY *pNewEntry; 562 | if (EntryAt == NULL) 563 | { 564 | return FALSE; 565 | } 566 | pNewEntry = (struct ENTRY *)malloc(sizeof(ENTRY)); 567 | if (pNewEntry == NULL) 568 | { 569 | return FALSE; 570 | } 571 | pNewEntry->Text = (char *)malloc(strlen(Text) + 1); 572 | if (pNewEntry->Text == NULL) 573 | { 574 | free(pNewEntry); 575 | return FALSE; 576 | } 577 | strcpy(pNewEntry->Text, Text); 578 | if (EntryAt->pNext == NULL) /* No following nodes. */ 579 | { 580 | EntryAt->pNext = pNewEntry; 581 | pNewEntry->pNext = NULL; 582 | } 583 | else 584 | { 585 | pNewEntry->pNext = EntryAt->pNext; 586 | EntryAt->pNext = pNewEntry; 587 | } 588 | pNewEntry->pPrev = EntryAt; 589 | pNewEntry->Type = Mode; 590 | return TRUE; 591 | } 592 | 593 | /*========================================================================= 594 | AddSectionAndpKey : Adds a section and then a pKey to the chained list 595 | *========================================================================*/ 596 | bool AddSectionAndpKey(cchr *Section, cchr *pKey, cchr *Value) 597 | { 598 | char Text[5120]; 599 | sprintf(Text, "[%s]", Section); 600 | if (AddItem(tpSECTION, Text) == FALSE) 601 | { 602 | return FALSE; 603 | } 604 | sprintf(Text, "%s=%s", pKey, Value); 605 | return AddItem(tpKEYVALUE, Text); 606 | } 607 | 608 | /*========================================================================= 609 | AddpKey : Adds a pKey to the chained list 610 | *========================================================================*/ 611 | void AddpKey(struct ENTRY *SecEntry, cchr *pKey, cchr *Value) 612 | { 613 | char Text[5120]; 614 | sprintf(Text, "%s=%s", pKey, Value); 615 | AddItemAt(SecEntry, tpKEYVALUE, Text); 616 | } 617 | 618 | /*========================================================================= 619 | MakeNewEntry : Allocates the memory for a new entry. This is only 620 | the new empty structure, that must be filled from 621 | function like AddItem etc. 622 | Info : This is only a internal function. You dont have to call 623 | it from outside. 624 | *==========================================================================*/ 625 | struct ENTRY * 626 | MakeNewEntry(void) 627 | { 628 | struct ENTRY *pEntry; 629 | pEntry = (struct ENTRY *)malloc(sizeof(ENTRY)); 630 | if (pEntry == NULL) 631 | { 632 | FreeAllMem(); 633 | return NULL; 634 | } 635 | if (Entry == NULL) 636 | { 637 | Entry = pEntry; 638 | } 639 | pEntry->Type = tpNULL; 640 | pEntry->pPrev = CurEntry; 641 | pEntry->pNext = NULL; 642 | pEntry->Text = NULL; 643 | if (CurEntry != NULL) 644 | { 645 | CurEntry->pNext = pEntry; 646 | } 647 | return pEntry; 648 | } 649 | 650 | /*========================================================================= 651 | GetSectionCount : Get the number of sections 652 | *========================================================================*/ 653 | int GetSectionCount() 654 | { 655 | struct ENTRY *pEntry = Entry; 656 | int count = 0; 657 | while (pEntry != NULL) 658 | { 659 | if (pEntry->Type == tpSECTION) 660 | { 661 | count++; 662 | } 663 | pEntry = pEntry->pNext; 664 | } 665 | 666 | return count; 667 | } 668 | 669 | /*========================================================================= 670 | GetSections : Retrieve the sections 671 | *========================================================================*/ 672 | void GetSections(char *sections[]) 673 | { 674 | struct ENTRY *pEntry = Entry; 675 | int i = 0; 676 | 677 | while (pEntry != NULL) 678 | { 679 | if (pEntry->Type == tpSECTION) 680 | { 681 | sprintf(sections[i], pEntry->Text); 682 | i++; 683 | } 684 | pEntry = pEntry->pNext; 685 | } 686 | } 687 | -------------------------------------------------------------------------------- /source/inifile.h: -------------------------------------------------------------------------------- 1 | /************************************************************************ 2 | T h e O p e n W i n d o w s P r o j e c t 3 | ------------------------------------------------------------------------ 4 | Filename : IniFile.h 5 | Author(s) : Carsten Breuer 6 | ------------------------------------------------------------------------ 7 | Copyright (c) 2000 by Carsten Breuer (C.Breuer@openwin.de) 8 | /************************************************************************/ 9 | 10 | #ifndef INIFILE_H 11 | #define INIFILE_H 12 | 13 | #ifndef CCHR_H 14 | #define CCHR_H 15 | typedef const char cchr; 16 | #endif 17 | 18 | #ifndef __cplusplus 19 | typedef char bool; 20 | #define true 1 21 | #define TRUE 1 22 | #define false 0 23 | #define FALSE 0 24 | #endif 25 | 26 | #define tpNULL 0 27 | #define tpSECTION 1 28 | #define tpKEYVALUE 2 29 | #define tpCOMMENT 3 30 | 31 | typedef struct ENTRY 32 | { 33 | char Type; 34 | char *Text; 35 | struct ENTRY *pPrev; 36 | struct ENTRY *pNext; 37 | } ENTRY; 38 | 39 | typedef struct 40 | { 41 | struct ENTRY *pSec; 42 | struct ENTRY *pKey; 43 | char KeyText[128]; 44 | char ValText[4096]; 45 | char Comment[32]; 46 | } EFIND; 47 | 48 | /* Macros */ 49 | #define ArePtrValid(Sec, Key, Val) ((Sec != NULL) && (Key != NULL) && (Val != NULL)) 50 | 51 | /* Connectors of this file (Prototypes) */ 52 | 53 | bool OpenIniFile(cchr *FileName); 54 | 55 | bool ReadBool(cchr *Section, cchr *Key, bool Default); 56 | int ReadInt(cchr *Section, cchr *Key, int Default); 57 | double ReadDouble(cchr *Section, cchr *Key, double Default); 58 | cchr *ReadString(cchr *Section, cchr *Key, cchr *Default); 59 | 60 | void WriteBool(cchr *Section, cchr *Key, bool Value); 61 | void WriteInt(cchr *Section, cchr *Key, int Value); 62 | void WriteDouble(cchr *Section, cchr *Key, double Value); 63 | void WriteString(cchr *Section, cchr *Key, cchr *Value); 64 | 65 | bool DeleteKey(cchr *Section, cchr *Key); 66 | 67 | void CloseIniFile(); 68 | bool WriteIniFile(cchr *FileName); 69 | 70 | int GetSectionCount(); 71 | void GetSections(char *sections[]); 72 | #endif 73 | -------------------------------------------------------------------------------- /source/lang.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include "string.h" 3 | #include "stdio.h" 4 | #include "config.h" 5 | #include "util.h" 6 | #include "lang.h" 7 | 8 | char lang_identifiers[LANG_STRINGS_NUM][LANG_ID_SIZE] = { 9 | FOREACH_STR(GET_STRING)}; 10 | 11 | // This is properly populated so that emulator won't crash if an user launches it without language INI files. 12 | char lang_strings[LANG_STRINGS_NUM][LANG_STR_SIZE] = { 13 | "Connection Settings", // STR_CONNECTION_SETTINGS 14 | "Site", // STR_SITE 15 | "Local", // STR_LOCAL 16 | "Remote", // STR_REMOTE 17 | "Messages", // STR_MESSAGES 18 | "Update Software", // STR_UPDATE_SOFTWARE 19 | "Connect", // STR_CONNECT_FTP 20 | "Disconnect", // STR_DISCONNECT_FTP 21 | "Search", // STR_SEARCH 22 | "Refresh", // STR_REFRESH 23 | "Server", // STR_SERVER 24 | "Username", // STR_USERNAME 25 | "Password", // STR_PASSWORD 26 | "Port", // STR_PORT 27 | "Pasv", // STR_PASV 28 | "Directory", // STR_DIRECTORY 29 | "Filter", // STR_FILTER 30 | "Yes", // STR_YES 31 | "No", // STR_NO 32 | "Cancel", // STR_CANCEL 33 | "Continue", // STR_CONTINUE 34 | "Close", // STR_CLOSE 35 | "Folder", // STR_FOLDER 36 | "File", // STR_FILE 37 | "Type", // STR_TYPE 38 | "Name", // STR_NAME 39 | "Size", // STR_SIZE 40 | "Date", // STR_DATE 41 | "New Folder", // STR_NEW_FOLDER 42 | "Rename", // STR_RENAME 43 | "Delete", // STR_DELETE 44 | "Upload", // STR_UPLOAD 45 | "Download", // STR_DOWNLOAD 46 | "Select All", // STR_SELECT_ALL 47 | "Clear All", // STR_CLEAR_ALL 48 | "Uploading", // STR_UPLOADING 49 | "Downloading", // STR_DOWNLOADING 50 | "Overwrite", // STR_OVERWRITE 51 | "Don't Overwrite", // STR_DONT_OVERWRITE 52 | "Ask for Confirmation", // STR_ASK_FOR_CONFIRM 53 | "Don't Ask for Confirmation", // STR_DONT_ASK_CONFIRM 54 | "Always use this option and don't ask again", // STR_ALLWAYS_USE_OPTION 55 | "Actions", // STR_ACTIONS 56 | "Confirm", // STR_CONFIRM 57 | "Overwrite Options", // STR_OVERWRITE_OPTIONS 58 | "Properties", // STR_PROPERTIES 59 | "Progress", // STR_PROGRESS 60 | "Updates", // STR_UPDATES 61 | "Are you sure you want to delete this file(s)/folder(s)?", // STR_DEL_CONFIRM_MSG 62 | "Canceling. Waiting for last action to complete", // STR_CANCEL_ACTION_MSG 63 | "Failed to upload file", // STR_FAIL_UPLOAD_MSG 64 | "Failed to download file", // STR_FAIL_DOWNLOAD_MSG 65 | "Failed to read contents of directory or folder does not exist.", // STR_FAIL_READ_LOCAL_DIR_MSG 66 | "426 Connection closed.", // STR_CONNECTION_CLOSE_ERR_MSG 67 | "426 Remote Server has terminated the connection.", // STR_REMOTE_TERM_CONN_MSG 68 | "300 Failed Login. Please check your username or password.", // STR_FAIL_LOGIN_MSG 69 | "426 Failed. Connection timeout.", // STR_FAIL_TIMEOUT_MSG 70 | "Failed to delete directory", // STR_FAIL_DEL_DIR_MSG 71 | "Deleting", // STR_DELETING 72 | "Failed to delete file", // STR_FAIL_DEL_FILE_MSG 73 | "Deleted" // STR_DELETED 74 | }; 75 | 76 | bool needs_extended_font = false; 77 | 78 | namespace Lang 79 | { 80 | void SetTranslation(int32_t lang_idx) 81 | { 82 | char langFile[LANG_STR_SIZE * 2]; 83 | char identifier[LANG_ID_SIZE], buffer[LANG_STR_SIZE]; 84 | 85 | std::string lang = std::string(language); 86 | lang = Util::Trim(lang, " "); 87 | if (lang.size() > 0) 88 | { 89 | sprintf(langFile, "/app0/assets/langs/%s.ini", lang.c_str()); 90 | } 91 | else 92 | { 93 | switch (lang_idx) 94 | { 95 | case ORBIS_SYSTEM_PARAM_LANG_ITALIAN: 96 | sprintf(langFile, "/app0/assets/langs/Italiano.ini"); 97 | break; 98 | case ORBIS_SYSTEM_PARAM_LANG_SPANISH: 99 | case ORBIS_SYSTEM_PARAM_LANG_SPANISH_LA: 100 | sprintf(langFile, "/app0/assets/langs/Spanish.ini"); 101 | break; 102 | case ORBIS_SYSTEM_PARAM_LANG_GERMAN: 103 | sprintf(langFile, "/app0/assets/langs/German.ini"); 104 | break; 105 | case ORBIS_SYSTEM_PARAM_LANG_PORTUGUESE_PT: 106 | case ORBIS_SYSTEM_PARAM_LANG_PORTUGUESE_BR: 107 | sprintf(langFile, "/app0/assets/langs/Portuguese_BR.ini"); 108 | break; 109 | case ORBIS_SYSTEM_PARAM_LANG_RUSSIAN: 110 | sprintf(langFile, "/app0/assets/langs/Russian.ini"); 111 | break; 112 | case ORBIS_SYSTEM_PARAM_LANG_DUTCH: 113 | sprintf(langFile, "/app0/assets/langs/Dutch.ini"); 114 | break; 115 | case ORBIS_SYSTEM_PARAM_LANG_FRENCH: 116 | case ORBIS_SYSTEM_PARAM_LANG_FRENCH_CA: 117 | sprintf(langFile, "/app0/assets/langs/French.ini"); 118 | break; 119 | case ORBIS_SYSTEM_PARAM_LANG_POLISH: 120 | sprintf(langFile, "/app0/assets/langs/Polish.ini"); 121 | break; 122 | case ORBIS_SYSTEM_PARAM_LANG_JAPANESE: 123 | sprintf(langFile, "/app0/assets/langs/Japanese.ini"); 124 | break; 125 | case ORBIS_SYSTEM_PARAM_LANG_KOREAN: 126 | sprintf(langFile, "/app0/assets/langs/Korean.ini"); 127 | break; 128 | case ORBIS_SYSTEM_PARAM_LANG_CHINESE_S: 129 | sprintf(langFile, "/app0/assets/langs/Simplified Chinese.ini"); 130 | break; 131 | case ORBIS_SYSTEM_PARAM_LANG_CHINESE_T: 132 | sprintf(langFile, "/app0/assets/langs/Traditional Chinese.ini"); 133 | break; 134 | case ORBIS_SYSTEM_PARAM_LANG_INDONESIAN: 135 | sprintf(langFile, "/app0/assets/langs/Indonesian.ini"); 136 | break; 137 | case ORBIS_SYSTEM_PARAM_LANG_HUNGARIAN: 138 | sprintf(langFile, "/app0/assets/langs/Hungarian.ini"); 139 | break; 140 | case ORBIS_SYSTEM_PARAM_LANG_GREEK: 141 | sprintf(langFile, "/app0/assets/langs/Greek.ini"); 142 | break; 143 | case ORBIS_SYSTEM_PARAM_LANG_THAI: 144 | sprintf(langFile, "/app0/assets/langs/Thai.ini"); 145 | break; 146 | case ORBIS_SYSTEM_PARAM_LANG_TURKISH: 147 | sprintf(langFile, "%s", "/app0/assets/langs/Turkish.ini"); 148 | break; 149 | case ORBIS_SYSTEM_PARAM_LANG_ARABIC: 150 | sprintf(langFile, "%s", "/app0/assets/langs/Arabic.ini"); 151 | break; 152 | default: 153 | sprintf(langFile, "/app0/assets/langs/English.ini"); 154 | break; 155 | } 156 | } 157 | 158 | FILE *config = fopen(langFile, "r"); 159 | if (config) 160 | { 161 | while (EOF != fscanf(config, "%[^=]=%[^\n]\n", identifier, buffer)) 162 | { 163 | for (int i = 0; i < LANG_STRINGS_NUM; i++) 164 | { 165 | if (strcmp(lang_identifiers[i], identifier) == 0) 166 | { 167 | char *newline = nullptr, *p = buffer; 168 | while (newline = strstr(p, "\\n")) 169 | { 170 | newline[0] = '\n'; 171 | int len = strlen(&newline[2]); 172 | memmove(&newline[1], &newline[2], len); 173 | newline[len + 1] = 0; 174 | p++; 175 | } 176 | strcpy(lang_strings[i], buffer); 177 | } 178 | } 179 | } 180 | fclose(config); 181 | } 182 | 183 | char buf[12]; 184 | int num; 185 | sscanf(last_site, "%[^ ] %d", buf, &num); 186 | sprintf(display_site, "%s %d", lang_strings[STR_SITE], num); 187 | } 188 | } -------------------------------------------------------------------------------- /source/lang.h: -------------------------------------------------------------------------------- 1 | #ifndef __LANG_H__ 2 | #define __LANG_H__ 3 | 4 | #include "config.h" 5 | 6 | #define FOREACH_STR(FUNC) \ 7 | FUNC(STR_CONNECTION_SETTINGS) \ 8 | FUNC(STR_SITE) \ 9 | FUNC(STR_LOCAL) \ 10 | FUNC(STR_REMOTE) \ 11 | FUNC(STR_MESSAGES) \ 12 | FUNC(STR_UPDATE_SOFTWARE) \ 13 | FUNC(STR_CONNECT_FTP) \ 14 | FUNC(STR_DISCONNECT_FTP) \ 15 | FUNC(STR_SEARCH) \ 16 | FUNC(STR_REFRESH) \ 17 | FUNC(STR_SERVER) \ 18 | FUNC(STR_USERNAME) \ 19 | FUNC(STR_PASSWORD) \ 20 | FUNC(STR_PORT) \ 21 | FUNC(STR_PASV) \ 22 | FUNC(STR_DIRECTORY) \ 23 | FUNC(STR_FILTER) \ 24 | FUNC(STR_YES) \ 25 | FUNC(STR_NO) \ 26 | FUNC(STR_CANCEL) \ 27 | FUNC(STR_CONTINUE) \ 28 | FUNC(STR_CLOSE) \ 29 | FUNC(STR_FOLDER) \ 30 | FUNC(STR_FILE) \ 31 | FUNC(STR_TYPE) \ 32 | FUNC(STR_NAME) \ 33 | FUNC(STR_SIZE) \ 34 | FUNC(STR_DATE) \ 35 | FUNC(STR_NEW_FOLDER) \ 36 | FUNC(STR_RENAME) \ 37 | FUNC(STR_DELETE) \ 38 | FUNC(STR_UPLOAD) \ 39 | FUNC(STR_DOWNLOAD) \ 40 | FUNC(STR_SELECT_ALL) \ 41 | FUNC(STR_CLEAR_ALL) \ 42 | FUNC(STR_UPLOADING) \ 43 | FUNC(STR_DOWNLOADING) \ 44 | FUNC(STR_OVERWRITE) \ 45 | FUNC(STR_DONT_OVERWRITE) \ 46 | FUNC(STR_ASK_FOR_CONFIRM) \ 47 | FUNC(STR_DONT_ASK_CONFIRM) \ 48 | FUNC(STR_ALLWAYS_USE_OPTION) \ 49 | FUNC(STR_ACTIONS) \ 50 | FUNC(STR_CONFIRM) \ 51 | FUNC(STR_OVERWRITE_OPTIONS) \ 52 | FUNC(STR_PROPERTIES) \ 53 | FUNC(STR_PROGRESS) \ 54 | FUNC(STR_UPDATES) \ 55 | FUNC(STR_DEL_CONFIRM_MSG) \ 56 | FUNC(STR_CANCEL_ACTION_MSG) \ 57 | FUNC(STR_FAIL_UPLOAD_MSG) \ 58 | FUNC(STR_FAIL_DOWNLOAD_MSG) \ 59 | FUNC(STR_FAIL_READ_LOCAL_DIR_MSG) \ 60 | FUNC(STR_CONNECTION_CLOSE_ERR_MSG) \ 61 | FUNC(STR_REMOTE_TERM_CONN_MSG) \ 62 | FUNC(STR_FAIL_LOGIN_MSG) \ 63 | FUNC(STR_FAIL_TIMEOUT_MSG) \ 64 | FUNC(STR_FAIL_DEL_DIR_MSG) \ 65 | FUNC(STR_DELETING) \ 66 | FUNC(STR_FAIL_DEL_FILE_MSG) \ 67 | FUNC(STR_DELETED) 68 | 69 | #define GET_VALUE(x) x, 70 | #define GET_STRING(x) #x, 71 | 72 | enum 73 | { 74 | FOREACH_STR(GET_VALUE) 75 | }; 76 | 77 | #define LANG_STRINGS_NUM 61 78 | #define LANG_ID_SIZE 61 79 | #define LANG_STR_SIZE 256 80 | extern char lang_identifiers[LANG_STRINGS_NUM][LANG_ID_SIZE]; 81 | extern char lang_strings[LANG_STRINGS_NUM][LANG_STR_SIZE]; 82 | extern bool needs_extended_font; 83 | 84 | namespace Lang 85 | { 86 | void SetTranslation(int32_t lang_idx); 87 | } 88 | 89 | #endif -------------------------------------------------------------------------------- /source/main.cpp: -------------------------------------------------------------------------------- 1 | #undef main 2 | 3 | #include 4 | #include 5 | #include 6 | #include 7 | #include 8 | #include 9 | #include 10 | #include 11 | #include 12 | #include 13 | #include 14 | //#include 15 | 16 | #include "imgui.h" 17 | #include "SDL2/SDL.h" 18 | #include "imgui_impl_sdl.h" 19 | #include "imgui_impl_sdlrenderer.h" 20 | #include "config.h" 21 | #include "lang.h" 22 | #include "gui.h" 23 | #include "rtc.h" 24 | #include "util.h" 25 | extern "C" 26 | { 27 | #include "orbis_jbc.h" 28 | } 29 | 30 | #define FRAME_WIDTH 1920 31 | #define FRAME_HEIGHT 1080 32 | #define NET_HEAP_SIZE (5 * 1024 * 1024) 33 | 34 | // SDL window and software renderer 35 | SDL_Window *window; 36 | SDL_Renderer *renderer; 37 | 38 | void InitImgui() 39 | { 40 | // Setup Dear ImGui context 41 | IMGUI_CHECKVERSION(); 42 | ImGui::CreateContext(); 43 | ImGuiIO &io = ImGui::GetIO(); 44 | (void)io; 45 | io.ConfigFlags |= ImGuiConfigFlags_NavEnableGamepad; 46 | 47 | // Setup Dear ImGui style 48 | ImGui::StyleColorsDark(); 49 | 50 | io.Fonts->Clear(); 51 | io.Fonts->Flags |= ImFontAtlasFlags_NoBakedLines; 52 | 53 | static const ImWchar ranges[] = { // All languages with chinese included 54 | 0x0020, 0x00FF, // Basic Latin + Latin Supplement 55 | 0x0100, 0x024F, // Latin Extended 56 | 0x0370, 0x03FF, // Greek 57 | 0x0400, 0x052F, // Cyrillic + Cyrillic Supplement 58 | 0x0590, 0x05FF, // Hebrew 59 | 0x1E00, 0x1EFF, // Latin Extended Additional 60 | 0x1F00, 0x1FFF, // Greek Extended 61 | 0x2000, 0x206F, // General Punctuation 62 | 0x2100, 0x214F, // Letterlike Symbols 63 | 0x2460, 0x24FF, // Enclosed Alphanumerics 64 | 0x2DE0, 0x2DFF, // Cyrillic Extended-A 65 | 0x2E80, 0x2EFF, // CJK Radicals Supplement 66 | 0x3000, 0x30FF, // CJK Symbols and Punctuations, Hiragana, Katakana 67 | 0x31F0, 0x31FF, // Katakana Phonetic Extensions 68 | 0x3400, 0x4DBF, // CJK Rare 69 | 0x4E00, 0x9FFF, // CJK Ideograms 70 | 0xA640, 0xA69F, // Cyrillic Extended-B 71 | 0xF900, 0xFAFF, // CJK Compatibility Ideographs 72 | 0xFF00, 0xFFEF, // Half-width characters 73 | 0, 74 | }; 75 | 76 | static const ImWchar arabic[] = { // Arabic 77 | 0x0020, 0x00FF, // Basic Latin + Latin Supplement 78 | 0x0100, 0x024F, // Latin Extended 79 | 0x0400, 0x052F, // Cyrillic + Cyrillic Supplement 80 | 0x1E00, 0x1EFF, // Latin Extended Additional 81 | 0x2000, 0x206F, // General Punctuation 82 | 0x2100, 0x214F, // Letterlike Symbols 83 | 0x2460, 0x24FF, // Enclosed Alphanumerics 84 | 0x0600, 0x06FF, // Arabic 85 | 0x0750, 0x077F, // Arabic Supplement 86 | 0x0870, 0x089F, // Arabic Extended-B 87 | 0x08A0, 0x08FF, // Arabic Extended-A 88 | 0xFB50, 0xFDFF, // Arabic Presentation Forms-A 89 | 0xFE70, 0xFEFF, // Arabic Presentation Forms-B 90 | 0, 91 | }; 92 | 93 | std::string lang = std::string(language); 94 | int32_t lang_idx; 95 | sceSystemServiceParamGetInt( ORBIS_SYSTEM_SERVICE_PARAM_ID_LANG, &lang_idx ); 96 | 97 | lang = Util::Trim(lang, " "); 98 | if (lang.compare("Korean") == 0 || (lang.empty() && lang_idx == ORBIS_SYSTEM_PARAM_LANG_KOREAN)) 99 | { 100 | io.Fonts->AddFontFromFileTTF("/app0/assets/fonts/Roboto_ext.ttf", 26.0f, NULL, io.Fonts->GetGlyphRangesKorean()); 101 | } 102 | else if (lang.compare("Simplified Chinese") == 0 || (lang.empty() && lang_idx == ORBIS_SYSTEM_PARAM_LANG_CHINESE_S)) 103 | { 104 | io.Fonts->AddFontFromFileTTF("/app0/assets/fonts/Roboto_ext.ttf", 26.0f, NULL, io.Fonts->GetGlyphRangesChineseSimplifiedCommon()); 105 | } 106 | else if (lang.compare("Traditional Chinese") == 0 || (lang.empty() && lang_idx == ORBIS_SYSTEM_PARAM_LANG_CHINESE_T)) 107 | { 108 | io.Fonts->AddFontFromFileTTF("/app0/assets/fonts/Roboto_ext.ttf", 18.0f, NULL, io.Fonts->GetGlyphRangesChineseFull()); 109 | } 110 | else if (lang.compare("Japanese") == 0 || lang.compare("Ryukyuan") == 0 || (lang.empty() && lang_idx == ORBIS_SYSTEM_PARAM_LANG_JAPANESE)) 111 | { 112 | io.Fonts->AddFontFromFileTTF("/app0/assets/fonts/Roboto_ext.ttf", 26.0f, NULL, io.Fonts->GetGlyphRangesJapanese()); 113 | } 114 | else if (lang.compare("Thai") == 0 || (lang.empty() && lang_idx == ORBIS_SYSTEM_PARAM_LANG_THAI)) 115 | { 116 | io.Fonts->AddFontFromFileTTF("/app0/assets/fonts/Roboto_ext.ttf", 26.0f, NULL, io.Fonts->GetGlyphRangesThai()); 117 | } 118 | else if (lang.compare("Vietnamese") == 0 || (lang.empty() && lang_idx == ORBIS_SYSTEM_PARAM_LANG_VIETNAMESE)) 119 | { 120 | io.Fonts->AddFontFromFileTTF("/app0/assets/fonts/Roboto_ext.ttf", 26.0f, NULL, io.Fonts->GetGlyphRangesVietnamese()); 121 | } 122 | else if (lang.compare("Greek") == 0 || (lang.empty() && lang_idx == ORBIS_SYSTEM_PARAM_LANG_GREEK)) 123 | { 124 | io.Fonts->AddFontFromFileTTF("/app0/assets/fonts/Roboto_ext.ttf", 26.0f, NULL, io.Fonts->GetGlyphRangesGreek()); 125 | } 126 | else if (lang.compare("Arabic") == 0 || (lang.empty() && lang_idx == ORBIS_SYSTEM_PARAM_LANG_ARABIC)) 127 | { 128 | io.Fonts->AddFontFromFileTTF("/app0/assets/fonts/Roboto_ext.ttf", 26.0f, NULL, arabic); 129 | } 130 | else 131 | { 132 | io.Fonts->AddFontFromFileTTF("/app0/assets/fonts/Roboto.ttf", 26.0f, NULL, ranges); 133 | } 134 | Lang::SetTranslation(lang_idx); 135 | 136 | auto &style = ImGui::GetStyle(); 137 | style.AntiAliasedLinesUseTex = false; 138 | style.AntiAliasedLines = true; 139 | style.AntiAliasedFill = true; 140 | style.WindowRounding = 1.0f; 141 | style.FrameRounding = 2.0f; 142 | style.GrabRounding = 2.0f; 143 | 144 | // Style::LoadStyle(style_path); 145 | ImVec4 *colors = ImGui::GetStyle().Colors; 146 | colors[ImGuiCol_Text] = ImVec4(0.95f, 0.96f, 0.98f, 1.00f); 147 | colors[ImGuiCol_TextDisabled] = ImVec4(0.36f, 0.42f, 0.47f, 1.00f); 148 | colors[ImGuiCol_WindowBg] = ImVec4(0.11f, 0.15f, 0.17f, 1.00f); 149 | colors[ImGuiCol_ChildBg] = ImVec4(0.15f, 0.18f, 0.22f, 1.00f); 150 | colors[ImGuiCol_PopupBg] = ImVec4(0.08f, 0.08f, 0.08f, 0.94f); 151 | colors[ImGuiCol_Border] = ImVec4(0.08f, 0.10f, 0.12f, 1.00f); 152 | colors[ImGuiCol_BorderShadow] = ImVec4(0.00f, 0.00f, 0.00f, 0.00f); 153 | colors[ImGuiCol_FrameBg] = ImVec4(0.20f, 0.25f, 0.29f, 1.00f); 154 | colors[ImGuiCol_FrameBgHovered] = ImVec4(0.12f, 0.20f, 0.28f, 1.00f); 155 | colors[ImGuiCol_FrameBgActive] = ImVec4(0.09f, 0.12f, 0.14f, 1.00f); 156 | colors[ImGuiCol_TitleBg] = ImVec4(0.09f, 0.12f, 0.14f, 0.65f); 157 | colors[ImGuiCol_TitleBgActive] = ImVec4(0.08f, 0.10f, 0.12f, 1.00f); 158 | colors[ImGuiCol_TitleBgCollapsed] = ImVec4(0.00f, 0.00f, 0.00f, 0.51f); 159 | colors[ImGuiCol_MenuBarBg] = ImVec4(0.15f, 0.18f, 0.22f, 1.00f); 160 | colors[ImGuiCol_ScrollbarBg] = ImVec4(0.02f, 0.02f, 0.02f, 0.39f); 161 | colors[ImGuiCol_ScrollbarGrab] = ImVec4(0.20f, 0.25f, 0.29f, 1.00f); 162 | colors[ImGuiCol_ScrollbarGrabHovered] = ImVec4(0.18f, 0.22f, 0.25f, 1.00f); 163 | colors[ImGuiCol_ScrollbarGrabActive] = ImVec4(0.09f, 0.21f, 0.31f, 1.00f); 164 | colors[ImGuiCol_CheckMark] = ImVec4(0.00f, 0.50f, 0.50f, 1.0f); 165 | colors[ImGuiCol_SliderGrab] = ImVec4(0.28f, 0.56f, 1.00f, 1.00f); 166 | colors[ImGuiCol_SliderGrabActive] = ImVec4(0.37f, 0.61f, 1.00f, 1.00f); 167 | colors[ImGuiCol_Button] = ImVec4(0.20f, 0.25f, 0.29f, 1.00f); 168 | colors[ImGuiCol_ButtonHovered] = ImVec4(0.00f, 0.50f, 0.50f, 1.0f); 169 | colors[ImGuiCol_ButtonActive] = ImVec4(0.00f, 0.50f, 0.50f, 1.0f); 170 | colors[ImGuiCol_Header] = ImVec4(0.20f, 0.25f, 0.29f, 0.55f); 171 | colors[ImGuiCol_HeaderHovered] = ImVec4(0.00f, 0.50f, 0.50f, 1.0f); 172 | colors[ImGuiCol_HeaderActive] = ImVec4(0.00f, 0.50f, 0.50f, 1.0f); 173 | colors[ImGuiCol_Separator] = ImVec4(0.20f, 0.25f, 0.29f, 1.00f); 174 | colors[ImGuiCol_SeparatorHovered] = ImVec4(0.10f, 0.40f, 0.75f, 0.78f); 175 | colors[ImGuiCol_SeparatorActive] = ImVec4(0.10f, 0.40f, 0.75f, 1.00f); 176 | colors[ImGuiCol_ResizeGrip] = ImVec4(0.26f, 0.59f, 0.98f, 0.25f); 177 | colors[ImGuiCol_ResizeGripHovered] = ImVec4(0.26f, 0.59f, 0.98f, 0.67f); 178 | colors[ImGuiCol_ResizeGripActive] = ImVec4(0.26f, 0.59f, 0.98f, 0.95f); 179 | colors[ImGuiCol_Tab] = ImVec4(0.11f, 0.15f, 0.17f, 1.00f); 180 | colors[ImGuiCol_TabHovered] = ImVec4(0.00f, 0.50f, 0.50f, 1.0f); 181 | colors[ImGuiCol_TabActive] = ImVec4(0.00f, 0.50f, 0.50f, 1.0f); 182 | colors[ImGuiCol_TabUnfocused] = ImVec4(0.11f, 0.15f, 0.17f, 1.00f); 183 | colors[ImGuiCol_TabUnfocusedActive] = ImVec4(0.11f, 0.15f, 0.17f, 1.00f); 184 | colors[ImGuiCol_PlotLines] = ImVec4(0.00f, 0.50f, 0.50f, 1.0f); 185 | colors[ImGuiCol_PlotLinesHovered] = ImVec4(1.00f, 0.43f, 0.35f, 1.00f); 186 | colors[ImGuiCol_PlotHistogram] = ImVec4(0.00f, 0.50f, 0.50f, 1.0f); 187 | colors[ImGuiCol_PlotHistogramHovered] = ImVec4(1.00f, 0.60f, 0.00f, 1.00f); 188 | colors[ImGuiCol_TextSelectedBg] = ImVec4(0.26f, 0.59f, 0.98f, 0.35f); 189 | colors[ImGuiCol_DragDropTarget] = ImVec4(1.00f, 1.00f, 0.00f, 0.90f); 190 | colors[ImGuiCol_NavHighlight] = ImVec4(0.00f, 0.50f, 0.50f, 1.0f); 191 | colors[ImGuiCol_NavWindowingHighlight] = ImVec4(1.00f, 1.00f, 1.00f, 0.70f); 192 | colors[ImGuiCol_NavWindowingDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.20f); 193 | colors[ImGuiCol_ModalWindowDimBg] = ImVec4(0.80f, 0.80f, 0.80f, 0.35f); 194 | } 195 | 196 | static void terminate() 197 | { 198 | terminate_jbc(); 199 | sceSystemServiceLoadExec("exit", NULL); 200 | } 201 | 202 | int main() 203 | { 204 | //dbglogger_init(); 205 | //dbglogger_log("If you see this you've set up dbglogger correctly."); 206 | int rc; 207 | // No buffering 208 | setvbuf(stdout, NULL, _IONBF, 0); 209 | 210 | if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER | SDL_INIT_GAMECONTROLLER) != 0) 211 | { 212 | return 0; 213 | } 214 | 215 | // load common modules 216 | int ret = sceSysmoduleLoadModuleInternal(ORBIS_SYSMODULE_INTERNAL_SYSTEM_SERVICE); 217 | if (ret < 0) 218 | { 219 | return 0; 220 | } 221 | 222 | ret = sceSysmoduleLoadModuleInternal(ORBIS_SYSMODULE_INTERNAL_USER_SERVICE); 223 | if (ret < 0) 224 | { 225 | return 0; 226 | } 227 | 228 | if (sceSysmoduleLoadModuleInternal(ORBIS_SYSMODULE_INTERNAL_PAD) < 0) 229 | return 0; 230 | 231 | if (sceSysmoduleLoadModuleInternal(ORBIS_SYSMODULE_INTERNAL_AUDIOOUT) < 0 || 232 | sceAudioOutInit() != 0) 233 | { 234 | return 0; 235 | } 236 | 237 | if (sceSysmoduleLoadModuleInternal(ORBIS_SYSMODULE_IME_DIALOG) < 0) 238 | return 0; 239 | 240 | if(sceSysmoduleLoadModuleInternal(ORBIS_SYSMODULE_INTERNAL_NET) < 0 || sceNetInit() != 0) 241 | return 0; 242 | 243 | sceNetPoolCreate("simple", NET_HEAP_SIZE, 0); 244 | 245 | CONFIG::LoadConfig(); 246 | 247 | // Create a window context 248 | window = SDL_CreateWindow("main", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, FRAME_WIDTH, FRAME_HEIGHT, 0); 249 | if (window == NULL) 250 | return 0; 251 | 252 | renderer = SDL_CreateRenderer(window, 0, SDL_RENDERER_ACCELERATED | SDL_RENDERER_PRESENTVSYNC); 253 | if (renderer == NULL) 254 | return 0; 255 | 256 | InitImgui(); 257 | 258 | // Setup Platform/Renderer backends 259 | ImGui_ImplSDL2_InitForSDLRenderer(window, renderer); 260 | ImGui_ImplSDLRenderer_Init(renderer); 261 | ImGui_ImplSDLRenderer_CreateFontsTexture(); 262 | ImGui_ImplSDL2_DisableButton(SDL_CONTROLLER_BUTTON_X, true); 263 | 264 | if (!initialize_jbc()) 265 | { 266 | terminate(); 267 | } 268 | 269 | if (load_rtc_module() != 0) 270 | return 0; 271 | 272 | atexit(terminate); 273 | 274 | GUI::RenderLoop(renderer); 275 | 276 | SDL_DestroyRenderer(renderer); 277 | SDL_DestroyWindow(window); 278 | 279 | ImGui::DestroyContext(); 280 | 281 | return 0; 282 | } -------------------------------------------------------------------------------- /source/orbis_jbc.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | // Variables for (un)jailbreaking 9 | jbc_cred g_Cred; 10 | jbc_cred g_RootCreds; 11 | 12 | // Verify jailbreak 13 | static int is_jailbroken() 14 | { 15 | FILE *s_FilePointer = fopen("/user/.jailbreak", "w"); 16 | 17 | if (!s_FilePointer) 18 | return 0; 19 | 20 | fclose(s_FilePointer); 21 | remove("/user/.jailbreak"); 22 | return 1; 23 | } 24 | 25 | // Jailbreaks creds 26 | static int jailbreak() 27 | { 28 | if (is_jailbroken()) 29 | { 30 | return 1; 31 | } 32 | 33 | jbc_get_cred(&g_Cred); 34 | g_RootCreds = g_Cred; 35 | jbc_jailbreak_cred(&g_RootCreds); 36 | jbc_set_cred(&g_RootCreds); 37 | 38 | return (is_jailbroken()); 39 | } 40 | 41 | // Initialize jailbreak 42 | int initialize_jbc() 43 | { 44 | // Pop notification depending on jailbreak result 45 | if (!jailbreak()) 46 | { 47 | return 0; 48 | } 49 | 50 | return 1; 51 | } 52 | 53 | // Unload libjbc libraries 54 | void terminate_jbc() 55 | { 56 | if (!is_jailbroken()) 57 | return; 58 | 59 | // Restores original creds 60 | jbc_set_cred(&g_Cred); 61 | } 62 | -------------------------------------------------------------------------------- /source/orbis_jbc.h: -------------------------------------------------------------------------------- 1 | #ifndef __ORBIS_JBC_H__ 2 | #define __ORBIS_JBC_H__ 3 | 4 | int initialize_jbc(); 5 | void terminate_jbc(); 6 | 7 | #endif 8 | -------------------------------------------------------------------------------- /source/remote_client.h: -------------------------------------------------------------------------------- 1 | #ifndef REMOTECLIENT_H 2 | #define REMOTECLIENT_H 3 | 4 | #include "common.h" 5 | 6 | class RemoteClient 7 | { 8 | public: 9 | RemoteClient(){}; 10 | virtual ~RemoteClient(){}; 11 | virtual int Connect(const std::string &host, unsigned short port, const std::string &username, const std::string &password) = 0; 12 | virtual int Mkdir(const std::string &path) = 0; 13 | virtual int Rmdir(const std::string &path, bool recursive) = 0; 14 | virtual int Size(const std::string &path, int64_t *size) = 0; 15 | virtual int Get(const std::string &outputfile, const std::string &path, int64_t offset) = 0; 16 | virtual int Put(const std::string &inputfile, const std::string &path, int64_t offset) = 0; 17 | virtual int Rename(const std::string &src, const std::string &dst) = 0; 18 | virtual int Delete(const std::string &path) = 0; 19 | virtual bool FileExists(const std::string &path) = 0; 20 | virtual std::vector ListDir(const std::string &path) = 0; 21 | virtual bool IsConnected() = 0; 22 | virtual bool Ping() = 0; 23 | virtual const char *LastResponse() = 0; 24 | virtual int Quit() = 0; 25 | }; 26 | 27 | #endif -------------------------------------------------------------------------------- /source/rtc.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include "rtc.h" 6 | 7 | int (*sceRtcGetTick)(const OrbisDateTime *inOrbisDateTime, OrbisTick *outTick); 8 | int (*sceRtcSetTick)(OrbisDateTime *outOrbisDateTime, const OrbisTick *inputTick); 9 | int (*sceRtcConvertLocalTimeToUtc)(const OrbisTick *local_time, OrbisTick *utc); 10 | int (*sceRtcConvertUtcToLocalTime)(const OrbisTick *utc, OrbisTick *local_time); 11 | int (*sceRtcGetCurrentClockLocalTime)(OrbisDateTime *time); 12 | 13 | void convertUtcToLocalTime(const OrbisDateTime *utc, OrbisDateTime *local_time) 14 | { 15 | OrbisTick utc_tick; 16 | OrbisTick local_tick; 17 | sceRtcGetTick(utc, &utc_tick); 18 | sceRtcConvertUtcToLocalTime(&utc_tick, &local_tick); 19 | sceRtcSetTick(local_time, &local_tick); 20 | } 21 | 22 | void convertLocalTimeToUtc(const OrbisDateTime *local_time, OrbisDateTime *utc) 23 | { 24 | OrbisTick utc_tick; 25 | OrbisTick local_tick; 26 | sceRtcGetTick(local_time, &local_tick); 27 | sceRtcConvertLocalTimeToUtc(&local_tick, &utc_tick); 28 | sceRtcSetTick(utc, &utc_tick); 29 | } 30 | 31 | int load_rtc_module() 32 | { 33 | int rtc_handle = sceKernelLoadStartModule("/system/common/lib/libSceRtc.sprx", 0, NULL, 0, NULL, NULL); 34 | if (rtc_handle == 0) 35 | { 36 | return -1; 37 | } 38 | 39 | sceKernelDlsym(rtc_handle, "sceRtcGetTick", (void **)&sceRtcGetTick); 40 | if (sceRtcGetTick == NULL) 41 | { 42 | return -1; 43 | } 44 | 45 | sceKernelDlsym(rtc_handle, "sceRtcSetTick", (void **)&sceRtcSetTick); 46 | if (sceRtcSetTick == NULL) 47 | { 48 | return -1; 49 | } 50 | 51 | sceKernelDlsym(rtc_handle, "sceRtcConvertLocalTimeToUtc", (void **)&sceRtcConvertLocalTimeToUtc); 52 | if (sceRtcConvertLocalTimeToUtc == NULL) 53 | { 54 | return -1; 55 | } 56 | 57 | sceKernelDlsym(rtc_handle, "sceRtcConvertUtcToLocalTime", (void **)&sceRtcConvertUtcToLocalTime); 58 | if (sceRtcConvertUtcToLocalTime == NULL) 59 | { 60 | return -1; 61 | } 62 | 63 | sceKernelDlsym(rtc_handle, "sceRtcGetCurrentClockLocalTime", (void **)&sceRtcGetCurrentClockLocalTime); 64 | if (sceRtcGetCurrentClockLocalTime == NULL) 65 | { 66 | return -1; 67 | } 68 | 69 | return 0; 70 | } -------------------------------------------------------------------------------- /source/rtc.h: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | #ifdef __cplusplus 4 | extern "C" { 5 | #endif 6 | 7 | typedef struct OrbisTick { 8 | uint64_t mytick; 9 | } OrbisTick; 10 | 11 | typedef struct OrbisDateTime { 12 | unsigned short year; 13 | unsigned short month; 14 | unsigned short day; 15 | unsigned short hour; 16 | unsigned short minute; 17 | unsigned short second; 18 | unsigned int microsecond; 19 | } OrbisDateTime; 20 | 21 | extern int (*sceRtcGetTick)(const OrbisDateTime *inOrbisDateTime, OrbisTick *outTick); 22 | extern int (*sceRtcSetTick)(OrbisDateTime *outOrbisDateTime, const OrbisTick *inputTick); 23 | extern int (*sceRtcConvertLocalTimeToUtc)(const OrbisTick *local_time, OrbisTick *utc); 24 | extern int (*sceRtcConvertUtcToLocalTime)(const OrbisTick *utc, OrbisTick *local_time); 25 | extern int (*sceRtcGetCurrentClockLocalTime)(OrbisDateTime *time) ; 26 | 27 | int load_rtc_module(); 28 | void convertUtcToLocalTime(const OrbisDateTime *utc, OrbisDateTime *local_time); 29 | void convertLocalTimeToUtc(const OrbisDateTime *local_time, OrbisDateTime *utc); 30 | 31 | #ifdef __cplusplus 32 | } 33 | #endif 34 | -------------------------------------------------------------------------------- /source/util.h: -------------------------------------------------------------------------------- 1 | #ifndef UTIL_H 2 | #define UTIL_H 3 | 4 | #include 5 | #include 6 | #include 7 | 8 | namespace Util 9 | { 10 | 11 | static inline std::string &Ltrim(std::string &str, std::string chars) 12 | { 13 | str.erase(0, str.find_first_not_of(chars)); 14 | return str; 15 | } 16 | 17 | static inline std::string &Rtrim(std::string &str, std::string chars) 18 | { 19 | str.erase(str.find_last_not_of(chars) + 1); 20 | return str; 21 | } 22 | 23 | // trim from both ends (in place) 24 | static inline std::string &Trim(std::string &str, std::string chars) 25 | { 26 | return Ltrim(Rtrim(str, chars), chars); 27 | } 28 | 29 | static inline void ReplaceAll(std::string &data, std::string toSearch, std::string replaceStr) 30 | { 31 | size_t pos = data.find(toSearch); 32 | while (pos != std::string::npos) 33 | { 34 | data.replace(pos, toSearch.size(), replaceStr); 35 | pos = data.find(toSearch, pos + replaceStr.size()); 36 | } 37 | } 38 | 39 | static inline std::string ToLower(std::string s) 40 | { 41 | std::transform(s.begin(), s.end(), s.begin(), 42 | [](unsigned char c) 43 | { return std::tolower(c); }); 44 | return s; 45 | } 46 | 47 | } 48 | #endif 49 | -------------------------------------------------------------------------------- /source/windows.h: -------------------------------------------------------------------------------- 1 | #ifndef LAUNCHER_WINDOWS_H 2 | #define LAUNCHER_WINDOWS_H 3 | 4 | #define IMGUI_DEFINE_MATH_OPERATORS 5 | #include 6 | #include "imgui.h" 7 | #include "imgui_internal.h" 8 | #include "common.h" 9 | #include "remote_client.h" 10 | #include "actions.h" 11 | #include "SDL2/SDL.h" 12 | 13 | #define LOCAL_BROWSER 1 14 | #define REMOTE_BROWSER 2 15 | 16 | extern int view_mode; 17 | extern bool handle_updates; 18 | extern RemoteClient *ftpclient; 19 | extern int64_t bytes_transfered; 20 | extern int64_t bytes_to_download; 21 | extern std::vector local_files; 22 | extern std::vector remote_files; 23 | extern std::set multi_selected_local_files; 24 | extern std::set multi_selected_remote_files; 25 | extern DirEntry selected_local_file; 26 | extern DirEntry selected_remote_file; 27 | extern ACTIONS selected_action; 28 | extern char status_message[]; 29 | extern char local_file_to_select[]; 30 | extern char remote_file_to_select[]; 31 | extern char local_filter[]; 32 | extern char remote_filter[]; 33 | extern char activity_message[]; 34 | extern char confirm_message[]; 35 | extern bool activity_inprogess; 36 | extern bool stop_activity; 37 | extern int confirm_state; 38 | extern int overwrite_type; 39 | extern ACTIONS action_to_take; 40 | extern bool file_transfering; 41 | 42 | static ImVector s_GroupPanelLabelStack; 43 | 44 | namespace Windows 45 | { 46 | 47 | inline void SetupWindow(void) 48 | { 49 | ImGui::SetNextWindowPos(ImVec2(0.0f, 0.0f), ImGuiCond_Once); 50 | ImGui::SetNextWindowSize(ImVec2(ImGui::GetIO().DisplaySize.x, ImGui::GetIO().DisplaySize.y), ImGuiCond_Once); 51 | }; 52 | 53 | inline void SetNavFocusHere() 54 | { 55 | GImGui->NavId = GImGui->LastItemData.ID; 56 | } 57 | 58 | inline void ClearNavFocus() 59 | { 60 | GImGui->NavId = 0; 61 | } 62 | 63 | inline void BeginGroupPanel(const char *name, const ImVec2 &size) 64 | { 65 | ImGui::BeginGroup(); 66 | 67 | auto cursorPos = ImGui::GetCursorScreenPos(); 68 | auto itemSpacing = ImGui::GetStyle().ItemSpacing; 69 | ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0.0f, 0.0f)); 70 | ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.0f, 0.0f)); 71 | 72 | auto frameHeight = ImGui::GetFrameHeight(); 73 | ImGui::BeginGroup(); 74 | 75 | ImVec2 effectiveSize = size; 76 | if (size.x < 0.0f) 77 | effectiveSize.x = ImGui::GetContentRegionAvail().x; 78 | else 79 | effectiveSize.x = size.x; 80 | ImGui::Dummy(ImVec2(effectiveSize.x, 0.0f)); 81 | 82 | ImGui::Dummy(ImVec2(frameHeight * 0.5f, 0.0f)); 83 | ImGui::SameLine(0.0f, 0.0f); 84 | ImGui::BeginGroup(); 85 | ImGui::Dummy(ImVec2(frameHeight * 0.5f, 0.0f)); 86 | ImGui::SameLine(0.0f, 0.0f); 87 | ImGui::TextUnformatted(name); 88 | auto labelMin = ImGui::GetItemRectMin(); 89 | auto labelMax = ImGui::GetItemRectMax(); 90 | ImGui::SameLine(0.0f, 0.0f); 91 | ImGui::Dummy(ImVec2(0.0, frameHeight + itemSpacing.y)); 92 | ImGui::BeginGroup(); 93 | 94 | ImGui::PopStyleVar(2); 95 | 96 | #if IMGUI_VERSION_NUM >= 17301 97 | ImGui::GetCurrentWindow()->ContentRegionRect.Max.x -= frameHeight * 0.5f; 98 | ImGui::GetCurrentWindow()->WorkRect.Max.x -= frameHeight * 0.5f; 99 | ImGui::GetCurrentWindow()->InnerRect.Max.x -= frameHeight * 0.5f; 100 | #else 101 | ImGui::GetCurrentWindow()->ContentsRegionRect.Max.x -= frameHeight * 0.5f; 102 | #endif 103 | ImGui::GetCurrentWindow()->Size.x -= frameHeight; 104 | 105 | auto itemWidth = ImGui::CalcItemWidth(); 106 | ImGui::PushItemWidth(ImMax(0.0f, itemWidth - frameHeight)); 107 | 108 | s_GroupPanelLabelStack.push_back(ImRect(labelMin, labelMax)); 109 | } 110 | 111 | inline void EndGroupPanel() 112 | { 113 | ImGui::PopItemWidth(); 114 | 115 | auto itemSpacing = ImGui::GetStyle().ItemSpacing; 116 | 117 | ImGui::PushStyleVar(ImGuiStyleVar_FramePadding, ImVec2(0.0f, 0.0f)); 118 | ImGui::PushStyleVar(ImGuiStyleVar_ItemSpacing, ImVec2(0.0f, 0.0f)); 119 | 120 | auto frameHeight = ImGui::GetFrameHeight(); 121 | 122 | ImGui::EndGroup(); 123 | ImGui::EndGroup(); 124 | 125 | ImGui::SameLine(0.0f, 0.0f); 126 | ImGui::Dummy(ImVec2(frameHeight * 0.5f, 0.0f)); 127 | ImGui::Dummy(ImVec2(0.0, frameHeight - frameHeight * 0.5f - itemSpacing.y)); 128 | 129 | ImGui::EndGroup(); 130 | 131 | auto itemMin = ImGui::GetItemRectMin(); 132 | auto itemMax = ImGui::GetItemRectMax(); 133 | 134 | auto labelRect = s_GroupPanelLabelStack.back(); 135 | s_GroupPanelLabelStack.pop_back(); 136 | 137 | ImVec2 halfFrame = ImVec2(frameHeight * 0.25f, frameHeight) * 0.5f; 138 | ImRect frameRect = ImRect(itemMin + halfFrame, itemMax - ImVec2(halfFrame.x, 0.0f)); 139 | labelRect.Min.x -= itemSpacing.x; 140 | labelRect.Max.x += itemSpacing.x; 141 | for (int i = 0; i < 4; ++i) 142 | { 143 | switch (i) 144 | { 145 | // left half-plane 146 | case 0: 147 | ImGui::PushClipRect(ImVec2(-FLT_MAX, -FLT_MAX), ImVec2(labelRect.Min.x, FLT_MAX), true); 148 | break; 149 | // right half-plane 150 | case 1: 151 | ImGui::PushClipRect(ImVec2(labelRect.Max.x, -FLT_MAX), ImVec2(FLT_MAX, FLT_MAX), true); 152 | break; 153 | // top 154 | case 2: 155 | ImGui::PushClipRect(ImVec2(labelRect.Min.x, -FLT_MAX), ImVec2(labelRect.Max.x, labelRect.Min.y), true); 156 | break; 157 | // bottom 158 | case 3: 159 | ImGui::PushClipRect(ImVec2(labelRect.Min.x, labelRect.Max.y), ImVec2(labelRect.Max.x, FLT_MAX), true); 160 | break; 161 | } 162 | 163 | ImGui::GetWindowDrawList()->AddRect( 164 | frameRect.Min, frameRect.Max, 165 | ImColor(ImGui::GetStyleColorVec4(ImGuiCol_Button)), 166 | halfFrame.x, 0, 2.0f); 167 | 168 | ImGui::PopClipRect(); 169 | } 170 | 171 | ImGui::PopStyleVar(2); 172 | 173 | #if IMGUI_VERSION_NUM >= 17301 174 | ImGui::GetCurrentWindow()->ContentRegionRect.Max.x += frameHeight * 0.5f; 175 | ImGui::GetCurrentWindow()->WorkRect.Max.x += frameHeight * 0.5f; 176 | ImGui::GetCurrentWindow()->InnerRect.Max.x += frameHeight * 0.5f; 177 | #else 178 | ImGui::GetCurrentWindow()->ContentsRegionRect.Max.x += frameHeight * 0.5f; 179 | #endif 180 | ImGui::GetCurrentWindow()->Size.x += frameHeight; 181 | 182 | ImGui::Dummy(ImVec2(0.0f, 0.0f)); 183 | 184 | ImGui::EndGroup(); 185 | } 186 | 187 | void Init(); 188 | void HandleWindowInput(); 189 | void MainWindow(); 190 | void HandleImeInput(); 191 | void ExecuteActions(); 192 | void ResetImeCallbacks(); 193 | void SetModalMode(bool modal); 194 | 195 | void SingleValueImeCallback(int ime_result); 196 | void MultiValueImeCallback(int ime_result); 197 | void NullAfterValueChangeCallback(int ime_result); 198 | void AfterLocalFileChangesCallback(int ime_result); 199 | void AfterRemoteFileChangesCallback(int ime_result); 200 | void AfterFolderNameCallback(int ime_result); 201 | void CancelActionCallBack(int ime_result); 202 | } 203 | 204 | #endif 205 | --------------------------------------------------------------------------------