Compare commits
16 Commits
Author | SHA1 | Date | |
---|---|---|---|
b47e208dd6 | |||
c624d5f741 | |||
57ba63f87f | |||
04bd445538 | |||
ce6e45c968 | |||
748acf65fd | |||
082f63603a | |||
a605886d80 | |||
1adbd17b34 | |||
28aeac117e | |||
7abf87ea27 | |||
0db40030c2 | |||
705f49b80a | |||
cc52ac1ce8 | |||
914c939ee9 | |||
74fb52d957 |
@@ -2,5 +2,6 @@
|
||||
|
||||
ENABLE_VARS="kde-tray|ON|KDE_TRAY"
|
||||
ENABLE_KDE_TRAY_DOC="build with kde tray and appindicator instead of gtk3 tray"
|
||||
DISABLE_VARS="aur|ON|DISABLE_AUR"
|
||||
DISABLE_VARS="aur|ON|DISABLE_AUR icon-update|OFF|ICON_UPDATE"
|
||||
DISABLE_DISABLE_AUR_DOC="disable the AUR in pamac"
|
||||
DISABLE_ICON_UPDATE_DOC="disable the update of the icon cache after installing"
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -5,3 +5,4 @@ PKGBUILD
|
||||
*.pkg.tar.xz
|
||||
*.pkg.tar.xz.sig
|
||||
/build
|
||||
src/interface/*~
|
||||
|
@@ -76,6 +76,7 @@ add_subdirectory(src)
|
||||
add_subdirectory(src/aur)
|
||||
add_subdirectory(src/pamac-user-daemon)
|
||||
add_subdirectory(src/pamac-tray)
|
||||
add_subdirectory(src/pamac-clean-cache)
|
||||
add_subdirectory(src/pamac-install)
|
||||
add_subdirectory(src/pamac-manager)
|
||||
add_subdirectory(src/pamac-system-daemon)
|
||||
|
46
README.md
46
README.md
@@ -20,7 +20,7 @@ A graphical package manager for pacman
|
||||
|
||||
- GTK+: 3.0
|
||||
- GIO: 2.0
|
||||
- GLib: 2.0
|
||||
- GLib: 2.38
|
||||
- GObject: 2.0
|
||||
- Json-Glib: 1.0
|
||||
- libalpm
|
||||
@@ -31,10 +31,10 @@ A graphical package manager for pacman
|
||||
- vte: 2.91
|
||||
- appindicator-gtk3 (optional to build KDE tray icon)
|
||||
- CMake
|
||||
- Vala
|
||||
- AutoVala (optional to regenerate CMake files)
|
||||
- Vala: 0.38
|
||||
- AutoVala: 1.1.2 (optional to regenerate CMake and Meson files)
|
||||
|
||||
## Using CMake
|
||||
## Using CMake with GNU Make
|
||||
|
||||
```
|
||||
mkdir build
|
||||
@@ -48,11 +48,43 @@ make
|
||||
### Extra build flags
|
||||
|
||||
- -DDISABLE_AUR=ON (to disable AUR in Pamac)
|
||||
- -DKDE_TRAY=true (to build kde tray icon instead of gtk tray icon)
|
||||
- -DKDE_TRAY=ON (to build kde tray icon instead of gtk tray icon)
|
||||
|
||||
## Using configure
|
||||
## Using CMake with Ninja
|
||||
|
||||
The configure script is just a wrapper for CMake, in the background the build process is the same.
|
||||
```
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. \
|
||||
-GNinja
|
||||
-DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_INSTALL_LIBDIR=/usr/lib \
|
||||
-DCMAKE_INSTALL_SYSCONFDIR=/etc
|
||||
ninja
|
||||
```
|
||||
### Extra build flags
|
||||
|
||||
- -DDISABLE_AUR=ON (to disable AUR in Pamac)
|
||||
- -DKDE_TRAY=ON (to build kde tray icon instead of gtk tray icon)
|
||||
|
||||
## Using Meson with Ninja
|
||||
|
||||
```
|
||||
mkdir build
|
||||
cd build
|
||||
meson \
|
||||
--prefix=/usr \
|
||||
--sysconfdir=/etc
|
||||
ninja
|
||||
```
|
||||
### Extra build flags
|
||||
|
||||
- -DDISABLE_AUR=ON (to disable AUR in Pamac)
|
||||
- -DKDE_TRAY=ON (to build kde tray icon instead of gtk tray icon)
|
||||
|
||||
## Using configure wrapper
|
||||
|
||||
The configure script is just a wrapper for CMake, in the background the build process is the same as using CMake with GNU Make.
|
||||
|
||||
```
|
||||
./configure --prefix=/usr \
|
||||
|
@@ -8,7 +8,6 @@ popd
|
||||
|
||||
# Update the autovala environment
|
||||
export AUTOVALA_CMAKE_SCRIPT="${PWD}"/autovala/cmake
|
||||
autovala refresh
|
||||
autovala cmake
|
||||
autovala update
|
||||
cp "${PWD}"/autovala/configure "${PWD}"/configure
|
||||
cp "${PWD}"/autovala/configure-custom.sh "${PWD}"/.configure-custom.sh
|
||||
|
@@ -2,5 +2,6 @@
|
||||
|
||||
ENABLE_VARS="kde-tray|ON|KDE_TRAY"
|
||||
ENABLE_KDE_TRAY_DOC="build with kde tray and appindicator instead of gtk3 tray"
|
||||
DISABLE_VARS="aur|ON|DISABLE_AUR"
|
||||
DISABLE_VARS="aur|ON|DISABLE_AUR icon-update|OFF|ICON_UPDATE"
|
||||
DISABLE_DISABLE_AUR_DOC="disable the AUR in pamac"
|
||||
DISABLE_ICON_UPDATE_DOC="disable the update of the icon cache after installing"
|
||||
|
@@ -71,7 +71,6 @@ SET (pamac_transaction_gresource_xml_H_FILE ${CMAKE_CURRENT_BINARY_DIR}/pamac.tr
|
||||
endif ()
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pamac-install.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/ )
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pamac-manager.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/ )
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pamac-updater.desktop DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/applications/ )
|
||||
if (KDE_TRAY)
|
||||
if( NOT ( ${CMAKE_INSTALL_PREFIX} MATCHES "^/home/" ) )
|
||||
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/pamac-tray-appindicator.desktop DESTINATION /etc/xdg/autostart/ )
|
||||
|
@@ -6,13 +6,13 @@ if (NOT(DISABLE_AUR))
|
||||
install(DIRECTORY
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pamac.conf
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_SYSCONFDIR}
|
||||
/etc
|
||||
)
|
||||
ELSE()
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pamac.conf
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_SYSCONFDIR}
|
||||
/etc
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
@@ -6,13 +6,13 @@ if (DISABLE_AUR)
|
||||
install(DIRECTORY
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pamac.conf
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_SYSCONFDIR}
|
||||
/etc
|
||||
)
|
||||
ELSE()
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pamac.conf
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_SYSCONFDIR}
|
||||
/etc
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
@@ -9,3 +9,15 @@ RefreshPeriod = 6
|
||||
|
||||
## When there are no updates available, hide the tray icon:
|
||||
#NoUpdateHideIcon
|
||||
|
||||
## Number of versions of each package to keep in the cache:
|
||||
KeepNumPackages = 3
|
||||
|
||||
## Remove only the versions of uninstalled packages when clean cache:
|
||||
#OnlyRmUninstalled
|
||||
|
||||
## Terminal background color
|
||||
BackgroundColor = rgb(0,0,0)
|
||||
|
||||
## Terminal foreground color
|
||||
ForegroundColor = rgb(255,255,255)
|
||||
|
@@ -24,3 +24,15 @@ BuildDirectory = /tmp
|
||||
|
||||
## Do not ask for confirmation when building packages:
|
||||
#NoConfirmBuild
|
||||
|
||||
## Number of versions of each package to keep in the cache:
|
||||
KeepNumPackages = 3
|
||||
|
||||
## Remove only the versions of uninstalled packages when clean cache:
|
||||
#OnlyRmUninstalled
|
||||
|
||||
## Terminal background color
|
||||
BackgroundColor = rgb(0,0,0)
|
||||
|
||||
## Terminal foreground color
|
||||
ForegroundColor = rgb(255,255,255)
|
||||
|
@@ -5,13 +5,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.conf)
|
||||
install(DIRECTORY
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.conf
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d
|
||||
/etc/dbus-1/system.d
|
||||
)
|
||||
ELSE()
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.conf
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d
|
||||
/etc/dbus-1/system.d
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
@@ -19,13 +19,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.user.service)
|
||||
install(DIRECTORY
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.user.service
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/services
|
||||
/usr/share/dbus-1/services
|
||||
)
|
||||
ELSE()
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.user.service
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/services
|
||||
/usr/share/dbus-1/services
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
@@ -33,13 +33,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.service)
|
||||
install(DIRECTORY
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.service
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/system-services
|
||||
/usr/share/dbus-1/system-services
|
||||
)
|
||||
ELSE()
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.system.service
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/system-services
|
||||
/usr/share/dbus-1/system-services
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.20.0 -->
|
||||
<!-- Generated with glade 3.20.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.14"/>
|
||||
<object class="GtkAdjustment" id="cache_keep_nb_adjustment">
|
||||
@@ -375,6 +375,102 @@
|
||||
<property name="title" translatable="yes">General</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="terminal_config_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">6</property>
|
||||
<property name="margin_right">6</property>
|
||||
<property name="margin_start">6</property>
|
||||
<property name="margin_end">6</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="margin_bottom">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkColorButton" id="terminal_background">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Select a background color</property>
|
||||
<property name="rgba">rgb(0,0,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkColorButton" id="terminal_foreground">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Select a text color</property>
|
||||
<property name="rgba">rgb(255,255,255)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Background:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Text:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">terminal</property>
|
||||
<property name="title" translatable="yes">Terminal</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="mirrors_config_box">
|
||||
<property name="visible">True</property>
|
||||
@@ -487,7 +583,7 @@
|
||||
<packing>
|
||||
<property name="name">official_repositories</property>
|
||||
<property name="title" translatable="yes">Official Repositories</property>
|
||||
<property name="position">1</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -620,6 +716,24 @@ All AUR users should be familiar with the build process.</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="check_aur_updates_checkbutton">
|
||||
<property name="label" translatable="yes">Check for updates from AUR</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="margin_left">24</property>
|
||||
<property name="margin_start">24</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="box3">
|
||||
<property name="visible">True</property>
|
||||
@@ -662,29 +776,11 @@ All AUR users should be familiar with the build process.</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="check_aur_updates_checkbutton">
|
||||
<property name="label" translatable="yes">Check for updates from AUR</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="margin_left">24</property>
|
||||
<property name="margin_start">24</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">aur</property>
|
||||
<property name="title" translatable="yes">AUR</property>
|
||||
<property name="position">2</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -780,7 +876,7 @@ All AUR users should be familiar with the build process.</property>
|
||||
<packing>
|
||||
<property name="name">cache</property>
|
||||
<property name="title" translatable="yes">Cache</property>
|
||||
<property name="position">3</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
@@ -807,6 +903,9 @@ All AUR users should be familiar with the build process.</property>
|
||||
<property name="halign">center</property>
|
||||
<property name="stack">stack</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.20.0 -->
|
||||
<!-- Generated with glade 3.20.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.14"/>
|
||||
<object class="GtkAdjustment" id="cache_keep_nb_adjustment">
|
||||
@@ -375,6 +375,102 @@
|
||||
<property name="title" translatable="yes">General</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="terminal_config_box">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="margin_left">6</property>
|
||||
<property name="margin_right">6</property>
|
||||
<property name="margin_start">6</property>
|
||||
<property name="margin_end">6</property>
|
||||
<property name="margin_top">6</property>
|
||||
<property name="margin_bottom">6</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkGrid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<property name="column_spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkColorButton" id="terminal_background">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Select a background color</property>
|
||||
<property name="rgba">rgb(0,0,0)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkColorButton" id="terminal_foreground">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Select a text color</property>
|
||||
<property name="rgba">rgb(255,255,255)</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes">Background:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="label" translatable="yes">Text:</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="name">terminal</property>
|
||||
<property name="title" translatable="yes">Terminal</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="mirrors_config_box">
|
||||
<property name="visible">True</property>
|
||||
@@ -487,7 +583,7 @@
|
||||
<packing>
|
||||
<property name="name">official_repositories</property>
|
||||
<property name="title" translatable="yes">Official Repositories</property>
|
||||
<property name="position">1</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -583,7 +679,7 @@
|
||||
<packing>
|
||||
<property name="name">cache</property>
|
||||
<property name="title" translatable="yes">Cache</property>
|
||||
<property name="position">3</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
@@ -610,6 +706,9 @@
|
||||
<property name="halign">center</property>
|
||||
<property name="stack">stack</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
|
@@ -5,13 +5,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/x-alpm-package.xml)
|
||||
install(DIRECTORY
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/x-alpm-package.xml
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/mime/packages
|
||||
/usr/share/mime/packages
|
||||
)
|
||||
ELSE()
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/x-alpm-package.xml
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/mime/packages
|
||||
/usr/share/mime/packages
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
@@ -1,7 +1,7 @@
|
||||
[Desktop Entry]
|
||||
Name=Update Notifier Appindicator
|
||||
Icon=update-notifier
|
||||
Exec=pamac-tray-appindicator
|
||||
Exec=pamac-tray
|
||||
Terminal=false
|
||||
Type=Application
|
||||
StartupNotify=true
|
||||
|
@@ -1,134 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=Software Update
|
||||
Name[af]=Sagtewarebywerking
|
||||
Name[ar]=ŲŖŲŲÆŁŲ« Ų§ŁŲØŲ±Ł
Ų¬ŁŲ§ŲŖ
|
||||
Name[as]=ą¦ą¦¾ą¦²ą¦Øą¦¾ą¦ą§ą¦ą¦¾ą¦Ø ą¦ą¦Øą§ą¦Øą§ą¦Ø ą¦¬ą§ą¦Æą§±ą¦øą§ą¦„া
|
||||
Name[ast]=Anovamientu de software
|
||||
Name[be]=ŠŠ±Š½Š°Ńленне Š°ŠæŃагŃамаваннŃ
|
||||
Name[bg]=ŠŠ±Š½Š¾Š²Š»ŠµŠ½ŠøŠµ на ŃŠ¾ŃŃŃŠµŃа
|
||||
Name[bn]=ą¦øą¦«ą§ą¦ą¦ą§ą§ą¦Æą¦¾ą¦° ą¦¹ą¦¾ą¦²ą¦Øą¦¾ą¦ą¦¾ą¦¦
|
||||
Name[bn_IN]=ą¦øą¦«ą§ą¦ą¦ą§ą§ą¦Æą¦¾ą¦° ą¦ą¦Ŗą¦”ą§ą¦ ą¦¬ą§ą¦Æą¦¬ą¦øą§ą¦„া
|
||||
Name[ca]=Actualització de programari
|
||||
Name[ca@valencia]=Actualització de programari
|
||||
Name[cs]=Aktualizace softwaru
|
||||
Name[da]=Softwareopdatering
|
||||
Name[de]=Software-Aktualisierungen
|
||||
Name[el]=ĪνημĪĻĻĻĪ· λογιĻμικοĻ
|
||||
Name[en@shaw]=ššŖššš¢šŗ š³ššš±š
|
||||
Name[en_GB]=Software Update
|
||||
Name[eo]=Programar-gĢistatigo
|
||||
Name[es]=Actualización de software
|
||||
Name[et]=Tarkvarauuendus
|
||||
Name[eu]=Softwarearen eguneraketa
|
||||
Name[fa]=ŲØŲ±ŁŲ²Ų±Ų³Ų§ŁŪ ŁŲ±Ł
āŲ§ŁŲ²Ų§Ų±
|
||||
Name[fi]=OhjelmistopƤivitykset
|
||||
Name[fr]=Mise Ć jour des logiciels
|
||||
Name[gl]=Actualización de software
|
||||
Name[gu]=ąŖøą«ąŖ«ą«ąŖąŖµą«ąŖ° ąŖøą«ąŖ§ąŖ¾ąŖ°ąŖ¾
|
||||
Name[he]=×¢×××× ×Ŗ×× ×
|
||||
Name[hi]=ą¤øą„ą¤«ą„ą¤ą¤µą„यर ą¤
ą¤¦ą„ą¤Æą¤¤ą¤Ø
|
||||
Name[hu]=SzoftverfrissĆtĆ©s
|
||||
Name[id]=Pembaruan Perangkat Lunak
|
||||
Name[it]=Aggiornamento software
|
||||
Name[ja]=ć½ććć¦ć§ć¢ć®ę“ę°
|
||||
Name[kn]=ą²¤ą²ą²¤ą³ą²°ą²¾ą²ą²¶ ą²
ą²Ŗą³āą²”ą³ą²ą³ā
|
||||
Name[ko]=ģķķøģØģ“ ģ
ė°ģ“ķø
|
||||
Name[lt]=PrograminÄs ÄÆrangos atnaujinimas
|
||||
Name[lv]=ProgrammatÅ«ras atjauninÄÅ”ana
|
||||
Name[mk]=ŠŠ¶ŃŃŠøŃŠ°ŃŠµ на ŃŠ¾ŃŃŠ²ŠµŃ
|
||||
Name[ml]=ą“øąµą“«ąµą“±ąµą“±ąµāą“µąµą“Æą“°ąµā ą“Ŗą“°ą“æą“·ąµą“ą“¾ą“°ą“
|
||||
Name[mr]=ą¤øą„ą¤«ą„ą¤ą¤µą„ą¤
र ą¤
ą¤¦ą„ą¤Æą¤Æą¤¾ą¤µą¤¤
|
||||
Name[nb]=Programvareoppdatering
|
||||
Name[nl]=Software bijwerken
|
||||
Name[nn]=Programvareoppdatering
|
||||
Name[or]=ą¬øą¬«ąą¬ą±ąą¬° ą¬
ą¬¦ąąą¬¤ą¬Ø
|
||||
Name[pa]=ąØøąØ¾ąØ«ąØąØµą©ąØ
ਰ ąØ
ą©±ąØŖąØ”ą©ąØ
|
||||
Name[pl]=Aktualizacja oprogramowania
|
||||
Name[pt]=Actualização de Software
|
||||
Name[pt_BR]=AtualizaƧƵes de programas
|
||||
Name[ro]=ActualizÄri de programe
|
||||
Name[ru]=ŠŠ±Š½Š¾Š²Š»ŠµŠ½ŠøŠµ ŠæŃŠ¾Š³Ńамм
|
||||
Name[sk]=AktualizƔcia softvƩru
|
||||
Name[sl]=Posodobitev programske opreme
|
||||
Name[sr]=ŠŠ¶ŃŃŠøŃŠ°ŃŠµ ŠæŃŠ¾Š³Ńама
|
||||
Name[sr@latin]=Ažuriranje programa
|
||||
Name[sv]=Programuppdatering
|
||||
Name[ta]=ą®®ąÆą®©ąÆą®ŖąÆą®°ąÆą®³ąÆ ą®®ąÆą®®ąÆą®Ŗą®ąÆą®¤ąÆą®¤ą®²ąÆ
|
||||
Name[te]=ą°øą°¾ą°Ŗą±ą°ą±āą°µą±ą°°ą± ą°Øą°µą±ą°ą°°ą°£
|
||||
Name[th]=ąøąø£ąø±ąøąø£ąøøą¹ąøąøąøąøąøą¹ą¹ąø§ąø£ą¹
|
||||
Name[tr]=Yazılım Güncelleme
|
||||
Name[ug]=ŁŪŁ
Ų“Ų§Ł ŲÆŪŲŖŲ§Ł ŁŪŚŁŁŲ§Ų“
|
||||
Name[uk]=ŠŠ½Š¾Š²Š»ŠµŠ½Š½Ń ŠæŃŠ¾Š³Ńам
|
||||
Name[vi]=Bįŗ£n cįŗp nhįŗt phįŗ§n mį»m
|
||||
Name[zh_CN]=软件ę“ę°
|
||||
Name[zh_HK]=č»ä»¶ę“ę°
|
||||
Name[zh_TW]=č»é«ę“ę°
|
||||
Comment=Update software installed on the system
|
||||
Comment[af]=Werk geĆÆnstalleer sagteware op die stelsel by
|
||||
Comment[ar]=ŲŲÆŁŲ« Ų§ŁŲŲ²Ł
Ų§ŁŁ
ŁŲ«ŲØŁŲŖŲ© Ų¹ŁŁ Ų§ŁŁŲøŲ§Ł
|
||||
Comment[as]=ą¦¬ą§ą¦Æą§±ą¦øą§ą¦„ą¦¾ą¦Ŗą§ą§°ą¦£ą¦¾ą¦²ą§ą¦¤ ą¦øą¦ą¦øą§ą¦„াপিত ą¦ą¦¾ą¦²ą¦Øą¦¾ą¦ą§ą¦ą¦¾ą¦Ø ą¦ą¦Øą§ą¦Øą§ą¦Ø ą¦ą§°ą¦
|
||||
Comment[ast]=Anovar el software instalƔu nel sistema
|
||||
Comment[be]=ŠŠ±Š½Š°Ńленне Š°ŠæŃагŃамаваннŃ, ŃŃŃŠ°Š»Ńванага Ń ŃŃŃŃŃŠ¼Šµ
|
||||
Comment[bg]=ŠŠ±Š½Š¾Š²Ńване на ŃŠ¾ŃŃŃŠµŃа инŃŃŠ°Š»ŠøŃан вŃŃŃ
Ń ŃŠøŃŃŠµŠ¼Š°Ńа
|
||||
Comment[bn]=ą¦øą¦æą¦øą§ą¦ą§ą¦®ą§ ą¦ą¦Øą¦øą§ą¦ą¦²ą¦ą§ą¦¤ ą¦øą¦«ą§ą¦ą¦ą§ą§ą¦Æą¦¾ą¦° ą¦¹ą¦¾ą¦²ą¦Øą¦¾ą¦ą¦¾ą¦¦
|
||||
Comment[bn_IN]=ą¦øą¦æą¦øą§ą¦ą§ą¦®ą§ ą¦ą¦Øą¦øą§ą¦ą¦² ą¦„ą¦¾ą¦ą¦¾ ą¦øą¦«ą§ą¦ą¦ą§ą§ą¦Æą¦¾ą¦° ą¦ą¦Ŗą¦”ą§ą¦ ą¦ą¦°ą§ą¦Ø
|
||||
Comment[ca]=Actualitza el programari instalĀ·lat en el sistema
|
||||
Comment[ca@valencia]=Actualitza el programari instalĀ·lat en el sistema
|
||||
Comment[cs]=Aktualizovat software instalovaný v tomto systému
|
||||
Comment[da]=OpdatƩr software installeret pƄ systemet
|
||||
Comment[de]=Auf dem System installierte Software aktualisieren
|
||||
Comment[el]=ĪνημĪĻĻĻĪ· εγκαĻεĻĻημĪνοĻ
λογιĻμικοĻ
|
||||
Comment[en@shaw]=š³ššš±š ššŖššš¢šŗ š¦šÆššš·š¤š šŖšÆ š šš¦ššš©š„
|
||||
Comment[en_GB]=Update software installed on the system
|
||||
Comment[es]=Actualizar el software instalado en el sistema
|
||||
Comment[et]=Süsteemi paigaldatud tarkvara uuendamine
|
||||
Comment[eu]=Eguneratu sisteman instalatutako softwarea
|
||||
Comment[fa]=ŲØŲ±ŁŲ²Ų±Ų³Ų§ŁŪ ŁŲ±Ł
āŲ§ŁŲ²Ų§Ų± ŁŲµŲØ Ų“ŲÆŁ ŲØŲ± Ų±ŁŪ Ų³ŪŲ³ŲŖŁ
|
||||
Comment[fi]=PƤivitƤ jƤrjestelmƤƤn asennettuja ohjelmistoja
|
||||
Comment[fr]=Met à jour les logiciels installés sur le système
|
||||
Comment[gl]=Actualizar o software instalado no sistema
|
||||
Comment[gu]=ąŖøąŖæąŖøą«ąŖąŖ® ąŖŖąŖ° ąŖøą«ąŖ„ાપિત ąŖ„ąŖÆą«ąŖ² ąŖøą«ąŖ«ą«ąŖąŖµą«ąŖ°ąŖØą« ąŖøą«ąŖ§ąŖ¾ąŖ°ą«
|
||||
Comment[he]=×¢×××× ×Ŗ××× ××Ŗ ××××Ŗ×§× ××Ŗ ×¢× ××ער××Ŗ
|
||||
Comment[hi]=ą¤øą¤æą¤øą„ą¤ą¤® पर ą¤øą¤ą¤øą„ऄापित ą¤øą„ą¤«ą„ą¤ą¤µą„यर ą¤
ą¤¦ą„ą¤Æą¤¤ą¤Ø ą¤ą¤°ą„ą¤
|
||||
Comment[hu]=A rendszerre telepĆtett szoftverek frissĆtĆ©se
|
||||
Comment[id]=Mutakhirkan perangkat lunak yang terpasang pada sistem
|
||||
Comment[it]=Aggiorna il software installato sul sistema
|
||||
Comment[ja]=ć·ć¹ćć ć«ć¤ć³ć¹ćć¼ć«ćććććć±ć¼ćøć®ę“ę°
|
||||
Comment[kn]=ą²ą²£ą²ą²¦ą²²ą³ą²²ą²æ ą²
ą²Øą³ą²øą³ą²„ą²¾ą²Ŗą²æą²¤ą²ą³ą²ą²”ą²æą²°ą³ą²µ ą²¤ą²ą²¤ą³ą²°ą²¾ą²ą²¶ą²µą²Øą³ą²Øą³ ą²
ą²Ŗą³ą²”ą³ą²ą³ ಮಾಔą³
|
||||
Comment[ko]=ģģ¤ķ
ģ ģ¤ģ¹ķ ģķķøģØģ“넼 ģ
ė°ģ“ķøķ©ėė¤
|
||||
Comment[lt]=Atnaujinti sistemoje ÄÆdiegtÄ
programinÄ ÄÆrangÄ
|
||||
Comment[lv]=AtjauninÄt sistÄmÄ instalÄto programmatÅ«ru
|
||||
Comment[mk]=ŠŠ¶ŃŃŠøŃŠ°Ń Š³Š¾ ŃŠ¾ŃŃŠ²ŠµŃŠ¾Ń ŠøŠ½ŃŃŠ°Š»ŠøŃŠ°Ń Š½Š° ŃŠøŃŃŠµŠ¼Š¾Ń
|
||||
Comment[ml]=ą“øą“æą“øąµą“±ąµą“±ą“®ą“æą“²ąµā ą“ą“Øąµāą“øąµą“±ąµą“±ąµą“³ąµā ą“ąµą“Æąµą“¤ą“æą“°ą“æą“ąµą“ąµą“Øąµą“Ø ą“øąµą“«ąµą“±ąµą“±ąµāą“µąµą“Æą“±ąµą“ą“³ąµā ą“Ŗą“°ą“æą“·ąµą“ą“°ą“æą“ąµą“ąµą“
|
||||
Comment[mr]=ą¤Ŗą„ą¤°ą¤£ą¤¾ą¤²ą„वर ą¤Ŗą„ą¤°ą¤¤ą¤æą¤·ą„ą¤ ą¤¾ą¤Ŗą„ą¤¤ ą¤øą„ą¤«ą„ą¤ą¤µą„ą¤
र ą¤
ą¤¦ą„ą¤Æą¤Æą¤¾ą¤µą¤¤ ą¤ą¤°ą¤¾
|
||||
Comment[nb]=Oppdater programvare som er installert pƄ systemet
|
||||
Comment[nl]=Werk de op uw systeem geĆÆnstalleerde software bij
|
||||
Comment[nn]=Oppdater programvare installert pƄ systemet
|
||||
Comment[or]=ą¬¤ą¬Øąą¬¤ąą¬°ą¬°ą ą¬øąą¬„ାପନ ą¬ą¬°ą¬¾ą¬Æą¬¾ą¬ą¬„ିବା ą¬øą¬«ąą¬ą±ąą¬°ą¬ą ą¬
ą¬¦ąąą¬¤ą¬Ø ą¬ą¬°ą¬Øąą¬¤ą
|
||||
Comment[pa]=ąØøąØæąØøąØąØ® ąØą©±ąØ¤ą© ąØą©°ąØøąØąØ¾ąØ² ąØøąØ¾ąØ«ąØąØµą©ąØ
ਰ ąØ
ą©±ąØŖąØ”ą©ąØ ąØąØ°ą©
|
||||
Comment[pl]=Aktualizacja oprogramowania zainstalowanego w systemie
|
||||
Comment[pt]=Actualizar software instalado no sistema
|
||||
Comment[pt_BR]=Atualize os programas instalados no sistema
|
||||
Comment[ro]=ActualizaČi programele instalate pe sistem
|
||||
Comment[ru]=ŠŠ±Š½Š¾Š²Š»ŠµŠ½ŠøŠµ ŠæŃŠ¾Š³Ńамм, ŃŃŃŠ°Š½Š¾Š²Š»ŠµŠ½Š½ŃŃ
в ŃŠøŃŃŠµŠ¼Šµ
|
||||
Comment[sk]=Aktualizuje softvĆ©r nainÅ”talovaný v tomto poÄĆtaÄi
|
||||
Comment[sl]=Posodobitev programske opreme nameÅ”Äene na sistemu
|
||||
Comment[sr]=ŠŠ¶ŃŃŠøŃаŃŃŠµ ŠæŃŠ¾Š³Ńаме инŃŃŠ°Š»ŠøŃане на овом ŃŠøŃŃŠµŠ¼Ń
|
||||
Comment[sr@latin]=Ažurirajte programe instalirane na ovom sistemu
|
||||
Comment[sv]=Uppdatera programvara installerade pƄ systemet
|
||||
Comment[ta]=ą®ą®£ą®æą®©ą®æą®Æą®æą®²ąÆ ą®Øą®æą®±ąÆą®µą®ŖąÆą®Ŗą®ąÆą® ą®®ąÆą®©ąÆą®ŖąÆą®°ąÆą®³ąÆ ą®ŖąÆą®¤ąÆą®ŖąÆą®Ŗą®æą®ąÆą®ą®µąÆą®®ąÆ
|
||||
Comment[te]=ą°µą±ą°Æą°µą°øą±ą°„ ą°Øą°ą°¦ą± ą°øą±ą°„ą°¾ą°Ŗą°æą°ą°ą°æą°Ø ą°øą°¾ą°«ą±ą°ą±āą°µą±ą°°ą±āą°Øą± ą°Øą°µą±ą°ą°°ą°æą°ą°ą±
|
||||
Comment[th]=ąøąø£ąø±ąøąø£ąøøą¹ąøąøąøąøąøą¹ą¹ąø§ąø£ą¹ąøąøµą¹ąøąø“ąøąøąø±ą¹ąøąøąø¢ąø¹ą¹ą¹ąøąø£ąø°ąøąø
|
||||
Comment[tr]=Sisteminizde yüklü yazılımı güncelleyin
|
||||
Comment[ug]=ŁŪŚŁŁŲ§Ų“ ŁŪŁ
Ų“Ų§Ł ŲÆŪŲŖŲ§Ł ŲØŪ Ų³ŁŲ³ŲŖŪŁ
ŁŲŗŲ§ Ų¦ŁŲ±ŁŁŲŖŁŁŲÆŁ
|
||||
Comment[uk]=ŠŠ½Š¾Š²Š»ŠµŠ½Š½Ń ŠæŃŠ¾Š³Ńам, вŃŃŠ°Š½Š¾Š²Š»ŠµŠ½ŠøŃ
Ń ŃŠøŃŃŠµŠ¼Ń
|
||||
Comment[vi]=Cįŗp nhįŗt phįŗ§n mį»m ÄĆ£ cĆ i Äįŗ·t trĆŖn hį» thį»ng
|
||||
Comment[zh_CN]=ę“ę°ę¬ē³»ē»äøå®č£
ē软件
|
||||
Comment[zh_HK]=ę“ę°ē³»ēµ±äøå·²å®č£ēč»ä»¶
|
||||
Comment[zh_TW]=ę“ę°ē³»ēµ±äøå·²å®č£ēč»é«
|
||||
Icon=system-software-update
|
||||
Exec=pamac-updater
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=GNOME;GTK;System;Settings;X-XFCE-SettingsDialog;X-XFCE-SystemSettings;
|
||||
StartupNotify=true
|
@@ -5,13 +5,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.policy)
|
||||
install(DIRECTORY
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.policy
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions
|
||||
/usr/share/polkit-1/actions
|
||||
)
|
||||
ELSE()
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/org.pamac.policy
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions
|
||||
/usr/share/polkit-1/actions
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
@@ -5,13 +5,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pamac-system.service)
|
||||
install(DIRECTORY
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pamac-system.service
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_LIBDIR}/systemd/system
|
||||
/usr/lib/systemd/system
|
||||
)
|
||||
ELSE()
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pamac-system.service
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_LIBDIR}/systemd/system
|
||||
/usr/lib/systemd/system
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
@@ -19,13 +19,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pamac-cleancache.service)
|
||||
install(DIRECTORY
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pamac-cleancache.service
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_LIBDIR}/systemd/system
|
||||
/usr/lib/systemd/system
|
||||
)
|
||||
ELSE()
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pamac-cleancache.service
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_LIBDIR}/systemd/system
|
||||
/usr/lib/systemd/system
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
@@ -33,13 +33,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pamac-cleancache.timer)
|
||||
install(DIRECTORY
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pamac-cleancache.timer
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_LIBDIR}/systemd/system
|
||||
/usr/lib/systemd/system
|
||||
)
|
||||
ELSE()
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pamac-cleancache.timer
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_LIBDIR}/systemd/system
|
||||
/usr/lib/systemd/system
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
@@ -47,13 +47,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pamac-mirrorlist.service)
|
||||
install(DIRECTORY
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pamac-mirrorlist.service
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_LIBDIR}/systemd/system
|
||||
/usr/lib/systemd/system
|
||||
)
|
||||
ELSE()
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pamac-mirrorlist.service
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_LIBDIR}/systemd/system
|
||||
/usr/lib/systemd/system
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
@@ -61,13 +61,13 @@ IF(IS_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/pamac-mirrorlist.timer)
|
||||
install(DIRECTORY
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pamac-mirrorlist.timer
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_LIBDIR}/systemd/system
|
||||
/usr/lib/systemd/system
|
||||
)
|
||||
ELSE()
|
||||
install(FILES
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/pamac-mirrorlist.timer
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_LIBDIR}/systemd/system
|
||||
/usr/lib/systemd/system
|
||||
)
|
||||
ENDIF()
|
||||
|
||||
|
@@ -3,4 +3,4 @@ Description=Clean packages cache
|
||||
|
||||
[Service]
|
||||
Type=oneshot
|
||||
ExecStart=/usr/bin/paccache -r
|
||||
ExecStart=/usr/bin/pamac-clean-cache
|
||||
|
130
meson.build
Normal file
130
meson.build
Normal file
@@ -0,0 +1,130 @@
|
||||
project('pamac',['c','vala'])
|
||||
|
||||
DISABLE_AUR = (get_option('DISABLE_AUR') != '')
|
||||
KDE_TRAY = (get_option('KDE_TRAY') != '')
|
||||
|
||||
add_global_arguments('-DGETTEXT_PACKAGE="pamac"',language: 'c')
|
||||
|
||||
gdk_3_0_dep = dependency('gdk-3.0')
|
||||
gtk_3_0_dep = dependency('gtk+-3.0')
|
||||
json_glib_1_0_dep = dependency('json-glib-1.0')
|
||||
libalpm_dep = dependency('libalpm')
|
||||
libcurl_dep = dependency('libcurl')
|
||||
libnotify_dep = dependency('libnotify')
|
||||
libsoup_2_4_dep = dependency('libsoup-2.4')
|
||||
polkit_gobject_1_dep = dependency('polkit-gobject-1')
|
||||
vte_2_91_dep = dependency('vte-2.91')
|
||||
if KDE_TRAY
|
||||
appindicator3_0_1_dep = dependency('appindicator3-0.1')
|
||||
endif
|
||||
gio_2_0_dep = dependency('gio-2.0')
|
||||
glib_2_0_dep = dependency('glib-2.0')
|
||||
gobject_2_0_dep = dependency('gobject-2.0')
|
||||
|
||||
subdir('po')
|
||||
meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/etc/dbus-1/system.d',join_paths(meson.current_source_dir(),'data/dbus','org.pamac.system.conf'))
|
||||
|
||||
meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/share/dbus-1/services',join_paths(meson.current_source_dir(),'data/dbus','org.pamac.user.service'))
|
||||
|
||||
meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/share/dbus-1/system-services',join_paths(meson.current_source_dir(),'data/dbus','org.pamac.system.service'))
|
||||
|
||||
meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/lib/systemd/system',join_paths(meson.current_source_dir(),'data/systemd','pamac-system.service'))
|
||||
|
||||
meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/lib/systemd/system',join_paths(meson.current_source_dir(),'data/systemd','pamac-cleancache.service'))
|
||||
|
||||
meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/lib/systemd/system',join_paths(meson.current_source_dir(),'data/systemd','pamac-cleancache.timer'))
|
||||
|
||||
meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/lib/systemd/system',join_paths(meson.current_source_dir(),'data/systemd','pamac-mirrorlist.service'))
|
||||
|
||||
meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/lib/systemd/system',join_paths(meson.current_source_dir(),'data/systemd','pamac-mirrorlist.timer'))
|
||||
|
||||
meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/share/polkit-1/actions',join_paths(meson.current_source_dir(),'data/polkit','org.pamac.policy'))
|
||||
|
||||
meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/usr/share/mime/packages',join_paths(meson.current_source_dir(),'data/mime','x-alpm-package.xml'))
|
||||
|
||||
if DISABLE_AUR
|
||||
meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/etc',join_paths(meson.current_source_dir(),'data/config/noaur','pamac.conf'))
|
||||
|
||||
else
|
||||
meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),'/etc',join_paths(meson.current_source_dir(),'data/config','pamac.conf'))
|
||||
|
||||
endif
|
||||
pamac_installer_gresource_xml_generator = generator(find_program('glib-compile-resources'), arguments: [ '--sourcedir=@SOURCE_DIR@/data' , '--generate-source', '--target=@BUILD_DIR@/pamac.installer.gresource.xml.c', '@INPUT@'], output: '@PLAINNAME@.c')
|
||||
|
||||
pamac_installer_gresource_xml_file_c = pamac_installer_gresource_xml_generator.process(['data/pamac.installer.gresource.xml'])
|
||||
|
||||
if DISABLE_AUR
|
||||
pamac_manager_no_aur_gresource_xml_generator = generator(find_program('glib-compile-resources'), arguments: [ '--sourcedir=@SOURCE_DIR@/data' , '--generate-source', '--target=@BUILD_DIR@/pamac.manager_no_aur.gresource.xml.c', '@INPUT@'], output: '@PLAINNAME@.c')
|
||||
|
||||
pamac_manager_no_aur_gresource_xml_file_c = pamac_manager_no_aur_gresource_xml_generator.process(['data/pamac.manager_no_aur.gresource.xml'])
|
||||
|
||||
pamac_transaction_no_aur_gresource_xml_generator = generator(find_program('glib-compile-resources'), arguments: [ '--sourcedir=@SOURCE_DIR@/data' , '--generate-source', '--target=@BUILD_DIR@/pamac.transaction_no_aur.gresource.xml.c', '@INPUT@'], output: '@PLAINNAME@.c')
|
||||
|
||||
pamac_transaction_no_aur_gresource_xml_file_c = pamac_transaction_no_aur_gresource_xml_generator.process(['data/pamac.transaction_no_aur.gresource.xml'])
|
||||
|
||||
else
|
||||
pamac_manager_gresource_xml_generator = generator(find_program('glib-compile-resources'), arguments: [ '--sourcedir=@SOURCE_DIR@/data' , '--generate-source', '--target=@BUILD_DIR@/pamac.manager.gresource.xml.c', '@INPUT@'], output: '@PLAINNAME@.c')
|
||||
|
||||
pamac_manager_gresource_xml_file_c = pamac_manager_gresource_xml_generator.process(['data/pamac.manager.gresource.xml'])
|
||||
|
||||
pamac_transaction_gresource_xml_generator = generator(find_program('glib-compile-resources'), arguments: [ '--sourcedir=@SOURCE_DIR@/data' , '--generate-source', '--target=@BUILD_DIR@/pamac.transaction.gresource.xml.c', '@INPUT@'], output: '@PLAINNAME@.c')
|
||||
|
||||
pamac_transaction_gresource_xml_file_c = pamac_transaction_gresource_xml_generator.process(['data/pamac.transaction.gresource.xml'])
|
||||
|
||||
endif
|
||||
if KDE_TRAY
|
||||
else
|
||||
endif
|
||||
if DISABLE_AUR
|
||||
else
|
||||
endif
|
||||
meson.add_install_script(join_paths(meson.current_source_dir(),'meson_scripts','install_data.sh'),join_paths(get_option('prefix'),get_option('datadir'),'doc'),join_paths(meson.current_source_dir(),'doc','','*'))
|
||||
|
||||
install_data('data/pamac-install.desktop',install_dir:join_paths(get_option('prefix'),get_option('datadir'),'applications'))
|
||||
install_data('data/pamac-manager.desktop',install_dir:join_paths(get_option('prefix'),get_option('datadir'),'applications'))
|
||||
if KDE_TRAY
|
||||
if (get_option('prefix').startswith('/home/'))
|
||||
message('[33mAutostart file data/pamac-tray-appindicator.desktop will not be installed. You must create your own .desktop file and put it at ~/.config/autostart[39m')
|
||||
else
|
||||
install_data('data/pamac-tray-appindicator.desktop',install_dir: '/etc/xdg/autostart')
|
||||
endif
|
||||
else
|
||||
if (get_option('prefix').startswith('/home/'))
|
||||
message('[33mAutostart file data/pamac-tray.desktop will not be installed. You must create your own .desktop file and put it at ~/.config/autostart[39m')
|
||||
else
|
||||
install_data('data/pamac-tray.desktop',install_dir: '/etc/xdg/autostart')
|
||||
endif
|
||||
endif
|
||||
install_data('data/interface/choose_ignorepkgs_dialog.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
install_data('data/interface/choose_provider_dialog.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
install_data('data/interface/history_dialog.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
install_data('data/interface/progress_box.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
install_data('data/interface/transaction_sum_dialog.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
if DISABLE_AUR
|
||||
install_data('data/interface/manager_window_no_aur.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
install_data('data/interface/preferences_dialog_no_aur.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
else
|
||||
install_data('data/interface/manager_window.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
install_data('data/interface/preferences_dialog.ui', install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
endif
|
||||
install_data('data/icons/16x16/apps/system-software-install.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'icons','hicolor/16x16/apps'))
|
||||
install_data('data/icons/24x24/status/pamac-tray-no-update.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'icons','hicolor/24x24/apps'))
|
||||
install_data('data/icons/24x24/status/pamac-tray-update.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'icons','hicolor/24x24/apps'))
|
||||
install_data('data/icons/32x32/apps/system-software-install.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'icons','hicolor/32x32/apps'))
|
||||
install_data('data/pixmaps/package-available-locked.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
install_data('data/pixmaps/package-available.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
install_data('data/pixmaps/package-generic.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
install_data('data/pixmaps/package-install.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
install_data('data/pixmaps/package-installed-locked.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
install_data('data/pixmaps/package-installed-updated.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
install_data('data/pixmaps/package-reinstall.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
install_data('data/pixmaps/package-remove.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
install_data('data/pixmaps/package-upgrade.png',install_dir: join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
subdir('src')
|
||||
subdir('src/aur')
|
||||
subdir('src/pamac-user-daemon')
|
||||
subdir('src/pamac-tray')
|
||||
subdir('src/pamac-clean-cache')
|
||||
subdir('src/pamac-install')
|
||||
subdir('src/pamac-manager')
|
||||
subdir('src/pamac-system-daemon')
|
2
meson_options.txt
Normal file
2
meson_options.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
option('DISABLE_AUR',type : 'string', value: '')
|
||||
option('KDE_TRAY',type : 'string', value: '')
|
7
meson_scripts/install_data.sh
Executable file
7
meson_scripts/install_data.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
mkdir -p $DESTDIR/$1
|
||||
if [[ -d $2 ]]; then
|
||||
cp -a $2/* $DESTDIR/$1
|
||||
else
|
||||
cp -a $2 $DESTDIR/$1
|
||||
fi
|
9
meson_scripts/install_library.sh
Executable file
9
meson_scripts/install_library.sh
Executable file
@@ -0,0 +1,9 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p "${DESTDIR}${MESON_INSTALL_PREFIX}/share/vala/vapi"
|
||||
mkdir -p "${DESTDIR}${MESON_INSTALL_PREFIX}/share/gir-1.0"
|
||||
mkdir -p "${DESTDIR}${MESON_INSTALL_PREFIX}/include"
|
||||
|
||||
install -m 644 "${MESON_BUILD_ROOT}/$1/$2.vapi" "${DESTDIR}${MESON_INSTALL_PREFIX}/share/vala/vapi"
|
||||
install -m 644 "${MESON_BUILD_ROOT}/$1/$2.h" "${DESTDIR}${MESON_INSTALL_PREFIX}/include"
|
||||
install -m 644 "${MESON_BUILD_ROOT}/$1/$2@sha/$3" "${DESTDIR}${MESON_INSTALL_PREFIX}/share/gir-1.0"
|
65
pamac.avprj
65
pamac.avprj
@@ -1,22 +1,22 @@
|
||||
### AutoVala Project ###
|
||||
autovala_version: 24
|
||||
project_name: pamac
|
||||
*vala_version: 0.38
|
||||
vala_version: 0.38
|
||||
|
||||
custom: data/dbus/org.pamac.system.conf ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d
|
||||
custom: data/dbus/org.pamac.user.service ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/services
|
||||
custom: data/dbus/org.pamac.system.service ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/dbus-1/system-services
|
||||
custom: data/systemd/pamac-system.service ${CMAKE_INSTALL_LIBDIR}/systemd/system
|
||||
custom: data/systemd/pamac-cleancache.service ${CMAKE_INSTALL_LIBDIR}/systemd/system
|
||||
custom: data/systemd/pamac-cleancache.timer ${CMAKE_INSTALL_LIBDIR}/systemd/system
|
||||
custom: data/systemd/pamac-mirrorlist.service ${CMAKE_INSTALL_LIBDIR}/systemd/system
|
||||
custom: data/systemd/pamac-mirrorlist.timer ${CMAKE_INSTALL_LIBDIR}/systemd/system
|
||||
custom: data/polkit/org.pamac.policy ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/polkit-1/actions
|
||||
custom: data/mime/x-alpm-package.xml ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/mime/packages
|
||||
custom: data/dbus/org.pamac.system.conf /etc/dbus-1/system.d
|
||||
custom: data/dbus/org.pamac.user.service /usr/share/dbus-1/services
|
||||
custom: data/dbus/org.pamac.system.service /usr/share/dbus-1/system-services
|
||||
custom: data/systemd/pamac-system.service /usr/lib/systemd/system
|
||||
custom: data/systemd/pamac-cleancache.service /usr/lib/systemd/system
|
||||
custom: data/systemd/pamac-cleancache.timer /usr/lib/systemd/system
|
||||
custom: data/systemd/pamac-mirrorlist.service /usr/lib/systemd/system
|
||||
custom: data/systemd/pamac-mirrorlist.timer /usr/lib/systemd/system
|
||||
custom: data/polkit/org.pamac.policy /usr/share/polkit-1/actions
|
||||
custom: data/mime/x-alpm-package.xml /usr/share/mime/packages
|
||||
if DISABLE_AUR
|
||||
custom: data/config/noaur/pamac.conf ${CMAKE_INSTALL_SYSCONFDIR}
|
||||
custom: data/config/noaur/pamac.conf /etc
|
||||
else
|
||||
custom: data/config/pamac.conf ${CMAKE_INSTALL_SYSCONFDIR}
|
||||
custom: data/config/pamac.conf /etc
|
||||
end
|
||||
|
||||
define: KDE_TRAY
|
||||
@@ -33,8 +33,19 @@ end
|
||||
|
||||
vapidir: src/vapis
|
||||
|
||||
vala_binary: src/pamac-clean-cache/pamac-clean-cache
|
||||
version: 6.2.0
|
||||
vala_local_package: Pamac
|
||||
vala_package: posix
|
||||
vala_check_package: gtk+-3.0
|
||||
*vala_check_package: gio-2.0
|
||||
*vala_check_package: glib-2.0
|
||||
*vala_check_package: gobject-2.0
|
||||
*vala_source: clean_cache.vala
|
||||
*vala_source: pamac_config.vala
|
||||
|
||||
vala_binary: src/pamac-install/pamac-install
|
||||
version: 6.0.0
|
||||
version: 6.2.0
|
||||
use_gresource: pamac_installer_gresource_xml
|
||||
vala_local_package: Pamac
|
||||
vala_check_package: gtk+-3.0
|
||||
@@ -45,7 +56,7 @@ vala_check_package: gtk+-3.0
|
||||
*vala_source: progress_dialog.vala
|
||||
|
||||
vala_binary: src/pamac-manager/pamac-manager
|
||||
version: 6.0.0
|
||||
version: 6.2.0
|
||||
use_gresource: pamac_manager_gresource_xml
|
||||
vala_local_package: Pamac
|
||||
vala_check_package: gtk+-3.0
|
||||
@@ -57,7 +68,7 @@ vala_check_package: gtk+-3.0
|
||||
*vala_source: manager_window.vala
|
||||
|
||||
vala_binary: src/pamac-system-daemon/pamac-system-daemon
|
||||
version: 6.0.0
|
||||
version: 6.2.0
|
||||
vala_local_package: Pamac
|
||||
if NOT DISABLE_AUR
|
||||
vala_local_package: AUR
|
||||
@@ -78,7 +89,7 @@ vala_check_package: polkit-gobject-1
|
||||
*vala_source: system_daemon.vala
|
||||
|
||||
vala_binary: src/pamac-tray/pamac-tray
|
||||
version: 6.0.0
|
||||
version: 6.2.0
|
||||
vala_local_package: Pamac
|
||||
if NOT DISABLE_AUR
|
||||
vala_local_package: AUR
|
||||
@@ -104,9 +115,11 @@ end
|
||||
*vala_source: user_daemon.vala
|
||||
|
||||
vala_binary: src/pamac-user-daemon/pamac-user-daemon
|
||||
version: 6.0.0
|
||||
vala_local_package: AUR
|
||||
version: 6.2.0
|
||||
vala_local_package: Pamac
|
||||
if NOT DISABLE_AUR
|
||||
vala_local_package: AUR
|
||||
end
|
||||
vala_package: posix
|
||||
vala_check_package: gtk+-3.0
|
||||
vala_check_package: json-glib-1.0
|
||||
@@ -120,7 +133,7 @@ vala_check_package: libsoup-2.4
|
||||
|
||||
|
||||
vala_library: src/pamac
|
||||
version: 6.0.0
|
||||
version: 6.2.0
|
||||
*namespace: Pamac
|
||||
use_gresource: pamac_transaction_gresource_xml
|
||||
vala_package: posix
|
||||
@@ -132,6 +145,7 @@ vala_check_package: vte-2.91
|
||||
*vala_check_package: gio-2.0
|
||||
*vala_check_package: glib-2.0
|
||||
*vala_check_package: gobject-2.0
|
||||
*c_library: m
|
||||
*vala_source: alpm_config.vala
|
||||
*vala_source: choose_ignorepkgs_dialog.vala
|
||||
*vala_source: choose_provider_dialog.vala
|
||||
@@ -145,7 +159,7 @@ vala_check_package: vte-2.91
|
||||
*vala_source: transaction_sum_dialog.vala
|
||||
|
||||
vala_library: src/aur/aur
|
||||
version: 6.0.0
|
||||
version: 6.2.0
|
||||
*namespace: AUR
|
||||
vala_check_package: json-glib-1.0
|
||||
vala_check_package: libsoup-2.4
|
||||
@@ -168,6 +182,8 @@ vala_check_package: libsoup-2.4
|
||||
*translate: vala src/common.vala
|
||||
*translate: vala src/mirrors_config.vala
|
||||
*translate: vala src/package.vala
|
||||
*translate: vala src/pamac-clean-cache/clean_cache.vala
|
||||
*translate: vala src/pamac-clean-cache/pamac_config.vala
|
||||
*translate: vala src/pamac-install/installer.vala
|
||||
*translate: vala src/pamac-install/progress_dialog.vala
|
||||
*translate: vala src/pamac-manager/history_dialog.vala
|
||||
@@ -204,7 +220,6 @@ end
|
||||
|
||||
*desktop: data/pamac-install.desktop
|
||||
*desktop: data/pamac-manager.desktop
|
||||
*desktop: data/pamac-updater.desktop
|
||||
|
||||
if KDE_TRAY
|
||||
autostart: data/pamac-tray-appindicator.desktop
|
||||
@@ -241,9 +256,5 @@ end
|
||||
*pixmap: data/pixmaps/package-upgrade.png
|
||||
|
||||
# These depends are needed to enable parallel builds
|
||||
include: src/pamac-install/CMakeDepends.txt
|
||||
include: src/pamac-manager/CMakeDepends.txt
|
||||
include: src/pamac-system-daemon/CMakeDepends.txt
|
||||
include: src/pamac-tray/CMakeDepends.txt
|
||||
include: src/pamac-user-daemon/CMakeDepends.txt
|
||||
include: src/CMakeSymlinks.txt
|
||||
|
||||
|
@@ -3,4 +3,4 @@
|
||||
|
||||
include (Translations)
|
||||
add_translations_directory("pamac")
|
||||
add_translations_catalog("pamac" ../src/pamac-install ../src/pamac-manager ../src/pamac-system-daemon ../src/pamac-tray ../src/pamac-user-daemon ../src ../src/aur ../data/interface )
|
||||
add_translations_catalog("pamac" ../src/pamac-clean-cache ../src/pamac-install ../src/pamac-manager ../src/pamac-system-daemon ../src/pamac-tray ../src/pamac-user-daemon ../src ../src/aur ../data/interface )
|
||||
|
@@ -1,3 +1,5 @@
|
||||
src/pamac-clean-cache/clean_cache.vala
|
||||
src/pamac-clean-cache/pamac_config.vala
|
||||
src/pamac-install/installer.vala
|
||||
src/pamac-install/progress_dialog.vala
|
||||
src/pamac-manager/history_dialog.vala
|
||||
|
2
po/meson.build
Normal file
2
po/meson.build
Normal file
@@ -0,0 +1,2 @@
|
||||
i18n = import('i18n')
|
||||
i18n.gettext('pamac', languages: ['af', 'ar', 'es_ES', 'nn', 'sl_SI', 'cs_CZ', 'is', 'gl', 'be', 'sr_RS', 'zh_TW', 'pl_PL', 'uz', 'fi', 'is_IS', 'sr_RS@latin', 'sl', 'sr@latin', 'fr', 'ro', 'sr', 'el', 'eu', 'ml', 'ur_PK', 'ko', 'el_GR', 'de_DE', 'cs', 'bs', 'si', 'zh', 'da', 'ca_ES', 'sv', 'it_IT', 'vi', 'eo', 'es_AR', 'zh_CN', 'pl', 'hi', 'pt', 'en_GB', 'es', 'es_MX', 'fa', 'nl', 'hu', 'bn', 'hr_HR', 'nb', 'ja', 'pt_BR', 'pt_PT', 'nl_BE', 'ca', 'tr', 'he', 'hi_IN', 'et', 'lt', 'fo', 'it', 'fa_IR', 'es_419', 'de_CH', 'de', 'ka', 'bs_BA', 'ru', 'ms', 'sk', 'bg', 'ast', 'uk', 'hr', 'es_SV', 'nl_NL', 'cy', 'id', 'az_AZ'])
|
@@ -7,7 +7,7 @@ set (GETTEXT_PACKAGE "pamac")
|
||||
set (RELEASE_NAME "pamac")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.0.0")
|
||||
set (VERSION "6.2.0")
|
||||
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
|
||||
set (DOLLAR "$")
|
||||
|
||||
@@ -15,7 +15,7 @@ configure_file (${CMAKE_SOURCE_DIR}/src/Config.vala.base ${CMAKE_BINARY_DIR}/src
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
|
||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Pamac.pc ${CMAKE_CURRENT_BINARY_DIR}/Pamac.pc)
|
||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Pamac.deps ${CMAKE_CURRENT_BINARY_DIR}/Pamac.deps)
|
||||
set (VERSION "6.0.0")
|
||||
set (VERSION "6.2.0")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
link_libraries ( ${DEPS_LIBRARIES} )
|
||||
link_directories ( ${DEPS_LIBRARY_DIRS} )
|
||||
@@ -82,10 +82,12 @@ GENERATE_HEADER
|
||||
SET (VALA_C ${VALA_C} ${pamac_transaction_gresource_xml_C_FILE})
|
||||
add_library(Pamac SHARED ${VALA_C})
|
||||
|
||||
add_dependencies (Pamac pamac_transaction_gresource_xml)
|
||||
set ( Pamac_DEPENDENCIES ${Pamac_DEPENDENCIES} pamac_transaction_gresource_xml )
|
||||
add_dependencies( Pamac ${Pamac_DEPENDENCIES} )
|
||||
target_link_libraries( Pamac m )
|
||||
set_target_properties( Pamac PROPERTIES
|
||||
VERSION
|
||||
6.0.0
|
||||
6.2.0
|
||||
SOVERSION
|
||||
6 )
|
||||
|
||||
@@ -141,4 +143,7 @@ install(CODE "MESSAGE (\"
|
||||
* Run 'sudo ldconfig' to complete installation *
|
||||
************************************************
|
||||
|
||||
\") " )
|
||||
\") " )
|
||||
|
||||
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/CMakeSymlinks.txt)
|
||||
|
@@ -1,3 +1,2 @@
|
||||
add_dependencies(pamac-manager Pamac)
|
||||
include (InstallSymlink)
|
||||
install_symlink(pamac-manager ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_BINDIR}/pamac-updater)
|
@@ -6,7 +6,7 @@ includedir=@DOLLAR@{exec_prefix}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||
|
||||
Name: Pamac
|
||||
Description: Pamac
|
||||
Version: 6.0.0
|
||||
Version: 6.2.0
|
||||
Libs: -L@DOLLAR@{libdir} -lPamac
|
||||
Cflags: -I@DOLLAR@{includedir}
|
||||
Requires: gdk-3.0 gtk+-3.0 libalpm libnotify vte-2.91 gio-2.0 glib-2.0 gobject-2.0
|
||||
|
@@ -6,7 +6,7 @@ includedir=@DOLLAR@{exec_prefix}/${CMAKE_INSTALL_INCLUDEDIR}
|
||||
|
||||
Name: AUR
|
||||
Description: AUR
|
||||
Version: 6.0.0
|
||||
Version: 6.2.0
|
||||
Libs: -L@DOLLAR@{libdir} -lAUR
|
||||
Cflags: -I@DOLLAR@{includedir}
|
||||
Requires: json-glib-1.0 libsoup-2.4 glib-2.0
|
||||
|
@@ -7,7 +7,7 @@ set (GETTEXT_PACKAGE "pamac")
|
||||
set (RELEASE_NAME "pamac")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.0.0")
|
||||
set (VERSION "6.2.0")
|
||||
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
|
||||
set (DOLLAR "$")
|
||||
|
||||
@@ -15,7 +15,7 @@ configure_file (${CMAKE_SOURCE_DIR}/src/aur/Config.vala.base ${CMAKE_BINARY_DIR}
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
|
||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/AUR.pc ${CMAKE_CURRENT_BINARY_DIR}/AUR.pc)
|
||||
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/AUR.deps ${CMAKE_CURRENT_BINARY_DIR}/AUR.deps)
|
||||
set (VERSION "6.0.0")
|
||||
set (VERSION "6.2.0")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
link_libraries ( ${DEPS_LIBRARIES} )
|
||||
link_directories ( ${DEPS_LIBRARY_DIRS} )
|
||||
@@ -65,7 +65,7 @@ add_library(AUR SHARED ${VALA_C})
|
||||
|
||||
set_target_properties( AUR PROPERTIES
|
||||
VERSION
|
||||
6.0.0
|
||||
6.2.0
|
||||
SOVERSION
|
||||
6 )
|
||||
|
||||
|
46
src/aur/meson.build
Normal file
46
src/aur/meson.build
Normal file
@@ -0,0 +1,46 @@
|
||||
cfg_aur = configuration_data()
|
||||
cfg_aur.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir')))
|
||||
cfg_aur.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
cfg_aur.set('GETTEXT_PACKAGE', 'pamac')
|
||||
cfg_aur.set('RELEASE_NAME', 'pamac')
|
||||
cfg_aur.set('PREFIX', get_option('prefix'))
|
||||
cfg_aur.set('VERSION', '6.2.0')
|
||||
cfg_aur.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_2 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_aur)
|
||||
|
||||
aur_deps = [json_glib_1_0_dep]
|
||||
aur_deps += [libsoup_2_4_dep]
|
||||
aur_deps += [glib_2_0_dep]
|
||||
aur_sources = [cfgfile_2]
|
||||
aur_sources += ['aur.vala']
|
||||
aur_vala_args = ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
|
||||
aur_c_args = []
|
||||
if DISABLE_AUR
|
||||
aur_vala_args += ['-D', 'DISABLE_AUR']
|
||||
aur_c_args += ['-DDISABLE_AUR']
|
||||
endif
|
||||
if KDE_TRAY
|
||||
aur_vala_args += ['-D', 'KDE_TRAY']
|
||||
aur_c_args += ['-DKDE_TRAY']
|
||||
endif
|
||||
aur_vala_args += ['--gir=AUR-6.0.gir']
|
||||
|
||||
|
||||
AUR_library = shared_library('AUR',aur_sources,dependencies: aur_deps,vala_args: aur_vala_args,c_args: aur_c_args,version: '6.2.0',soversion: '6',install: true)
|
||||
|
||||
aur_requires = []
|
||||
aur_requires += ['json-glib-1.0']
|
||||
aur_requires += ['libsoup-2.4']
|
||||
aur_requires += ['glib-2.0']
|
||||
pkg_mod = import('pkgconfig')
|
||||
pkg_mod.generate(libraries : AUR_library,
|
||||
version : '6.2.0',
|
||||
name : 'AUR',
|
||||
filebase : 'AUR',
|
||||
description : 'AUR',
|
||||
requires : aur_requires)
|
||||
|
||||
install_data(join_paths(meson.current_source_dir(),'AUR.deps'),install_dir: join_paths(get_option('prefix'),'share','vala','vapi'))
|
||||
meson.add_install_script(join_paths(meson.source_root(),'meson_scripts','install_library.sh'),'src/aur','AUR','AUR-6.0.gir')
|
||||
|
78
src/meson.build
Normal file
78
src/meson.build
Normal file
@@ -0,0 +1,78 @@
|
||||
cfg_pamac = configuration_data()
|
||||
cfg_pamac.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir')))
|
||||
cfg_pamac.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
cfg_pamac.set('GETTEXT_PACKAGE', 'pamac')
|
||||
cfg_pamac.set('RELEASE_NAME', 'pamac')
|
||||
cfg_pamac.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac.set('VERSION', '6.2.0')
|
||||
cfg_pamac.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_1 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac)
|
||||
|
||||
pamac_deps = [gdk_3_0_dep]
|
||||
pamac_deps += [gtk_3_0_dep]
|
||||
pamac_deps += [libalpm_dep]
|
||||
pamac_deps += [libnotify_dep]
|
||||
pamac_deps += [vte_2_91_dep]
|
||||
pamac_deps += [gio_2_0_dep]
|
||||
pamac_deps += [glib_2_0_dep]
|
||||
pamac_deps += [gobject_2_0_dep]
|
||||
pamac_sources = [cfgfile_1]
|
||||
pamac_sources += ['alpm_config.vala']
|
||||
pamac_sources += ['choose_ignorepkgs_dialog.vala']
|
||||
pamac_sources += ['choose_provider_dialog.vala']
|
||||
pamac_sources += ['common.vala']
|
||||
pamac_sources += ['mirrors_config.vala']
|
||||
pamac_sources += ['package.vala']
|
||||
pamac_sources += ['pamac_config.vala']
|
||||
pamac_sources += ['preferences_dialog.vala']
|
||||
pamac_sources += ['progress_box.vala']
|
||||
pamac_sources += ['transaction.vala']
|
||||
pamac_sources += ['transaction_sum_dialog.vala']
|
||||
if DISABLE_AUR
|
||||
pamac_sources += [pamac_transaction_no_aur_gresource_xml_file_c]
|
||||
else
|
||||
pamac_sources += [pamac_transaction_gresource_xml_file_c]
|
||||
endif
|
||||
pamac_vala_args = ['--pkg','posix']
|
||||
pamac_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
|
||||
if DISABLE_AUR
|
||||
pamac_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.transaction_no_aur.gresource.xml')]
|
||||
else
|
||||
pamac_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.transaction.gresource.xml')]
|
||||
endif
|
||||
pamac_c_args = []
|
||||
if DISABLE_AUR
|
||||
pamac_vala_args += ['-D', 'DISABLE_AUR']
|
||||
pamac_c_args += ['-DDISABLE_AUR']
|
||||
endif
|
||||
if KDE_TRAY
|
||||
pamac_vala_args += ['-D', 'KDE_TRAY']
|
||||
pamac_c_args += ['-DKDE_TRAY']
|
||||
endif
|
||||
pamac_deps += [meson.get_compiler('c').find_library('m', required : false)]
|
||||
pamac_vala_args += ['--gir=Pamac-6.0.gir']
|
||||
|
||||
|
||||
Pamac_library = shared_library('Pamac',pamac_sources,dependencies: pamac_deps,vala_args: pamac_vala_args,c_args: pamac_c_args,version: '6.2.0',soversion: '6',install: true)
|
||||
|
||||
pamac_requires = []
|
||||
pamac_requires += ['gdk-3.0']
|
||||
pamac_requires += ['gtk+-3.0']
|
||||
pamac_requires += ['libalpm']
|
||||
pamac_requires += ['libnotify']
|
||||
pamac_requires += ['vte-2.91']
|
||||
pamac_requires += ['gio-2.0']
|
||||
pamac_requires += ['glib-2.0']
|
||||
pamac_requires += ['gobject-2.0']
|
||||
pkg_mod = import('pkgconfig')
|
||||
pkg_mod.generate(libraries : Pamac_library,
|
||||
version : '6.2.0',
|
||||
name : 'Pamac',
|
||||
filebase : 'Pamac',
|
||||
description : 'Pamac',
|
||||
requires : pamac_requires)
|
||||
|
||||
install_data(join_paths(meson.current_source_dir(),'Pamac.deps'),install_dir: join_paths(get_option('prefix'),'share','vala','vapi'))
|
||||
meson.add_install_script(join_paths(meson.source_root(),'meson_scripts','install_library.sh'),'src','Pamac','Pamac-6.0.gir')
|
||||
|
89
src/pamac-clean-cache/CMakeLists.txt
Normal file
89
src/pamac-clean-cache/CMakeLists.txt
Normal file
@@ -0,0 +1,89 @@
|
||||
### CMakeLists automatically created with AutoVala
|
||||
### Do not edit
|
||||
|
||||
set (DATADIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}")
|
||||
set (PKGDATADIR "${DATADIR}/pamac")
|
||||
set (GETTEXT_PACKAGE "pamac")
|
||||
set (RELEASE_NAME "pamac")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.2.0")
|
||||
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
|
||||
set (DOLLAR "$")
|
||||
|
||||
configure_file (${CMAKE_SOURCE_DIR}/src/pamac-clean-cache/Config.vala.base ${CMAKE_BINARY_DIR}/src/pamac-clean-cache/Config.vala)
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
|
||||
set (VERSION "6.2.0")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lPamac )
|
||||
link_directories ( ${DEPS_LIBRARY_DIRS} ${CMAKE_BINARY_DIR}/src )
|
||||
find_package (Vala REQUIRED)
|
||||
include (ValaVersion)
|
||||
ensure_vala_version ("0.38" MINIMUM)
|
||||
include (ValaPrecompile)
|
||||
|
||||
set (VALA_PACKAGES ${VALA_PACKAGES} posix)
|
||||
set (VALA_PACKAGES ${VALA_PACKAGES} gtk+-3.0)
|
||||
set (VALA_PACKAGES ${VALA_PACKAGES} gio-2.0)
|
||||
set (VALA_PACKAGES ${VALA_PACKAGES} glib-2.0)
|
||||
set (VALA_PACKAGES ${VALA_PACKAGES} gobject-2.0)
|
||||
|
||||
set (APP_SOURCES ${APP_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/Config.vala)
|
||||
set (APP_SOURCES ${APP_SOURCES} clean_cache.vala)
|
||||
set (APP_SOURCES ${APP_SOURCES} pamac_config.vala)
|
||||
|
||||
set (CUSTOM_VAPIS_LIST ${CUSTOM_VAPIS_LIST} ${CMAKE_BINARY_DIR}/src/Pamac.vapi)
|
||||
|
||||
if (DISABLE_AUR)
|
||||
set (COMPILE_OPTIONS ${COMPILE_OPTIONS} -D DISABLE_AUR)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDISABLE_AUR " )
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DDISABLE_AUR " )
|
||||
endif ()
|
||||
if (KDE_TRAY)
|
||||
set (COMPILE_OPTIONS ${COMPILE_OPTIONS} -D KDE_TRAY)
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DKDE_TRAY " )
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DKDE_TRAY " )
|
||||
endif ()
|
||||
set (COMPILE_OPTIONS ${COMPILE_OPTIONS} --vapidir=${CMAKE_SOURCE_DIR}/src/vapis )
|
||||
|
||||
if ((${CMAKE_BUILD_TYPE} STREQUAL "Debug") OR (${CMAKE_BUILD_TYPE} STREQUAL "RelWithDebInfo"))
|
||||
set(COMPILE_OPTIONS ${COMPILE_OPTIONS} "-g")
|
||||
endif()
|
||||
|
||||
|
||||
vala_precompile(VALA_C pamac-clean-cache
|
||||
${APP_SOURCES}
|
||||
PACKAGES
|
||||
${VALA_PACKAGES}
|
||||
CUSTOM_VAPIS
|
||||
${CUSTOM_VAPIS_LIST}
|
||||
OPTIONS
|
||||
${COMPILE_OPTIONS}
|
||||
)
|
||||
|
||||
add_executable(pamac-clean-cache ${VALA_C})
|
||||
set ( pamac-clean-cache_DEPENDENCIES ${pamac-clean-cache_DEPENDENCIES} Pamac )
|
||||
add_dependencies( pamac-clean-cache ${pamac-clean-cache_DEPENDENCIES} )
|
||||
|
||||
|
||||
install(TARGETS
|
||||
pamac-clean-cache
|
||||
RUNTIME DESTINATION
|
||||
${CMAKE_INSTALL_BINDIR}
|
||||
)
|
||||
if(HAVE_VALADOC)
|
||||
valadoc(pamac-clean-cache
|
||||
${CMAKE_BINARY_DIR}/valadoc/pamac-clean-cache
|
||||
${APP_SOURCES}
|
||||
PACKAGES
|
||||
${VALA_PACKAGES}
|
||||
CUSTOM_VAPIS
|
||||
${CUSTOM_VAPIS_LIST}
|
||||
)
|
||||
install(DIRECTORY
|
||||
${CMAKE_BINARY_DIR}/valadoc
|
||||
DESTINATION
|
||||
${CMAKE_INSTALL_DATAROOTDIR}/doc/pamac
|
||||
)
|
||||
endif()
|
10
src/pamac-clean-cache/Config.vala.base
Normal file
10
src/pamac-clean-cache/Config.vala.base
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace Constants {
|
||||
public const string DATADIR = "@DATADIR@";
|
||||
public const string PKGDATADIR = "@PKGDATADIR@";
|
||||
public const string GETTEXT_PACKAGE = "@GETTEXT_PACKAGE@";
|
||||
public const string RELEASE_NAME = "@RELEASE_NAME@";
|
||||
public const string VERSION = "@VERSION@";
|
||||
#if UNITEST
|
||||
public const string TESTSRCDIR = "@TESTSRCDIR@";
|
||||
#endif
|
||||
}
|
33
src/pamac-clean-cache/clean_cache.vala
Normal file
33
src/pamac-clean-cache/clean_cache.vala
Normal file
@@ -0,0 +1,33 @@
|
||||
/*
|
||||
* pamac-vala
|
||||
*
|
||||
* Copyright (C) 2017 Chris Cromer <cromer@cromnix.org>
|
||||
* Copyright (C) 2014-2017 Guillaume Benoit <guillaume@manjaro.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a get of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
int main () {
|
||||
var pamac_config = new Pamac.Config ("/etc/pamac.conf");
|
||||
string rm_only_uninstalled_str = "";
|
||||
if (pamac_config.rm_only_uninstalled) {
|
||||
rm_only_uninstalled_str = "-u";
|
||||
}
|
||||
try {
|
||||
Process.spawn_command_line_sync ("paccache -q --nocolor %s -r -k %llu".printf (rm_only_uninstalled_str, pamac_config.keep_num_pkgs));
|
||||
} catch (SpawnError e) {
|
||||
stderr.printf ("SpawnError: %s\n", e.message);
|
||||
}
|
||||
return 0;
|
||||
}
|
34
src/pamac-clean-cache/meson.build
Normal file
34
src/pamac-clean-cache/meson.build
Normal file
@@ -0,0 +1,34 @@
|
||||
cfg_pamac_clean_cache = configuration_data()
|
||||
cfg_pamac_clean_cache.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir')))
|
||||
cfg_pamac_clean_cache.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
cfg_pamac_clean_cache.set('GETTEXT_PACKAGE', 'pamac')
|
||||
cfg_pamac_clean_cache.set('RELEASE_NAME', 'pamac')
|
||||
cfg_pamac_clean_cache.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_clean_cache.set('VERSION', '6.2.0')
|
||||
cfg_pamac_clean_cache.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_5 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_clean_cache)
|
||||
|
||||
pamac_clean_cache_deps = [gtk_3_0_dep]
|
||||
pamac_clean_cache_deps += [gio_2_0_dep]
|
||||
pamac_clean_cache_deps += [glib_2_0_dep]
|
||||
pamac_clean_cache_deps += [gobject_2_0_dep]
|
||||
pamac_clean_cache_sources = [cfgfile_5]
|
||||
pamac_clean_cache_sources += ['clean_cache.vala']
|
||||
pamac_clean_cache_sources += ['pamac_config.vala']
|
||||
pamac_clean_cache_vala_args = ['--pkg','posix']
|
||||
pamac_clean_cache_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
|
||||
pamac_clean_cache_dependencies = [Pamac_library]
|
||||
pamac_clean_cache_c_args = []
|
||||
if DISABLE_AUR
|
||||
pamac_clean_cache_vala_args += ['-D', 'DISABLE_AUR']
|
||||
pamac_clean_cache_c_args += ['-DDISABLE_AUR']
|
||||
endif
|
||||
if KDE_TRAY
|
||||
pamac_clean_cache_vala_args += ['-D', 'KDE_TRAY']
|
||||
pamac_clean_cache_c_args += ['-DKDE_TRAY']
|
||||
endif
|
||||
pamac_clean_cache_hfolders = ['../../src']
|
||||
|
||||
executable('pamac-clean-cache',pamac_clean_cache_sources,dependencies: pamac_clean_cache_deps,vala_args: pamac_clean_cache_vala_args,c_args: pamac_clean_cache_c_args,link_with: pamac_clean_cache_dependencies,include_directories: include_directories(pamac_clean_cache_hfolders),install: true)
|
||||
|
1
src/pamac-clean-cache/pamac_config.vala
Symbolic link
1
src/pamac-clean-cache/pamac_config.vala
Symbolic link
@@ -0,0 +1 @@
|
||||
../pamac_config.vala
|
@@ -1 +0,0 @@
|
||||
add_dependencies(pamac-install Pamac)
|
@@ -7,13 +7,13 @@ set (GETTEXT_PACKAGE "pamac")
|
||||
set (RELEASE_NAME "pamac")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.0.0")
|
||||
set (VERSION "6.2.0")
|
||||
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
|
||||
set (DOLLAR "$")
|
||||
|
||||
configure_file (${CMAKE_SOURCE_DIR}/src/pamac-install/Config.vala.base ${CMAKE_BINARY_DIR}/src/pamac-install/Config.vala)
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
|
||||
set (VERSION "6.0.0")
|
||||
set (VERSION "6.2.0")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lPamac )
|
||||
@@ -64,7 +64,9 @@ OPTIONS
|
||||
|
||||
SET (VALA_C ${VALA_C} ${pamac_installer_gresource_xml_C_FILE})
|
||||
add_executable(pamac-install ${VALA_C})
|
||||
add_dependencies (pamac-install pamac_installer_gresource_xml)
|
||||
set ( pamac-install_DEPENDENCIES ${pamac-install_DEPENDENCIES} pamac_installer_gresource_xml )
|
||||
set ( pamac-install_DEPENDENCIES ${pamac-install_DEPENDENCIES} Pamac )
|
||||
add_dependencies( pamac-install ${pamac-install_DEPENDENCIES} )
|
||||
|
||||
|
||||
install(TARGETS
|
||||
@@ -87,4 +89,3 @@ if(HAVE_VALADOC)
|
||||
${CMAKE_INSTALL_DATAROOTDIR}/doc/pamac
|
||||
)
|
||||
endif()
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/CMakeDepends.txt)
|
||||
|
35
src/pamac-install/meson.build
Normal file
35
src/pamac-install/meson.build
Normal file
@@ -0,0 +1,35 @@
|
||||
cfg_pamac_install = configuration_data()
|
||||
cfg_pamac_install.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir')))
|
||||
cfg_pamac_install.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
cfg_pamac_install.set('GETTEXT_PACKAGE', 'pamac')
|
||||
cfg_pamac_install.set('RELEASE_NAME', 'pamac')
|
||||
cfg_pamac_install.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_install.set('VERSION', '6.2.0')
|
||||
cfg_pamac_install.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_6 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_install)
|
||||
|
||||
pamac_install_deps = [gtk_3_0_dep]
|
||||
pamac_install_deps += [gio_2_0_dep]
|
||||
pamac_install_deps += [glib_2_0_dep]
|
||||
pamac_install_deps += [gobject_2_0_dep]
|
||||
pamac_install_sources = [cfgfile_6]
|
||||
pamac_install_sources += ['installer.vala']
|
||||
pamac_install_sources += ['progress_dialog.vala']
|
||||
pamac_install_sources += [pamac_installer_gresource_xml_file_c]
|
||||
pamac_install_vala_args = ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
|
||||
pamac_install_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.installer.gresource.xml')]
|
||||
pamac_install_dependencies = [Pamac_library]
|
||||
pamac_install_c_args = []
|
||||
if DISABLE_AUR
|
||||
pamac_install_vala_args += ['-D', 'DISABLE_AUR']
|
||||
pamac_install_c_args += ['-DDISABLE_AUR']
|
||||
endif
|
||||
if KDE_TRAY
|
||||
pamac_install_vala_args += ['-D', 'KDE_TRAY']
|
||||
pamac_install_c_args += ['-DKDE_TRAY']
|
||||
endif
|
||||
pamac_install_hfolders = ['../../src']
|
||||
|
||||
executable('pamac-install',pamac_install_sources,dependencies: pamac_install_deps,vala_args: pamac_install_vala_args,c_args: pamac_install_c_args,link_with: pamac_install_dependencies,include_directories: include_directories(pamac_install_hfolders),install: true)
|
||||
|
@@ -7,13 +7,13 @@ set (GETTEXT_PACKAGE "pamac")
|
||||
set (RELEASE_NAME "pamac")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.0.0")
|
||||
set (VERSION "6.2.0")
|
||||
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
|
||||
set (DOLLAR "$")
|
||||
|
||||
configure_file (${CMAKE_SOURCE_DIR}/src/pamac-manager/Config.vala.base ${CMAKE_BINARY_DIR}/src/pamac-manager/Config.vala)
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
|
||||
set (VERSION "6.0.0")
|
||||
set (VERSION "6.2.0")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lPamac )
|
||||
@@ -66,7 +66,9 @@ OPTIONS
|
||||
|
||||
SET (VALA_C ${VALA_C} ${pamac_manager_gresource_xml_C_FILE})
|
||||
add_executable(pamac-manager ${VALA_C})
|
||||
add_dependencies (pamac-manager pamac_manager_gresource_xml)
|
||||
set ( pamac-manager_DEPENDENCIES ${pamac-manager_DEPENDENCIES} pamac_manager_gresource_xml )
|
||||
set ( pamac-manager_DEPENDENCIES ${pamac-manager_DEPENDENCIES} Pamac )
|
||||
add_dependencies( pamac-manager ${pamac-manager_DEPENDENCIES} )
|
||||
|
||||
|
||||
install(TARGETS
|
||||
@@ -89,4 +91,3 @@ if(HAVE_VALADOC)
|
||||
${CMAKE_INSTALL_DATAROOTDIR}/doc/pamac
|
||||
)
|
||||
endif()
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/CMakeDepends.txt)
|
||||
|
44
src/pamac-manager/meson.build
Normal file
44
src/pamac-manager/meson.build
Normal file
@@ -0,0 +1,44 @@
|
||||
cfg_pamac_manager = configuration_data()
|
||||
cfg_pamac_manager.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir')))
|
||||
cfg_pamac_manager.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
cfg_pamac_manager.set('GETTEXT_PACKAGE', 'pamac')
|
||||
cfg_pamac_manager.set('RELEASE_NAME', 'pamac')
|
||||
cfg_pamac_manager.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_manager.set('VERSION', '6.2.0')
|
||||
cfg_pamac_manager.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_7 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_manager)
|
||||
|
||||
pamac_manager_deps = [gtk_3_0_dep]
|
||||
pamac_manager_deps += [gio_2_0_dep]
|
||||
pamac_manager_deps += [glib_2_0_dep]
|
||||
pamac_manager_deps += [gobject_2_0_dep]
|
||||
pamac_manager_sources = [cfgfile_7]
|
||||
pamac_manager_sources += ['history_dialog.vala']
|
||||
pamac_manager_sources += ['manager.vala']
|
||||
pamac_manager_sources += ['manager_window.vala']
|
||||
if DISABLE_AUR
|
||||
pamac_manager_sources += [pamac_manager_no_aur_gresource_xml_file_c]
|
||||
else
|
||||
pamac_manager_sources += [pamac_manager_gresource_xml_file_c]
|
||||
endif
|
||||
pamac_manager_vala_args = ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
|
||||
if DISABLE_AUR
|
||||
pamac_manager_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.manager_no_aur.gresource.xml')]
|
||||
else
|
||||
pamac_manager_vala_args += ['--gresources='+join_paths(meson.source_root(),'data/pamac.manager.gresource.xml')]
|
||||
endif
|
||||
pamac_manager_dependencies = [Pamac_library]
|
||||
pamac_manager_c_args = []
|
||||
if DISABLE_AUR
|
||||
pamac_manager_vala_args += ['-D', 'DISABLE_AUR']
|
||||
pamac_manager_c_args += ['-DDISABLE_AUR']
|
||||
endif
|
||||
if KDE_TRAY
|
||||
pamac_manager_vala_args += ['-D', 'KDE_TRAY']
|
||||
pamac_manager_c_args += ['-DKDE_TRAY']
|
||||
endif
|
||||
pamac_manager_hfolders = ['../../src']
|
||||
|
||||
executable('pamac-manager',pamac_manager_sources,dependencies: pamac_manager_deps,vala_args: pamac_manager_vala_args,c_args: pamac_manager_c_args,link_with: pamac_manager_dependencies,include_directories: include_directories(pamac_manager_hfolders),install: true)
|
||||
|
@@ -1 +0,0 @@
|
||||
add_dependencies(pamac-system-daemon AUR Pamac)
|
@@ -7,13 +7,13 @@ set (GETTEXT_PACKAGE "pamac")
|
||||
set (RELEASE_NAME "pamac")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.0.0")
|
||||
set (VERSION "6.2.0")
|
||||
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
|
||||
set (DOLLAR "$")
|
||||
|
||||
configure_file (${CMAKE_SOURCE_DIR}/src/pamac-system-daemon/Config.vala.base ${CMAKE_BINARY_DIR}/src/pamac-system-daemon/Config.vala)
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
|
||||
set (VERSION "6.0.0")
|
||||
set (VERSION "6.2.0")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src ${CMAKE_BINARY_DIR}/src/aur )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lPamac -lAUR )
|
||||
@@ -73,6 +73,11 @@ OPTIONS
|
||||
)
|
||||
|
||||
add_executable(pamac-system-daemon ${VALA_C})
|
||||
set ( pamac-system-daemon_DEPENDENCIES ${pamac-system-daemon_DEPENDENCIES} Pamac )
|
||||
if (NOT DISABLE_AUR)
|
||||
set ( pamac-system-daemon_DEPENDENCIES ${pamac-system-daemon_DEPENDENCIES} AUR )
|
||||
endif ()
|
||||
add_dependencies( pamac-system-daemon ${pamac-system-daemon_DEPENDENCIES} )
|
||||
|
||||
|
||||
install(TARGETS
|
||||
@@ -95,4 +100,3 @@ if(HAVE_VALADOC)
|
||||
${CMAKE_INSTALL_DATAROOTDIR}/doc/pamac
|
||||
)
|
||||
endif()
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/CMakeDepends.txt)
|
||||
|
45
src/pamac-system-daemon/meson.build
Normal file
45
src/pamac-system-daemon/meson.build
Normal file
@@ -0,0 +1,45 @@
|
||||
cfg_pamac_system_daemon = configuration_data()
|
||||
cfg_pamac_system_daemon.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir')))
|
||||
cfg_pamac_system_daemon.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
cfg_pamac_system_daemon.set('GETTEXT_PACKAGE', 'pamac')
|
||||
cfg_pamac_system_daemon.set('RELEASE_NAME', 'pamac')
|
||||
cfg_pamac_system_daemon.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_system_daemon.set('VERSION', '6.2.0')
|
||||
cfg_pamac_system_daemon.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_8 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_system_daemon)
|
||||
|
||||
pamac_system_daemon_deps = [gtk_3_0_dep]
|
||||
pamac_system_daemon_deps += [json_glib_1_0_dep]
|
||||
pamac_system_daemon_deps += [libalpm_dep]
|
||||
pamac_system_daemon_deps += [libcurl_dep]
|
||||
pamac_system_daemon_deps += [libsoup_2_4_dep]
|
||||
pamac_system_daemon_deps += [polkit_gobject_1_dep]
|
||||
pamac_system_daemon_deps += [gio_2_0_dep]
|
||||
pamac_system_daemon_deps += [glib_2_0_dep]
|
||||
pamac_system_daemon_deps += [gobject_2_0_dep]
|
||||
pamac_system_daemon_sources = [cfgfile_8]
|
||||
pamac_system_daemon_sources += ['alpm_config.vala']
|
||||
pamac_system_daemon_sources += ['mirrors_config.vala']
|
||||
pamac_system_daemon_sources += ['pamac_config.vala']
|
||||
pamac_system_daemon_sources += ['system_daemon.vala']
|
||||
pamac_system_daemon_vala_args = ['--pkg','posix']
|
||||
pamac_system_daemon_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
|
||||
pamac_system_daemon_dependencies = [Pamac_library]
|
||||
if not DISABLE_AUR
|
||||
pamac_system_daemon_dependencies += [AUR_library]
|
||||
endif
|
||||
pamac_system_daemon_c_args = []
|
||||
if DISABLE_AUR
|
||||
pamac_system_daemon_vala_args += ['-D', 'DISABLE_AUR']
|
||||
pamac_system_daemon_c_args += ['-DDISABLE_AUR']
|
||||
endif
|
||||
if KDE_TRAY
|
||||
pamac_system_daemon_vala_args += ['-D', 'KDE_TRAY']
|
||||
pamac_system_daemon_c_args += ['-DKDE_TRAY']
|
||||
endif
|
||||
pamac_system_daemon_hfolders = ['../../src']
|
||||
pamac_system_daemon_hfolders += ['../../src/aur']
|
||||
|
||||
executable('pamac-system-daemon',pamac_system_daemon_sources,dependencies: pamac_system_daemon_deps,vala_args: pamac_system_daemon_vala_args,c_args: pamac_system_daemon_c_args,link_with: pamac_system_daemon_dependencies,include_directories: include_directories(pamac_system_daemon_hfolders),install: true)
|
||||
|
@@ -1,285 +0,0 @@
|
||||
/*
|
||||
* pamac-vala
|
||||
*
|
||||
* Copyright (C) 2017 Chris Cromer <cromer@cromnix.org>
|
||||
* Copyright (C) 2014-2017 Guillaume Benoit <guillaume@manjaro.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a get of the GNU General Public License
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace Pamac {
|
||||
class Config {
|
||||
string conf_path;
|
||||
HashTable<string,string> _environment_variables;
|
||||
|
||||
public bool recurse { get; private set; }
|
||||
public uint64 refresh_period { get; private set; }
|
||||
public bool no_update_hide_icon { get; private set; }
|
||||
public bool enable_aur { get; private set; }
|
||||
public bool search_aur { get; private set; }
|
||||
public string aur_build_dir { get; private set; }
|
||||
public bool check_aur_updates { get; private set; }
|
||||
public unowned HashTable<string,string> environment_variables {
|
||||
get {
|
||||
return _environment_variables;
|
||||
}
|
||||
}
|
||||
|
||||
public Config (string path) {
|
||||
conf_path = path;
|
||||
//get environment variables
|
||||
_environment_variables = new HashTable<string,string> (str_hash, str_equal);
|
||||
var utsname = Posix.utsname();
|
||||
_environment_variables.insert ("HTTP_USER_AGENT", "pamac (%s %s)".printf (utsname.sysname, utsname.machine));
|
||||
unowned string? variable = Environment.get_variable ("http_proxy");
|
||||
if (variable != null) {
|
||||
_environment_variables.insert ("http_proxy", variable);
|
||||
}
|
||||
variable = Environment.get_variable ("https_proxy");
|
||||
if (variable != null) {
|
||||
_environment_variables.insert ("https_proxy", variable);
|
||||
}
|
||||
variable = Environment.get_variable ("ftp_proxy");
|
||||
if (variable != null) {
|
||||
_environment_variables.insert ("ftp_proxy", variable);
|
||||
}
|
||||
variable = Environment.get_variable ("socks_proxy");
|
||||
if (variable != null) {
|
||||
_environment_variables.insert ("socks_proxy", variable);
|
||||
}
|
||||
variable = Environment.get_variable ("no_proxy");
|
||||
if (variable != null) {
|
||||
_environment_variables.insert ("no_proxy", variable);
|
||||
}
|
||||
// set default option
|
||||
refresh_period = 6;
|
||||
reload ();
|
||||
}
|
||||
|
||||
public void reload () {
|
||||
// set default options
|
||||
recurse = false;
|
||||
no_update_hide_icon = false;
|
||||
enable_aur = false;
|
||||
search_aur = false;
|
||||
aur_build_dir = "/tmp";
|
||||
check_aur_updates = false;
|
||||
parse_file (conf_path);
|
||||
}
|
||||
|
||||
void parse_file (string path) {
|
||||
var file = GLib.File.new_for_path (path);
|
||||
if (file.query_exists ()) {
|
||||
try {
|
||||
// Open file for reading and wrap returned FileInputStream into a
|
||||
// DataInputStream, so we can read line by line
|
||||
var dis = new DataInputStream (file.read ());
|
||||
string? line;
|
||||
// Read lines until end of file (null) is reached
|
||||
while ((line = dis.read_line ()) != null) {
|
||||
if (line.length == 0) {
|
||||
continue;
|
||||
}
|
||||
// ignore whole line and end of line comments
|
||||
string[] splitted = line.split ("#", 2);
|
||||
line = splitted[0].strip ();
|
||||
if (line.length == 0) {
|
||||
continue;
|
||||
}
|
||||
splitted = line.split ("=", 2);
|
||||
unowned string key = splitted[0]._strip ();
|
||||
if (key == "RemoveUnrequiredDeps") {
|
||||
recurse = true;
|
||||
} else if (key == "RefreshPeriod") {
|
||||
if (splitted.length == 2) {
|
||||
unowned string val = splitted[1]._strip ();
|
||||
refresh_period = uint64.parse (val);
|
||||
}
|
||||
} else if (key == "NoUpdateHideIcon") {
|
||||
no_update_hide_icon = true;
|
||||
} else if (key == "EnableAUR") {
|
||||
enable_aur = true;
|
||||
} else if (key == "SearchInAURByDefault") {
|
||||
search_aur = true;
|
||||
} else if (key == "BuildDirectory") {
|
||||
if (splitted.length == 2) {
|
||||
aur_build_dir = splitted[1]._strip ();
|
||||
}
|
||||
} else if (key == "CheckAURUpdates") {
|
||||
check_aur_updates = true;
|
||||
}
|
||||
}
|
||||
} catch (GLib.Error e) {
|
||||
GLib.stderr.printf("%s\n", e.message);
|
||||
}
|
||||
} else {
|
||||
GLib.stderr.printf ("File '%s' doesn't exist.\n", path);
|
||||
}
|
||||
}
|
||||
|
||||
public void write (HashTable<string,Variant> new_conf) {
|
||||
var file = GLib.File.new_for_path (conf_path);
|
||||
var data = new GLib.List<string> ();
|
||||
if (file.query_exists ()) {
|
||||
try {
|
||||
// Open file for reading and wrap returned FileInputStream into a
|
||||
// DataInputStream, so we can read line by line
|
||||
var dis = new DataInputStream (file.read ());
|
||||
string? line;
|
||||
// Read lines until end of file (null) is reached
|
||||
while ((line = dis.read_line ()) != null) {
|
||||
if (line.length == 0) {
|
||||
data.append ("\n");
|
||||
continue;
|
||||
}
|
||||
unowned Variant variant;
|
||||
if (line.contains ("RemoveUnrequiredDeps")) {
|
||||
if (new_conf.lookup_extended ("RemoveUnrequiredDeps", null, out variant)) {
|
||||
if (variant.get_boolean ()) {
|
||||
data.append ("RemoveUnrequiredDeps\n");
|
||||
} else {
|
||||
data.append ("#RemoveUnrequiredDeps\n");
|
||||
}
|
||||
new_conf.remove ("RemoveUnrequiredDeps");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else if (line.contains ("RefreshPeriod")) {
|
||||
if (new_conf.lookup_extended ("RefreshPeriod", null, out variant)) {
|
||||
data.append ("RefreshPeriod = %llu\n".printf (variant.get_uint64 ()));
|
||||
new_conf.remove ("RefreshPeriod");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else if (line.contains ("NoUpdateHideIcon")) {
|
||||
if (new_conf.lookup_extended ("NoUpdateHideIcon", null, out variant)) {
|
||||
if (variant.get_boolean ()) {
|
||||
data.append ("NoUpdateHideIcon\n");
|
||||
} else {
|
||||
data.append ("#NoUpdateHideIcon\n");
|
||||
}
|
||||
new_conf.remove ("NoUpdateHideIcon");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else if (line.contains ("EnableAUR")) {
|
||||
if (new_conf.lookup_extended ("EnableAUR", null, out variant)) {
|
||||
if (variant.get_boolean ()) {
|
||||
data.append ("EnableAUR\n");
|
||||
} else {
|
||||
data.append ("#EnableAUR\n");
|
||||
}
|
||||
new_conf.remove ("EnableAUR");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else if (line.contains ("SearchInAURByDefault")) {
|
||||
if (new_conf.lookup_extended ("SearchInAURByDefault", null, out variant)) {
|
||||
if (variant.get_boolean ()) {
|
||||
data.append ("SearchInAURByDefault\n");
|
||||
} else {
|
||||
data.append ("#SearchInAURByDefault\n");
|
||||
}
|
||||
new_conf.remove ("SearchInAURByDefault");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else if (line.contains ("BuildDirectory")) {
|
||||
if (new_conf.lookup_extended ("BuildDirectory", null, out variant)) {
|
||||
data.append ("BuildDirectory = %s\n".printf (variant.get_string ()));
|
||||
new_conf.remove ("BuildDirectory");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else if (line.contains ("CheckAURUpdates")) {
|
||||
if (new_conf.lookup_extended ("CheckAURUpdates", null, out variant)) {
|
||||
if (variant.get_boolean ()) {
|
||||
data.append ("CheckAURUpdates\n");
|
||||
} else {
|
||||
data.append ("#CheckAURUpdates\n");
|
||||
}
|
||||
new_conf.remove ("CheckAURUpdates");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
}
|
||||
// delete the file before rewrite it
|
||||
file.delete ();
|
||||
} catch (GLib.Error e) {
|
||||
GLib.stderr.printf("%s\n", e.message);
|
||||
}
|
||||
} else {
|
||||
GLib.stderr.printf ("File '%s' doesn't exist.\n", conf_path);
|
||||
}
|
||||
// create lines for unexisted options
|
||||
if (new_conf.size () != 0) {
|
||||
data.append ("\n");
|
||||
var iter = HashTableIter<string,Variant> (new_conf);
|
||||
unowned string key;
|
||||
unowned Variant val;
|
||||
while (iter.next (out key, out val)) {
|
||||
if (key == "RemoveUnrequiredDeps") {
|
||||
if (val.get_boolean ()) {
|
||||
data.append ("RemoveUnrequiredDeps\n");
|
||||
} else {
|
||||
data.append ("#RemoveUnrequiredDeps\n");
|
||||
}
|
||||
} else if (key == "RefreshPeriod") {
|
||||
data.append ("RefreshPeriod = %llu\n".printf (val.get_uint64 ()));
|
||||
} else if (key =="NoUpdateHideIcon") {
|
||||
if (val.get_boolean ()) {
|
||||
data.append ("NoUpdateHideIcon\n");
|
||||
} else {
|
||||
data.append ("#NoUpdateHideIcon\n");
|
||||
}
|
||||
} else if (key == "EnableAUR") {
|
||||
if (val.get_boolean ()) {
|
||||
data.append ("EnableAUR\n");
|
||||
} else {
|
||||
data.append ("#EnableAUR\n");
|
||||
}
|
||||
} else if (key == "SearchInAURByDefault") {
|
||||
if (val.get_boolean ()) {
|
||||
data.append ("SearchInAURByDefault\n");
|
||||
} else {
|
||||
data.append ("#SearchInAURByDefault\n");
|
||||
}
|
||||
} else if (key == "BuildDirectory") {
|
||||
data.append ("BuildDirectory = %s\n".printf (val.get_string ()));
|
||||
} else if (key == "CheckAURUpdates") {
|
||||
if (val.get_boolean ()) {
|
||||
data.append ("CheckAURUpdates\n");
|
||||
} else {
|
||||
data.append ("#CheckAURUpdates\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// write the file
|
||||
try {
|
||||
// creating a DataOutputStream to the file
|
||||
var dos = new DataOutputStream (file.create (FileCreateFlags.REPLACE_DESTINATION));
|
||||
foreach (unowned string new_line in data) {
|
||||
// writing a short string to the stream
|
||||
dos.put_string (new_line);
|
||||
}
|
||||
} catch (GLib.Error e) {
|
||||
GLib.stderr.printf("%s\n", e.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
1
src/pamac-system-daemon/pamac_config.vala
Symbolic link
1
src/pamac-system-daemon/pamac_config.vala
Symbolic link
@@ -0,0 +1 @@
|
||||
../pamac_config.vala
|
@@ -427,12 +427,12 @@ namespace Pamac {
|
||||
});
|
||||
}
|
||||
|
||||
public void clean_cache (uint keep_nb, bool only_uninstalled, GLib.BusName sender) {
|
||||
public void clean_cache (uint64 keep_nb, bool only_uninstalled, GLib.BusName sender) {
|
||||
check_authorization.begin (sender, (obj, res) => {
|
||||
bool authorized = check_authorization.end (res);
|
||||
if (authorized) {
|
||||
string[] commands = {"paccache", "-rq"};
|
||||
commands += "-k%u".printf (keep_nb);
|
||||
string[] commands = {"paccache", "--nocolor", "-rq"};
|
||||
commands += "-k%llu".printf (keep_nb);
|
||||
if (only_uninstalled) {
|
||||
commands += "-u";
|
||||
}
|
||||
|
@@ -1 +0,0 @@
|
||||
add_dependencies(pamac-tray Pamac AUR)
|
@@ -7,13 +7,13 @@ set (GETTEXT_PACKAGE "pamac")
|
||||
set (RELEASE_NAME "pamac")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.0.0")
|
||||
set (VERSION "6.2.0")
|
||||
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
|
||||
set (DOLLAR "$")
|
||||
|
||||
configure_file (${CMAKE_SOURCE_DIR}/src/pamac-tray/Config.vala.base ${CMAKE_BINARY_DIR}/src/pamac-tray/Config.vala)
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
|
||||
set (VERSION "6.0.0")
|
||||
set (VERSION "6.2.0")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src ${CMAKE_BINARY_DIR}/src/aur )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lPamac -lAUR )
|
||||
@@ -78,6 +78,11 @@ OPTIONS
|
||||
)
|
||||
|
||||
add_executable(pamac-tray ${VALA_C})
|
||||
set ( pamac-tray_DEPENDENCIES ${pamac-tray_DEPENDENCIES} Pamac )
|
||||
if (NOT DISABLE_AUR)
|
||||
set ( pamac-tray_DEPENDENCIES ${pamac-tray_DEPENDENCIES} AUR )
|
||||
endif ()
|
||||
add_dependencies( pamac-tray ${pamac-tray_DEPENDENCIES} )
|
||||
|
||||
|
||||
install(TARGETS
|
||||
@@ -103,4 +108,3 @@ endif()
|
||||
if (KDE_TRAY)
|
||||
else ()
|
||||
endif ()
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/CMakeDepends.txt)
|
||||
|
50
src/pamac-tray/meson.build
Normal file
50
src/pamac-tray/meson.build
Normal file
@@ -0,0 +1,50 @@
|
||||
cfg_pamac_tray = configuration_data()
|
||||
cfg_pamac_tray.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir')))
|
||||
cfg_pamac_tray.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
cfg_pamac_tray.set('GETTEXT_PACKAGE', 'pamac')
|
||||
cfg_pamac_tray.set('RELEASE_NAME', 'pamac')
|
||||
cfg_pamac_tray.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_tray.set('VERSION', '6.2.0')
|
||||
cfg_pamac_tray.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_4 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_tray)
|
||||
|
||||
pamac_tray_deps = [json_glib_1_0_dep]
|
||||
pamac_tray_deps += [libnotify_dep]
|
||||
if KDE_TRAY
|
||||
pamac_tray_deps += [appindicator3_0_1_dep]
|
||||
else
|
||||
pamac_tray_deps += [gtk_3_0_dep]
|
||||
endif
|
||||
pamac_tray_deps += [gio_2_0_dep]
|
||||
pamac_tray_deps += [glib_2_0_dep]
|
||||
pamac_tray_deps += [gobject_2_0_dep]
|
||||
pamac_tray_sources = [cfgfile_4]
|
||||
if KDE_TRAY
|
||||
pamac_tray_sources += ['tray-appindicator.vala']
|
||||
else
|
||||
pamac_tray_sources += ['tray-gtk.vala']
|
||||
endif
|
||||
pamac_tray_sources += ['pamac_config.vala']
|
||||
pamac_tray_sources += ['tray.vala']
|
||||
pamac_tray_sources += ['user_daemon.vala']
|
||||
pamac_tray_vala_args = ['--pkg','posix']
|
||||
pamac_tray_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
|
||||
pamac_tray_dependencies = [Pamac_library]
|
||||
if not DISABLE_AUR
|
||||
pamac_tray_dependencies += [AUR_library]
|
||||
endif
|
||||
pamac_tray_c_args = []
|
||||
if DISABLE_AUR
|
||||
pamac_tray_vala_args += ['-D', 'DISABLE_AUR']
|
||||
pamac_tray_c_args += ['-DDISABLE_AUR']
|
||||
endif
|
||||
if KDE_TRAY
|
||||
pamac_tray_vala_args += ['-D', 'KDE_TRAY']
|
||||
pamac_tray_c_args += ['-DKDE_TRAY']
|
||||
endif
|
||||
pamac_tray_hfolders = ['../../src']
|
||||
pamac_tray_hfolders += ['../../src/aur']
|
||||
|
||||
executable('pamac-tray',pamac_tray_sources,dependencies: pamac_tray_deps,vala_args: pamac_tray_vala_args,c_args: pamac_tray_c_args,link_with: pamac_tray_dependencies,include_directories: include_directories(pamac_tray_hfolders),install: true)
|
||||
|
@@ -1 +0,0 @@
|
||||
add_dependencies(pamac-user-daemon Pamac AUR)
|
@@ -7,17 +7,17 @@ set (GETTEXT_PACKAGE "pamac")
|
||||
set (RELEASE_NAME "pamac")
|
||||
set (CMAKE_C_FLAGS "")
|
||||
set (PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
set (VERSION "6.0.0")
|
||||
set (VERSION "6.2.0")
|
||||
set (TESTSRCDIR "${CMAKE_SOURCE_DIR}")
|
||||
set (DOLLAR "$")
|
||||
|
||||
configure_file (${CMAKE_SOURCE_DIR}/src/pamac-user-daemon/Config.vala.base ${CMAKE_BINARY_DIR}/src/pamac-user-daemon/Config.vala)
|
||||
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
|
||||
set (VERSION "6.0.0")
|
||||
set (VERSION "6.2.0")
|
||||
add_definitions (${DEPS_CFLAGS})
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src/aur ${CMAKE_BINARY_DIR}/src )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lAUR -lPamac )
|
||||
link_directories ( ${DEPS_LIBRARY_DIRS} ${CMAKE_BINARY_DIR}/src/aur ${CMAKE_BINARY_DIR}/src )
|
||||
include_directories ( ${CMAKE_BINARY_DIR}/src ${CMAKE_BINARY_DIR}/src/aur )
|
||||
link_libraries ( ${DEPS_LIBRARIES} -lPamac -lAUR )
|
||||
link_directories ( ${DEPS_LIBRARY_DIRS} ${CMAKE_BINARY_DIR}/src ${CMAKE_BINARY_DIR}/src/aur )
|
||||
find_package (Vala REQUIRED)
|
||||
include (ValaVersion)
|
||||
ensure_vala_version ("0.38" MINIMUM)
|
||||
@@ -36,8 +36,10 @@ set (APP_SOURCES ${APP_SOURCES} ${CMAKE_CURRENT_BINARY_DIR}/Config.vala)
|
||||
set (APP_SOURCES ${APP_SOURCES} alpm_config.vala)
|
||||
set (APP_SOURCES ${APP_SOURCES} user_daemon.vala)
|
||||
|
||||
set (CUSTOM_VAPIS_LIST ${CUSTOM_VAPIS_LIST} ${CMAKE_BINARY_DIR}/src/aur/AUR.vapi)
|
||||
set (CUSTOM_VAPIS_LIST ${CUSTOM_VAPIS_LIST} ${CMAKE_BINARY_DIR}/src/Pamac.vapi)
|
||||
if (NOT DISABLE_AUR)
|
||||
set (CUSTOM_VAPIS_LIST ${CUSTOM_VAPIS_LIST} ${CMAKE_BINARY_DIR}/src/aur/AUR.vapi)
|
||||
endif ()
|
||||
|
||||
if (DISABLE_AUR)
|
||||
set (COMPILE_OPTIONS ${COMPILE_OPTIONS} -D DISABLE_AUR)
|
||||
@@ -67,6 +69,11 @@ OPTIONS
|
||||
)
|
||||
|
||||
add_executable(pamac-user-daemon ${VALA_C})
|
||||
set ( pamac-user-daemon_DEPENDENCIES ${pamac-user-daemon_DEPENDENCIES} Pamac )
|
||||
if (NOT DISABLE_AUR)
|
||||
set ( pamac-user-daemon_DEPENDENCIES ${pamac-user-daemon_DEPENDENCIES} AUR )
|
||||
endif ()
|
||||
add_dependencies( pamac-user-daemon ${pamac-user-daemon_DEPENDENCIES} )
|
||||
|
||||
|
||||
install(TARGETS
|
||||
@@ -89,4 +96,3 @@ if(HAVE_VALADOC)
|
||||
${CMAKE_INSTALL_DATAROOTDIR}/doc/pamac
|
||||
)
|
||||
endif()
|
||||
include(${CMAKE_CURRENT_SOURCE_DIR}/CMakeDepends.txt)
|
||||
|
41
src/pamac-user-daemon/meson.build
Normal file
41
src/pamac-user-daemon/meson.build
Normal file
@@ -0,0 +1,41 @@
|
||||
cfg_pamac_user_daemon = configuration_data()
|
||||
cfg_pamac_user_daemon.set('DATADIR', join_paths(get_option('prefix'),get_option('datadir')))
|
||||
cfg_pamac_user_daemon.set('PKGDATADIR', join_paths(get_option('prefix'),get_option('datadir'),'pamac'))
|
||||
cfg_pamac_user_daemon.set('GETTEXT_PACKAGE', 'pamac')
|
||||
cfg_pamac_user_daemon.set('RELEASE_NAME', 'pamac')
|
||||
cfg_pamac_user_daemon.set('PREFIX', get_option('prefix'))
|
||||
cfg_pamac_user_daemon.set('VERSION', '6.2.0')
|
||||
cfg_pamac_user_daemon.set('TESTSRCDIR', meson.source_root())
|
||||
|
||||
cfgfile_3 = configure_file(input: 'Config.vala.base',output: 'Config.vala',configuration: cfg_pamac_user_daemon)
|
||||
|
||||
pamac_user_daemon_deps = [gtk_3_0_dep]
|
||||
pamac_user_daemon_deps += [json_glib_1_0_dep]
|
||||
pamac_user_daemon_deps += [libalpm_dep]
|
||||
pamac_user_daemon_deps += [libsoup_2_4_dep]
|
||||
pamac_user_daemon_deps += [gio_2_0_dep]
|
||||
pamac_user_daemon_deps += [glib_2_0_dep]
|
||||
pamac_user_daemon_deps += [gobject_2_0_dep]
|
||||
pamac_user_daemon_sources = [cfgfile_3]
|
||||
pamac_user_daemon_sources += ['alpm_config.vala']
|
||||
pamac_user_daemon_sources += ['user_daemon.vala']
|
||||
pamac_user_daemon_vala_args = ['--pkg','posix']
|
||||
pamac_user_daemon_vala_args += ['--vapidir='+join_paths(meson.source_root(),'src/vapis')]
|
||||
pamac_user_daemon_dependencies = [Pamac_library]
|
||||
if not DISABLE_AUR
|
||||
pamac_user_daemon_dependencies += [AUR_library]
|
||||
endif
|
||||
pamac_user_daemon_c_args = []
|
||||
if DISABLE_AUR
|
||||
pamac_user_daemon_vala_args += ['-D', 'DISABLE_AUR']
|
||||
pamac_user_daemon_c_args += ['-DDISABLE_AUR']
|
||||
endif
|
||||
if KDE_TRAY
|
||||
pamac_user_daemon_vala_args += ['-D', 'KDE_TRAY']
|
||||
pamac_user_daemon_c_args += ['-DKDE_TRAY']
|
||||
endif
|
||||
pamac_user_daemon_hfolders = ['../../src']
|
||||
pamac_user_daemon_hfolders += ['../../src/aur']
|
||||
|
||||
executable('pamac-user-daemon',pamac_user_daemon_sources,dependencies: pamac_user_daemon_deps,vala_args: pamac_user_daemon_vala_args,c_args: pamac_user_daemon_c_args,link_with: pamac_user_daemon_dependencies,include_directories: include_directories(pamac_user_daemon_hfolders),install: true)
|
||||
|
@@ -33,6 +33,10 @@ namespace Pamac {
|
||||
public string aur_build_dir { get; private set; }
|
||||
public bool check_aur_updates { get; private set; }
|
||||
#endif
|
||||
public uint64 keep_num_pkgs { get; private set; }
|
||||
public bool rm_only_uninstalled { get; private set; }
|
||||
public string terminal_background { get; private set; }
|
||||
public string terminal_foreground { get; private set; }
|
||||
public unowned HashTable<string,string> environment_variables {
|
||||
get {
|
||||
return _environment_variables;
|
||||
@@ -81,6 +85,10 @@ namespace Pamac {
|
||||
aur_build_dir = "/tmp";
|
||||
check_aur_updates = false;
|
||||
#endif
|
||||
keep_num_pkgs = 3;
|
||||
rm_only_uninstalled = false;
|
||||
terminal_background = "rgb(0,0,0)";
|
||||
terminal_foreground = "rgb(255,255,255)";
|
||||
parse_file (conf_path);
|
||||
}
|
||||
|
||||
@@ -127,6 +135,21 @@ namespace Pamac {
|
||||
} else if (key == "CheckAURUpdates") {
|
||||
check_aur_updates = true;
|
||||
#endif
|
||||
} else if (key == "KeepNumPackages") {
|
||||
if (splitted.length == 2) {
|
||||
unowned string val = splitted[1]._strip ();
|
||||
keep_num_pkgs = uint64.parse (val);
|
||||
}
|
||||
} else if (key == "OnlyRmUninstalled") {
|
||||
rm_only_uninstalled = true;
|
||||
} else if (key == "BackgroundColor") {
|
||||
if (splitted.length == 2) {
|
||||
terminal_background = splitted[1]._strip ();
|
||||
}
|
||||
} else if (key == "ForegroundColor") {
|
||||
if (splitted.length == 2) {
|
||||
terminal_foreground = splitted[1]._strip ();
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (GLib.Error e) {
|
||||
@@ -136,5 +159,208 @@ namespace Pamac {
|
||||
GLib.stderr.printf ("File '%s' doesn't exist.\n", path);
|
||||
}
|
||||
}
|
||||
public void write (HashTable<string,Variant> new_conf) {
|
||||
var file = GLib.File.new_for_path (conf_path);
|
||||
var data = new GLib.List<string> ();
|
||||
if (file.query_exists ()) {
|
||||
try {
|
||||
// Open file for reading and wrap returned FileInputStream into a
|
||||
// DataInputStream, so we can read line by line
|
||||
var dis = new DataInputStream (file.read ());
|
||||
string? line;
|
||||
// Read lines until end of file (null) is reached
|
||||
while ((line = dis.read_line ()) != null) {
|
||||
if (line.length == 0) {
|
||||
data.append ("\n");
|
||||
continue;
|
||||
}
|
||||
unowned Variant variant;
|
||||
if (line.contains ("RemoveUnrequiredDeps")) {
|
||||
if (new_conf.lookup_extended ("RemoveUnrequiredDeps", null, out variant)) {
|
||||
if (variant.get_boolean ()) {
|
||||
data.append ("RemoveUnrequiredDeps\n");
|
||||
} else {
|
||||
data.append ("#RemoveUnrequiredDeps\n");
|
||||
}
|
||||
new_conf.remove ("RemoveUnrequiredDeps");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else if (line.contains ("RefreshPeriod")) {
|
||||
if (new_conf.lookup_extended ("RefreshPeriod", null, out variant)) {
|
||||
data.append ("RefreshPeriod = %llu\n".printf (variant.get_uint64 ()));
|
||||
new_conf.remove ("RefreshPeriod");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else if (line.contains ("NoUpdateHideIcon")) {
|
||||
if (new_conf.lookup_extended ("NoUpdateHideIcon", null, out variant)) {
|
||||
if (variant.get_boolean ()) {
|
||||
data.append ("NoUpdateHideIcon\n");
|
||||
} else {
|
||||
data.append ("#NoUpdateHideIcon\n");
|
||||
}
|
||||
new_conf.remove ("NoUpdateHideIcon");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
#if DISABLE_AUR
|
||||
#else
|
||||
} else if (line.contains ("EnableAUR")) {
|
||||
if (new_conf.lookup_extended ("EnableAUR", null, out variant)) {
|
||||
if (variant.get_boolean ()) {
|
||||
data.append ("EnableAUR\n");
|
||||
} else {
|
||||
data.append ("#EnableAUR\n");
|
||||
}
|
||||
new_conf.remove ("EnableAUR");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else if (line.contains ("SearchInAURByDefault")) {
|
||||
if (new_conf.lookup_extended ("SearchInAURByDefault", null, out variant)) {
|
||||
if (variant.get_boolean ()) {
|
||||
data.append ("SearchInAURByDefault\n");
|
||||
} else {
|
||||
data.append ("#SearchInAURByDefault\n");
|
||||
}
|
||||
new_conf.remove ("SearchInAURByDefault");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else if (line.contains ("BuildDirectory")) {
|
||||
if (new_conf.lookup_extended ("BuildDirectory", null, out variant)) {
|
||||
data.append ("BuildDirectory = %s\n".printf (variant.get_string ()));
|
||||
new_conf.remove ("BuildDirectory");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else if (line.contains ("CheckAURUpdates")) {
|
||||
if (new_conf.lookup_extended ("CheckAURUpdates", null, out variant)) {
|
||||
if (variant.get_boolean ()) {
|
||||
data.append ("CheckAURUpdates\n");
|
||||
} else {
|
||||
data.append ("#CheckAURUpdates\n");
|
||||
}
|
||||
new_conf.remove ("CheckAURUpdates");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
#endif
|
||||
} else if (line.contains ("KeepNumPackages")) {
|
||||
if (new_conf.lookup_extended ("KeepNumPackages", null, out variant)) {
|
||||
data.append ("KeepNumPackages = %llu\n".printf (variant.get_uint64 ()));
|
||||
new_conf.remove ("KeepNumPackages");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else if (line.contains ("OnlyRmUninstalled")) {
|
||||
if (new_conf.lookup_extended ("OnlyRmUninstalled", null, out variant)) {
|
||||
if (variant.get_boolean ()) {
|
||||
data.append ("OnlyRmUninstalled\n");
|
||||
} else {
|
||||
data.append ("#OnlyRmUninstalled\n");
|
||||
}
|
||||
new_conf.remove ("OnlyRmUninstalled");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else if (line.contains ("BackgroundColor")) {
|
||||
if (new_conf.lookup_extended ("BackgroundColor", null, out variant)) {
|
||||
data.append ("BackgroundColor = %s\n".printf (variant.get_string ()));
|
||||
new_conf.remove ("BackgroundColor");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else if (line.contains ("ForegroundColor")) {
|
||||
if (new_conf.lookup_extended ("ForegroundColor", null, out variant)) {
|
||||
data.append ("ForegroundColor = %s\n".printf (variant.get_string ()));
|
||||
new_conf.remove ("ForegroundColor");
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
} else {
|
||||
data.append (line + "\n");
|
||||
}
|
||||
}
|
||||
// delete the file before rewrite it
|
||||
file.delete ();
|
||||
} catch (GLib.Error e) {
|
||||
GLib.stderr.printf("%s\n", e.message);
|
||||
}
|
||||
} else {
|
||||
GLib.stderr.printf ("File '%s' doesn't exist.\n", conf_path);
|
||||
}
|
||||
// create lines for unexisted options
|
||||
if (new_conf.size () != 0) {
|
||||
data.append ("\n");
|
||||
var iter = HashTableIter<string,Variant> (new_conf);
|
||||
unowned string key;
|
||||
unowned Variant val;
|
||||
while (iter.next (out key, out val)) {
|
||||
if (key == "RemoveUnrequiredDeps") {
|
||||
if (val.get_boolean ()) {
|
||||
data.append ("RemoveUnrequiredDeps\n");
|
||||
} else {
|
||||
data.append ("#RemoveUnrequiredDeps\n");
|
||||
}
|
||||
} else if (key == "RefreshPeriod") {
|
||||
data.append ("RefreshPeriod = %llu\n".printf (val.get_uint64 ()));
|
||||
} else if (key =="NoUpdateHideIcon") {
|
||||
if (val.get_boolean ()) {
|
||||
data.append ("NoUpdateHideIcon\n");
|
||||
} else {
|
||||
data.append ("#NoUpdateHideIcon\n");
|
||||
}
|
||||
#if DISABLE_AUR
|
||||
#else
|
||||
} else if (key == "EnableAUR") {
|
||||
if (val.get_boolean ()) {
|
||||
data.append ("EnableAUR\n");
|
||||
} else {
|
||||
data.append ("#EnableAUR\n");
|
||||
}
|
||||
} else if (key == "SearchInAURByDefault") {
|
||||
if (val.get_boolean ()) {
|
||||
data.append ("SearchInAURByDefault\n");
|
||||
} else {
|
||||
data.append ("#SearchInAURByDefault\n");
|
||||
}
|
||||
} else if (key == "BuildDirectory") {
|
||||
data.append ("BuildDirectory = %s\n".printf (val.get_string ()));
|
||||
} else if (key == "CheckAURUpdates") {
|
||||
if (val.get_boolean ()) {
|
||||
data.append ("CheckAURUpdates\n");
|
||||
} else {
|
||||
data.append ("#CheckAURUpdates\n");
|
||||
}
|
||||
#endif
|
||||
} else if (key == "KeepNumPackages") {
|
||||
data.append ("KeepNumPackages = %llu\n".printf (val.get_uint64 ()));
|
||||
} else if (key == "OnlyRmUninstalled") {
|
||||
if (val.get_boolean ()) {
|
||||
data.append ("OnlyRmUninstalled\n");
|
||||
} else {
|
||||
data.append ("#OnlyRmUninstalled\n");
|
||||
}
|
||||
} else if (key == "BackgroundColor") {
|
||||
data.append ("BackgroundColor = %s\n".printf (val.get_string ()));
|
||||
} else if (key == "ForegroundColor") {
|
||||
data.append ("ForegroundCOlor = %s\n".printf (val.get_string ()));
|
||||
}
|
||||
}
|
||||
}
|
||||
// write the file
|
||||
try {
|
||||
// creating a DataOutputStream to the file
|
||||
var dos = new DataOutputStream (file.create (FileCreateFlags.REPLACE_DESTINATION));
|
||||
foreach (unowned string new_line in data) {
|
||||
// writing a short string to the stream
|
||||
dos.put_string (new_line);
|
||||
}
|
||||
} catch (GLib.Error e) {
|
||||
GLib.stderr.printf("%s\n", e.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -70,6 +70,10 @@ namespace Pamac {
|
||||
Gtk.SpinButton cache_keep_nb_spin_button;
|
||||
[GtkChild]
|
||||
Gtk.CheckButton cache_only_uninstalled_checkbutton;
|
||||
[GtkChild]
|
||||
Gtk.ColorButton terminal_background;
|
||||
[GtkChild]
|
||||
Gtk.ColorButton terminal_foreground;
|
||||
|
||||
Gtk.ListStore ignorepkgs_liststore;
|
||||
Transaction transaction;
|
||||
@@ -103,6 +107,18 @@ namespace Pamac {
|
||||
previous_refresh_period = transaction.refresh_period;
|
||||
}
|
||||
no_update_hide_icon_checkbutton.active = transaction.no_update_hide_icon;
|
||||
cache_keep_nb_spin_button.value = transaction.keep_num_pkgs;
|
||||
cache_only_uninstalled_checkbutton.active = transaction.rm_only_uninstalled;
|
||||
|
||||
// Set up terminal colors
|
||||
terminal_background.set_use_alpha (false);
|
||||
terminal_foreground.set_use_alpha (false);
|
||||
Gdk.RGBA rgba = Gdk.RGBA ();
|
||||
bool tmp = rgba.parse (transaction.terminal_background);
|
||||
terminal_background.rgba = rgba;
|
||||
tmp = rgba.parse (transaction.terminal_foreground);
|
||||
terminal_foreground.rgba = rgba;
|
||||
stdout.printf(transaction.terminal_background);
|
||||
|
||||
// populate ignorepkgs_liststore
|
||||
ignorepkgs_liststore = new Gtk.ListStore (1, typeof (string));
|
||||
@@ -116,7 +132,11 @@ namespace Pamac {
|
||||
check_updates_button.state_set.connect (on_check_updates_button_state_set);
|
||||
refresh_period_spin_button.value_changed.connect (on_refresh_period_spin_button_value_changed);
|
||||
no_update_hide_icon_checkbutton.toggled.connect (on_no_update_hide_icon_checkbutton_toggled);
|
||||
cache_keep_nb_spin_button.value_changed.connect (on_cache_keep_nb_spin_button_value_changed);
|
||||
cache_only_uninstalled_checkbutton.toggled.connect (on_cache_only_uninstalled_checkbutton_toggled);
|
||||
transaction.write_pamac_config_finished.connect (on_write_pamac_config_finished);
|
||||
terminal_background.color_set.connect (on_select_background);
|
||||
terminal_foreground.color_set.connect (on_select_foreground);
|
||||
|
||||
AlpmPackage pkg = transaction.find_installed_satisfier ("pacman-mirrors");
|
||||
if (pkg.name == "") {
|
||||
@@ -197,12 +217,37 @@ namespace Pamac {
|
||||
transaction.start_write_pamac_config (new_pamac_conf);
|
||||
}
|
||||
|
||||
|
||||
void on_cache_keep_nb_spin_button_value_changed () {
|
||||
var new_pamac_conf = new HashTable<string,Variant> (str_hash, str_equal);
|
||||
new_pamac_conf.insert ("KeepNumPackages", new Variant.uint64 (cache_keep_nb_spin_button.get_value_as_int ()));
|
||||
transaction.start_write_pamac_config (new_pamac_conf);
|
||||
}
|
||||
|
||||
void on_cache_only_uninstalled_checkbutton_toggled () {
|
||||
var new_pamac_conf = new HashTable<string,Variant> (str_hash, str_equal);
|
||||
new_pamac_conf.insert ("OnlyRmUninstalled", new Variant.boolean (cache_only_uninstalled_checkbutton.active));
|
||||
transaction.start_write_pamac_config (new_pamac_conf);
|
||||
}
|
||||
|
||||
void on_no_update_hide_icon_checkbutton_toggled () {
|
||||
var new_pamac_conf = new HashTable<string,Variant> (str_hash, str_equal);
|
||||
new_pamac_conf.insert ("NoUpdateHideIcon", new Variant.boolean (no_update_hide_icon_checkbutton.active));
|
||||
transaction.start_write_pamac_config (new_pamac_conf);
|
||||
}
|
||||
|
||||
void on_select_background () {
|
||||
var new_pamac_conf = new HashTable<string,Variant> (str_hash, str_equal);
|
||||
new_pamac_conf.insert ("BackgroundColor", new Variant.string (terminal_background.rgba.to_string ()));
|
||||
transaction.start_write_pamac_config (new_pamac_conf);
|
||||
}
|
||||
|
||||
void on_select_foreground () {
|
||||
var new_pamac_conf = new HashTable<string,Variant> (str_hash, str_equal);
|
||||
new_pamac_conf.insert ("ForegroundColor", new Variant.string (terminal_foreground.rgba.to_string ()));
|
||||
transaction.start_write_pamac_config (new_pamac_conf);
|
||||
}
|
||||
|
||||
#if DISABLE_AUR
|
||||
#else
|
||||
bool on_enable_aur_button_state_set (bool new_state) {
|
||||
@@ -399,8 +444,7 @@ namespace Pamac {
|
||||
|
||||
[GtkCallback]
|
||||
void on_cache_clean_button_clicked () {
|
||||
transaction.clean_cache ((uint) cache_keep_nb_spin_button.get_value_as_int (),
|
||||
cache_only_uninstalled_checkbutton.active);
|
||||
transaction.clean_cache (transaction.keep_num_pkgs, transaction.rm_only_uninstalled);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -18,6 +18,8 @@
|
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
//using Math
|
||||
|
||||
namespace Pamac {
|
||||
[DBus (name = "org.pamac.user")]
|
||||
interface UserDaemon : Object {
|
||||
@@ -72,7 +74,7 @@ namespace Pamac {
|
||||
public abstract void start_write_alpm_config (HashTable<string,Variant> new_alpm_conf) throws IOError;
|
||||
public abstract void start_write_mirrors_config (HashTable<string,Variant> new_mirrors_conf) throws IOError;
|
||||
public abstract void start_generate_mirrors_list () throws IOError;
|
||||
public abstract void clean_cache (uint keep_nb, bool only_uninstalled) throws IOError;
|
||||
public abstract void clean_cache (uint64 keep_nb, bool only_uninstalled) throws IOError;
|
||||
public abstract void start_set_pkgreason (string pkgname, uint reason) throws IOError;
|
||||
public abstract void start_refresh (bool force) throws IOError;
|
||||
public abstract void start_sysupgrade_prepare (bool enable_downgrade, string[] temporary_ignorepkgs) throws IOError;
|
||||
@@ -142,6 +144,10 @@ namespace Pamac {
|
||||
public bool search_aur { get { return pamac_config.search_aur; } }
|
||||
public string aur_build_dir { get { return pamac_config.aur_build_dir; } }
|
||||
#endif
|
||||
public uint64 keep_num_pkgs { get { return pamac_config.keep_num_pkgs; } }
|
||||
public bool rm_only_uninstalled { get { return pamac_config.rm_only_uninstalled; } }
|
||||
public string terminal_background { get { return pamac_config.terminal_background; } }
|
||||
public string terminal_foreground { get { return pamac_config.terminal_foreground; } }
|
||||
public unowned GLib.HashTable<string,string> environment_variables { get {return pamac_config.environment_variables; } }
|
||||
public bool no_update_hide_icon { get { return pamac_config.no_update_hide_icon; } }
|
||||
public bool recurse { get { return pamac_config.recurse; } }
|
||||
@@ -258,9 +264,19 @@ namespace Pamac {
|
||||
term.set_scrollback_lines (-1);
|
||||
term.expand = true;
|
||||
term.visible = true;
|
||||
var black = Gdk.RGBA ();
|
||||
/*var black = Gdk.RGBA ();
|
||||
black.parse ("black");
|
||||
var green = Gdk.RGBA ();
|
||||
green.parse ("green");
|
||||
term.set_color_cursor (black);
|
||||
term.set_color_foreground (green);
|
||||
term.set_color_background (black);*/
|
||||
var tmp = Gdk.RGBA ();
|
||||
tmp.parse (terminal_background);
|
||||
term.set_color_cursor (tmp);
|
||||
term.set_color_background (tmp);
|
||||
tmp.parse (terminal_foreground);
|
||||
term.set_color_foreground (tmp);
|
||||
term.button_press_event.connect (on_term_button_press_event);
|
||||
term.key_press_event.connect (on_term_key_press_event);
|
||||
// creating pty for term
|
||||
@@ -503,7 +519,7 @@ namespace Pamac {
|
||||
}
|
||||
}
|
||||
|
||||
public void clean_cache (uint keep_nb, bool only_uninstalled) {
|
||||
public void clean_cache (uint64 keep_nb, bool only_uninstalled) {
|
||||
try {
|
||||
system_daemon.clean_cache (keep_nb, only_uninstalled);
|
||||
} catch (IOError e) {
|
||||
|
Reference in New Issue
Block a user