Skip to content
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

MSIX #5393

Merged
merged 14 commits into from
Jan 24, 2024
Merged

MSIX #5393

merged 14 commits into from
Jan 24, 2024

Conversation

RensDofferhoff
Copy link
Contributor

@RensDofferhoff RensDofferhoff commented Jan 15, 2024

Builds 3 MSIXs:

  • Self-signed nightly
  • Unsigned for sideloading. To be signed with UVA key (to replace msi eventually)
  • Unsigned to be uploaded to MS store
    AppxManifests for these options will likely diverge over time.

Adds a class that wrangles the static and dynamic runtime files used to determine if and how to initialize Jasp on first start.
Still generates the MSI for now (sign troubles).

I will add some docs on how to add the self signed cert to trusted sources in a different PR.

For testing:
The latest MSIX-branch builds of windows zip, msi and msix on the nightlies page are build with theses changes.

auto env = DynamicRuntimeInfo::getInstance()->getRuntimeEnvironment();
bool useAppdata = env != DynamicRuntimeInfo::MSIX;
auto env = DynamicRuntimeInfo::getInstance()->runtimeEnvironment();
bool useAppdata = env != RuntimeEnvironment::MSIX && env != RuntimeEnvironment::ZIP;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

? why did you add this.
Dont we want ZIP stuff to stay in the zip folder as much as possible?
I mean it will work fine but might collide if someone has normal jasp installed as well.
If we do this we should make some other changes as well

@JorisGoosen
Copy link
Contributor

The order of targets is still:
cmake --build . --target all && cmake --build . --target collect-junctions && cmake --build . --target install && cmake --build . --target zip msix right?

Because I had to manually create "Install" in the buildfolder for the process to continue

@RensDofferhoff
Copy link
Contributor Author

The order is exactly as stated in the buildbotscript. That auto builds.
I have never had to mkdir Install.

@JorisGoosen
Copy link
Contributor

Ok ill try it again from scratch, cause it fails anyway with:

Memory limit defaulting to 16724537344 bytes.
Memory limit defaulting to 4294967296 bytes.
Using "\\?\D:\JASP\build-jasp-desktop-Desktop_Qt_6_6_0_MSVC2019_64bit-Release\Install\AppxManifest.xml" as the manifest for the package.
MakeAppx : error: Error info: error C00CE169: App manifest validation error: The app manifest must be valid as per schema: Line 11, Column 9, Reason: '0.19.0000.0' violates pattern constraint of '(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])(\.(0|[1-9][0-9]{0,3}|[1-5][0-9]{4}|6[0-4][0-9]{3}|65[0-4][0-9]{2}|655[0-2][0-9]|6553[0-5])){3}'.
The attribute 'Version' with value '0.19.0000.0' failed to parse.

MakeAppx : error: Package creation failed.
MakeAppx : error: 0x80080204 - The specified package format is not valid: The package manifest is not valid.

Although I guess the versionnumber is not accepted?
I raised it to 0.19 recently

@RensDofferhoff
Copy link
Contributor Author

I will boot my windows partition. I doubt 0.18 -> 0.19 could cause an issue. Then again this is windows

@JorisGoosen
Copy link
Contributor

Yeah maybe its the 0000 thing that messes it up?

I dont know, anyway the missing ingredient is probably cmake --build . --target windowsPreInstallHacks

@RensDofferhoff
Copy link
Contributor Author

yes 1000 is okay but 0000 is not because ... who knows

@RensDofferhoff
Copy link
Contributor Author

breaks my beautiful hack

@JorisGoosen
Copy link
Contributor

Well, I have no idea what is going wrong, but I do not get the Install folder, but I can also not run the buildbotscript.
Despite the fact that my windows pc is probably set up similarly.
It seems Im missing some qt version but I dont know where it would be defined.

@shun2wang
Copy link
Contributor

shun2wang commented Jan 18, 2024

Version numbering of msix:
https://github.com/microsoft/WindowsAppSDK/blob/main/specs/Deployment/MSIXPackageVersioning.md#24-decision-4-version-encoding

We once had a problem with four digits .msi version number and had to be careful with it haha

@RensDofferhoff
Copy link
Contributor Author

Yeah lets just let msix package version diverge from jasp version whenever necessary

@RensDofferhoff
Copy link
Contributor Author

@JorisGoosen you can also use the buildbot if its going to cost a lot of time

@JorisGoosen
Copy link
Contributor

Well I would like to be able to build it locally before merging it into development you know...

Where does Install get created?
Or what env vars are set on the buildbot so I can set up my pc like it?

@RensDofferhoff
Copy link
Contributor Author

The install folder is created by the install target. I have not altered that.

@RensDofferhoff
Copy link
Contributor Author

did you alter the CMAKE_INSTALL_PREFIX?

@RensDofferhoff
Copy link
Contributor Author

or CMAKE_BINARY_DIR

@JorisGoosen
Copy link
Contributor

Ah I missed these comments last week...

image

And I dont even see CMAKE_BINARY so I guess its not changed?
Im starting from scratch

@JorisGoosen
Copy link
Contributor

Ok now I can get it to build and get all the way to building a set of 'msix'es so so far so good!

But I cant install them without them signed properly and I dont know how to do it.
You added some certificate documentation at 6c8b0b2 for https://github.com/jasp-stats/jasp-desktop/blob/development/Docs/development/msix-nightly-testing.md but that doesnt help me build my own msix and install it...

So I cant finish testing because I have no idea whether my msixes work.
Can you add a manual?

@RensDofferhoff
Copy link
Contributor Author

added some docs

@JorisGoosen JorisGoosen merged commit 52d2a3d into jasp-stats:development Jan 24, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants