Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Monday, March 2, 2026

imgui cross compiled

tp compile glew  

export TRIPLET=x86_64-w64-mingw32
export PREFIX=$HOME/cross/$TRIPLET

make distclean 2>/dev/null || true

make -j SYSTEM=mingw \
  CC=$TRIPLET-gcc LD=$TRIPLET-gcc \
  AR=$TRIPLET-ar RANLIB=$TRIPLET-ranlib STRIP=$TRIPLET-strip \
  glew.lib glew.dll
 

sudo make SYSTEM=mingw \
  CC=x86_64-w64-mingw32-gcc LD=x86_64-w64-mingw32-gcc \
  GLEW_DEST=/usr/x86_64-w64-mingw32 \
  LIBDIR=/usr/x86_64-w64-mingw32/lib \
  INSTALL_BIN_DIR=/usr/x86_64-w64-mingw32/bin \
  INSTALL_LIB_DIR=/usr/x86_64-w64-mingw32/lib \
  INSTALL_INC_DIR=/usr/x86_64-w64-mingw32/include \
  install
 

to compile glfw-3.4 

export TRIPLET=x86_64-w64-mingw32
export PREFIX=/usr/$TRIPLET

cmake -S . -B build-mingw \
  -DCMAKE_SYSTEM_NAME=Windows \
  -DCMAKE_C_COMPILER=x86_64-w64-mingw32-gcc \
  -DCMAKE_CXX_COMPILER=x86_64-w64-mingw32-g++ \
  -DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32 \
  -DBUILD_SHARED_LIBS=ON \
  -DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF

cmake --build build-mingw
sudo cmake --install build-mingw

to compile imgui

#=============================================================================
# Windows Cross-Compilation Configuration (MinGW)
#=============================================================================

WIN_CXX = x86_64-w64-mingw32-g++
WIN_WINDRES = x86_64-w64-mingw32-windres

WIN_CXXFLAGS = -std=c++17 -Wall -Wextra -O2 -DWIN32 -D_WIN32 -DUNICODE -D_UNICODE
# WIN_CXXFLAGS += -D__REQUIRED_RPCNDR_H_VERSION__=475
WIN_CXXFLAGS += -I. -Iimgui -Iimgui/backends

# Windows libraries (WPD + OpenGL + GLFW)
WIN_LDFLAGS = -static-libgcc -static-libstdc++ -mconsole
WIN_LIBS = -lole32 -loleaut32 -luuid -lpropsys
WIN_LIBS +=  -L/usr/x86_64-w64-mingw32/lib -lglfw3dll -lopengl32 -lgdi32 -lglew32

WIN_OBJECTS = $(addprefix $(WIN_BUILD_DIR)/, $(WIN_SOURCES:.cpp=.win.o))
WIN_IMGUI_OBJECTS = $(addprefix $(WIN_BUILD_DIR)/, $(IMGUI_SOURCES:.cpp=.win.o))

WIN_TARGET = hello.exe

 

 # Link (Windows)
$(WIN_TARGET): $(WIN_OBJECTS) $(WIN_IMGUI_OBJECTS)
    $(WIN_CXX) $^ -o $@ $(WIN_LDFLAGS) $(WIN_LIBS)

# Compile application sources (Windows)
$(WIN_BUILD_DIR)/%.win.o: %.cpp
    @mkdir -p $(WIN_BUILD_DIR)
    $(WIN_CXX) $(WIN_CXXFLAGS) -c $< -o $@

# Compile ImGui sources (Windows)
$(WIN_BUILD_DIR)/$(IMGUI_DIR)/%.win.o: $(IMGUI_DIR)/%.cpp
    @mkdir -p $(WIN_BUILD_DIR)/$(IMGUI_DIR)
    $(WIN_CXX) $(WIN_CXXFLAGS) -c $< -o $@

$(WIN_BUILD_DIR)/$(IMGUI_DIR)/backends/%.win.o: $(IMGUI_DIR)/backends/%.cpp
    @mkdir -p $(WIN_BUILD_DIR)/$(IMGUI_DIR)/backends
    $(WIN_CXX) $(WIN_CXXFLAGS) -c $< -o $@

Tuesday, May 28, 2024

convert ccd to chd

 install virtual clone drive and mount the cd

https://www.elby.ch/en/products/vcd.html

install exact audio copy

https://www.exactaudiocopy.de/en/index.php/resources/download/

in c:\Program Files (x86)\Exact Audio Copy\CDRDAO>

cdrdao.exe read-cd --device 2,0,0 --read-raw --read-subchan rw_raw myfile.toc

and then 

chdman createcd -i myfile.toc -o myfile.chd


==LINUX==

install cdemu:

sudo add-apt-repository ppa:cdemu/ppa

sudo apt update

sudo apt install cdemu-client cdemu-daemon gcdemu

gcdemu
(a tray icon appears)

cdrdao read-cd --device /dev/sr0 --read-raw --read-subchan rw_raw file.toc

chdman createcd -i file.toc -o file.chd



Sunday, September 25, 2016

Windows password

To change the password policy (pwd length, pwd expiration period)
run secpol.msc
navigate to account policy / password policy

To unlock a locked out user
run lusrmgr.msc
double click the user
untick the lock


Monday, May 16, 2016

cygwin change locale

right click, options, text and set the locale

source: https://cygwin.com/cygwin-ug-net/setup-locale.html

Tuesday, September 22, 2015

Vmware with physical partition under windows

if you get the error Operation on file "\\.\PhysicalDrive1" failed 
then you need to get the disk offline
from a prompt  launch diskpart
and then 
DISKPART > select disk 1
DISKPART > offline disk 


sources:
http://www.experts-exchange.com/Software/VMWare/Q_26689536.html
https://social.technet.microsoft.com/Forums/windowsserver/en-US/48ea44b0-9962-49e3-95a1-568275851753/take-a-hdd-offlineonline?forum=winserverpowershell

Thursday, May 8, 2014

Altera-DE0

LINUX


if you get error


Error (209053): Unexpected error in JTAG server -- error code 89
Error (209012): Operation failed


add the file /etc/udev/rules.d/98-altera.rules with the following content


# USB-Blaster

SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6001", MODE="0666", SYMLINK+="usbblaster/%k"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6002", MODE="0666", SYMLINK+="usbblaster/%k"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6003", MODE="0666", SYMLINK+="usbblaster/%k"


# USB-Blaster II
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6010", MODE="0666", SYMLINK+="usbblaster2/%k"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTRS{idVendor}=="09fb", ATTRS{idProduct}=="6810", MODE="0666", SYMLINK+="usbblaster2/%k"

source: http://www.alteraforum.com/forum/showthread.php?t=41657


WINDOWS
if panel gives errors for the DLL

"Load DLL (TERASIC_JTAG_DRIVE.dll) fail"

"Fail to connect to FPGA board"

add the bin directory of the quartus software to the system path (control panel)

source: http://www.alteraforum.com/forum/showthread.php?t=24461

Tuesday, November 27, 2012