Commit fb1c252d authored by akiraohgaki's avatar akiraohgaki

Merge branch 'develop'

parents 81788e86 713aab05
Pipeline #40 failed with stage
......@@ -35,7 +35,6 @@ clean:
install:
$(INSTALL_PROGRAM) $(srcdir)/launcher/$(TARGET) $(DESTDIR)$(bindir)/$(TARGET)
$(INSTALL_PROGRAM) $(srcdir)/launcher/$(TARGET)-appimage $(DESTDIR)$(bindir)/$(TARGET)-appimage
$(MKDIR) $(DESTDIR)$(libdir)
$(CP) $(srcdir)/dist/$(TARGET)-linux-x64 $(DESTDIR)$(libdir)
$(INSTALL_DATA) $(srcdir)/desktop/$(TARGET).desktop $(DESTDIR)$(datadir)/applications/$(TARGET).desktop
......@@ -43,7 +42,6 @@ install:
uninstall:
$(RM) $(DESTDIR)$(bindir)/$(TARGET)
$(RM) $(DESTDIR)$(bindir)/$(TARGET)-appimage
$(RM) $(DESTDIR)$(libdir)/$(TARGET)-linux-x64
$(RM) $(DESTDIR)$(datadir)/applications/$(TARGET).desktop
$(RM) $(DESTDIR)$(datadir)/icons/hicolor/scalable/apps/$(TARGET).svg
......@@ -57,8 +55,7 @@ $(TARGET)-linux-x64: ocs-manager
ocs-manager:
$(MKDIR) $(build_tmpdir)
#git clone https://www.opencode.net/OCS/ocs-manager.git -b release-0.6.5 --single-branch --depth=1 $(build_tmpdir)/ocs-manager
git clone https://github.com/opendesktop/ocs-manager.git -b release-0.6.5 --single-branch --depth=1 $(build_tmpdir)/ocs-manager
git clone https://gitlab.opencode.net/OCS/ocs-manager.git -b release-0.6.5 --single-branch --depth=1 $(build_tmpdir)/ocs-manager
cd $(build_tmpdir)/ocs-manager ; \
./scripts/package build_appimage
$(INSTALL_PROGRAM) `find "$(build_tmpdir)/ocs-manager" -type f -name "ocs-manager*-x86_64.AppImage"` $(srcdir)/bin/ocs-manager
......@@ -352,55 +352,6 @@ import Root from '../components/Root.js';
statusManager.registerAction('remove-file', (resolve, reject, params) => {
sendWebSocketMessage(params.itemKey, 'ItemHandler::uninstall', [params.itemKey]);
});
statusManager.registerAction('check-self-update', (resolve, reject) => {
console.log('Checking for self update');
fetch(packageMeta._releaseMeta)
.then((response) => {
if (response.ok) {
return response.json();
}
return Promise.reject(new Error('Network response was not ok'));
})
.then((data) => {
if (data.versioncode > packageMeta._versioncode) {
console.log('Found newer version');
if (process.env.APPIMAGE === path.join(remote.app.getPath('home'), '.local', 'bin', 'ocs-store.AppImage')) {
for (const releasefile of data.releasefiles) {
if (releasefile.url.endsWith('x86_64.AppImage')) {
const dirPath = path.join(remote.app.getPath('home'), '.cache', 'ocs-store');
const filePath = path.join(dirPath, 'ocs-store.AppImage');
if (!isDirectory(dirPath)) {
fs.mkdirSync(dirPath);
}
request.get(releasefile.url)
.on('error', (error) => {
console.error(error);
})
.pipe(fs.createWriteStream(filePath));
break;
}
}
}
//else {
// resolve(data);
//}
}
})
.catch((error) => {
reject(error);
});
});
//statusManager.registerView('check-self-update', (state) => {
//});
statusManager.dispatch('check-self-update');
}
function setupWebView() {
......
#!/bin/bash
PREFIX="$(cd "$(dirname "${0}")" && pwd)/"
if [[ "${APPIMAGE}" ]]; then
if [[ "${1}" = '--install' ]]; then
mkdir -p ${HOME}/.local/share/applications
mkdir -p ${HOME}/.local/bin
sed -e "s|Exec=ocs-store|Exec=${HOME}/.local/bin/ocs-store|" \
-e "s|Icon=ocs-store|Icon=${HOME}/.local/share/applications/ocs-store.svg|" \
${PREFIX}ocs-store.desktop > ${HOME}/.local/share/applications/ocs-store.desktop
chmod 644 ${HOME}/.local/share/applications/ocs-store.desktop
install -D -m 644 ${PREFIX}ocs-store.svg ${HOME}/.local/share/applications/ocs-store.svg
update-desktop-database ${HOME}/.local/share/applications
ln -sf ocs-store-appimage ${HOME}/.local/bin/ocs-store
install -D -m 755 ${PREFIX}ocs-store-appimage ${HOME}/.local/bin/ocs-store-appimage
install -D -m 755 "${APPIMAGE}" ${HOME}/.local/bin/ocs-store.AppImage
rm "${APPIMAGE}"
exit 0
elif [[ "${1}" = '--uninstall' ]]; then
rm ${HOME}/.local/share/applications/ocs-store.desktop
rm ${HOME}/.local/share/applications/ocs-store.svg
update-desktop-database ${HOME}/.local/share/applications
unlink ${HOME}/.local/bin/ocs-store
rm ${HOME}/.local/bin/ocs-store-appimage
rm ${HOME}/.local/bin/ocs-store.AppImage
exit 0
fi
fi
if [[ -f "${PREFIX}ocs-store-linux-x64/ocs-store" ]]; then
${PREFIX}ocs-store-linux-x64/ocs-store
elif [[ -f "${PREFIX}../lib/ocs-store-linux-x64/ocs-store" ]]; then
${PREFIX}../lib/ocs-store-linux-x64/ocs-store
elif [[ -f "${PREFIX}usr/local/lib/ocs-store-linux-x64/ocs-store" ]]; then
${PREFIX}usr/local/lib/ocs-store-linux-x64/ocs-store
elif [[ -f "${PREFIX}usr/lib/ocs-store-linux-x64/ocs-store" ]]; then
${PREFIX}usr/lib/ocs-store-linux-x64/ocs-store
PREFIX="$(cd "$(dirname "${0}")" && pwd)"
if [[ -f "${PREFIX}/ocs-store-linux-x64/ocs-store" ]]; then
${PREFIX}/ocs-store-linux-x64/ocs-store
elif [[ -f "${PREFIX}/../lib/ocs-store-linux-x64/ocs-store" ]]; then
${PREFIX}/../lib/ocs-store-linux-x64/ocs-store
elif [[ -f "${PREFIX}/usr/local/lib/ocs-store-linux-x64/ocs-store" ]]; then
${PREFIX}/usr/local/lib/ocs-store-linux-x64/ocs-store
elif [[ -f "${PREFIX}/usr/lib/ocs-store-linux-x64/ocs-store" ]]; then
${PREFIX}/usr/lib/ocs-store-linux-x64/ocs-store
else
exit 1
fi
#!/bin/bash
if [[ -f "${HOME}/.cache/ocs-store/ocs-store.AppImage" ]]; then
chmod 755 ${HOME}/.cache/ocs-store/ocs-store.AppImage
${HOME}/.cache/ocs-store/ocs-store.AppImage --install
fi
if [[ -f "${HOME}/.local/bin/ocs-store.AppImage" ]]; then
${HOME}/.local/bin/ocs-store.AppImage
fi
......@@ -2,8 +2,6 @@
"name": "ocs-store",
"productName": "OCS-Store",
"version": "3.3.1",
"_versioncode": 20,
"_releaseMeta": "https://www.opencode.net/OCS/ocs-store/raw/branch/master/release.json",
"description": "Store Frontend and Management Application based on OpenCollaborationServices (OCS) of Opendesktop.org.",
"keywords": [
"Opendesktop",
......@@ -13,12 +11,12 @@
"author": "Opendesktop.org",
"license": "GPL-3.0",
"homepage": "https://www.opendesktop.org/",
"repository": "https://www.opencode.net/OCS/ocs-store",
"repository": "https://gitlab.opencode.net/OCS/ocs-store",
"main": "app/main.js",
"scripts": {
"start": "electron .",
"debug": "electron . --debug",
"package": "electron-packager . ocs-store --platform=linux --arch=x64 --out=dist --overwrite --ignore='^/(\\.gitignore|\\.gitlab\\-ci\\.yml|\\.travis\\.yml|Makefile|README\\.md|release\\.json|desktop|launcher|pkg|scripts|appimagebuild|appimagetool|squashfs\\-root|build_.+)($|/)'"
"package": "electron-packager . ocs-store --platform=linux --arch=x64 --out=dist --overwrite --ignore='^/(\\.gitignore|\\.gitlab\\-ci\\.yml|\\.travis\\.yml|Makefile|README\\.md|desktop|launcher|pkg|scripts|appimagebuild|appimagetool|squashfs\\-root|build_.+)($|/)'"
},
"dependencies": {
"electron-store": "2.0.0",
......
......@@ -4,6 +4,8 @@ PKGNAME='ocs-store'
PKGVER='3.3.1'
PKGREL='1'
UPDINFO='zsync|http://dl.opendesktop.org/api/files/download/id/1532435039/as/latest/ocs-store-x86_64.AppImage.zsync'
curl -fsSL -o appimagetool https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage
chmod 755 appimagetool
./appimagetool --appimage-extract
......@@ -17,10 +19,9 @@ install -D -m 755 /usr/lib/x86_64-linux-gnu/gtk-2.0/modules/libcanberra-gtk-modu
install -D -m 755 /usr/lib/x86_64-linux-gnu/libgnome-keyring.so.0 ${PKGNAME}.AppDir/usr/lib/ocs-store-linux-x64/libgnome-keyring.so.0
install -D -m 755 ${PKGNAME}.AppDir/usr/bin/${PKGNAME} ${PKGNAME}.AppDir/AppRun
install -D -m 755 ${PKGNAME}.AppDir/usr/bin/${PKGNAME}-appimage ${PKGNAME}.AppDir/${PKGNAME}-appimage
install -D -m 644 ${PKGNAME}.AppDir/usr/share/applications/${PKGNAME}.desktop ${PKGNAME}.AppDir/${PKGNAME}.desktop
install -D -m 644 ${PKGNAME}.AppDir/usr/share/icons/hicolor/scalable/apps/${PKGNAME}.svg ${PKGNAME}.AppDir/${PKGNAME}.svg
./squashfs-root/AppRun ${PKGNAME}.AppDir
./squashfs-root/AppRun -u "${UPDINFO}" ${PKGNAME}.AppDir
mv *-x86_64.AppImage ${PKGNAME}-${PKGVER}-${PKGREL}-x86_64.AppImage
{
"versionname": "3.3.1",
"versioncode": 20,
"releasepage": "https://www.opendesktop.org/p/1175480/",
"_see": "https://www.opendesktop.org/ocs/v1/content/data/1175480",
"releasefiles": [
{
"name": "ocs-store-3.3.1-1-x86_64.AppImage",
"description": "",
"url": "https://dl.opendesktop.org/api/files/downloadfile/id/1532435039/s/fbd9a82daf98fd6e6fce0cafc09bec87/t/1532478542/o/1/ocs-store-3.3.1-1-x86_64.AppImage"
}
]
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment