Skip to content

Commit

Permalink
Delete libui from desktop variant
Browse files Browse the repository at this point in the history
  • Loading branch information
petabyt committed Jan 25, 2025
1 parent 232f0b4 commit a116687
Show file tree
Hide file tree
Showing 9 changed files with 105 additions and 471 deletions.
5 changes: 0 additions & 5 deletions .github/workflows/unit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,6 @@ jobs:
submodules: recursive
- name: Install deps
run: sudo apt install liblua5.3-dev libusb-1.0-0-dev
- name: Quick install libui-dev
run: |
sudo mkdir /usr/local/lib/x86_64-linux-gnu
sudo wget https://github.com/petabyt/libui-cross/releases/download/2/libui.so -O /usr/lib/libui.so
sudo wget https://raw.githubusercontent.com/libui-ng/libui-ng/master/ui.h -O /usr/local/include/ui.h
- name: Checkout submodules
run: git submodule update --init --recursive
- name: Get latest vcam
Expand Down
4 changes: 2 additions & 2 deletions desktop/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ include cross.mk
FUDGE = ../lib

CAMLIB_CORE := transport.o operations.o packet.o enums.o data.o enum_dump.o lib.o canon.o liveview.o bind.o ml.o conv.o generic.o canon_adv.o stuff.o
OBJ := main.o ui.o jank.o os.o backend.o
FUDGE_CORE := fuji.o tester.o data.o net.o discovery.o exif.o uilua.o fuji_usb.o object.o fuji_lua.o lua_runtime.o
OBJ := main.o jank.o backend.o
FUDGE_CORE := fuji.o tester.o data.o net.o discovery.o exif.o fuji_usb.o object.o fuji_lua.o lua_runtime.o

ifeq ($(TARGET),l)
CAMLIB_CORE += libusb.o
Expand Down
2 changes: 0 additions & 2 deletions desktop/backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@ struct PtpRuntime *luaptp_get_runtime(lua_State *L) {
return ptp_get();
}

int luaopen_libuilua(lua_State *L);
int cam_lua_setup(lua_State *L) {
luaL_requiref(L, "ui", luaopen_libuilua, 1);
return 0;
}

Expand Down
79 changes: 0 additions & 79 deletions desktop/file_table.c

This file was deleted.

59 changes: 58 additions & 1 deletion desktop/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,63 @@ int fuji_discovery_check_cancel(void *arg) {
return 0;
}

void app_send_cam_name(const char *name) {

}

void fuji_discovery_update_progress(void *arg, enum DiscoverUpdateMessages progress) {
}

void app_downloading_file(const struct PtpObjectInfo *oi) {
// ...
}

void app_downloaded_file(const struct PtpObjectInfo *oi, const char *path) {
// ...
}

void app_increment_progress_bar(int read) {
// ...
}

void app_report_download_speed(long time, size_t size) {
// ...
}

void app_log_clear(void) {
// ...
}

void app_print(char *fmt, ...) {
char buffer[512];
va_list args;
va_start(args, fmt);
vsnprintf(buffer, sizeof(buffer), fmt, args);
va_end(args);
}

void tester_log(char *fmt, ...) {
char buffer[512];
va_list args;
va_start(args, fmt);
vsnprintf(buffer, sizeof(buffer), fmt, args);
va_end(args);
printf("LOG: %s\n", buffer);
}

void tester_fail(char *fmt, ...) {
char buffer[512];
va_list args;
va_start(args, fmt);
vsnprintf(buffer, sizeof(buffer), fmt, args);
va_end(args);
printf("FAIL: %s\n", buffer);
}

void app_update_connected_status(int connected) {

}

static int help(void) {
printf("Fudge 0.1.0\n");
printf("Compilation date: " __DATE__ "\n");
Expand Down Expand Up @@ -116,5 +173,5 @@ int main(int argc, char **argv) {
}
}

return fudge_main_ui();
return 0;
}
Loading

0 comments on commit a116687

Please sign in to comment.