Author Topic: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)  (Read 270159 times)

0 Members and 4 Guests are viewing this topic.

Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
How to build correctly under Linux? I ran

Code: [Select]
git clone https://github.com/ngld/knossos.git
cd knossos
pip3 install raven
pip3 install token-bucket
yarnpkg install
./task.sh
which gives
Code: [Select]
./task.sh
Building build-tools...
build github.com/ngld/knossos/packages/build-tools: cannot load io/fs: malformed module path "io/fs": missing dot in first path element
Ideas?

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
@mjn: Thanks for the feedback! I just tried to modernise the UI a bit and I'm certainly better at it than I was back when I started working on Knossos but it still needs a lot of polish. :lol:  I'm currently trying to finish the first alpha which should implement the basic Knossos functionality (install, update, remove and launch mods). Once that's done, I want to add some polish before I start working on the dev tab.

Regarding the tabs: I want to let modders create new tabs which they can fill with BBCode content. Having an actual changelog and a staff list could be very helpful, though. Especially since I can fill them with at least some useful info (i.e. usernames, release dates, etc.) even for mods that don't currently have a changelog / staff list.
What do you think about letting users connect their Nebula account to their forum account and adding a PM link to the staff list. That seems like the easiest way to let people contact mod uploaders directly.

@praseodym: You shouldn't run pip or yarn. Using pip is pointless since NuKnossos doesn't actually use Python at all. If you run yarn directly, you'll use your system Node.js version instead of the one managed by the build system. Just skip those steps and let the build system handle it.
The error for build-tools is caused by an old Go version which in this case didn't understand the import. Make sure you have at least Go 1.16.0.

 
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
Code: [Select]
./task.sh
Building build-tools...
build github.com/ngld/knossos/packages/build-tools: cannot load io/fs: malformed module path "io/fs": missing dot in first path element
Same result

Code: [Select]
dpkg -l golang | grep ii
ii  golang         2:1.13~1ubuntu2 amd64        Go programming language compiler

Installing 1.16 via

Code: [Select]
sudo add-apt-repository ppa:longsleep/golang-backports
sudo apt-get update
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 52B59B1571A79DBC054901C0F6BC817356A3D45E
sudo apt-get install golang-go

shows

Code: [Select]
./task.sh
//tasks.star:118:29: Running ldconfig -p
//tasks.star:118:29: Skipping unexpected line from ldconfig: 1937 Bibliotheken im Cache »/etc/ld.so.cache« gefunden
Failed to parse tasks
Traceback (most recent call last):
  //tasks.star:248:22: in configure
  //tasks/knossos.star:61:25: in knossos_configure
  //tasks/helpers.star:138:31: in find_library
  //tasks/helpers.star:124:10: in find_static_lib
Error in error: Could not find static library for liblzma! Please make sure it's installed.

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
Quote
Could not find static library for liblzma! Please make sure it's installed.
I thought that message is fairly self-explanatory. For Ubuntu, you’ll have to install the following packages: libgtk-3-dev liblzma-dev libzstd-dev zlib1g-dev

That said, if you just want to launch NuKnossos, you can grab the precompiled build from GitHub. The Linux build is huge because the build script doesn’t strip the CEF debug symbols, yet. Once you’ve downloaded the build, you can run strip on the libcef.so file to save some space.

Also, all of the builds are packed twice due to a limitation on GitHub's end. They always put the final archives into zips without compression.

