فهرست منبع

Barcode: Encoding tables as assets

Willy-JL 2 سال پیش
والد
کامیت
8ec390df05
2فایلهای تغییر یافته به همراه8 افزوده شده و 11 حذف شده
  1. 4 4
      barcode_gen/application.fam
  2. 4 7
      barcode_gen/barcode_app.h

+ 4 - 4
barcode_gen/application.fam

@@ -1,12 +1,12 @@
 App(
-    appid="Barcode_App",
-    name="Barcode App",
+    appid="barcode_app",
+    name="Barcode",
     apptype=FlipperAppType.EXTERNAL,
     entry_point="barcode_main",
     requires=["gui", "storage"],
     stack_size=2 * 1024,
-    fap_category="Misc",
+    fap_category="Tools",
     fap_icon="images/barcode_10.png",
     fap_icon_assets="images",
-    fap_icon_assets_symbol="barcode_app",
+    fap_file_assets="encoding_tables",
 )

+ 4 - 7
barcode_gen/barcode_app.h

@@ -23,20 +23,17 @@
 #define BARCODE_HEIGHT 50
 #define BARCODE_Y_START 3
 
-//the folder where the encodings are located
-#define BARCODE_DATA_FILE_DIR_PATH EXT_PATH("apps_data/barcode_data")
-
 //the folder where the codabar encoding table is located
-#define CODABAR_DICT_FILE_PATH BARCODE_DATA_FILE_DIR_PATH "/codabar_encodings.txt"
+#define CODABAR_DICT_FILE_PATH APP_ASSETS_PATH("codabar_encodings.txt")
 
 //the folder where the code 39 encoding table is located
-#define CODE39_DICT_FILE_PATH BARCODE_DATA_FILE_DIR_PATH "/code39_encodings.txt"
+#define CODE39_DICT_FILE_PATH APP_ASSETS_PATH("code39_encodings.txt")
 
 //the folder where the code 128 encoding table is located
-#define CODE128_DICT_FILE_PATH BARCODE_DATA_FILE_DIR_PATH "/code128_encodings.txt"
+#define CODE128_DICT_FILE_PATH APP_ASSETS_PATH("code128_encodings.txt")
 
 //the folder where the code 128 C encoding table is located
-#define CODE128C_DICT_FILE_PATH BARCODE_DATA_FILE_DIR_PATH "/code128c_encodings.txt"
+#define CODE128C_DICT_FILE_PATH APP_ASSETS_PATH("code128c_encodings.txt")
 
 //the folder where the user stores their barcodes
 #define DEFAULT_USER_BARCODES EXT_PATH("apps_data/barcodes")