mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
Get app compiling
This commit is contained in:
@@ -5,10 +5,6 @@
|
||||
#ifndef COMMON_H
|
||||
#define COMMON_H
|
||||
|
||||
#define OBJC_OLD_DISPATCH_PROTOTYPES 1
|
||||
#include <objc/objc-runtime.h>
|
||||
#include <CoreGraphics/CoreGraphics.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdarg.h>
|
||||
#include "string.h"
|
||||
|
||||
78
v2/internal/ffenestri/ffenestri_windows.c
Normal file
78
v2/internal/ffenestri/ffenestri_windows.c
Normal file
@@ -0,0 +1,78 @@
|
||||
|
||||
typedef struct {
|
||||
} Application;
|
||||
|
||||
struct Application *NewApplication(const char *title, int width, int height, int resizable, int devtools, int fullscreen, int startHidden, int logLevel, int hideWindowOnClose) {
|
||||
}
|
||||
void SetMinWindowSize(struct Application* app, int minWidth, int minHeight) {
|
||||
}
|
||||
void SetMaxWindowSize(struct Application* app, int maxWidth, int maxHeight) {
|
||||
}
|
||||
void Run(struct Application* app, int argc, char **argv) {
|
||||
}
|
||||
void DestroyApplication(struct Application* app) {
|
||||
}
|
||||
void SetDebug(struct Application* app, int flag) {
|
||||
}
|
||||
void SetBindings(struct Application* app, const char *bindings) {
|
||||
}
|
||||
void ExecJS(struct Application* app, const char *script) {
|
||||
}
|
||||
void Hide(struct Application* app) {
|
||||
}
|
||||
void Show(struct Application* app) {
|
||||
}
|
||||
void Center(struct Application* app) {
|
||||
}
|
||||
void Maximise(struct Application* app) {
|
||||
}
|
||||
void Unmaximise(struct Application* app) {
|
||||
}
|
||||
void ToggleMaximise(struct Application* app) {
|
||||
}
|
||||
void Minimise(struct Application* app) {
|
||||
}
|
||||
void Unminimise(struct Application* app) {
|
||||
}
|
||||
void ToggleMinimise(struct Application* app) {
|
||||
}
|
||||
void SetColour(struct Application* app, int red, int green, int blue, int alpha) {
|
||||
}
|
||||
void SetSize(struct Application* app, int width, int height) {
|
||||
}
|
||||
void SetPosition(struct Application* app, int x, int y) {
|
||||
}
|
||||
void Quit(struct Application* app) {
|
||||
}
|
||||
void SetTitle(struct Application* app, const char *title) {
|
||||
}
|
||||
void Fullscreen(struct Application* app) {
|
||||
}
|
||||
void UnFullscreen(struct Application* app) {
|
||||
}
|
||||
void ToggleFullscreen(struct Application* app) {
|
||||
}
|
||||
void DisableFrame(struct Application* app) {
|
||||
}
|
||||
void OpenDialog(struct Application* app, char *callbackID, char *title, char *filters, char *defaultFilename, char *defaultDir, int allowFiles, int allowDirs, int allowMultiple, int showHiddenFiles, int canCreateDirectories, int resolvesAliases, int treatPackagesAsDirectories) {
|
||||
}
|
||||
void SaveDialog(struct Application* app, char *callbackID, char *title, char *filters, char *defaultFilename, char *defaultDir, int showHiddenFiles, int canCreateDirectories, int treatPackagesAsDirectories) {
|
||||
}
|
||||
void MessageDialog(struct Application* app, char *callbackID, char *type, char *title, char *message, char *icon, char *button1, char *button2, char *button3, char *button4, char *defaultButton, char *cancelButton) {
|
||||
}
|
||||
void DarkModeEnabled(struct Application* app, char *callbackID) {
|
||||
}
|
||||
void SetApplicationMenu(struct Application* app, const char *applicationMenuJSON) {
|
||||
}
|
||||
void AddTrayMenu(struct Application* app, const char *menuTrayJSON) {
|
||||
}
|
||||
void SetTrayMenu(struct Application* app, const char *menuTrayJSON) {
|
||||
}
|
||||
void DeleteTrayMenuByID(struct Application* app, const char *id) {
|
||||
}
|
||||
void UpdateTrayMenuLabel(struct Application* app, const char* JSON) {
|
||||
}
|
||||
void AddContextMenu(struct Application* app, char *contextMenuJSON) {
|
||||
}
|
||||
void UpdateContextMenu(struct Application* app, char *contextMenuJSON) {
|
||||
}
|
||||
14
v2/internal/ffenestri/ffenestri_windows.go
Normal file
14
v2/internal/ffenestri/ffenestri_windows.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package ffenestri
|
||||
|
||||
/*
|
||||
|
||||
#include "ffenestri.h"
|
||||
#include "ffenestri_windows.h"
|
||||
|
||||
*/
|
||||
import "C"
|
||||
|
||||
func (a *Application) processPlatformSettings() error {
|
||||
|
||||
return nil
|
||||
}
|
||||
5
v2/internal/ffenestri/ffenestri_windows.h
Normal file
5
v2/internal/ffenestri/ffenestri_windows.h
Normal file
@@ -0,0 +1,5 @@
|
||||
|
||||
#ifndef _FFENESTRI_WINDOWS_
|
||||
#define _FFENESTRI_WINDOWS_
|
||||
|
||||
#endif
|
||||
@@ -12,10 +12,5 @@ func (i *Info) discover() error {
|
||||
return err
|
||||
}
|
||||
i.OS = osinfo
|
||||
|
||||
// dll := syscall.MustLoadDLL("kernel32.dll")
|
||||
// p := dll.MustFindProc("GetVersion")
|
||||
// v, _, _ := p.Call()
|
||||
// fmt.Printf("Windows version %d.%d (Build %d)\n", byte(v), uint8(v>>8), uint16(v>>16))
|
||||
return nil
|
||||
}
|
||||
|
||||
@@ -59,9 +59,9 @@ func Build(options *Options) (string, error) {
|
||||
}
|
||||
|
||||
// Check platform
|
||||
validPlatforms := slicer.String([]string{"linux", "darwin"})
|
||||
validPlatforms := slicer.String([]string{"linux", "darwin", "windows"})
|
||||
if !validPlatforms.Contains(options.Platform) {
|
||||
return "", fmt.Errorf("platform %s not supported", options.Platform)
|
||||
return "", fmt.Errorf("platform %s is not supported", options.Platform)
|
||||
}
|
||||
|
||||
// Load project
|
||||
|
||||
Reference in New Issue
Block a user