There's not a lot to see, yet. NuKnossos can import an existing Knossos library, launch mods, list installed and available mods and change per-mod FSO flags. Mod installation, most settings and the dev tab are still missing.

 
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
Better now, however
Code: [Select]
./task.sh libknossos-build
...
# github.com/ngld/knossos/packages/libarchive
/usr/bin/ld: i386 architecture of input file `/lib/i386-linux-gnu/libz.a(crc32.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/lib/i386-linux-gnu/libz.a(inflate.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/lib/i386-linux-gnu/libz.a(inftrees.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/lib/i386-linux-gnu/libz.a(zutil.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/lib/i386-linux-gnu/libz.a(adler32.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `/lib/i386-linux-gnu/libz.a(inffast.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: /lib/i386-linux-gnu/libz.a(adler32.o): in function `adler32_combine':
(.text+0x62b): undefined reference to `__moddi3'
/usr/bin/ld: /lib/i386-linux-gnu/libz.a(adler32.o): in function `adler32_combine64':
(.text+0x6fe): undefined reference to `__moddi3'
collect2: error: ld returned 1 exit status
Failed task libknossos-build:
exit status 2

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
I didn't expect 32bit libraries to show up in ldconfig -p although it's not surprising. I'll have to figure out a way to filter those.
In the meantime, you can still build by telling the build system not to link against the static libraries. To do that, you have to run ./task.sh configure static_deps=false. Afterwards, run the build command again.

 
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
Thanks, that did the trick.

However, I cannot point to the FS2 folder via "Browse". Terminal shows

Code: [Select]
[0501/201156.258044:WARNING:file_dialog_manager.cc(301)] No file dialog runner available for this platform

 

Offline mjn.mixael

  • Cutscene Master
  • 212
  • Chopped liver
    • Steam
    • Twitter
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
@mjn: Thanks for the feedback! I just tried to modernise the UI a bit and I'm certainly better at it than I was back when I started working on Knossos but it still needs a lot of polish. :lol:  I'm currently trying to finish the first alpha which should implement the basic Knossos functionality (install, update, remove and launch mods). Once that's done, I want to add some polish before I start working on the dev tab.

Regarding the tabs: I want to let modders create new tabs which they can fill with BBCode content. Having an actual changelog and a staff list could be very helpful, though. Especially since I can fill them with at least some useful info (i.e. usernames, release dates, etc.) even for mods that don't currently have a changelog / staff list.
What do you think about letting users connect their Nebula account to their forum account and adding a PM link to the staff list. That seems like the easiest way to let people contact mod uploaders directly.

Custom tabs is a cool idea.  :yes:

Having Knossos accounts linked to forum accounts is definitely a good idea, too. It would make it so much easier to contact mod authors/uploaders.
Cutscene Upgrade Project - Mainhall Remakes - Between the Ashes
Youtube Channel - P3D Model Box
Between the Ashes is looking for committed testers, PM me for details.
Freespace Upgrade Project See what's happening.

 
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
Maybe this output helps as well?
Code: [Select]
/task.sh js-lint
build-tool: nothing to do (output is 54.945247 seconds newer)
fetch-deps: tool fetch-deps
yarn-install: nothing to do (output is 426.513694 seconds newer)
install-tools: nothing to do (output is 433.747071 seconds newer)
proto-build: nothing to do (output is 436.308760 seconds newer)
js-lint: node .yarn/releases/yarn-2.4.1.cjs lint
src/pages/mods/list.tsx:37:83 - error TS2345: Argument of type '{ limit: number; offset: number; query: string; }' is not assignable to parameter of type 'ModListRequest'.
  Property 'sort' is missing in type '{ limit: number; offset: number; query: string; }' but required in type 'ModListRequest'.

 37   const response = await gs.runTwirpRequest(gs.client.getModList.bind(gs.client), {
                                                                                      ~
 38     limit: 300,
    ~~~~~~~~~~~~~~~
...
 40     query,
    ~~~~~~~~~~
 41   });
    ~~~

  ../api/api/service.ts:171:5
    171     sort: ModListRequest_SortType;
            ~~~~
    'sort' is declared here.


Found 1 error.

src/lib/ws-dev-api.ts:1:1 - error TS1208: 'ws-dev-api.ts' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module.

1 type Listener = (msg: ArrayBuffer) => void;
  ~~~~

src/lib/ws-dev-api.ts:4:1 - error TS2578: Unused '@ts-expect-error' directive.

4 // @ts-expect-error We never defined these as properties on window
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/lib/ws-dev-api.ts:9:1 - error TS2578: Unused '@ts-expect-error' directive.

9 // @ts-expect-error We never defined these as properties on window
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 3 errors.


  src/pages/local-mod.tsx:159:22
  ⚠  159:22  flag is already declared in the upper scope on line 152 column 21.  no-shadow

  src/pages/remote-mod.tsx:1:17
  ✖    1:17  useState is defined but never used.                                 @typescript-eslint/no-unused-vars
  ✖    2:10  action is defined but never used.                                   @typescript-eslint/no-unused-vars
  ✖    2:18  makeAutoObservable is defined but never used.                       @typescript-eslint/no-unused-vars
  ✖    9:3   Checkbox is defined but never used.                                 @typescript-eslint/no-unused-vars
  ✖   12:3   HTMLTable is defined but never used.                                @typescript-eslint/no-unused-vars
  ✖   19:10  Release is defined but never used.                                  @typescript-eslint/no-unused-vars
  ✖   19:19  ModType is defined but never used.                                  @typescript-eslint/no-unused-vars
  ✖   21:8   RefImage is defined but never used.                                 @typescript-eslint/no-unused-vars

  src/pages/remote-mod-list.tsx:7:10
  ✖    7:10  launchMod is defined but never used.                                @typescript-eslint/no-unused-vars
  ✖   56:11  Unsafe assignment of an any value.                                  @typescript-eslint/no-unsafe-assignment
  ✖   56:18  Unsafe member access .toString on an any value.                     @typescript-eslint/no-unsafe-member-access
  ✖   56:18  Unsafe call of an any typed value.                                  @typescript-eslint/no-unsafe-call
  ✖   73:9   Unsafe assignment of an any value.                                  @typescript-eslint/no-unsafe-assignment
  ✖   73:16  Unsafe member access .toString on an any value.                     @typescript-eslint/no-unsafe-member-access
  ✖   73:16  Unsafe call of an any typed value.                                  @typescript-eslint/no-unsafe-call

  1 warning
  15 errors

Failed task js-lint:
exit status 1

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
The issue was that CEF apparently didn't implement file/folder dialogs for Linux, only for Windows and macOS. I've added a GTK3 implementation which should fix the issue.
Those warnings didn't cause any issues they're mostly about unused stuff and things the type checker for JavaScript/TypeScript wasn't sure about. Nonetheless, the warnings have been addressed.

 
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
Errr

Code: [Select]
./task.sh libknossos-build
build-tool: nothing to do (output is 23.215984 seconds newer)
fetch-deps: tool fetch-deps
yarn-install: nothing to do (output is 424.767891 seconds newer)
install-tools: nothing to do (output is 442.314043 seconds newer)
proto-build: nothing to do (output is 445.433336 seconds newer)
libarchive-build: nothing to do (output is 122.142570 seconds newer)
libknossos-build: go build -o ../../build/libknossos/libknossos.so -buildmode c-shared ./api
# github.com/ngld/knossos/packages/libknossos/pkg/storage
pkg/storage/mods.go:80:39: rel.Type undefined (type *common.Release has no field or method Type)
pkg/storage/mods.go:155:45: release.Type undefined (type *common.Release has no field or method Type)
Failed task libknossos-build:
exit status 2
and

Code: [Select]
./task.sh js-lint
build-tool: nothing to do (output is 23.215984 seconds newer)
fetch-deps: tool fetch-deps
yarn-install: nothing to do (output is 424.767891 seconds newer)
install-tools: nothing to do (output is 442.314043 seconds newer)
proto-build: nothing to do (output is 445.433336 seconds newer)
js-lint: node .yarn/releases/yarn-2.4.1.cjs lint
src/pages/local-mod-list.tsx:47:26 - error TS2339: Property 'title' does not exist on type 'Release'.

47                     {mod.title}
                            ~~~~~

src/pages/local-mod.tsx:270:58 - error TS2339: Property 'title' does not exist on type 'Release'.

270                     <span className="text-3xl">{mod.mod?.title}</span>
                                                             ~~~~~

src/pages/local-mod.tsx:311:28 - error TS2339: Property 'type' does not exist on type 'Release'.

311                 {(mod.mod?.type === ModType.MOD || mod.mod?.type === ModType.TOTAL_CONVERSION) && (
                               ~~~~

src/pages/local-mod.tsx:311:61 - error TS2339: Property 'type' does not exist on type 'Release'.

311                 {(mod.mod?.type === ModType.MOD || mod.mod?.type === ModType.TOTAL_CONVERSION) && (
                                                                ~~~~


Found 4 errors.

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
I'm currently working on implementing syncing available mods between Nebula and Knossos and accidentally pushed the Nebula commits before finishing the logic for Knossos. The sync mechanism required a few changes to the shared data structures which means that libknossos won't compile until the mod sync logic for it is done. Should be ready by tomorrow.

 
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
On Xubuntu 20.04 attempting to build nuknossos i get

[email protected]:~/knossos$ ./task.sh
//tasks.star:151:9: found inputs but no outputs
//tasks.star:118:29: Running ldconfig -p
//tasks.star:118:29: Skipping unexpected line from ldconfig: 1373 libs found in cache `/etc/ld.so.cache'
Failed to parse tasks
Traceback (most recent call last):
  //tasks.star:249:22: in configure
  //tasks/knossos.star:61:25: in knossos_configure
  //tasks/helpers.star:138:31: in find_library
  //tasks/helpers.star:124:10: in find_static_lib
Error in error: Could not find static library for liblzma! Please make sure it's installed.

I have liblzma-dev installed ???
[email protected]:~/knossos$ dpkg -l liblzma-dev | grep ii
ii  liblzma-dev:amd64 5.2.4-1ubuntu1 amd64        XZ-format compression library - development files
« Last Edit: May 12, 2021, 11:44:32 pm by JeffPearson »

 
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
Hi JeffPearson,

to prepare anything from fs2 engine compiling, (old) Knossos 0.14.3 compiling and the manual for the new knossos version and the help from this thread, install this first:

Code: [Select]
sudo apt-get install python3 build-essential libasyncns0:i386 libavahi-client-dev:i386 libc6:i386 libcaca0:i386 libdbus-1-3:i386 libflac8:i386 libgcc1:i386 libglu1-mesa:i386 libjansson4:i386 libjpeg-turbo8:i386 liblua5.1-0:i386 libncursesw5:i386 libogg0:i386 libopenal1:i386 libpulse0:i386 libpulse-dev:i386 libsdl1.2debian:i386 libsdl1.2-dev:i386 libslang2:i386 libsndfile1:i386 libstdc++6:i386 libtheora0:i386 libtinfo5:i386 libvorbis0a:i386 libvorbisenc2:i386 libvorbisfile3:i386 libwrap0:i386 libx11-6:i386 libxau6:i386 libxcb1:i386 libxdmcp6:i386 libxext6:i386 zlib1g:i386 python3-wheel python3-setuptools pyqt5-dev pyqt5-dev-tools qttools5-dev-tools qt5-default curl python3-pyqt5.qtwebengine python3-pyqt5.qtwebchannel python3-requests-toolbelt python3-ply git p7zip-full libopenal-dev ninja-build pipenv yarnpkg python3-semantic-version libsdl2-dev libgtk-3-dev liblzma-dev libzstd-dev zlib1g-dev
I dont know if some of them are redundand and/or if libpng12-0 is (still) required. If it is you need this PPA for it

Code: [Select]
sudo add-apt-repository ppa:linuxuprising/libpng12
sudo apt-get update
sudo apt-get install libpng12-0
Additionally, as written earlier on this page, do not link to the static libs via

Code: [Select]
./task.sh configure static_deps=false
« Last Edit: May 13, 2021, 04:48:51 am by praseodym »

 
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
The current process I figured out so far is:

Code: [Select]
git clone https://github.com/ngld/knossos.git
cd knossos
./task.sh
./task.sh check-deps
./task.sh libarchive-build
./task.sh configure static_deps=false
./task.sh libknossos-build # Up to today, it stucks from here, see above
./task.sh client-build #follow the instructions in the terminal.
./task.sh client-ui-build
./task.sh front-build
./task.sh client-run
The final lines used to work, however, I wasnt able to point to the FS2 folder as also shown here.
« Last Edit: May 13, 2021, 04:51:45 am by praseodym »

  

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
@JeffPearson: Looks like your liblzma-dev package doesn't contain a static library. You can verify this by running "dpkg -L liblzma-dev | grep '\.a$'". If that command doesn't list any files, the package doesn't contain any static libraries.

@praseodym: You can still build the commits before I started working on modsync. If you switch to d257775c or any other commit before that, it should still work. You only have to run task.sh twice. The following should work:
Code: [Select]
./task.sh configure build=Release static_deps=false
./task.sh client-run
The build system resolves and handles dependencies automatically and the configure step has to be run before you can run any task (your example would fail on check-deps). You can run it again at any point but that's only useful if you want to change the parameters. If you do that, you should generally remove the build folder to avoid mixing files built with the old options and the new options.
The instructions regarding the SUID binary come from Chromium and shouldn't be necessary on any modern Linux system. The chrome-sandbox binary is only used as a fallback if seccomp-bpf isn't available (any Linux kernel older than 3.5). For reference, here's the relevant Chromium doc.

 
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
How to switch to that? With the new "configure" command as step 2 before "check-deps" it still stucks at "libknossos-build"

Code: [Select]
libknossos-build: go build -o ../../build/libknossos/libknossos.so -buildmode c-shared ./api
# github.com/ngld/knossos/packages/libknossos/pkg/storage
pkg/storage/mods.go:80:39: rel.Type undefined (type *common.Release has no field or method Type)
pkg/storage/mods.go:155:45: release.Type undefined (type *common.Release has no field or method Type)
Failed task libknossos-build:
exit status 2

 

Offline ngld

  • Administrator
  • 29
  • Knossos dev
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
To switch to another branch or commit, you can run "git checkout <commit hash or branch name>". However, I've finished the modsync code now, so just updating with "git pull" should work as well. Precompiled builds are here.

[...] With the new "configure" command as step 2 before "check-deps" [...]
Why are you running "check-deps"? As "./task.sh -l" will tell you, it only tells you whether the dependencies listed in DEPS.yml have available updates. It doesn't download anything. You're probably looking for "fetch-deps" instead. Also, "front-build" builds the frontend for Nebula and is useless on its own. If you want Nebula, you'd have to run "server-build" as well.
I strongly recommend leaving the necessary steps up to the build system. Just run the task you actually want ("client-run" or "client-build"). The build system will take care of the rest and it won't build anything you don't need.

 
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
Now it builds and launches
What do I put in Library Path in settings
Explore tab is empty refresh shows this
[00:00]: Fetching remote index
[00:00]: Failed with error: failed to fetch index mods.UpdateRemoteModIndex.func1:github.com/ngld/knossos/packages/libknossos/pkg/mods/modsync.go:149 remote mod not found mods.UpdateRemoteModIndex:github.com/ngld/knossos/packages/libknossos/pkg/mods/modsync.go:139 storage.ImportRemoteMods:github.com/ngld/knossos/packages/libknossos/pkg/storage/remote_mods.go:33 bbolt.(*DB).Update:go.etcd.io/[email protected]/db.go:694 storage.ImportRemoteMods.func1:github.com/ngld/knossos/packages/libknossos/pkg/storage/remote_mods.go:42 mods.UpdateRemoteModIndex.func1:github.com/ngld/knossos/packages/libknossos/pkg/mods/modsync.go:149

Build tab shows page not found, Play tab empty

 
Re: PUBLIC BETA: Knossos 0.14.3 (combined launcher/installer)
Ok, this is what I learned and tried:
Code: [Select]
git clone https://github.com/ngld/knossos.git
cd knossos
git checkout d257775c
./task.sh
./task.sh fetch-deps
./task.sh libarchive-build
./task.sh libknossos-build
./task.sh configure build=Release static_deps=false
./task.sh client-build
./task.sh client-ui-build
./task.sh client-run

client-build now shows this:
Code: [Select]
/home/$USER/knossos/packages/client/launcher/browser/knossos_handler_linux.cc: In member function ‘void KnossosHandler::OpenFolderDialog(CefRefPtr<CefBrowser>, std::string, std::string, CefRefPtr<CefRunFileDialogCallback>)’:
/home/$USER/knossos/packages/client/launcher/browser/knossos_handler_linux.cc:169:42: error: could not convert ‘callback’ from ‘CefRefPtr<CefRunFileDialogCallback>’ {aka ‘scoped_refptr<CefRunFileDialogCallback>’} to ‘std::vector<std::__cxx11::basic_string<char> >’
  169 |                          folder.c_str(), callback);
      |                                          ^~~~~~~~
      |                                          |
      |                                          CefRefPtr<CefRunFileDialogCallback> {aka scoped_refptr<CefRunFileDialogCallback>}
At global scope:
cc1plus: error: unrecognized command line option ‘-Wno-undefined-var-template’ [-Werror]
cc1plus: all warnings being treated as errors
make[3]: *** [launcher/CMakeFiles/knossos.dir/build.make:193: launcher/CMakeFiles/knossos.dir/browser/knossos_handler_linux.cc.o] Fehler 1
make[3]: *** Auf noch nicht beendete Prozesse wird gewartet …
make[2]: *** [CMakeFiles/Makefile2:1152: launcher/CMakeFiles/knossos.dir/all] Fehler 2
make[1]: *** [CMakeFiles/Makefile2:1159: launcher/CMakeFiles/knossos.dir/rule] Fehler 2
make: *** [Makefile:586: knossos] Fehler 2
Failed task client-build:
exit status 2
Ideas?