*/}}
Browse Source

Windows adaptation and installation script

YimingWu 1 year ago
parent
commit
7c8cb7f5ec
3 changed files with 25 additions and 3 deletions
  1. 22 0
      CMakeLists.txt
  2. 2 2
      ouroperations.c
  3. 1 1
      ourtranslations.c

+ 22 - 0
CMakeLists.txt

@@ -1,6 +1,10 @@
 cmake_minimum_required(VERSION 3.1)
 project(OurPaint)
 
+set(CMAKE_INSTALL_SYSTEM_RUNTIME_DESTINATION ".")
+
+include (InstallRequiredSystemLibraries)
+
 set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_CURRENT_SOURCE_DIR})
 
 find_package(lagui REQUIRED)
@@ -65,3 +69,21 @@ target_link_libraries(OurPaint
     ${PNG_LIBRARY}
     ${LCMS2_LIBRARIES}
 )
+
+SET(LAGUI_FONT_CUSTOM_PATH  $ENV{HOME}/.local/share/fonts/lagui CACHE STRING "Where to install lagui fonts")
+
+if (NOT DEFINED ${LAGUI_FONT_CUSTOM_PATH})
+    set(LAGUI_FONT_CUSTOM_PATH $ENV{HOME}/.local/share/fonts/lagui)
+endif()
+
+install(TARGETS OurPaint RUNTIME_DEPENDENCY_SET runtime_deps DESTINATION ".")
+LIST(APPEND pre_exclude_regexes "api-ms-.*")
+LIST(APPEND pre_exclude_regexes "ext-ms-.*")
+LIST(APPEND post_exclude_regexes ".*WINDOWS[\\/]system32.*")
+LIST(APPEND post_exclude_regexes "^/lib" "^/usr" "^/bin")
+install(RUNTIME_DEPENDENCY_SET runtime_deps
+    PRE_EXCLUDE_REGEXES ${pre_exclude_regexes}
+    POST_EXCLUDE_REGEXES ${post_exclude_regexes}
+    DESTINATION "."
+)
+install(DIRECTORY "${LAGUI_FONT_CUSTOM_PATH}/" DESTINATION "fonts" PATTERN "*.*")

+ 2 - 2
ouroperations.c

@@ -308,7 +308,7 @@ void ourui_SplashPanel(laUiList *uil, laPropPack *This, laPropPack *DetachedProp
     }else{
         laShowImage(uil,c,Our->SplashImage,5)->Flags|=LA_UI_IMAGE_FULL_W;
     }
-    laShowLabel(uil,cl,"Our Paint v0.1",0,0);
+    laShowLabel(uil,cl,"Our Paint v0.1a",0,0);
     laShowLabel(uil,cl,"Our Paint is a free application.",0,0)->Flags|=LA_UI_FLAGS_DISABLED|LA_TEXT_LINE_WRAP|LA_UI_MIN_WIDTH;
     laUiItem* b=laBeginRow(uil,cl,0,0);
     laShowLabel(uil, cl, OURPAINT_GIT_BRANCH,0,0)->Flags|=LA_TEXT_MONO|LA_UI_FLAGS_DISABLED;
@@ -1989,7 +1989,7 @@ void ourRegisterEverything(){
     laAssignNewKey(km, 0, "LA_undo", 0, LA_KEY_CTRL, LA_KEY_DOWN, ']', 0);
     laAssignNewKey(km, 0, "LA_redo", 0, LA_KEY_CTRL, LA_KEY_DOWN, '[', 0);
 
-    laSetMenuBarTemplates(ourui_MenuButtons, ourui_ToolExtras, "Our Paint v0.1");
+    laSetMenuBarTemplates(ourui_MenuButtons, ourui_ToolExtras, "Our Paint v0.1a");
 
     ourRegisterNodes();
 

+ 1 - 1
ourtranslations.c

@@ -97,7 +97,7 @@ static const char *entries[]={
 "Canvas Scale","画布缩放",
 "Others","其他",
 "Bit Depth:","位深度:",
-"Our Paint v0.1","好得涂 v0.1",
+"Our Paint v0.1a","好得涂 v0.1a",
 "New Layer","新图层",
 "Color Space:","色彩空间:",
 "Our Paint","好得涂",