Produire Cesium Desktop

Je me posais la question, si c’était difficile pour quelqu’un qui ne s’y connaît pas beaucoup en informatique de créer un exécutable pour windows ? Parce que sinon, je pourrais peut-être le faire moi-même et le mettre à disposition ensuite :slight_smile: A condition bien sûr qu’on m’indique comment faire :slight_smile:

Il vaut mieux s’y connaître, mais c’est un bon moyen de commencer.

2 « J'aime »

Ce n’est pas très compliqué si tu as une machine Linux avec 4Go de RAM ou plus.

Le plus simple est d’avoir une Ubuntu, d’installer Git, Vagrant, VirtualBox (tous installables avec apt-get, de mémoire). Puis de lancer les commandes :

git clone https://github.com/duniter/cesium-desktop.git
cd cesium-desktop
./release.sh <version>

Par exemple :

./release.sh 0.19.0

Cela produira les exécutables de Cesium Desktop (.deb, .exe, .tar.gz) sur ta machine. Puis vient une phase d’upload vers https://github.com/duniter/cesium/releases. Pour l’upload, il te faudra un compte GitHub, puis il nous faudra lui donner les autorisations pour effectuer l’upload.

Si tu arrives à produire les livrables, alors donne nous ton compte GitHub et on lui donnera les droits nécessaires :slight_smile:

:warning: Le build Windows va télécharger une VM de plusieurs Go (14Go je crois bien). Attention donc au forfait de données si tu es derrière une connexion 4G !

J’ai téléchargé et installer Git sur mon pc windows et j’ai tester les commandes qui fonctionnent sauf pour la dernière : ./release.sh 0.19.3

Je reçois cette erreur :
nvm (Node version manager) not found (directory NVM_DIR not defined). Please install nvm, and retry

Est-ce que tu veux bien m’aider s’il te plaît ? :slight_smile:

Ah oui, il te faut aussi NodeJS : https://nodejs.org/fr/

Mais dans tous les cas le script release.sh va planter, car il attend NVM. Il te faut le modifier pour aller plus loin, en supprimant ou en commentant la ligne 29 exit -1.

Tu es obligé de passer par là si tu es sous Windows. D’ailleurs tu auras peut-être d’autres soucis, on a réalisé ces scripts pour Ubuntu.

1 « J'aime »

J’ai installé NodeJS.

Où se trouve le script release.sh pour que je puisse le modifier ?

Je vais essayer d’aller au bout, si ça ne marche pas tant pis, mais j’aimerais y arriver :slight_smile:

C’est le script que tu exécutes, il est précisément dans le dossier cesium-desktop/ que tu as clôné, à sa racine.

Quand tu exécutes ./release.sh, le ./ signifie « dans le répertoire courant ».

1 « J'aime »

J’y suis mais je n’arrive pas à l’ouvrir correctement…

Une fenêtre git apparaît puis disparaît quelques secondes après

Fais un clic droit dessus, “Ouvrir avec > Bloc notes”.

J’ai modifié le script ( en supprimant la ligne, il y avait déjà exit -1 ) et j’ai recommencé mais je reçois toujours la même erreur :confused:

EDIT: en fait j’ai cette erreur qui apparaît :

nvm (Node version manager) not found (directory NVM_DIR not defined). Please ins                                                                                                                tall nvm, and retry
npm notice created a lockfile as package-lock.json. You should commit this file.
npm WARN cesium-desktop No repository field.
npm WARN cesium-desktop No license field.

added 63 packages in 24.383s
Checking that 0.19.3 has been pushed to 'origin'...
fs.js:646
  return binding.open(pathModule._makeLong(path), stringToFlags(flags), mode);
                 ^

Error: ENOENT: no such file or directory, open 'C:\Users\Suzena\.config\duniter\                                                                                                                .github'
    at Object.fs.openSync (fs.js:646:18)
    at Object.fs.readFileSync (fs.js:551:33)
    at Object.<anonymous> (C:\Users\Suzena\cesium-desktop\scripts\exists-tag.js:                                                                                                                12:25)
    at Module._compile (module.js:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:676:10)
    at startup (bootstrap_node.js:187:16)
    at bootstrap_node.js:608:3
The '0.19.3' tag does not exist on 'origin' repository. Use command ./new_versio                                                                                                                n.sh to create a new version and use 'git push origin --tags' to share the tag.

OK, alors dans ton terminal fais ceci :

touch ~/.config/duniter/.github

Puis réessayes.

Je vais sans doute paraître relativement nul ^^ Mais c’est quoi le terminal ? C’est la fenêtre de commande dans git ?

J’ai essayé et j’ai de nouveau une erreur :

Mickaël@LAPTOP-BTQ6SATM MINGW64 ~/cesium-desktop (master)
$ touch ~/.config/duniter/.github

