-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
com.visualstudio.code #150
Conversation
com.visualstudio.code.json
Outdated
"type": "archive", | ||
"url": "https://www.x.org/releases/individual/lib/libxkbfile-1.0.9.tar.bz2", | ||
"sha256": "51817e0530961975d9513b773960b4edd275f7d5c72293d5a151ed4f42aeb16a" | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace.
com.visualstudio.code.json
Outdated
"cp share/pixmaps/code.png export/share/icons/hicolor/512x512/apps/com.visualstudio.code.png", | ||
"mkdir -p export/share/applications", | ||
"cp share/applications/code.desktop export/share/applications/com.visualstudio.code.desktop", | ||
"desktop-file-edit --set-key=Exec --set-value='code %F' export/share/applications/com.visualstudio.code.desktop", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nevermind this runs off the Sdk...desktop-file-edit
isn't in the runtime.
com.visualstudio.code.json
Outdated
"mv usr/* .", | ||
"rmdir usr", | ||
"mkdir -p export/share/icons/hicolor/512x512/apps", | ||
"cp share/pixmaps/code.png export/share/icons/hicolor/512x512/apps/com.visualstudio.code.png", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can be combined into a install -Dm644 ...
command.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also since you are copying this it leaves a duplicate around you can remove, same applies for desktop and appdata.
] | ||
}, | ||
{ | ||
"name": "nodejs", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably reasonable to clean up: /include
/share
/lib/node_modules/npm/changelogs
/lib/node_modules/npm/doc
/lib/node_modules/npm/html
/lib/node_modules/npm/man
/lib/node_modules/npm/scripts
, etc
com.visualstudio.code.json
Outdated
] | ||
}, | ||
{ | ||
"name": "git", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can probably cleanup: /share/git-gui
"commands": [ | ||
"ar x code.deb", | ||
"rm -f code.deb", | ||
"tar -xf data.tar.xz", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Forgot to delete this.
com.visualstudio.code.json
Outdated
"desktop-file-edit --set-key=Exec --set-value='code %F' export/share/applications/com.visualstudio.code.desktop", | ||
"desktop-file-edit --set-key=Icon --set-value='com.visualstudio.code' export/share/applications/com.visualstudio.code.desktop", | ||
"mkdir -p export/share/appdata", | ||
"sed s/code.desktop/com.visualstudio.code.desktop/ share/appdata/code.appdata.xml > export/share/appdata/com.visualstudio.code.appdata.xml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The license of this is incorrect:
<metadata_license>Multiple, see https://code.visualstudio.com/license</metadata_license>
<project_license>Multiple, see https://code.visualstudio.com/license</project_license>
It should be LicenseRef-proprietary=https://code.visualstudio.com/license
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also its valuable for us to add <releases>
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I mean, this is upstream appdata. I'm always reluctant to override that where not actually necessary - but fair enough on the proprietary thing.
I'll open an issue upstream on this and the front, they've seemed pretty responsive to suggestions and patches thus far and I don't want to patch that downstream if possible since it's a bit fragile with a frequently released app..
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, the license fix is required but for releases reasonable to get upstream to do it.
This still writes to EDIT: Having the script run Also shipping |
We should think about adding some of this dotfile stuff to the Review Guidelines because we basically don't talk about sandboxing and permissions at all there. |
OK, that should cover the first review. ;-) |
com.visualstudio.code.json
Outdated
"desktop-file-edit --set-key=Exec --set-value='code %F' export/share/applications/com.visualstudio.code.desktop", | ||
"desktop-file-edit --set-key=Icon --set-value='com.visualstudio.code' export/share/applications/com.visualstudio.code.desktop", | ||
"mkdir -p export/share/appdata", | ||
"sed -e s/code.desktop/com.visualstudio.code.desktop/ -e 's/Multiple, see /LicenseRef-proprietary=/' share/appdata/code.appdata.xml > export/share/appdata/com.visualstudio.code.appdata.xml" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
's/Multiple, see /LicenseRef-proprietary=/'
s/.../.../g
since it has multiple matches
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks!
Ugh, so I don't think using the appdata from inside the package can work - since it's extra-data that means that the package fails the flathub validation. So I'm going to fork the open source version's appdata, modify the Licence of the binary and add versions tags as suggested. Such is life. |
Newer build, now with appdata, hopefully https://flathub.org/builds/#/builders/1/builds/1003 |
com.visualstudio.code.appdata.xml
Outdated
<?xml version="1.0" encoding="UTF-8"?> | ||
<component type="desktop"> | ||
<id>com.visualstudio.code.desktop</id> | ||
<metadata_license>Multiple, see https://code.visualstudio.com/license</metadata_license> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be the same syntax as project_license
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One problem though is this license would then not be distributable, but.. the same appdata file is under a different license if the foss version is built...
upstream really needs to fix this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I'm going to update the metadata to be under the MIT, which is where I've 'forked' it from for these purposes.
@nedrichards Well I am using my cloud-built version of code-oss now https://github.com/amtlib-dot-dll/vscode-build-travis/blob/master/.travis.yml https://github.com/amtlib-dot-dll/vscode-build-travis/tree/out but yeah you are right we need to do some work to achieve offline and reproducible builds. |
Another (hopefully final) test build: https://flathub.org/builds/#/builders/1/builds/1028 |
Repository has been created: https://github.com/flathub/com.visualstudio.code |
Extra-data based flatpak for Visual Studio Code (since the source code based edition has both bitrotted and depends on us getting network free electron builds). Furthermore, there is value in providing the official, closed source packages with MS keys etc. If we wanted to migrate to the free software version, or offer it then it'd be with the com.visualstudio.code.oss App ID.
This doesn't use the new syntax for extra-data since Endless hasn't updated it's version of flatpak beyond 0.9.8 yet so I can't test it.