Mickaël@LAPTOP-BTQ6SATM MINGW64 ~/cesium-desktop (master)
$ ./release.sh 0.19.3
nvm (Node version manager) not found (directory NVM_DIR not defined). Please install nvm, and retry
Checking that 0.19.3 has been pushed to 'origin'...

{ StatusCodeError: 401 - {"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"}
    at new StatusCodeError (C:\Users\Suzena\cesium-desktop\node_modules\request-promise-core\lib\errors.js:32:15)
    at Request.plumbing.callback (C:\Users\Suzena\cesium-desktop\node_modules\request-promise-core\lib\plumbing.js:104:33)
    at Request.RP$callback [as _callback] (C:\Users\Suzena\cesium-desktop\node_modules\request-promise-core\lib\plumbing.js:46:31)
    at Request.self.callback (C:\Users\Suzena\cesium-desktop\node_modules\request\request.js:186:22)
    at emitTwo (events.js:126:13)
    at Request.emit (events.js:214:7)
    at Request.<anonymous> (C:\Users\Suzena\cesium-desktop\node_modules\request\request.js:1163:10)
    at emitOne (events.js:116:13)
    at Request.emit (events.js:211:7)
    at IncomingMessage.<anonymous> (C:\Users\Suzena\cesium-desktop\node_modules\request\request.js:1085:12)
    at Object.onceWrapper (events.js:313:30)
    at emitNone (events.js:111:20)
    at IncomingMessage.emit (events.js:208:7)
    at endReadableNT (_stream_readable.js:1056:12)
    at _combinedTickCallback (internal/process/next_tick.js:138:11)
    at process._tickCallback (internal/process/next_tick.js:180:9)
  name: 'StatusCodeError',
  statusCode: 401,
  message: '401 - {"message":"Bad credentials","documentation_url":"https://developer.github.com/v3"}',
  error:
   { message: 'Bad credentials',
     documentation_url: 'https://developer.github.com/v3' },
  options:
   { uri: 'https://api.github.com/repos/duniter/cesium/git/refs/tags/',
     method: 'GET',
     json: true,
     headers:
      { 'User-Agent': 'Request-Promise',
        Authorization: 'token ',
        Accept: 'application/vnd.github.v3+json' },
     callback: [Function: RP$callback],
     transform: undefined,
     simple: true,
     resolveWithFullResponse: false,
     transform2xxOnly: false },
  response:
   IncomingMessage {
     _readableState:
      ReadableState {
        objectMode: false,
        highWaterMark: 16384,
        buffer: [Object],
        length: 0,
        pipes: null,
        pipesCount: 0,
        flowing: true,
        ended: true,
        endEmitted: true,
        reading: false,
        sync: true,
        needReadable: false,
        emittedReadable: false,
        readableListening: false,
        resumeScheduled: false,
        destroyed: false,
        defaultEncoding: 'utf8',
        awaitDrain: 0,
        readingMore: false,
        decoder: null,
        encoding: null },
     readable: false,
     domain: null,
     _events:
      { end: [Array],
        close: [Array],
        data: [Function],
        error: [Function] },
     _eventsCount: 4,
     _maxListeners: undefined,
     socket:
      TLSSocket {
        _tlsOptions: [Object],
        _secureEstablished: true,
        _securePending: false,
        _newSessionPending: false,
        _controlReleased: true,
        _SNICallback: null,
        servername: null,
        npnProtocol: undefined,
        alpnProtocol: false,
        authorized: true,
        authorizationError: null,
        encrypted: true,
        _events: [Object],
        _eventsCount: 9,
        connecting: false,
        _hadError: false,
        _handle: null,
        _parent: null,
        _host: 'api.github.com',
        _readableState: [Object],
        readable: false,
        domain: null,
        _maxListeners: undefined,
        _writableState: [Object],
        writable: false,
        allowHalfOpen: false,
        _bytesDispatched: 186,
        _sockname: null,
        _pendingData: null,
        _pendingEncoding: '',
        server: undefined,
        _server: null,
        ssl: null,
        _requestCert: true,
        _rejectUnauthorized: true,
        parser: null,
        _httpMessage: [Object],
        read: [Function],
        _consuming: true,
        _idleNext: null,
        _idlePrev: null,
        _idleTimeout: -1,
        [Symbol(asyncId)]: 11,
        [Symbol(bytesRead)]: 917 },
     connection:
      TLSSocket {
        _tlsOptions: [Object],
        _secureEstablished: true,
        _securePending: false,
        _newSessionPending: false,
        _controlReleased: true,
        _SNICallback: null,
        servername: null,
        npnProtocol: undefined,
        alpnProtocol: false,
        authorized: true,
        authorizationError: null,
        encrypted: true,
        _events: [Object],
        _eventsCount: 9,
        connecting: false,
        _hadError: false,
        _handle: null,
        _parent: null,
        _host: 'api.github.com',
        _readableState: [Object],
        readable: false,
        domain: null,
        _maxListeners: undefined,
        _writableState: [Object],
        writable: false,
        allowHalfOpen: false,
        _bytesDispatched: 186,
        _sockname: null,
        _pendingData: null,
        _pendingEncoding: '',
        server: undefined,
        _server: null,
        ssl: null,
        _requestCert: true,
        _rejectUnauthorized: true,
        parser: null,
        _httpMessage: [Object],
        read: [Function],
        _consuming: true,
        _idleNext: null,
        _idlePrev: null,
        _idleTimeout: -1,
        [Symbol(asyncId)]: 11,
        [Symbol(bytesRead)]: 917 },
     httpVersionMajor: 1,
     httpVersionMinor: 1,
     httpVersion: '1.1',
     complete: true,
     headers:
      { server: 'GitHub.com',
        date: 'Sun, 05 Nov 2017 12:21:37 GMT',
        'content-type': 'application/json; charset=utf-8',
        'content-length': '83',
        connection: 'close',
        status: '401 Unauthorized',
        'x-github-media-type': 'github.v3; format=json',
        'x-ratelimit-limit': '60',
        'x-ratelimit-remaining': '59',
        'x-ratelimit-reset': '1509888097',
        'access-control-expose-headers': 'ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval',
        'access-control-allow-origin': '*',
        'content-security-policy': 'default-src \'none\'',
        'strict-transport-security': 'max-age=31536000; includeSubdomains; preload',
        'x-content-type-options': 'nosniff',
        'x-frame-options': 'deny',
        'x-xss-protection': '1; mode=block',
        'x-runtime-rack': '0.011972',
        'x-github-request-id': 'A422:6834:B85EAA:17AE9AE:59FF0250' },
     rawHeaders:
      [ 'Server',
        'GitHub.com',
        'Date',
        'Sun, 05 Nov 2017 12:21:37 GMT',
        'Content-Type',
        'application/json; charset=utf-8',
        'Content-Length',
        '83',
        'Connection',
        'close',
        'Status',
        '401 Unauthorized',
        'X-GitHub-Media-Type',
        'github.v3; format=json',
        'X-RateLimit-Limit',
        '60',
        'X-RateLimit-Remaining',
        '59',
        'X-RateLimit-Reset',
        '1509888097',
        'Access-Control-Expose-Headers',
        'ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval',
        'Access-Control-Allow-Origin',
        '*',
        'Content-Security-Policy',
        'default-src \'none\'',
        'Strict-Transport-Security',
        'max-age=31536000; includeSubdomains; preload',
        'X-Content-Type-Options',
        'nosniff',
        'X-Frame-Options',
        'deny',
        'X-XSS-Protection',
        '1; mode=block',
        'X-Runtime-rack',
        '0.011972',
        'X-GitHub-Request-Id',
        'A422:6834:B85EAA:17AE9AE:59FF0250' ],
     trailers: {},
     rawTrailers: [],
     upgrade: false,
     url: '',
     method: null,
     statusCode: 401,
     statusMessage: 'Unauthorized',
     client:
      TLSSocket {
        _tlsOptions: [Object],
        _secureEstablished: true,
        _securePending: false,
        _newSessionPending: false,
        _controlReleased: true,
        _SNICallback: null,
        servername: null,
        npnProtocol: undefined,
        alpnProtocol: false,
        authorized: true,
        authorizationError: null,
        encrypted: true,
        _events: [Object],
        _eventsCount: 9,
        connecting: false,
        _hadError: false,
        _handle: null,
        _parent: null,
        _host: 'api.github.com',
        _readableState: [Object],
        readable: false,
        domain: null,
        _maxListeners: undefined,
        _writableState: [Object],
        writable: false,
        allowHalfOpen: false,
        _bytesDispatched: 186,
        _sockname: null,
        _pendingData: null,
        _pendingEncoding: '',
        server: undefined,
        _server: null,
        ssl: null,
        _requestCert: true,
        _rejectUnauthorized: true,
        parser: null,
        _httpMessage: [Object],
        read: [Function],
        _consuming: true,
        _idleNext: null,
        _idlePrev: null,
        _idleTimeout: -1,
        [Symbol(asyncId)]: 11,
        [Symbol(bytesRead)]: 917 },
     _consuming: true,
     _dumped: false,
     req:
      ClientRequest {
        domain: null,
        _events: [Object],
        _eventsCount: 5,
        _maxListeners: undefined,
        output: [],
        outputEncodings: [],
        outputCallbacks: [],
        outputSize: 0,
        writable: true,
        _last: true,
        upgrading: false,
        chunkedEncoding: false,
        shouldKeepAlive: false,
        useChunkedEncodingByDefault: false,
        sendDate: false,
        _removedConnection: false,
        _removedContLen: false,
        _removedTE: false,
        _contentLength: 0,
        _hasBody: true,
        _trailer: '',
        finished: true,
        _headerSent: true,
        socket: [Object],
        connection: [Object],
        _header: 'GET /repos/duniter/cesium/git/refs/tags/ HTTP/1.1\r\nUser-Agent: Request-Promise\r\nAuthorization: token \r\nAccept: application/vnd.github.v3+json\r\nhost: api.github.com\r\nConnection: close\r\n\r\n',
        _onPendingData: [Function: noopPendingOutput],
        agent: [Object],
        socketPath: undefined,
        timeout: undefined,
        method: 'GET',
        path: '/repos/duniter/cesium/git/refs/tags/',
        _ended: true,
        res: [Circular],
        aborted: undefined,
        timeoutCb: null,
        upgradeOrConnect: false,
        parser: null,
        maxHeadersCount: null,
        [Symbol(outHeadersKey)]: [Object] },
     request:
      Request {
        domain: null,
        _events: [Object],
        _eventsCount: 5,
        _maxListeners: undefined,
        uri: [Object],
        method: 'GET',
        headers: [Object],
        readable: true,
        writable: true,
        explicitMethod: true,
        _qs: [Object],
        _auth: [Object],
        _oauth: [Object],
        _multipart: [Object],
        _redirect: [Object],
        _tunnel: [Object],
        _rp_resolve: [Function],
        _rp_reject: [Function],
        _rp_promise: [Object],
        _rp_callbackOrig: undefined,
        callback: [Function],
        _rp_options: [Object],
        setHeader: [Function],
        hasHeader: [Function],
        getHeader: [Function],
        removeHeader: [Function],
        localAddress: undefined,
        pool: {},
        dests: [],
        __isRequestRequest: true,
        _callback: [Function: RP$callback],
        proxy: null,
        tunnel: true,
        setHost: true,
        originalCookieHeader: undefined,
        _disableCookies: true,
        _jar: undefined,
        port: 443,
        host: 'api.github.com',
        path: '/repos/duniter/cesium/git/refs/tags/',
        _json: true,
        httpModule: [Object],
        agentClass: [Object],
        agent: [Object],
        _started: true,
        href: 'https://api.github.com/repos/duniter/cesium/git/refs/tags/',
        req: [Object],
        ntick: true,
        response: [Circular],
        originalHost: 'api.github.com',
        originalHostHeaderName: 'host',
        responseContent: [Circular],
        _destdata: true,
        _ended: true,
        _callbackCalled: true },
     toJSON: [Function: responseToJSON],
     caseless: Caseless { dict: [Object] },
     read: [Function],
     body:
      { message: 'Bad credentials',
        documentation_url: 'https://developer.github.com/v3' } } }

Ah oui … il te faut un token GitHub rien que pour vérifier l’existence de la release.

J’explique ici comment obtenir le token : « Création d’un token GitHub ».

1 « J'aime »

J’ai essayé de cloner duniter mais ça ne marche pas :

Mickaël@LAPTOP-BTQ6SATM MINGW64 ~
$ git clone git@github.com:duniter/duniter.git
Cloning into 'duniter'...
Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Donne moi ton pseudo sur GitHub, que je puisse te débloquer.

edit : je suppose que c’est https://github.com/MickaelLarose, je viens de t’envoyer une invitation (par mail). Si tu l’acceptes, tu devrais pouvoir avancer.

1 « J'aime »

Merci :slight_smile:

J’ai réessayer et je tombe sur ça :

Mickaël@LAPTOP-BTQ6SATM MINGW64 ~/cesium-desktop (master)
$ touch ~/.config/duniter/.github

Mickaël@LAPTOP-BTQ6SATM MINGW64 ~/cesium-desktop (master)
$ echo -n 'montoken' > ~/.config/duniter/.github

Mickaël@LAPTOP-BTQ6SATM MINGW64 ~/cesium-desktop (master)
$ git clone git@github.com:duniter/duniter.git
Cloning into 'duniter'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Mickaël@LAPTOP-BTQ6SATM MINGW64 ~/cesium-desktop (master)
$

Tu essayes de clôner duniter, ce n’est pas nécessaire.

Tu as juste à relancer le scrip release.sh.

Je reçois ça :

Mickaël@LAPTOP-BTQ6SATM MINGW64 ~/cesium-desktop (master)
$ ./release.sh 0.19.3
nvm (Node version manager) not found (directory NVM_DIR not defined). Please install nvm, and retry

Oui c’est normal, tu as juste retiré la ligne exit -1, pas le message d’avertissement qui continue donc à s’afficher. Pas de soucis.